-
Notifications
You must be signed in to change notification settings - Fork 940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Persist peers to disk such that nodes can bootstrap from previously seen peers #1851
Labels
Comments
renaynay
added
the
priority:high
High priority issue to be prioritized for the current/following sprint
label
Mar 3, 2023
@derrandz is taking over this issue. TODO (in order):
|
renaynay
changed the title
Bootstrapping from previously seen peers
feat: Persist peers to disk such that nodes can bootstrap from previously seen peers
Mar 20, 2023
5 tasks
5 tasks
renaynay
added a commit
that referenced
this issue
Jun 16, 2023
This PR implements a `PeerIDStore` that will be useful for both dumping useful peers inside of celestia-node's use of p2p.Exchange as well as inside of discovery. Related to #1851 --------- Co-authored-by: Hlib Kanunnikov <[email protected]>
renaynay
added a commit
that referenced
this issue
Sep 5, 2023
Provides `PIDStore` to header module so that it can be used in `peerTracker` and replaces mem `peerstore.Peerstore` with on-disk `peerstore.Peerstore` so that `peerTracker` can quickly bootstrap itself with previously-seen peers and allow syncer to initialise its sync target from tracked peers rather than trusted so long as it has a subjective head within the trusting period. Overrides #2133 Closes #1851, mitigates issues resulting from #1623 Swamp integration tests to follow (tracked in #2506) ### Future note: This PR introduces a soon-to-be deprecated feature from libp2p (on-disk peerstore). Once libp2p deprecates and removes this feature, the PIDStore will have to become a PeerAddrStore such that it can save addr info of good peers to disk instead of just their IDs.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
All our infrastructure is based around bootstrappers, and each time a node starts; it connects to them and only to them. We do not save any information about other discovered peers during runtime on disk.
This is a choke point for our networks. In case network bootstrappers go offline, a node connected to the network won't be able to rejoin it after the restart.
Saving known peers on disk and using them for bootstrapping will solve the problem, decrease the load on bootstrappers, and enhance network decentralization.
To ultimately achieve the goal, we should:
The text was updated successfully, but these errors were encountered: