Skip to content

Commit b748992

Browse files
committed
refactor: rename flag to zkevm validation
1 parent 824a37c commit b748992

File tree

7 files changed

+32
-32
lines changed

7 files changed

+32
-32
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 --zk-attester flag set.
287+
// If the chain spec enables zkVM, the node must have --zkevm-validation flag set.
288288
return Err(AvailabilityCheckError::ProofVerificationError(
289289
"Node is receiving execution proofs but zkVM verification is not enabled. \
290-
Use --zk-attester flag to enable proof verification."
290+
Use --zkevm-validation flag to enable proof verification."
291291
.to_string(),
292292
));
293293
};

beacon_node/client/src/builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ use beacon_chain::{
2020
use beacon_chain::{Kzg, LightClientProducerEvent};
2121
use beacon_processor::{BeaconProcessor, BeaconProcessorChannels};
2222
use beacon_processor::{BeaconProcessorConfig, BeaconProcessorQueueLengths};
23+
use dummy_el;
2324
use environment::RuntimeContext;
2425
use eth2::{
2526
BeaconNodeHttpClient, Error as ApiError, Timeouts,
2627
types::{BlockId, StateId},
2728
};
28-
use dummy_el;
2929
use execution_layer::ExecutionLayer;
3030
use execution_layer::test_utils::generate_genesis_header;
3131
use futures::channel::mpsc::Receiver;
@@ -191,9 +191,9 @@ where
191191
None
192192
};
193193

194-
// Spawn the dummy execution layer if --dummy-el flag is set
194+
// Spawn the dummy execution layer
195195
if config.use_dummy_el {
196-
info!("Spawning in-process dummy execution layer (--dummy-el)");
196+
info!("--zkevm-validation: spawning in-process execution layer");
197197

198198
let dummy_el_config = dummy_el::DummyElConfig {
199199
host: "127.0.0.1".to_string(),

beacon_node/src/cli.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ pub fn cli_app() -> Command {
828828
.alias("jwt-secrets")
829829
.help("File path which contains the hex-encoded JWT secret for the \
830830
execution endpoint provided in the --execution-endpoint flag.")
831-
.requires_one_of(["execution-endpoint", "zk-attester"])
831+
.requires("execution-source")
832832
.action(ArgAction::Set)
833833
.display_order(0)
834834
)
@@ -839,7 +839,7 @@ pub fn cli_app() -> Command {
839839
.alias("jwt-secret-key")
840840
.help("Hex-encoded JWT secret for the \
841841
execution endpoint provided in the --execution-endpoint flag.")
842-
.requires_one_of(["execution-endpoint", "zk-attester"])
842+
.requires("execution-source")
843843
.conflicts_with("execution-jwt")
844844
.action(ArgAction::Set)
845845
.display_order(0)
@@ -875,7 +875,7 @@ pub fn cli_app() -> Command {
875875
.help("Emergency fallback fee recipient for use in case the validator client does \
876876
not have one configured. You should set this flag on the validator \
877877
client instead of (or in addition to) setting it here.")
878-
.requires_one_of(["execution-endpoint", "zk-attester"])
878+
.requires("execution-source")
879879
.action(ArgAction::Set)
880880
.display_order(0)
881881
)
@@ -885,7 +885,7 @@ pub fn cli_app() -> Command {
885885
.alias("payload-builder")
886886
.alias("payload-builders")
887887
.help("The URL of a service compatible with the MEV-boost API.")
888-
.requires_one_of(["execution-endpoint", "zk-attester"])
888+
.requires("execution-source")
889889
.action(ArgAction::Set)
890890
.display_order(0)
891891
)
@@ -934,8 +934,8 @@ pub fn cli_app() -> Command {
934934
)
935935
/* ZK-VM Execution Layer settings */
936936
.arg(
937-
Arg::new("zk-attester")
938-
.long("zk-attester")
937+
Arg::new("zkevm-validation")
938+
.long("zkevm-validation")
939939
.help("Activates ZKVM execution proof mode. Enables the node to subscribe to the \
940940
execution_proof gossip topic, receive and verify execution proofs from peers, \
941941
and advertise zkVM support in its ENR for peer discovery. \
@@ -951,7 +951,7 @@ pub fn cli_app() -> Command {
951951
.help("Comma-separated list of proof type IDs to generate \
952952
(e.g., '0,1' where 0=SP1+Reth, 1=Risc0+Geth). \
953953
Optional - nodes can verify proofs without generating them.")
954-
.requires("zk-attester")
954+
.requires("zkevm-validation")
955955
.action(ArgAction::Set)
956956
.display_order(0)
957957
)
@@ -1655,5 +1655,8 @@ pub fn cli_app() -> Command {
16551655
.action(ArgAction::Set)
16561656
.hide(true)
16571657
)
1658+
.group(ArgGroup::new("execution-source")
1659+
.args(["execution-endpoint", "zkevm-validation"])
1660+
.required(true))
16581661
.group(ArgGroup::new("enable_http").args(["http", "gui", "staking"]).multiple(true))
16591662
}

beacon_node/src/config.rs

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -269,23 +269,21 @@ pub fn get_config<E: EthSpec>(
269269
client_config.http_metrics.allocator_metrics_enabled = false;
270270
}
271271

272-
// Auto-enable in-process dummy execution layer if --zk-attester is set without
272+
// Auto-enable in-process dummy execution layer if --zkevm-validation is set without
273273
// --zkvm-generation-proof-types and no explicit --execution-endpoint is provided.
274-
let use_dummy_el = cli_args.get_flag("zk-attester")
274+
let use_dummy_el = cli_args.get_flag("zkevm-validation")
275275
&& cli_args
276276
.get_one::<String>("zkvm-generation-proof-types")
277277
.is_none()
278-
&& cli_args
279-
.get_one::<String>("execution-endpoint")
280-
.is_none();
278+
&& cli_args.get_one::<String>("execution-endpoint").is_none();
281279

282280
client_config.use_dummy_el = use_dummy_el;
283281

284-
// Configure execution layer: either use provided endpoint or dummy EL (auto-enabled with --zk-attester)
282+
// Configure execution layer: either use provided endpoint or dummy EL (auto-enabled with --zkevm-validation)
285283
if !use_dummy_el {
286284
let endpoints: Option<String> = clap_utils::parse_optional(cli_args, "execution-endpoint")?;
287-
let endpoints =
288-
endpoints.ok_or("Error! Either --execution-endpoint or --zk-attester must be provided")?;
285+
let endpoints = endpoints
286+
.ok_or("Error! Either --execution-endpoint or --zkevm-validation must be provided")?;
289287

290288
let mut el_config = execution_layer::Config::default();
291289

@@ -355,9 +353,8 @@ pub fn get_config<E: EthSpec>(
355353
// Store the EL config in the client config.
356354
client_config.execution_layer = Some(el_config);
357355
} else {
358-
// When using --dummy-el, create an execution_layer config pointing to localhost
359-
// The dummy EL server will be spawned in-process by the client builder
360-
info!("Using in-process dummy execution layer (--dummy-el)");
356+
// Create an execution_layer config pointing to localhost
357+
info!("Using in-process dummy execution layer (--zkevm-validation)");
361358

362359
let mut el_config = execution_layer::Config::default();
363360

@@ -369,13 +366,15 @@ pub fn get_config<E: EthSpec>(
369366

370367
// For dummy EL, let ExecutionLayer handle JWT as usual
371368
// Dummy EL will not validate JWT (no need for local testing)
372-
el_config.default_datadir.clone_from(client_config.data_dir());
369+
el_config
370+
.default_datadir
371+
.clone_from(client_config.data_dir());
373372

374373
client_config.execution_layer = Some(el_config);
375374
}
376375

377376
// Parse ZK-VM execution layer config if provided
378-
if cli_args.get_flag("zk-attester") {
377+
if cli_args.get_flag("zkevm-validation") {
379378
let generation_proof_types = if let Some(gen_types_str) =
380379
clap_utils::parse_optional::<String>(cli_args, "zkvm-generation-proof-types")?
381380
{
@@ -396,9 +395,7 @@ pub fn get_config<E: EthSpec>(
396395
} else {
397396
// No generation proof types provided - running in verification-only mode
398397
if client_config.use_dummy_el {
399-
info!(
400-
"--zk-attester set without --zkvm-generation-proof-types: automatically enabled --dummy-el for proof verification mode"
401-
);
398+
info!("--zkevm-validation: no EL needed for proof verification");
402399
}
403400
HashSet::new()
404401
};

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 --zk-attester.
227+
/// Whether zkVM mode is enabled via CLI flag --zkevm-validation.
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-
- --zk-attester
9+
- --zkevm-validation
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-
- --zk-attester
21+
- --zkevm-validation
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-
- --zk-attester
9+
- --zkevm-validation
1010
- --zkvm-generation-proof-types=0,1
1111
- --target-peers=3
1212
count: 4

0 commit comments

Comments
 (0)