mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
Patch gossipsub (#1490)
## Issue Addressed Some nodes not following head, high CPU usage and HTTP API delays ## Proposed Changes Patches gossipsub. Gossipsub was using an `lru_time_cache` to check for duplicates. This contained an `O(N)` lookup for every gossipsub message to update the time cache. This was causing high cpu usage and blocking network threads. This PR introduces a custom cache without `O(N)` inserts. This also adds built in safety mechanisms to prevent gossipsub from excessively retrying connections upon failure. A maximum limit is set after which we disconnect from the node from too many failed substream connections.
This commit is contained in:
@@ -41,7 +41,7 @@ rand = "0.7.3"
|
||||
[dependencies.libp2p]
|
||||
#version = "0.23.0"
|
||||
git = "https://github.com/sigp/rust-libp2p"
|
||||
rev = "5139ec3ace4ad52506f217d790f0a9425274caef"
|
||||
rev = "3096cb6b89b2883a79ce5ffcb03d41778a09b695"
|
||||
default-features = false
|
||||
features = ["websocket", "identify", "mplex", "yamux", "noise", "gossipsub", "dns", "tcp-tokio"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user