feat(#109): seed boot anchor from ChainExchange peers under --no-fallback-rpc#111
Open
Reiers wants to merge 2 commits into
Open
feat(#109): seed boot anchor from ChainExchange peers under --no-fallback-rpc#111Reiers wants to merge 2 commits into
Reiers wants to merge 2 commits into
Conversation
…back-rpc The bridge-off boot anchor seed previously fetched the anchor tipset via a bitswap-only source. On calibration (and any network without a same-network gateway) this fails: bitswap has no peers serving that historical block and gateway.lantern.reiers.io is mainnet-only. So a --no-fallback-rpc cold boot could never seed and fell over. Wire the #91 ChainExchange client (PR #110) into the seed path: - construct the client on the libp2p host alongside the responder - seed the anchor tipset via FetchTipsetChain(anchorCids, 1): headers only, CID-verified against the multi-source quorum anchor (a peer can only refuse, never splice - verifyChain requires Chain[0]==anchor CIDs) - bounded wait (-seed-peer-wait, default 120s) for peers to connect + advertise /fil/chain/xchg/0.0.1; fail loud on timeout, never silently fall back to a gateway/RPC in bridge-off mode - also SetChainFetcher on the gossip ingestor so runtime parent-walk gap backfill prefers peer-sourced headers over the per-CID bitswap walk Gateway-free, Glif-free boot: calibration/mainnet Lotus + Forest peers already serve the standard ChainExchange protocol. Closes #109. build+vet+gofmt clean; net/... + cmd/... suites green; linux/amd64 cross-build ok.
…>tip gaps A single FetchTipsetChain is capped at MaxRequestLength (900) tipsets, so the previous one-shot chainExchangeBackfill could not bridge a stale quorum anchor thousands of epochs behind live head: it fetched only the top 900, tried to install a non-contiguous chunk, and failed (backfillFail). Snapshot-free boot inherently means bridging a large anchor->tip gap, so loop the request in <=900 chunks, rooting each at the previous batch's oldest tipset's parents, until the store head is reached; then install the whole gap oldest-first so the head walks up contiguously. Bounded by maxBackfillTipsets (20k) and a no-progress guard against a misbehaving peer. Every level stays CID-verified by the client. Validated live on calibration: bridge-off Light boot seeded the anchor from chainxchg peers (gateway-free, Glif-free) then this closes the gap to live head. build+vet+gofmt clean; net/blockingest + net/chainxchg tests green; linux/amd64 cross-build ok.
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.
What
Closes #109. Wires the #91 ChainExchange client (PR #110) into the bridge-off boot-anchor seed path so a
--no-fallback-rpcnode boots with zero gateway, zero Glif.Why
The bridge-off seed previously fetched the anchor tipset via a bitswap-only source. On calibration (and any network without a same-network gateway) that deterministically fails:
gateway.lantern.reiers.iois mainnet-only (mainnet beacon +lantern-census --network mainnetupstreams) → every calibration CID returnsMISS … not found in any upstream.So a calibration
--no-fallback-rpccold boot could never seed the anchor (bridge-off seed: fetch anchor block … via bitswap) and fell over — the blocker behind the stalled #104 Phase 1.How
FetchTipsetChain(anchorCids, 1)— headers only, CID-verified against the multi-source quorum anchor. A peer can only refuse, never splice (client requiresChain[0] == anchor CIDs);-seed-peer-wait, default 120s) for peers to connect + advertise/fil/chain/xchg/0.0.1; fail loud on timeout — never silently fall back to a gateway/RPC in bridge-off mode;SetChainFetcheron the gossip ingestor so runtime parent-walk gap backfill prefers peer-sourced headers over the per-CID bitswap walk.Calibration/mainnet Lotus + Forest peers already serve the standard ChainExchange protocol, so this is a genuine gateway-free path — the whole point of the bridge-off thesis.
Test
go build/vet/gofmtclean;net/...+cmd/...suites green; linux/amd64 cross-build ok.Stacks on
feat/91-chainxchg-client(#110).