feat: implement autorelay#21
Merged
Merged
Conversation
…cdeque to prioritize static relays when possible, ignore relayed peers (marking them as not supported), and remove redundant logic
… event of the node being reachable through other means
…s added that is public
…uilder::with_autorelay
aa7741c to
5d8fc2d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR derives from my rust-libp2p PR libp2p/rust-libp2p#6156, with some changes made internally. The internals may be subjected to change, and may be swapped out for for upstream implementation if ever merged in.
Note:
There is a small bug I discovered while using this impl. A fixed is applied via libp2p/rust-libp2p#6461 but should not be a problem for initial use. Additionally, this implementation relies on libp2p/rust-libp2p#6285, which I will probably require tracking on our end until the PR (and its seq fix in libp2p/rust-libp2p#6472) is backported.