[kyoto-hardening] resolve chain checkpoint from start_height#561
Closed
0xsiddharthks wants to merge 2 commits into
Closed
[kyoto-hardening] resolve chain checkpoint from start_height#5610xsiddharthks wants to merge 2 commits into
0xsiddharthks wants to merge 2 commits into
Conversation
When the trusted bitcoind peer blips, every Kyoto BIP-157 client across the fleet reconnects on the same fixed 5s timer, creating a thundering herd that overwhelms the peer and cascades into more disconnects. Replace the constant 5s sleep with a base + uniform random jitter in [0, 30s]. Each pod picks an independent restart instant, spreading the reconnect load across the upstream node.
4fa2ee2 to
36057ee
Compare
Kyoto seeds its header / compact-filter sync from a HeaderCheckpoint. We had two hard-coded mainnet activation checkpoints and a genesis fallback for everything else, so signet / testnet pods re-walked ~300k headers on every rebuild. Combined with the supervisor restart loop, that meant each Kyoto bounce cost several minutes of catch-up before deposits could be confirmed again. Resolve the checkpoint once at monitor startup: keep the mainnet activation fast-path, otherwise call bitcoind getblockhash(start_height) and use that as the checkpoint. Store the result on the Monitor so the supervision loop reuses it across rebuilds without re-RPC.
a221357 to
d89401f
Compare
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.
Kyoto seeds its header / compact-filter sync from a
HeaderCheckpoint. The old code had two hard-coded mainnet activation checkpoints and a genesis fallback for everything else, so signet / testnet pods re-walked ~300k headers on every Kyoto rebuild.Resolve the checkpoint once at monitor startup: keep the mainnet activation fast-path, otherwise call bitcoind
getblockhash(start_height)and use that as the checkpoint. Store the result on theMonitorso the supervision loop reuses it across rebuilds without re-RPC.Stacked on #560 (jitter).