Skip to content

Commit bf7c46c

Browse files
committed
refactor: change enabled fork to electra
1 parent 2606924 commit bf7c46c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

consensus/types/src/chain_spec.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ pub struct ChainSpec {
220220
*/
221221
/// Whether zkVM mode is enabled via CLI flag --activate-zkvm.
222222
/// When true, the node will subscribe to execution proof gossip, verify proofs,
223+
/// TODO(ethproofs): Changed to Electra fork epoch.
223224
/// and optionally generate proofs. zkVM activates at the Fulu fork.
224225
/// Unlike other forks, this is not a network-wide activation but a per-node opt-in.
225226
pub zkvm_enabled: bool,
@@ -495,12 +496,14 @@ impl ChainSpec {
495496
self.zkvm_enabled
496497
}
497498

499+
/// TODO(ethproofs): Changed to Electra fork epoch.
500+
///
498501
/// Returns the epoch at which zkVM activates.
499502
/// Currently uses Fulu fork epoch.
500503
/// Returns None if zkVM is disabled or Fulu is not scheduled.
501504
pub fn zkvm_fork_epoch(&self) -> Option<Epoch> {
502505
if self.zkvm_enabled {
503-
self.fulu_fork_epoch
506+
self.electra_fork_epoch
504507
} else {
505508
None
506509
}
@@ -512,9 +515,11 @@ impl ChainSpec {
512515
.is_some_and(|zkvm_fork_epoch| epoch >= zkvm_fork_epoch)
513516
}
514517

518+
/// TODO(ethproofs): Changed to Electra fork epoch.
519+
///
515520
/// Returns true if zkVM mode can be used at the given fork.
516521
pub fn is_zkvm_enabled_for_fork(&self, fork_name: ForkName) -> bool {
517-
self.is_zkvm_enabled() && fork_name.fulu_enabled()
522+
self.is_zkvm_enabled() && fork_name.electra_enabled()
518523
}
519524

520525
/// Returns the minimum number of execution proofs required.

0 commit comments

Comments
 (0)