litep2p/discovery: Publish authority records with external addresses only (#5176)
This PR reduces the occurrences for identified observed addresses. Litep2p discovers its external addresses by inspecting the `IdentifyInfo::ObservedAddress` field reported by other peers. After we get 5 confirmations of the same external observed address (the address the peer dialed to reach us), the address is reported through the network layer. The PR effectively changes this from 5 to 2. This has a subtle implication on freshly started nodes for the authority-discovery discussed below. The PR also makes the authority discovery a bit more robust by not publishing records if the node doesn't have addresses yet to report. This aims to fix a scenario where: - the litep2p node has started, it has some pending observed addresses but less than 5 - the authorit-discovery publishes a record, but at this time the node doesn't have any addresses discovered and the record is published without addresses -> this means other nodes w...
parent
39daa61e
Showing
- substrate/client/authority-discovery/src/worker.rs 18 additions, 7 deletionssubstrate/client/authority-discovery/src/worker.rs
- substrate/client/network/src/litep2p/discovery.rs 17 additions, 11 deletionssubstrate/client/network/src/litep2p/discovery.rs
- substrate/client/network/src/litep2p/mod.rs 1 addition, 1 deletionsubstrate/client/network/src/litep2p/mod.rs
Please register or sign in to comment