Experimental discovery (#2577)

# Description

A few changes have been made to discovery. In particular a custom re-write of an LRU cache which previously was read/write O(N) for all our sessions ~5k, to a more reasonable hashmap-style O(1). 

Further there has been reported issues in the current discv5, so added error handling to help identify the issue has been added.
This commit is contained in:
Age Manning
2021-09-16 04:45:05 +00:00
parent c5c7476518
commit 56e0615df8
4 changed files with 221 additions and 243 deletions

View File

@@ -5,7 +5,8 @@ authors = ["Sigma Prime <contact@sigmaprime.io>"]
edition = "2018"
[dependencies]
discv5 = { version = "0.1.0-beta.9", features = ["libp2p"] }
#discv5 = { version = "0.1.0-beta.10", features = ["libp2p"] }
discv5 = { git = "https://github.com/sigp/discv5", rev="10247bbd299227fef20233f2f5a8de9780de09ac", features = ["libp2p"] }
unsigned-varint = { version = "0.6.0", features = ["codec"] }
types = { path = "../../consensus/types" }
hashset_delay = { path = "../../common/hashset_delay" }