Skip to content

Conversation

dozyio
Copy link
Contributor

@dozyio dozyio commented Dec 14, 2024

  • Add bootstrapper flag to go-peer
  • Enable peer exchange on go-peer when bootstrapping
  • add directpeer option for bootstrapper go-peer

TODO

  • Peer scoring

Was thinking to add the same bootstrapper functionality to the rust peer but PX is not implemented libp2p/rust-libp2p#2398

Copy link

vercel bot commented Dec 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
universal-connectivity ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 7:49pm

@2color
Copy link
Collaborator

2color commented Feb 26, 2025

@dozyio Have you tried this with the browser peer? If enabled, does this make pubsub peer discovery redundant?

@dozyio
Copy link
Contributor Author

dozyio commented Feb 26, 2025

@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
Can't drop the pubsub peer discovery as rust doesn't support PX (might need to reconfirm this)
But we should be able to remove this https://github.com/libp2p/universal-connectivity/blob/main/js-peer/src/lib/libp2p.ts#L105 and let gossipsub handle the peering

@dhuseby
Copy link
Collaborator

dhuseby commented Aug 28, 2025

@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.

@dozyio
Copy link
Contributor Author

dozyio commented Aug 31, 2025

@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

@2color 2color requested a review from Copilot August 31, 2025 15:45
@2color
Copy link
Collaborator

2color commented Aug 31, 2025

@dozyio does peer exchange work with js-libp2p?

Copy link

@Copilot Copilot AI left a 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)
Copy link
Preview

Copilot AI Aug 31, 2025

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.

Suggested change
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.

@dozyio
Copy link
Contributor Author

dozyio commented Sep 1, 2025

@dozyio does peer exchange work with js-libp2p?

yeah, px works with js-libp2p

2color and others added 9 commits September 7, 2025 15:56
* 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]>
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]>
@dozyio dozyio marked this pull request as ready for review September 7, 2025 15:06
@dozyio dozyio requested a review from a team as a code owner September 7, 2025 15:06
@dozyio dozyio marked this pull request as draft September 7, 2025 15:13
@dozyio
Copy link
Contributor Author

dozyio commented Sep 7, 2025

libp2p/go-libp2p-pubsub#643 - will need this merging before this one can go in

@dozyio dozyio marked this pull request as ready for review September 13, 2025 16:14
@dozyio
Copy link
Contributor Author

dozyio commented Sep 13, 2025

libp2p/go-libp2p-pubsub#643 - will need this merging before this one can go in

can skip this - needed to add Dscore 0

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.

5 participants