Skip to content

Commit

Permalink
Bleeding edge discovery (#2435)
Browse files Browse the repository at this point in the history
* Update discovery banning logic and tokio

* Update to latest discovery

* Shift to latest discovery

* Fmt
  • Loading branch information
AgeManning committed Jul 9, 2021
1 parent 512a515 commit 8067396
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion beacon_node/eth2_libp2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Sigma Prime <[email protected]>"]
edition = "2018"

[dependencies]
discv5 = { version = "0.1.0-beta.5", features = ["libp2p"] }
discv5 = { version = "0.1.0-beta.6", features = ["libp2p"] }
unsigned-varint = { version = "0.6.0", features = ["codec"] }
types = { path = "../../consensus/types" }
hashset_delay = { path = "../../common/hashset_delay" }
Expand Down
4 changes: 4 additions & 0 deletions beacon_node/eth2_libp2p/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ impl Default for Config {
.disable_report_discovered_peers()
.ip_limit() // limits /24 IP's in buckets.
.incoming_bucket_limit(8) // half the bucket size
.filter_rate_limiter(filter_rate_limiter)
.filter_max_bans_per_ip(Some(5))
.filter_max_nodes_per_ip(Some(10))
.ban_duration(Some(Duration::from_secs(3600)))
.ping_interval(Duration::from_secs(300))
.build();

Expand Down

0 comments on commit 8067396

Please sign in to comment.