Skip to content
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: Bootstrap from previously seen peers #2133

Conversation

derrandz
Copy link
Contributor

@derrandz derrandz commented Apr 26, 2023

Overview

This PR contains the imlpementation of ADR-14

Depends on:

  1. Feat: add peerstore go-header#36
  2. Feat: add subjective init opts go-header#37

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

@derrandz derrandz force-pushed the feat/bootstrap-from-previously-seen-peers branch from 0c8648b to a4b05a5 Compare April 26, 2023 15:59
@derrandz derrandz force-pushed the feat/bootstrap-from-previously-seen-peers branch from 278ed09 to 0080204 Compare April 28, 2023 15:24
@derrandz derrandz force-pushed the feat/bootstrap-from-previously-seen-peers branch from 0080204 to 6a68df9 Compare April 28, 2023 17:56
@derrandz derrandz changed the title WIP: Feat: Bootstrap from previously seen peers Feat: Bootstrap from previously seen peers Apr 28, 2023
go.mod Outdated
@@ -4,6 +4,8 @@ go 1.20

replace github.com/ipfs/go-verifcid => github.com/celestiaorg/go-verifcid v0.0.1-lazypatch

replace github.com/celestiaorg/go-header => github.com/derrandz/go-header v0.0.0-20230428151923-2da10fd92f76
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is temporary, you can ignore

@derrandz derrandz marked this pull request as ready for review May 9, 2023 15:11
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@derrandz convert to draft please - this has goheader dep pointing at your local

It can only be marked ready for review once your PRs on go-header are merged.

@renaynay renaynay marked this pull request as draft May 10, 2023 12:42
renaynay added a commit that referenced this pull request 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.
@renaynay
Copy link
Member

renaynay commented Sep 5, 2023

superseded by #2507

@renaynay renaynay closed this Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants