Zebra/zebra-consensus/src
Arya 571cbfba7a
change(state): Stop re-downloading blocks that are in non-finalized side chains (#6335)
* Adds 'Contains' request in state, and:

- adds finalized block hashes to sent_blocks

- replaces Depth call with Contains in sync, inbound, and block verifier

* removes unnecessary From impl

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* updates references to Request::Contains

* Renames zs::response::BlockLocation to KnownBlocks

* Updates AlreadyInChain error

* update docs for sent_hashes.add_finalized

* Update zebra-consensus/src/block.rs

Co-authored-by: teor <teor@riseup.net>

* Update comment for `sent_blocks` field in state service

* update KnownBlock request to check the non-finalized state before responding that a block is in the queue

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* update references to renamed method

* Clear sent_blocks when there's a reset

* Move self.finalized_block_write_sender.is_none() to can_fork_chain_at

* revert changes related to checking queue

---------

Co-authored-by: teor <teor@riseup.net>
2023-03-24 07:10:07 +00:00
..
block feat(rpc): Implement the `getblocksubsidy` RPC (#6032) 2023-01-31 20:41:34 +00:00
chain change(rpc): Add proposal capability to getblocktemplate (#5870) 2023-01-11 23:39:51 +00:00
checkpoint Suggest making sure the RPC endpoint is enabled for checkpointing (#6375) 2023-03-24 07:09:37 +00:00
parameters feat(rpc): Implement the `getblocksubsidy` RPC (#6032) 2023-01-31 20:41:34 +00:00
primitives disable test (#6285) 2023-03-09 21:24:52 +00:00
transaction refactor(state): Simplify difficulty and median-time-past state and mempool requests (#6031) 2023-01-31 20:42:11 +00:00
block.rs change(state): Stop re-downloading blocks that are in non-finalized side chains (#6335) 2023-03-24 07:10:07 +00:00
chain.rs fix(consensus): Check that Zebra's state contains the social consensus chain on startup (#6163) 2023-02-21 05:30:29 +00:00
checkpoint.rs change(deps): Remove unused zebra-utils dependencies (#5961) 2023-01-16 21:39:47 +00:00
config.rs fix(consensus): Check that Zebra's state contains the social consensus chain on startup (#6163) 2023-02-21 05:30:29 +00:00
error.rs change(state): Stop re-downloading blocks that are in non-finalized side chains (#6335) 2023-03-24 07:10:07 +00:00
lib.rs fix(consensus): Check that Zebra's state contains the social consensus chain on startup (#6163) 2023-02-21 05:30:29 +00:00
parameters.rs Remove duplicate and redundant consensus parameter code (#4760) 2022-07-22 16:33:26 +00:00
primitives.rs fix(batch): Improve batch verifier async, correctness, and performance (#4750) 2022-07-18 08:41:18 +10:00
script.rs refactor: address comments from #3415: Prepare for changes in ZIP-244 (#3446) 2022-02-01 06:24:08 +00:00
transaction.rs use `reddsa` crate and remove duplicated RedPallas code (#6013) 2023-02-01 23:27:28 +00:00