Repository navigation
fix: mainnet bootstrap works out of the box (refresh peers from lotus v1.38.3, operator-aware quorum) - #176
Merged
Merged
Conversation
… v1.38.3, operator-aware quorum) F10: count distinct operators (default 3) with zero conflicting answers, fold glif.io onto chain.love, refresh bootstrap peers from lotus v1.38.3 with /dnsaddr resolution, add Filfox/Ankr RPC sources, send a lantern User-Agent, print operator-aware failure hints. F11: the daemon refuses to boot without an init-written anchor unless --allow-rpc-anchor; a stale F3 cert is ignored in the EC anchor fallback, which now compares independent operators at a common epoch.
…-quorum # Conflicts: # README.md # cmd/lantern/main.go
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.
Problem (F10)
On a fresh machine,
lantern init --filecoin-network mainneton main (ecf21fa) fails out of the box:Reproduced live from the Mac mini today with the ecf21fa binary (exit 1). Of the 7 libp2p sources, devtty.eu was listed twice (same peer ID, tcp + quic) and times out, the Venus peer has no DNS record, and ChainSafe mainnet-0/-2 are Forest 0.39 nodes that refuse F3 cert-exchange. Lotus v1.38.3
mainnet.pinow lists only chain.love and/dnsaddr/bootstrap-mainnet.chainsafe-fil.io.Worse than it looked: api.node.glif.io is served from chain.love infrastructure (same IP 46.229.170.7 as api.chain.love,
x-chainlove-lb-*headers, the same non-release Lotus build1.38.3+mainnet+git.eaea3cd, and a bare HEAD redirects to filecoin.chain.love). So the 4 sources that agreed were 2 operators (chain.love x3 + ChainSafe x1), and the--bootstrap-quorum 4workaround meant trusting two organisations.Fix
Operator-aware quorum (
chain/bootstrap).ErrConflict. Never retried, never outvoted. Different-instance answers are lag, not conflict. After the threshold is met the probe listens 3 s more so a late conflict is still seen.glif.io -> chain.love,chainsafe.dev -> chainsafe-fil.io); libp2p peers by the DNS domain of their bootstrap multiaddr (or the/dnsaddrroot that published them); one source per peer ID.Sources.
net/dnsaddrresolves/dnsaddrroots (embedded snapshot as offline fallback) for the libp2p host, DHT, gossipsub direct peers, the Peer-table eclipse hardening for the head path: pin anchor peers + head-source diversity #80 floor and the quorum. Dead entries removed (probed live from this Mac with a throwaway Go program: dial + certexchange per peer).F3GetLatestCertificate. Default sets now span 4 operators per network (chain.love, ChainSafe, Filfox, Ankr), 3 required.User-Agent: lantern/<version>: Filfox answers 403 toGo-http-client/1.1, which silently removed it from every vote.Guidance. init/doctor/repair print which sources failed (with operator), operators answered vs required, and the flags that help (
--peer,--no-libp2p,--bootstrap-quorum N). Conflicts get a separate message that does not suggest lowering the quorum. Too-few-configured-operators is reported without a pointless retry.lantern doctorexplains what a missing anchor means for the daemon.F11 (added mid-task).
lantern daemonwithout an init-writtenbootstrap-anchor.jsonused to anchor silently via gateway+RPC agreement (which, with Glif = chain.love, was one operator). It now refuses and points at init/doctor;--allow-rpc-anchorrestores the old path with a loud WARN. Devnet and--insecure-anchorunchanged.reset --chain-stateand README now say to runlantern repairbefore restarting.Reasoning and the source/operator table are in TRUST-MODEL.md section 2.9.
Live verification (this Mac, temp LANTERN_HOME, LANTERN_PASS='', deleted after)
go build ./... && go vet ./... && go test ./...green (CGO_ENABLED=0 locally).Security tradeoffs
lantern daemonwithout ever running init must run init/repair once or pass--allow-rpc-anchor. The installer already runs init. Embeddedpkg/daemonis not changed in this PR.