Skip to content

Commit b44a38b

Browse files
authored
feat: add EUCLID spec (#68)
* add EUCLID spec * update revm
1 parent 92a287a commit b44a38b

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/core/src/hardfork.rs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,27 @@ static HARDFORK_HEIGHTS: Lazy<HashMap<u64, HashMap<SpecId, u64>>> = Lazy::new(||
2020
let mut map = HashMap::new();
2121
map.insert(
2222
SCROLL_DEVNET_CHAIN_ID,
23-
HashMap::from([(SpecId::BERNOULLI, 0), (SpecId::CURIE, 5)]),
23+
HashMap::from([
24+
(SpecId::BERNOULLI, 0),
25+
(SpecId::CURIE, 5),
26+
(SpecId::EUCLID, u64::MAX),
27+
]),
2428
);
2529
map.insert(
2630
SCROLL_TESTNET_CHAIN_ID,
27-
HashMap::from([(SpecId::BERNOULLI, 3747132), (SpecId::CURIE, 4740239)]),
31+
HashMap::from([
32+
(SpecId::BERNOULLI, 3747132),
33+
(SpecId::CURIE, 4740239),
34+
(SpecId::EUCLID, u64::MAX),
35+
]),
2836
);
2937
map.insert(
3038
SCROLL_MAINNET_CHAIN_ID,
31-
HashMap::from([(SpecId::BERNOULLI, 5220340), (SpecId::CURIE, 7096836)]),
39+
HashMap::from([
40+
(SpecId::BERNOULLI, 5220340),
41+
(SpecId::CURIE, 7096836),
42+
(SpecId::EUCLID, u64::MAX),
43+
]),
3244
);
3345

3446
map
@@ -39,6 +51,7 @@ static HARDFORK_HEIGHTS: Lazy<HashMap<u64, HashMap<SpecId, u64>>> = Lazy::new(||
3951
pub struct HardforkConfig {
4052
bernoulli_block: u64,
4153
curie_block: u64,
54+
euclid_block: u64,
4255
}
4356

4457
impl HardforkConfig {
@@ -48,6 +61,7 @@ impl HardforkConfig {
4861
Self {
4962
bernoulli_block: heights.get(&SpecId::BERNOULLI).copied().unwrap_or(0),
5063
curie_block: heights.get(&SpecId::CURIE).copied().unwrap_or(0),
64+
euclid_block: heights.get(&SpecId::EUCLID).copied().unwrap_or(0),
5165
}
5266
} else {
5367
dev_warn!(
@@ -75,7 +89,8 @@ impl HardforkConfig {
7589
match block_number {
7690
n if n < self.bernoulli_block => SpecId::PRE_BERNOULLI,
7791
n if n < self.curie_block => SpecId::BERNOULLI,
78-
_ => SpecId::CURIE,
92+
n if n < self.euclid_block => SpecId::CURIE,
93+
_ => SpecId::EUCLID,
7994
}
8095
}
8196

0 commit comments

Comments
 (0)