Skip to content

Commit 9cf1209

Browse files
committed
refactor: flag renaming
1 parent 9e50e61 commit 9cf1209

File tree

6 files changed

+20
-16
lines changed

6 files changed

+20
-16
lines changed

beacon_node/beacon_chain/src/data_availability_checker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,10 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
284284
) -> Result<bool, AvailabilityCheckError> {
285285
let Some(verifier_registry) = &self.verifier_registry else {
286286
// No verifier configured but receiving proofs - this is a configuration error.
287-
// If the chain spec enables zkVM, the node must have --activate-zkvm flag set.
287+
// If the chain spec enables zkVM, the node must have --zk-attester flag set.
288288
return Err(AvailabilityCheckError::ProofVerificationError(
289289
"Node is receiving execution proofs but zkVM verification is not enabled. \
290-
Use --activate-zkvm flag to enable proof verification."
290+
Use --zk-attester flag to enable proof verification."
291291
.to_string(),
292292
));
293293
};

beacon_node/src/cli.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -946,8 +946,8 @@ pub fn cli_app() -> Command {
946946
)
947947
/* ZK-VM Execution Layer settings */
948948
.arg(
949-
Arg::new("activate-zkvm")
950-
.long("activate-zkvm")
949+
Arg::new("zk-attester")
950+
.long("zk-attester")
951951
.help("Activates ZKVM execution proof mode. Enables the node to subscribe to the \
952952
execution_proof gossip topic, receive and verify execution proofs from peers, \
953953
and advertise zkVM support in its ENR for peer discovery. \
@@ -963,7 +963,7 @@ pub fn cli_app() -> Command {
963963
.help("Comma-separated list of proof type IDs to generate \
964964
(e.g., '0,1' where 0=SP1+Reth, 1=Risc0+Geth). \
965965
Optional - nodes can verify proofs without generating them.")
966-
.requires("activate-zkvm")
966+
.requires("zk-attester")
967967
.action(ArgAction::Set)
968968
.display_order(0)
969969
)

beacon_node/src/config.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,13 @@ pub fn get_config<E: EthSpec>(
270270
}
271271

272272
// Check if --dummy-el flag is set
273-
let use_dummy_el = cli_args.get_flag("dummy-el");
273+
let mut use_dummy_el = cli_args.get_flag("dummy-el");
274+
275+
// Auto-enable --dummy-el if --zk-attester is set without --zkvm-generation-proof-types
276+
if cli_args.get_flag("zk-attester") && cli_args.get_one::<String>("zkvm-generation-proof-types").is_none() {
277+
use_dummy_el = true;
278+
}
279+
274280
client_config.use_dummy_el = use_dummy_el;
275281

276282
// Either `--execution-endpoint` or `--dummy-el` must be supplied.
@@ -351,7 +357,7 @@ pub fn get_config<E: EthSpec>(
351357
}
352358

353359
// Parse ZK-VM execution layer config if provided
354-
if cli_args.get_flag("activate-zkvm") {
360+
if cli_args.get_flag("zk-attester") {
355361
let gen_types_provided = cli_args.get_one::<String>("zkvm-generation-proof-types").is_some();
356362

357363
let generation_proof_types = if let Some(gen_types_str) =
@@ -372,11 +378,9 @@ pub fn get_config<E: EthSpec>(
372378
.collect::<Result<HashSet<_>, _>>()
373379
.map_err(|e| format!("Invalid subnet ID: {}", e))?
374380
} else {
375-
// If --activate-zkvm is set without --zkvm-generation-proof-types,
376-
// automatically enable --dummy-el for proof verification mode
377-
if !gen_types_provided {
378-
client_config.use_dummy_el = true;
379-
info!("--activate-zkvm set without --zkvm-generation-proof-types: automatically enabling --dummy-el for proof verification mode");
381+
// No generation proof types provided - running in verification-only mode
382+
if client_config.use_dummy_el {
383+
info!("--zk-attester set without --zkvm-generation-proof-types: automatically enabled --dummy-el for proof verification mode");
380384
}
381385
HashSet::new()
382386
};

consensus/types/src/chain_spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ pub struct ChainSpec {
224224
/*
225225
* zkVM execution proof params
226226
*/
227-
/// Whether zkVM mode is enabled via CLI flag --activate-zkvm.
227+
/// Whether zkVM mode is enabled via CLI flag --zk-attester.
228228
/// When true, the node will subscribe to execution proof gossip, verify proofs,
229229
/// TODO(ethproofs): Changed to Electra fork for demo.
230230
/// and optionally generate proofs. zkVM activates at the Fulu fork.

scripts/local_testnet/network_params_mixed_proof_gen_verify.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ participants:
66
cl_type: lighthouse
77
cl_image: lighthouse:local
88
cl_extra_params:
9-
- --activate-zkvm
9+
- --zk-attester
1010
- --zkvm-generation-proof-types=0,1
1111
- --target-peers=3
1212
count: 3
@@ -18,7 +18,7 @@ participants:
1818
cl_type: lighthouse
1919
cl_image: lighthouse:local
2020
cl_extra_params:
21-
- --activate-zkvm
21+
- --zk-attester
2222
- --target-peers=3
2323
count: 1
2424
network_params:

scripts/local_testnet/network_params_proof_gen_only.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ participants:
66
cl_type: lighthouse
77
cl_image: lighthouse:local
88
cl_extra_params:
9-
- --activate-zkvm
9+
- --zk-attester
1010
- --zkvm-generation-proof-types=0,1
1111
- --target-peers=3
1212
count: 4

0 commit comments

Comments
 (0)