Skip to content

fix(zakura): allow four unproven block probes#436

Closed
evan-forbes wants to merge 2 commits into
ironwood-mainfrom
evan/zakura-single-peer-wedge
Closed

fix(zakura): allow four unproven block probes#436
evan-forbes wants to merge 2 commits into
ironwood-mainfrom
evan/zakura-single-peer-wedge

Conversation

@evan-forbes

@evan-forbes evan-forbes commented Jul 3, 2026

Copy link
Copy Markdown

Motivation

Split out of #435.

An unproven Zakura block-sync peer currently gets only one GetBlocks probe before it must deliver an accepted body to receive more work. That is too brittle for a single-peer sync path: one lost/delayed initial response can leave the peer capped until the no-progress liveness deadline disconnects it.

Regtest also needed a shorter body-sync stall watchdog so a stalled node reaches the fallback within the e2e test budget.

No linked issue.

Solution

  • Shorten the Zakura body-sync stall watchdog on regtest.
  • Raise the default unproven peer probe cap from one GetBlocks request to four.
  • Keep the existing proof rule: a peer is still unproven until it delivers an accepted body.
  • Keep the existing liveness rule: a peer that never serves bodies is still disconnected by the normal no-progress deadline.
  • Add focused coverage that the default permits four unproven probes and still disconnects a silent peer.
  • Add the changelog entry for the single-peer wedge fix.

Tests

  • cargo fmt --all -- --check
  • cargo test -p zebra-network block_liveness
  • GitHub PR checks are passing as of 2026-07-03, including Unit Tests, Lint, Docs Check, Test Crate Build, Test Docker Config, and Zakura E2E.

Specifications & References

Follow-up Work

None planned.

AI Disclosure

PR Checklist

  • The PR title follows conventional commits format: type(scope): description
  • The PR follows the contribution guidelines.
  • This change was discussed in an issue or with the team beforehand.
  • The solution is tested.
  • The documentation and changelogs are up to date.

@evan-forbes
evan-forbes force-pushed the evan/zakura-single-peer-wedge branch 3 times, most recently from cb49fac to 3856df1 Compare July 3, 2026 17:14
@evan-forbes evan-forbes changed the title fix(sync): keep Zakura probing during external progress fix(zakura): allow two unproven block probes Jul 3, 2026
@evan-forbes
evan-forbes force-pushed the evan/zakura-single-peer-wedge branch from 3856df1 to f2c98ef Compare July 3, 2026 17:21
@evan-forbes evan-forbes changed the title fix(zakura): allow two unproven block probes fix(zakura): allow four unproven block probes Jul 3, 2026
const BLOCK_PROGRESS_TIMEOUT_REQUESTS: u32 = 4;
/// Default `GetBlocks` probes sent to a new peer before it proves block-body progress.
pub const DEFAULT_BS_INITIAL_BLOCK_PROBE_REQUESTS: u32 = 1;
pub const DEFAULT_BS_INITIAL_BLOCK_PROBE_REQUESTS: u32 = 4;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noticed a comment from @p0mvn who was debugging a flakey test

this is in a similar vein to #432, where we're hacking around the problem for now.

why the messages we're sending are not working the way we think they are working is tbd.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #441 where we're gathering more info to debug fully

@evan-forbes
evan-forbes force-pushed the evan/zakura-single-peer-wedge branch from f2c98ef to 2ef9f0c Compare July 3, 2026 17:32
@evan-forbes
evan-forbes force-pushed the evan/zakura-single-peer-wedge branch from 2ef9f0c to 5a0333b Compare July 3, 2026 17:36
@evan-forbes
evan-forbes marked this pull request as ready for review July 3, 2026 18:18
@evan-forbes

Copy link
Copy Markdown
Author

closing for now

@evan-forbes evan-forbes closed this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant