Skip to content
Commit 2fe297db authored by Alexandru Vasile's avatar Alexandru Vasile Committed by github-actions[bot]
Browse files

authority-discovery: Populate DHT records with public listen addresses (#6298)



This PR's main goal is to add public listen addresses to the DHT
authorities records. This change improves the discoverability of
validators that did not provide the `--public-addresses` flag.

This PR populates the authority DHT records with public listen addresses
if any.

The change effectively ensures that addresses are added to the DHT
record in following order:
 1. Public addresses provided by CLI `--public-addresses`
 2. Maximum of 4 public (global) listen addresses (if any)
3. Any external addresses discovered from the network (ie from
`/identify` protocol)

While at it, this PR adds the following constraints on the number of
addresses:
- Total number of addresses cached is bounded at 16 (increased from 10).
- A maximum number of 32 addresses are published to DHT records
(previously unbounded).
  - A maximum of 4 global listen addresses are utilized.

This PR also removes the following warning:
`WARNING: No public address specified, validator node may not be
reachable.`

### Next Steps
- [ ] deploy and monitor in versi network

Closes: https://github.com/paritytech/polkadot-sdk/issues/6280
Part of: https://github.com/paritytech/polkadot-sdk/issues/5266

cc @paritytech/networking

---------

Signed-off-by: default avatarAlexandru Vasile <[email protected]>
Co-authored-by: default avatarDmitry Markin <[email protected]>
Co-authored-by: default avatarBastian Köcher <[email protected]>
(cherry picked from commit 762f824c)
parent c1b64eba
Pipeline #504207 waiting for manual action with stages
in 1 hour, 10 minutes, and 10 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment