fix(network): clamp max_inflight_block_bytes up to the checkpoint floor#297
Merged
p0mvn merged 1 commit intoJun 28, 2026
Conversation
p0mvn
approved these changes
Jun 28, 2026
072d12e
into
codex/block-sync-checkpoint-byte-floor-pr
6 checks passed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
#292 enforces a checkpoint-safe block apply and byte budget floor. Older Zakura configs can still contain a positive
zakura.block_sync.max_inflight_block_bytesbelow that checkpoint-range floor, which would make zebrad reject the config at startup.Solution
Clamp positive below-floor
max_inflight_block_bytesvalues up toBS_CHECKPOINT_RANGE_BYTE_FLOORduring config deserialization, with a warning. Zero remains invalid and is still rejected by validation.This PR is intentionally stacked on #292 and contains only the config compatibility clamp.
Tests
Passed locally on
codex/block-sync-checkpoint-byte-clamp:cargo fmt --all -- --checkcargo test -p zebra-network block_sync_config_defaults_and_round_trips --libcargo test -p zebra-network config_ --lib(12 passed, includingconfig_clamps_below_floor_inflight_block_bytes,config_deserialize_clamps_below_floor_inflight_block_bytes, and zero-invalid validation coverage)AI Disclosure
PR Checklist
type(scope): description