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.
TCP does not listen and dial on the same port by default. When an external node reports our address, the Libp2p replaces the dial port with the listen port and pushes it into the DHT see documentation. The listen port is an internal port and different from what we set in
--public-addr
. Pods can change the external IP, resulting in many invalid addresses in the DHT. All automatically discovered addresses are incorrect, and only the one provided in--public-addr
will route directly to the POD.In this PR, we add an additional
--listen-addr
with the same port as in--public-addr
, which will increase the number of correct records in the DHT. This behavior is disabled by default. To enable it, set.Values.node.perNodeServices.setPublicAddressToExternalIp.autodiscoveryFix
totrue
.We have another fix paritytech/polkadot-sdk#3757 which keeps
--public-addr
first in DHT and it don't get lost among incorrect addresses.issue: paritytech/polkadot-sdk#3519 (comment)