Skip to content

Discovered external addresses no longer usable for Polkadot #4688

Answered by thomaseizinger
altonen asked this question in Q&A
Discussion options

You must be logged in to vote

The line you need to change is: https://github.com/paritytech/polkadot-sdk/blob/59b15684ed2773cd52bf25e7ebb9abe6b6455ed4/substrate/client/network/src/service.rs#L1464C5-L1464C5

One heuristic could be to check that at least two peers report you the same address as an observed address. In that case, you can go ahead and add it as an external one. That should filter out all of the ephemeral TCP ports.

Another, somewhat related thing is: I saw that you are not enabling port-reuse (https://github.com/paritytech/polkadot-sdk/blob/f4c4c0fe29300f765e3edd32c79ac0c856fa4bb8/substrate/client/network/src/transport.rs#L58). If you enable port-reuse, those ephemeral ports will should go away too.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
8 replies
@thomaseizinger
Comment options

@thomaseizinger
Comment options

@altonen
Comment options

@thomaseizinger
Comment options

Answer selected by altonen
@altonen
Comment options

@mxinden
Comment options

@thomaseizinger
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants