forked from ZcashFoundation/zebra
-
Notifications
You must be signed in to change notification settings - Fork 2
fix(network): tune block sync throughput defaults #289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
p0mvn
merged 7 commits into
feat/pre-release-main
from
review/blocksync-throughput-defaults
Jun 27, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cb8b994
perf(network): retain raw block bodies in reorder backlog
evan-forbes 00fe3fd
fix(network): prioritize block sync floor requests
evan-forbes a7e79f3
fix(network): add block sync congestion control
evan-forbes 8b47dd3
fix(network): tune block sync throughput defaults
evan-forbes cc9ea76
fix(zebrad): restore disable_vct_fast_sync in v5.0.0-rc.4.toml golden…
evan-forbes 40ad1a1
Merge branch 'feat/pre-release-main' into review/blocksync-throughput…
p0mvn 7db61d7
merge conflicts
p0mvn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,169 @@ | ||
| # Default configuration for zebrad. | ||
| # | ||
| # This file can be used as a skeleton for custom configs. | ||
| # | ||
| # Unspecified fields use default values. Optional fields are Some(field) if the | ||
| # field is present and None if it is absent. | ||
| # | ||
| # This file is generated as an example using zebrad's current defaults. | ||
| # You should set only the config options you want to keep, and delete the rest. | ||
| # Only a subset of fields are present in the skeleton, since optional values | ||
| # whose default is None are omitted. | ||
| # | ||
| # The config format (including a complete list of sections and fields) is | ||
| # documented here: | ||
| # https://docs.rs/zebrad/latest/zebrad/config/struct.ZebradConfig.html | ||
| # | ||
| # CONFIGURATION SOURCES (in order of precedence, highest to lowest): | ||
| # | ||
| # 1. Environment variables with ZEBRA_ prefix (highest precedence) | ||
| # - Format: ZEBRA_SECTION__KEY (double underscore for nested keys) | ||
| # - Examples: | ||
| # - ZEBRA_NETWORK__NETWORK=Testnet | ||
| # - ZEBRA_RPC__LISTEN_ADDR=127.0.0.1:8232 | ||
| # - ZEBRA_STATE__CACHE_DIR=/path/to/cache | ||
| # - ZEBRA_TRACING__FILTER=debug | ||
| # - ZEBRA_METRICS__ENDPOINT_ADDR=0.0.0.0:9999 | ||
| # | ||
| # 2. Configuration file (TOML format) | ||
| # - At the path specified via -c flag, e.g. `zebrad -c myconfig.toml start`, or | ||
| # - At the default path in the user's preference directory (platform-dependent, see below) | ||
| # | ||
| # 3. Hard-coded defaults (lowest precedence) | ||
| # | ||
| # The user's preference directory and the default path to the `zebrad` config are platform dependent, | ||
| # based on `dirs::preference_dir`, see https://docs.rs/dirs/latest/dirs/fn.preference_dir.html : | ||
| # | ||
| # | Platform | Value | Example | | ||
| # | -------- | ------------------------------------- | ---------------------------------------------- | | ||
| # | Linux | `$XDG_CONFIG_HOME` or `$HOME/.config` | `/home/alice/.config/zebrad.toml` | | ||
| # | macOS | `$HOME/Library/Preferences` | `/Users/Alice/Library/Preferences/zebrad.toml` | | ||
| # | Windows | `{FOLDERID_RoamingAppData}` | `C:\Users\Alice\AppData\Local\zebrad.toml` | | ||
|
|
||
| [consensus] | ||
| checkpoint_sync = true | ||
| disable_vct_fast_sync = false | ||
|
|
||
| [health] | ||
| enforce_on_test_networks = false | ||
| min_connected_peers = 1 | ||
| ready_max_blocks_behind = 2 | ||
| ready_max_tip_age = "5m" | ||
|
|
||
| [mempool] | ||
| eviction_memory_time = "1h" | ||
| max_datacarrier_bytes = 83 | ||
| tx_cost_limit = 80000000 | ||
|
|
||
| [metrics] | ||
|
|
||
| [mining] | ||
| internal_miner = false | ||
|
|
||
| [network] | ||
| cache_dir = true | ||
| crawl_new_peer_interval = "1m 1s" | ||
| initial_mainnet_peers = [ | ||
| "dnsseed.str4d.xyz:8233", | ||
| "dnsseed.z.cash:8233", | ||
| "mainnet.seeder.shieldedinfra.net:8233", | ||
| "mainnet.seeder.zfnd.org:8233", | ||
| ] | ||
| initial_testnet_peers = [ | ||
| "dnsseed.testnet.z.cash:18233", | ||
| "testnet.seeder.zfnd.org:18233", | ||
| ] | ||
| legacy_p2p = true | ||
| listen_addr = "[::]:8233" | ||
| max_connections_per_ip = 1 | ||
| network = "Mainnet" | ||
| peerset_initial_target_size = 100 | ||
| v2_p2p = true | ||
|
|
||
| [network.zakura] | ||
| bootstrap_peers = [] | ||
| listen_addr = "0.0.0.0:8234" | ||
| max_connections = 256 | ||
| max_pending_handshakes = 32 | ||
| message_rate_per_second = 2048 | ||
| stream_open_rate_per_second = 32 | ||
|
|
||
| [network.zakura.block_sync] | ||
| fanout = 1 | ||
| floor_peer_avoid_cooldown = "8s" | ||
| floor_watchdog_tick = "1s" | ||
| initial_inflight_requests = 64 | ||
| max_blocks_per_response = 1 | ||
| max_inflight_block_bytes = 6442450944 | ||
| max_inflight_requests = 32000 | ||
| max_reorder_lookahead_blocks = 4096 | ||
| max_reorder_lookahead_bytes = 6408896512 | ||
| max_response_bytes = 33554432 | ||
| max_submitted_block_applies = 400 | ||
| request_timeout = "8s" | ||
| size_deviation_tolerance = 200 | ||
| status_refresh_interval = "30s" | ||
|
|
||
| [network.zakura.block_sync.peer_limits] | ||
| inbound_queue_depth = 128 | ||
| max_inbound_peers = 256 | ||
| max_outbound_peers = 256 | ||
| max_pending_escalations = 32 | ||
| outbound_queue_depth = 128 | ||
|
|
||
| [network.zakura.header_sync] | ||
| accept_new_blocks = true | ||
| max_headers_per_response = 1000 | ||
| max_inflight_requests = 10 | ||
| status_refresh_interval = "30s" | ||
|
|
||
| [network.zakura.header_sync.peer_limits] | ||
| inbound_queue_depth = 128 | ||
| max_inbound_peers = 256 | ||
| max_outbound_peers = 256 | ||
| max_pending_escalations = 32 | ||
| outbound_queue_depth = 128 | ||
|
|
||
| [rpc] | ||
| cookie_dir = "cache_dir" | ||
| cookie_file_name = ".cookie" | ||
| debug_force_finished_sync = false | ||
| enable_cookie_auth = true | ||
| max_response_body_size = 52428800 | ||
| parallel_cpu_threads = 0 | ||
|
|
||
| [state] | ||
| cache_dir = "cache_dir" | ||
| debug_skip_non_finalized_state_backup_task = false | ||
| delete_old_database = true | ||
| ephemeral = false | ||
| should_backup_non_finalized_state = true | ||
| storage_mode = "archive" | ||
|
|
||
| [sync] | ||
| checkpoint_verify_concurrency_limit = 1000 | ||
| download_concurrency_limit = 100 | ||
| full_verify_concurrency_limit = 20 | ||
| parallel_cpu_threads = 0 | ||
| zakura_block_apply_concurrency_limit = 32 | ||
|
|
||
| [tracing] | ||
| buffer_limit = 128000 | ||
| force_use_color = false | ||
| use_color = true | ||
| use_journald = false | ||
|
|
||
| [zcashd_compat] | ||
| cookie_dir = "cache_dir" | ||
| cookie_file_name = ".zcashd-compat.cookie" | ||
| enable_cookie_auth = true | ||
| enabled = false | ||
| manage_zcashd = false | ||
| restart_backoff = "2s" | ||
| restart_backoff_max = "5m" | ||
| restart_reset_after = "1h" | ||
| shutdown_grace_period = "5m" | ||
| startup_delay = "1s" | ||
| unsafe_allow_remote_http = false | ||
| zcashd_extra_args = [] | ||
| zcashd_source = "path" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems fine for the test failure, but ofc I have less context here
also in a future pr, we could change this to avoid a double negative I think. we could just have the default be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to add this to the flups at the end if reviewers agree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm