You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on universal-connectivity, I wanted to share a quick summary of how peer discovery and connectivity mechanisms have evolved — particularly for Node.js and browser peers interacting with Rust/Go peers.
✅ Current Behavior
Earlier, js-libp2p setups included both:
A list of bootstrap nodes (static multiaddrs, e.g. /ip4/.../tcp/...)
One or more relayListenAddrs
But recently, as seen in PR #225, this was simplified to rely only on relayListenAddrs and remove the static bootstrap config.
Why? Because we now use:
🔍 Delegated Routing — to discover the real-time multiaddrs of known bootstrap peers using only their PeerId.
This avoids the need for hardcoded multiaddrs, especially since many bootstrap nodes (in Go/Rust) have ephemeral addresses.
🌐 Example
With delegated routing, a JS peer can discover and dial another peer like this:
Would love to hear how others are approaching hybrid peer discovery — and happy to provide code or support if anyone's trying this setup with Go/Rust/JS interop!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all 👋
While working on universal-connectivity, I wanted to share a quick summary of how peer discovery and connectivity mechanisms have evolved — particularly for Node.js and browser peers interacting with Rust/Go peers.
✅ Current Behavior
Earlier,
js-libp2p
setups included both:/ip4/.../tcp/...
)relayListenAddrs
But recently, as seen in PR #225, this was simplified to rely only on
relayListenAddrs
and remove the static bootstrap config.Why? Because we now use:
This avoids the need for hardcoded multiaddrs, especially since many bootstrap nodes (in Go/Rust) have ephemeral addresses.
🌐 Example
With delegated routing, a JS peer can discover and dial another peer like this:
See:
🔗 Delegated routing example
The endpoint used is typically the public IPFS delegated routing service:
🔄 Browser ↔ Node ↔ Rust Connectivity
PeerId
and then relay/dial dynamically.🧪 Reproducible Setup
For those experimenting with hybrid TCP/WebSocket relayed connections (e.g., Rust <-> Node.js), we’ve tested:
relayListenAddrs
+ delegated routing/p2p-circuit
once resolvedLet me know if you’d like a sample repo or Docker setup for this.
🔗 References
Would love to hear how others are approaching hybrid peer discovery — and happy to provide code or support if anyone's trying this setup with Go/Rust/JS interop!
Beta Was this translation helpful? Give feedback.
All reactions