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.
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
authority-discovery: Populate DHT records with public listen addresses #6298
authority-discovery: Populate DHT records with public listen addresses #6298
Changes from 7 commits
e42d31d
fd68062
36a4a1e
f1c7ed6
5ca1f8b
0b091ef
6bbfce0
58a8432
9c0d40d
0bb4526
9b34c65
f29ebcb
1ce39e8
d95fd51
e6f329d
c1c7739
7fca9ee
cedf8fa
7f6efce
094b5f5
53a07d4
9fb02e0
9fed62e
0a4e74c
eab484c
49f6d2e
e408fee
31b3595
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Having some sort of "context" here to know from where the
address
is coming from would be nice. Also for things likeexternal_addresses
, we should not print anything at all? I mean these addresses are coming from other nodes, but we probably ensure before that these contain our peer id?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.
Yep that makes sense! Have added an
AddressType
enum for better logs 🙏While at it, have kept the error for all possible address types (including external addresses), since we don't do any validation in the lower components (libp2p / litep2p).
I'll come with a followup, there are a few things I'd like to check:
ExternalAddressConfirmed
for addresses that have a different peer ID/p2p/
regardless of the address already containing itpolkadot-sdk/substrate/client/network/src/discovery.rs
Line 752 in 9fed62e
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.
Honestly, I would keep this warning, because there is no guarantee we will have a global listen address nor that the external address will be discovered correctly (with libp2p address translation). Especially since there is a practice of "hiding" validators behind firewalls / NATs.