-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change(rpc): Adds a TrustedChainSync struct for keeping up with Zebra…
…'s non-finalized best chain from a separate process (#8596) * Adds an init_read_only() fn in zebra-state * moves elasticsearch initialization to `FinalizedState::new_with_debug()` * Updates callers of `FinalizedState::{new, new_with_debug}` to pass a bool to try enabling elasticsearch * Adds a non-finalized read state syncer to zebra-rpc * moves, removes, updates, or addresses TODOs * reduces disk IO while waiting for the a new chain tip & updates the chain tip sender when the finalized tip has changed. * Returns boxed errors from RpcRequestClient methods instead of color_eyre type * Avoids resetting the non-finalized state when there's an error getting a block unless it has the missing block error code. * Adds stub for acceptance test(s) and removes outdated TODO * adds TODOs for testing * Tests that `ChainTipChange` is updated when the non-finalized best chain grows * adds a last_chain_tip_hash and uses a FuturesOrdered for getblock requests * Fixes a pre-flush sync issue by using a secondary db instead of a read-only db * Moves disk IO to blocking tasks * Updates acceptance test to how forks are handled * Checks synced read state for all of the expected blocks * checks that there isn't a tip change until the best chain changes * checks for chain tip changes in test * run test without feature * fixes lint * Fixes compilation/test issues * Adds docs / comments, moves HexData out from behind the getblocktemplate-rpcs feature flag, moves test behind the mining feature flag. * Fixes lints * removes syncer and rpc-syncer features * Fixes test on Windows, applies suggestions from code review * Updates `POLL_DELAY` documentation * Updates method docs * Fixes a test bug * use rpc-client feature in zebrad production code * use rpc-client feature in zebra-node-services for building zebra-rpc crate --------- Co-authored-by: Pili Guerra <[email protected]> Co-authored-by: Alfredo Garcia <[email protected]>
- Loading branch information
1 parent
2419e8a
commit 4213e82
Showing
20 changed files
with
852 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ pub mod constants; | |
pub mod methods; | ||
pub mod queue; | ||
pub mod server; | ||
pub mod sync; | ||
|
||
#[cfg(test)] | ||
mod tests; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
zebra-rpc/src/methods/get_block_template_rpcs/types/get_block_template/parameters.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.