-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change(deps): Remove unused zebra-utils dependencies (#5961)
* Remove unused zebra-utils dependencies * Cleanup zebra-checkpoints
- Loading branch information
Showing
9 changed files
with
64 additions
and
50 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//! Constants shared by some Zebra node services. | ||
/// We limit the maximum number of blocks in each checkpoint. Each block uses a | ||
/// constant amount of memory for the supporting data structures and futures. | ||
/// | ||
/// We choose a checkpoint gap that allows us to verify one checkpoint for | ||
/// every `ObtainTips` or `ExtendTips` response. | ||
/// | ||
/// `zcashd`'s maximum `FindBlocks` response size is 500 hashes. `zebrad` uses | ||
/// 1 hash to verify the tip, and discards 1-2 hashes to work around `zcashd` | ||
/// bugs. So the most efficient gap is slightly less than 500 blocks. | ||
pub const MAX_CHECKPOINT_HEIGHT_GAP: usize = 400; | ||
|
||
/// We limit the memory usage and download contention for each checkpoint, | ||
/// based on the cumulative size of the serialized blocks in the chain. | ||
/// | ||
/// Deserialized blocks (in memory) are slightly larger than serialized blocks | ||
/// (on the network or disk). But they should be within a constant factor of the | ||
/// serialized size. | ||
pub const MAX_CHECKPOINT_BYTE_COUNT: u64 = 32 * 1024 * 1024; |
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
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