Skip to content

Commit

Permalink
[feat] add Bernoulli to HardforkId (scroll-tech#1356)
Browse files Browse the repository at this point in the history
* add Bernoulli to HardforkId

* inc FIXED_TABLE_ROWS_NO_BITWISE by 3

* fix
  • Loading branch information
lightsing authored Jul 2, 2024
1 parent b1d78bf commit 84b9bb5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion eth-types/src/forks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use crate::constants::read_env_var;
/// Hardfork ID for scroll networks
#[derive(Debug, PartialEq, Eq)]
pub enum HardforkId {
/// Bernoulli hardfork
Bernoulli = 2,
/// Curie hardfork
Curie = 3,
}
Expand All @@ -20,7 +22,14 @@ pub const SCROLL_MAINNET_CHAIN_ID: u64 = 534352;
/// Returns a list of triplets of (hardfork id, chain id, block number)
pub fn hardfork_heights() -> Vec<(HardforkId, u64, u64)> {
vec![
(HardforkId::Curie, SCROLL_DEVNET_CHAIN_ID, 5), // devnet
(HardforkId::Bernoulli, SCROLL_DEVNET_CHAIN_ID, 0), // devnet
(HardforkId::Bernoulli, SCROLL_TESTNET_CHAIN_ID, 3747132), // testnet
(
HardforkId::Bernoulli,
SCROLL_MAINNET_CHAIN_ID,
read_env_var("SCROLL_MAINNET_BERNOULLI_BLOCK", 5220340),
), // mainnet
(HardforkId::Curie, SCROLL_DEVNET_CHAIN_ID, 5), // devnet
(HardforkId::Curie, SCROLL_TESTNET_CHAIN_ID, 4740239), // testnet
(
HardforkId::Curie,
Expand Down
2 changes: 1 addition & 1 deletion zkevm-circuits/src/evm_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ impl<F: Field> EvmCircuit<F> {
}
}

const FIXED_TABLE_ROWS_NO_BITWISE: usize = 3659;
const FIXED_TABLE_ROWS_NO_BITWISE: usize = 3662;
const FIXED_TABLE_ROWS: usize = FIXED_TABLE_ROWS_NO_BITWISE + 3 * 65536;

impl<F: Field> SubCircuit<F> for EvmCircuit<F> {
Expand Down

0 comments on commit 84b9bb5

Please sign in to comment.