-
Notifications
You must be signed in to change notification settings - Fork 0
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: add initial server #1
base: master
Are you sure you want to change the base?
Conversation
@vasco-santos @mkg20001 this is the initial relay server that leverages the pubsub discovery module. Still needs additional testing and a few updates, but the initial test demonstrates the discovery functionality over the relay. |
}, | ||
peerDiscovery: { | ||
[PubsubPeerDiscovery.tag]: { | ||
delay: options.delay || 5000, |
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 default should be updated
console.error('could not read peer id from path %s', idPath) | ||
} | ||
|
||
const libp2p = await create({ peerId }) |
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.
Needs to forward delay option from argv
enabled: true, | ||
hop: { | ||
enabled: true, | ||
active: false |
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.
Interesting to consider: Using active hopping and connections between relays to enable inter-relay connectivity, so if A dials B over R1 and B isn't connected to R1, R1 (that is connected to R2) will ask it for a connection to B, that way relaying becomes easily scalable
The initial implementation of a simple js-libp2p relay server that also subscribes to the js-libp2p-pubsub-peer-discovery service. This enables any peers connected to the relay, who also use the module to discover one another.
TODO
Dependencies