Skip to content

Commit

Permalink
Add disable-packet-filter option to beacon node
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanjay176 committed Aug 25, 2021
1 parent e3fe5d5 commit 2353618
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions beacon_node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
--subscribe-all-subnets to ensure all attestations are received for import.")
.takes_value(false),
)
.arg(
Arg::with_name("disable-packet-filter")
.long("disable-packet-filter")
.help("Disables the discovery packet filter. Useful for testing in smaller networks")
.takes_value(false),
)
.arg(
Arg::with_name("zero-ports")
.long("zero-ports")
Expand Down
5 changes: 5 additions & 0 deletions beacon_node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,11 @@ pub fn set_network_config(
config.discv5_config.enr_update = false;
}

if cli_args.is_present("disable-packet-filter") {
warn!(log, "Discv5 packet filter is disabled");
config.discv5_config.enable_packet_filter = false;
}

if cli_args.is_present("disable-discovery") {
config.disable_discovery = true;
warn!(log, "Discovery is disabled. New peers will not be found");
Expand Down
1 change: 1 addition & 0 deletions scripts/local_testnet/beacon_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ exec lighthouse \
--enr-tcp-port $2 \
--port $2 \
--http-port $3 \
--disable-packet-filter \
--target-peers $((NODE_COUNT - 1))

0 comments on commit 2353618

Please sign in to comment.