bch(M5): handshake-gated auto-getheaders kick — embedded header-sync self-start - #240
Merged
Conversation
…self-start The verack handler now self-issues the initial getheaders from the HeaderChain back-off locator when armed, so the embedded P2P node drives IBD without an external getheaders poll. Production run() arms it in maybe_start_p2p() (gated on a configured peer); the no-peer/RPC-only contract and the BCHN-RPC fallback are untouched. Off by default so the --ibd evidence harness and manual-drive tests keep prior behaviour. Adds --auto-kick to the --ibd harness: arms the self-start and skips the manual ibd_kick_sync poll. Live VM300 .110:8333 read-only proof — handshake -> AUTO getheaders self-started, synced 955700->956034 (peer tip, advanced), in_flight drained 0, false_evict=0, reissue=0, ABLA cursor 955700->956034. p2pool-merged-v36 surface: NONE (local SPV wire-sync transport only).
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.
Summary
The embedded BCH P2P node now self-starts header sync at handshake. The verack handler self-issues the initial getheaders from the HeaderChain back-off locator when armed, so production run() drives IBD without an external getheaders poll.
Off by default: the --ibd evidence harness and manual-drive tests keep prior behaviour; no-peer/RPC-only contract and the BCHN-RPC fallback are untouched.
Verification
Scope
p2pool-merged-v36 surface: NONE (local SPV wire-sync transport only). src/impl/bch + harness only. VM300 read-only (P2P connect issues no qm op). Merge operator-gated.