-
Notifications
You must be signed in to change notification settings - Fork 57
feat: add bootstrap mode to go peer #208
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@dozyio Have you tried this with the browser peer? If enabled, does this make pubsub peer discovery redundant? |
Need to do the browser peer bits & peer scoring |
@dozyio what's the status of this PR? I'll try to get it landed next week if you refresh it and tell me it's complete. |
will take a look this week. I was going to close it as rust doesn't support peer exchange... however python does, so might be worth implementing |
@dozyio does peer exchange work with js-libp2p? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds bootstrap mode functionality to the go-peer implementation, enabling peers to act as bootstrapper nodes in the gossipsub network. The changes introduce command-line flags to configure bootstrap behavior and implement peer exchange functionality.
- Adds
bootstrapper
flag to enable bootstrap mode with peer exchange - Implements
directpeer
option for specifying reciprocal gossipsub bootstrap peers - Configures gossipsub parameters optimized for bootstrap nodes
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
go-peer/main.go
Outdated
if len(directPeers) > 0 { | ||
dp := peerStrSliceToAddrInfoSlice(directPeers) | ||
gossipSubOpts = append(gossipSubOpts, pubsub.WithDirectPeers(dp)) | ||
pubsub.WithDirectConnectTicks(60) // attempt to reconnect to direct peers every 60 ticks (seconds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pubsub.WithDirectConnectTicks(60)
option is not being appended to gossipSubOpts
. It should be added to the slice like the other options.
pubsub.WithDirectConnectTicks(60) // attempt to reconnect to direct peers every 60 ticks (seconds) | |
gossipSubOpts = append(gossipSubOpts, pubsub.WithDirectConnectTicks(60)) // attempt to reconnect to direct peers every 60 ticks (seconds) |
Copilot uses AI. Check for mistakes.
yeah, px works with js-libp2p |
* feat: add ipfs deploy action * ci: add permissions to workflow * ci: run deploy workflow on all commits to main --------- Co-authored-by: Daniel N <[email protected]>
* initialize workshop mdbook Signed-off-by: Dave Grantham <[email protected]> * Update workshop/src/introduction.md Co-authored-by: Daniel Norman <[email protected]> --------- Signed-off-by: Dave Grantham <[email protected]> Co-authored-by: Daniel Norman <[email protected]>
* feat: overhaul ui and load chat by default * fix: simplify nav bar and load chat on index route * fix: linting --------- Co-authored-by: Daniel N <[email protected]>
Signed-off-by: Dave Grantham <[email protected]>
Bumps the npm_and_yarn group in /js-peer with 1 update: [next](https://github.com/vercel/next.js). Updates `next` from 14.2.13 to 14.2.25 - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](vercel/next.js@v14.2.13...v14.2.25) --- updated-dependencies: - dependency-name: next dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Adds a basic Node.js peer with a terminal user interface. Lifts some code from the existing js-peer. Doesn't support DMs or dialing peers directly (yet). Fixes libp2p#214 --------- Co-authored-by: Daniel N <[email protected]>
* chore: add or force update .github/workflows/stale.yml * chore: add or force update .github/workflows/generated-pr.yml
* add tui ui * add polling of events * clean up peer code * all hooked up * clean up system messages * smarter system messages * add tcp * fix channel handling * drop peers when they hang up * fix listen address is not necessarily an external address * add better logging and peer list * add headless, kademlia, relay, dcutr, webrtc, peer discovery * fix clippy * add tui ui * add polling of events * clean up peer code * all hooked up * clean up system messages * smarter system messages * add tcp * fix channel handling * drop peers when they hang up * fix listen address is not necessarily an external address * add better logging and peer list * add headless, kademlia, relay, dcutr, webrtc, peer discovery * fix clippy Signed-off-by: Dave Grantham <[email protected]>
libp2p/go-libp2p-pubsub#643 - will need this merging before this one can go in |
can skip this - needed to add Dscore 0 |
bootstrapper
flag to go-peerdirectpeer
option for bootstrapper go-peerTODO
Was thinking to add the same bootstrapper functionality to the rust peer but PX is not implemented libp2p/rust-libp2p#2398