This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
client/authority-discovery: Add option to disable querying #6354
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The authority discovery module (1) publishes a nodes address onto the
DHT and (2) queryies the DHT for the addresses of other authorities.
When a node is only allowed to connect to the configured reserved nodes
there is no benefit in discovering other authorities (2). To reduce the
unnecessary overhead this patch adds an option to disable (2) while
still running (1).
In the scenario above where a node can only connect to a small subset of
the nodes (reserved nodes) of the DHT the publishing of addresses (1) is
likely failing as the node can not place its addresses on the node
closest to its chain identity. For now the node will still try to
publish its addresses, hoping that (a) one of its reserved nodes is
close enough to accept the record and (b) the reserved node will
republish the record to other nodes.
polkadot companion: paritytech/polkadot#1262
Relates to #6031.