Skip to content

Commit 8067396

Browse files
committed
Bleeding edge discovery (#2435)
* Update discovery banning logic and tokio * Update to latest discovery * Shift to latest discovery * Fmt
1 parent 512a515 commit 8067396

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

beacon_node/eth2_libp2p/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Sigma Prime <[email protected]>"]
55
edition = "2018"
66

77
[dependencies]
8-
discv5 = { version = "0.1.0-beta.5", features = ["libp2p"] }
8+
discv5 = { version = "0.1.0-beta.6", features = ["libp2p"] }
99
unsigned-varint = { version = "0.6.0", features = ["codec"] }
1010
types = { path = "../../consensus/types" }
1111
hashset_delay = { path = "../../common/hashset_delay" }

beacon_node/eth2_libp2p/src/config.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ impl Default for Config {
174174
.disable_report_discovered_peers()
175175
.ip_limit() // limits /24 IP's in buckets.
176176
.incoming_bucket_limit(8) // half the bucket size
177+
.filter_rate_limiter(filter_rate_limiter)
178+
.filter_max_bans_per_ip(Some(5))
179+
.filter_max_nodes_per_ip(Some(10))
180+
.ban_duration(Some(Duration::from_secs(3600)))
177181
.ping_interval(Duration::from_secs(300))
178182
.build();
179183

0 commit comments

Comments
 (0)