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

chore(cleanup): Get rid of priority multiaddr, publish all of a node's multiaddresses #641

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

mcamou
Copy link
Contributor

@mcamou mcamou commented Nov 28, 2024

Description

While doing local testing I found a problem: a node was only publishing its external IP address (found by connecting to an external service). The issue was that, when running 2 nodes in my LAN for testing, they were trying to connect via the external IP, which my router does not allow.

This is completely unnecessary with Libp2p (the "priority multiaddr" was there because of some long-removed legacy code). Libp2p will publish all the multiaddrs that it knows about, and when a node connects to another node it will also add to the DHT the address as observed by the other node. So let's let libp2p do its thing and forget about this "priority multiaddr" shenanigans.

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

@mcamou mcamou requested review from mudler and a team and removed request for mudler November 28, 2024 18:55
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 28.12500% with 23 lines in your changes missing coverage. Please review.

Project coverage is 11.35%. Comparing base (04d2136) to head (6986d07).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/config/welcome.go 0.00% 12 Missing ⚠️
pkg/network/discover.go 0.00% 5 Missing ⚠️
cmd/masa-node/main.go 0.00% 4 Missing ⚠️
node/oracle_node.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #641      +/-   ##
==========================================
- Coverage   12.40%   11.35%   -1.06%     
==========================================
  Files          93       93              
  Lines        6770     6640     -130     
==========================================
- Hits          840      754      -86     
+ Misses       5854     5827      -27     
+ Partials       76       59      -17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mudler mudler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup!

@mcamou mcamou merged commit 303f6c6 into main Nov 29, 2024
12 of 13 checks passed
@mcamou mcamou deleted the mc/multiaddr branch November 29, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants