diff --git a/polkadot/cli/src/cli.rs b/polkadot/cli/src/cli.rs index 8ebf5b2323..27b6ff2a2e 100644 --- a/polkadot/cli/src/cli.rs +++ b/polkadot/cli/src/cli.rs @@ -100,6 +100,10 @@ pub struct RunCmd { #[structopt(long = "grandpa-pause", number_of_values(2))] pub grandpa_pause: Vec, + /// Disable BEEFY gadget. + #[structopt(long)] + pub no_beefy: bool, + /// Add the destination address to the jaeger agent. /// /// Must be valid socket address, of format `IP:Port` diff --git a/polkadot/cli/src/command.rs b/polkadot/cli/src/command.rs index db771f5123..42aeb46e83 100644 --- a/polkadot/cli/src/command.rs +++ b/polkadot/cli/src/command.rs @@ -189,6 +189,7 @@ pub fn run() -> Result<()> { config, service::IsCollator::No, grandpa_pause, + cli.run.no_beefy, jaeger_agent, None, ).map(|full| full.task_manager) diff --git a/polkadot/node/service/src/lib.rs b/polkadot/node/service/src/lib.rs index e5c53ce9a8..a8554d075c 100644 --- a/polkadot/node/service/src/lib.rs +++ b/polkadot/node/service/src/lib.rs @@ -679,6 +679,7 @@ pub fn new_full( mut config: Configuration, is_collator: IsCollator, grandpa_pause: Option<(u32, u32)>, + disable_beefy: bool, jaeger_agent: Option, telemetry_worker_handle: Option, program_path: Option, @@ -972,7 +973,7 @@ pub fn new_full( }; // We currently only run the BEEFY gadget on the Rococo and Wococo testnets. - if chain_spec.is_rococo() || chain_spec.is_wococo() { + if !disable_beefy && (chain_spec.is_rococo() || chain_spec.is_wococo()) { let gadget = beefy_gadget::start_beefy_gadget::<_, beefy_primitives::ecdsa::AuthorityPair, _, _, _, _>( client.clone(), keystore_opt.clone(), @@ -1262,6 +1263,7 @@ pub fn build_full( config: Configuration, is_collator: IsCollator, grandpa_pause: Option<(u32, u32)>, + disable_beefy: bool, jaeger_agent: Option, telemetry_worker_handle: Option, ) -> Result, Error> { @@ -1270,6 +1272,7 @@ pub fn build_full( config, is_collator, grandpa_pause, + disable_beefy, jaeger_agent, telemetry_worker_handle, None, @@ -1279,6 +1282,7 @@ pub fn build_full( config, is_collator, grandpa_pause, + disable_beefy, jaeger_agent, telemetry_worker_handle, None, @@ -1288,6 +1292,7 @@ pub fn build_full( config, is_collator, grandpa_pause, + disable_beefy, jaeger_agent, telemetry_worker_handle, None, @@ -1297,6 +1302,7 @@ pub fn build_full( config, is_collator, grandpa_pause, + disable_beefy, jaeger_agent, telemetry_worker_handle, None, diff --git a/polkadot/node/test/service/src/lib.rs b/polkadot/node/test/service/src/lib.rs index c467dc3323..4104a53cdd 100644 --- a/polkadot/node/test/service/src/lib.rs +++ b/polkadot/node/test/service/src/lib.rs @@ -82,6 +82,7 @@ pub fn new_full( config, is_collator, None, + true, None, None, worker_program_path, diff --git a/polkadot/parachain/test-parachains/adder/collator/src/main.rs b/polkadot/parachain/test-parachains/adder/collator/src/main.rs index adf4ed8d98..68a89dc3f4 100644 --- a/polkadot/parachain/test-parachains/adder/collator/src/main.rs +++ b/polkadot/parachain/test-parachains/adder/collator/src/main.rs @@ -62,6 +62,7 @@ fn main() -> Result<()> { config, polkadot_service::IsCollator::Yes(collator.collator_key()), None, + true, None, None, ).map_err(|e| e.to_string())?;