paritytech / helm-charts

Parity & Polkadot Helm charts collection
GNU General Public License v3.0
27 stars 22 forks source link

Add additional listen-addr #334

Closed BulatSaif closed 7 months ago

BulatSaif commented 7 months ago

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 to true.

We have another fix https://github.com/paritytech/polkadot-sdk/pull/3757 which keeps --public-addr first in DHT and it don't get lost among incorrect addresses.

issue: https://github.com/paritytech/polkadot-sdk/issues/3519#issuecomment-1991525996