-
Notifications
You must be signed in to change notification settings - Fork 446
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
refactor: circuit relay to async #477
Conversation
48857ad
to
08cb39d
Compare
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.
Great work @jacobheun
Found smaller stuff, but this should be almost ready to go
*/ | ||
getRawConn () { | ||
return this.conn | ||
return this.stream |
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.
Can we leverage this to better name this function?
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.
It's not being used anywhere so I will just remove it.
fc045c0
to
6fd7d0e
Compare
6fd7d0e
to
5b2386d
Compare
I switched tests over to use chai-as-promised to get better visibility into test failures, and then fixed an issue with needing to reset the multiaddrs of the test nodes for the relay suite due to the fix in #485 |
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.
LGTM 🎉
* refactor: add dialing over relay support * chore: fix lint * fix: dont clear listeners on close * fix: if dial errors already have codes, just rethrow them * fix: clear the registrar when libp2p stops * fix: improve connection maintenance with circuit * chore: correct feedback * test: use chai as promised * test(fix): reset multiaddrs on dial test
* refactor: add dialing over relay support * chore: fix lint * fix: dont clear listeners on close * fix: if dial errors already have codes, just rethrow them * fix: clear the registrar when libp2p stops * fix: improve connection maintenance with circuit * chore: correct feedback * test: use chai as promised * test(fix): reset multiaddrs on dial test
This dep is used, unsure why dep-check says it isn't.
## [9.3.4](libp2p/js-libp2p-kad-dht@v9.3.3...v9.3.4) (2023-05-22) ### Bug Fixes * add events dep ([libp2p#477](libp2p/js-libp2p-kad-dht#477)) ([3744a20](libp2p/js-libp2p-kad-dht@3744a20))
Relay
/p2p-circuit/<relay multiaddr>/p2p/<relay peer id>
will cause the node to dial that relay.Note: This does not include active relay dialing (Relays wont dial unconnected destination peers). However, this is a low priority. In most instances we shouldn't try dialing a peer we're not connected to, because this means the dialing peer should also be able to connect to them. The only instance this is not the case, is if the relay is in a private network with the destination node and is the only exposed node. Private networks should be explicitly connecting to their exposed relay in this instance.
Other fixes
close
method which is called onlibp2p.stop()
.