-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
network/litep2p: Publishes empty addresses at startup #5147
Comments
It looks like we rely on the Identify protocol to obtain the observed address. When we receive a response via the identify info, we get the observed address and populate the polkadot-sdk/substrate/client/network/src/litep2p/mod.rs Lines 919 to 924 in 18db502
We only report back addresses that have been confirmed at least 5 times, although I believe the confirmation can come from the same peer multiple times: polkadot-sdk/substrate/client/network/src/litep2p/discovery.rs Lines 445 to 458 in 18db502
Definetly something to look into, this might be the reason why some validators are failing to connect. |
May be we can decrease the number of confirmations to 3, ensuring they are coming from different peers. As for authority-discovery, would deferring publishing until we have at least one external address detected fix the issue? |
Yep, it sounds good to me, exactly my plan (although I picked 2 confirmations instead of 3) :D |
Whatever solution we come up with, can we also make sure it fixes this case as well ? |
…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 will not be able to reach us Next Steps - [ ] versi testing Closes: #5147 cc @paritytech/networking --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de>
…only (paritytech#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 will not be able to reach us Next Steps - [ ] versi testing Closes: paritytech#5147 cc @paritytech/networking --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de>
https://grafana.teleport.parity.io/goto/V-MQGUXSR?orgId=1
When starting a node with litep2p enabled I see in the logs that it publishes on the DHT addresses which are not valid
Nodes publish a few seconds later valid addresses, so this errors might be harmless, but they still need to be investigated.
cc: @paritytech/networking
The text was updated successfully, but these errors were encountered: