Skip to content
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

TCP/AutoNAT/Identify #227

Closed
wants to merge 4 commits into from
Closed

Conversation

b-zee
Copy link
Contributor

@b-zee b-zee commented May 3, 2023

  • feat(node): add AutoNAT behaviour
  • feat(node): use TCP as transport
  • feat(node): toggle AutoNAT and mDNS by local flag
  • feat(node): add identify behaviour

@reviewpad
Copy link

reviewpad bot commented May 3, 2023

AI-Generated Summary: This pull request introduces several changes to the networking code, including enabling/disabling mDNS and AutoNAT based on a new local flag, adding support for specifying an external address, and updating dependencies. Additionally, it removes manual addition of addresses to the Kademlia behavior, opting to use the identify behavior to receive listening addresses from peers instead. The address handling is refactored, adding the multiaddr_is_global and multiaddr_strip_p2p helper methods. AutoNAT events are also now being logged. Overall, these changes improve the networking capabilities and configuration options of the code.

@reviewpad reviewpad bot added the medium Pull request is medium label May 3, 2023
@reviewpad
Copy link

reviewpad bot commented May 3, 2023

Reviewpad Report

⚠️ Warnings

  • Please link an issue to the pull request

@b-zee b-zee force-pushed the feat-experiment-tcp-discovery branch from fdcee57 to 595ead4 Compare May 8, 2023 07:45
@reviewpad
Copy link

reviewpad bot commented May 8, 2023

AI-Generated Summary: This pull request updates the dependency libp2p and adds new features to the implementation. It adds libp2p-autonat, libp2p-mplex, libp2p-noise, libp2p-tcp, and libp2p-yamux to the Cargo.lock and safenode/Cargo.toml. The code has been modified to enable mDNS peer discovery when running on a local network, provide an option for specifying an external address, and other related changes for handling AutoNAT events, identifying info received from peers, and filtering ip addresses. Additionally, it updates the test cases to reflect these changes.

b-zee added 4 commits May 10, 2023 10:00
QUIC transport doesn't seem to work well with the (auto) NAT traversal
in libp2p. This might be reversed in the future, if QUIC is properly
supported in combination with other (NAT) protocols.
Also adds an external address flag, to add this to the swarm's external
addresses with an infinite score. This should get broadcast to other
peers that will immediately have the right address (if configured right
by the user).
Using the identify behaviour to exchange node information and adding addresses to the routing table based on that.
@b-zee b-zee force-pushed the feat-experiment-tcp-discovery branch from 595ead4 to d82dc17 Compare May 10, 2023 08:16
@reviewpad
Copy link

reviewpad bot commented May 10, 2023

AI-Generated Summary: This pull request adds new dependencies (libp2p-autonat, libp2p-mplex, libp2p-noise, libp2p-yamux, nohash-hasher) to Cargo.lock and introduces new options for running the node on a local network and specifying an external address. In SwarmDriver, the AutoNAT status change is logged, the provided external address is added if available, and mDNS is enabled only if in local mode. A couple of utility functions for multiaddress handling like multiaddr_strip_p2p and multiaddr_is_global have been added.

@b-zee b-zee closed this May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium Pull request is medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant