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

Improve (re)validation of nodes #206

Closed
kdeme opened this issue Apr 2, 2020 · 1 comment
Closed

Improve (re)validation of nodes #206

kdeme opened this issue Apr 2, 2020 · 1 comment
Labels
discoveryv5

Comments

@kdeme
Copy link
Contributor

@kdeme kdeme commented Apr 2, 2020

Currently nodes are (re)validated by a periodic ping and removed from the routing table at first failure to reply.
This should be improved, e.g.:

  1. No action should be taken on first failure. It should be marked stale after n (=5 ?) failures.
  2. The replacement cache should be used: When a node goes stale, it should be replaced with a (non stale?) entry from the replacement cache, if there is one.
  3. If there is no entry in the replacement cache, no immediate removal of the node should happen. Instead it should be removed when a new node for that bucket is added.

Considering that this replacement system (and kbucket ordering in general) is not really used currently (nodes only get added to it) and that there are no tests, it is possible that there are some hidden issues in the current code.
There also seems to be no current limitation on adding to the replacement cache.

Also the nodeToRevalidate should probably target least recently updated bucket.

@kdeme
Copy link
Contributor Author

@kdeme kdeme commented Jun 30, 2020

Use of replacement cache is in place, and replacement cache is limited to 8 nodes.

nodeToRevalidate targeting least recently updated bucket has not shown to give any improvement on current testnets.
More tests are in place now.

see #247 and #261

  1. and 3. are not currently done. 3. specifically might be an issue when the own connection drops or is just terrible.

Issue for those is created here: #262

@kdeme kdeme closed this as completed Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discoveryv5
Projects
None yet
Development

No branches or pull requests

1 participant