mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 02:57:57 +00:00
cli: enable BEEFY by default on test networks (#7293)
We consider BEEFY mature enough to run by default on all nodes for test networks (Rococo/Wococo/Versi). Right now, most nodes are not running it since it's opt-in using --beefy flag. Switch to an opt-out model for test networks. Replace --beefy flag from CLI with --no-beefy and have BEEFY client start by default on test networks. Signed-off-by: acatangiu <adrian@parity.io>
This commit is contained in:
@@ -114,9 +114,10 @@ pub struct RunCmd {
|
||||
#[arg(long = "grandpa-pause", num_args = 2)]
|
||||
pub grandpa_pause: Vec<u32>,
|
||||
|
||||
/// Enable the BEEFY gadget (only on Rococo or Wococo for now).
|
||||
/// Disable the BEEFY gadget
|
||||
/// (currently enabled by default on Rococo, Wococo and Versi).
|
||||
#[arg(long)]
|
||||
pub beefy: bool,
|
||||
pub no_beefy: bool,
|
||||
|
||||
/// Add the destination address to the jaeger agent.
|
||||
///
|
||||
|
||||
@@ -298,12 +298,9 @@ where
|
||||
.map_err(Error::from)?;
|
||||
let chain_spec = &runner.config().chain_spec;
|
||||
|
||||
// Disallow BEEFY on production networks.
|
||||
if cli.run.beefy &&
|
||||
(chain_spec.is_polkadot() || chain_spec.is_kusama() || chain_spec.is_westend())
|
||||
{
|
||||
return Err(Error::Other("BEEFY disallowed on production networks".to_string()))
|
||||
}
|
||||
// By default, enable BEEFY on test networks.
|
||||
let enable_beefy = (chain_spec.is_rococo() || chain_spec.is_wococo() || chain_spec.is_versi()) &&
|
||||
!cli.run.no_beefy;
|
||||
|
||||
set_default_ss58_version(chain_spec);
|
||||
|
||||
@@ -346,7 +343,7 @@ where
|
||||
config,
|
||||
service::IsCollator::No,
|
||||
grandpa_pause,
|
||||
cli.run.beefy,
|
||||
enable_beefy,
|
||||
jaeger_agent,
|
||||
None,
|
||||
false,
|
||||
|
||||
@@ -1158,15 +1158,11 @@ where
|
||||
|
||||
let gadget = beefy::start_beefy_gadget::<_, _, _, _, _, _, _>(beefy_params);
|
||||
|
||||
// Wococo's purpose is to be a testbed for BEEFY, so if it fails we'll
|
||||
// BEEFY currently only runs on testnets, if it fails we'll
|
||||
// bring the node down with it to make sure it is noticed.
|
||||
if chain_spec.is_wococo() {
|
||||
task_manager
|
||||
.spawn_essential_handle()
|
||||
.spawn_blocking("beefy-gadget", None, gadget);
|
||||
} else {
|
||||
task_manager.spawn_handle().spawn_blocking("beefy-gadget", None, gadget);
|
||||
}
|
||||
task_manager
|
||||
.spawn_essential_handle()
|
||||
.spawn_blocking("beefy-gadget", None, gadget);
|
||||
|
||||
if is_offchain_indexing_enabled {
|
||||
task_manager.spawn_handle().spawn_blocking(
|
||||
|
||||
@@ -9,8 +9,8 @@ command = "polkadot"
|
||||
[[relaychain.node_groups]]
|
||||
name = "validator"
|
||||
count = 3
|
||||
args = ["--log=beefy=debug", "--beefy", "--enable-offchain-indexing=true"]
|
||||
args = ["--log=beefy=debug", "--enable-offchain-indexing=true"]
|
||||
|
||||
[[relaychain.nodes]]
|
||||
name = "validator-unstable"
|
||||
args = ["--log=beefy=debug", "--beefy", "--enable-offchain-indexing=true"]
|
||||
args = ["--log=beefy=debug", "--enable-offchain-indexing=true"]
|
||||
|
||||
Reference in New Issue
Block a user