Skip to content
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

Discovery is slow for chains added later #1474

Closed
tomaka opened this issue Dec 15, 2023 · 1 comment · Fixed by #1544
Closed

Discovery is slow for chains added later #1474

tomaka opened this issue Dec 15, 2023 · 1 comment · Fixed by #1544

Comments

@tomaka
Copy link
Contributor

tomaka commented Dec 15, 2023

The networking service periodically starts a discovery process, where it asks a random peer for the peers it knows.
If multiple chains have been added to the networking service, it does this at the same time for each chain.

When the networking service is first created, the discovery fires very quickly in order to quickly fill the peers book. Over time, the delay increases.

This was designed at the time when the networking service could only serve a single chain.

Unfortunately, if a chain is added later, the discovery will already be slow, and the peers book of this chain will be slow to fill up.

@tomaka
Copy link
Contributor Author

tomaka commented Dec 20, 2023

While a good solution might be to slow down discovery once our address book is populated, in practice we can't do that as we have no idea of the size of the network. If a network has only 10 nodes in total, the discovery should slow down as well, even though the address book will never go past 10 entries.

I think that the best approach is simply the existing approach of an interval that increases automatically, except that it should be done per individual chain rather than globally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant