-
Notifications
You must be signed in to change notification settings - Fork 960
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(transport): Add GlobalOnly Transport implementation #3814
Conversation
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.
Thanks! I left some comments.
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
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.
Thank you for the work here @tcoratger!
This comment was marked as resolved.
This comment was marked as resolved.
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.
Apart from one unresolved conversation, this looks good to me!
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Can you address the clippy and doc test failures? I think then we can merge this 🥳 |
@thomaseizinger Done |
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.
Thank you!
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.
🙏 thanks @tcoratger. Upgraded downstream user mxinden/kademlia-exporter#292.
Description
Upstreams the
GlobalOnly
transport from @mxinden's kademlia-exporter to rust-libp2p.Source: https://github.com/mxinden/kademlia-exporter/blob/master/src/exporter/client/global_only.rs.
Resolves: #3669.
Notes & open questions
The Rust
is_global()
function associated toIpv4Addr
andIpv6Addr
used in this implementation is unstable.The method chosen here is to include the implementation of
is_global()
directly to the library to secure its implementation while waiting for the Rust issue to be resolved. Theis_global()
is then constructed to refer to all addresses that are not contained in the following Special-Purpose Address lists:ipv4
: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml#note2ipv6
: https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtmlChange checklist