Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Simplify bootstrap cache #1138

Open
povilasb opened this issue Feb 28, 2019 · 0 comments
Open

Simplify bootstrap cache #1138

povilasb opened this issue Feb 28, 2019 · 0 comments
Labels

Comments

@povilasb
Copy link
Contributor

The problem

Currently Crust will evict peers from bootstrap cache, if they are being unresponsive for too long (2 minutes). The problem with this approach is that peers might become active in some time, e.g. a minute if he's only rebooting the machine. So we will remove peer from cache that potentially could help us bootstrap to the p2p network in the future. In addition, this happens even if the cache has not reached its limit.

Solution

  1. If the cache is not full and previously cached peer is not responsive, don't evict it from the cache.
  2. Evict peer from the bootstrap cache only when cache is full (has 200 entries) and we find out about a new directly accessible peer which we'd like to cache.
  3. So remove all the time based external reachability tests of cached peers.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
version 0.32.0
  
To do
Development

No branches or pull requests

1 participant