Skip to content

Commit a811bac

Browse files
committed
using specid
1 parent cbe50f5 commit a811bac

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ alloy-sol-macro = "1.3.0"
481481
alloy-sol-types = { version = "1.3.0", default-features = false }
482482
alloy-trie = { version = "0.9.0", default-features = false }
483483

484-
alloy-hardforks = "0.2.7"
484+
alloy-hardforks = "0.3.0"
485485

486486
alloy-consensus = { version = "1.0.25", default-features = false }
487487
alloy-contract = { version = "1.0.25", default-features = false }
@@ -514,7 +514,7 @@ alloy-block-access-list = { version = "1.0.25", default-features = false }
514514

515515
# op
516516
alloy-op-evm = { version = "0.18", default-features = false }
517-
alloy-op-hardforks = "0.2.2"
517+
alloy-op-hardforks = "0.3.0"
518518
op-alloy-rpc-types = { version = "0.18.12", default-features = false }
519519
op-alloy-rpc-types-engine = { version = "0.18.12", default-features = false }
520520
op-alloy-network = { version = "0.18.12", default-features = false }
@@ -744,7 +744,9 @@ alloy-transport = { git = "https://github.com/Soubhik-10/alloy", branch = "engin
744744
alloy-transport-http = { git = "https://github.com/Soubhik-10/alloy", branch = "engine-api-trial" }
745745
alloy-transport-ipc = { git = "https://github.com/Soubhik-10/alloy", branch = "engine-api-trial" }
746746
alloy-transport-ws = { git = "https://github.com/Soubhik-10/alloy", branch = "engine-api-trial" }
747+
alloy-hardforks = { git = "https://github.com/Rimeeeeee/hardforks", branch = "amsterdam" }
747748

749+
alloy-op-hardforks = { git = "https://github.com/Rimeeeeee/hardforks", branch = "amsterdam" }
748750
# op-alloy-consensus = { git = "https://github.com/alloy-rs/op-alloy", rev = "a79d6fc" }
749751
# op-alloy-network = { git = "https://github.com/alloy-rs/op-alloy", rev = "a79d6fc" }
750752
# op-alloy-rpc-types = { git = "https://github.com/alloy-rs/op-alloy", rev = "a79d6fc" }

crates/ethereum/evm/src/build.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ where
8888
};
8989
}
9090

91+
let mut built_block_access_list = None;
92+
let mut block_access_list_hash = None;
93+
94+
if self.chain_spec.is_amsterdam_active_at_timestamp(timestamp) {
95+
built_block_access_list = block_access_list.clone();
96+
block_access_list_hash = block_access_list
97+
.as_ref()
98+
.map(|bal| alloy_primitives::keccak256(alloy_rlp::encode(bal)));
99+
}
100+
91101
let header = Header {
92102
parent_hash: ctx.parent_hash,
93103
ommers_hash: EMPTY_OMMER_ROOT_HASH,
@@ -110,9 +120,7 @@ where
110120
blob_gas_used,
111121
excess_blob_gas,
112122
requests_hash,
113-
block_access_list_hash: block_access_list
114-
.as_ref()
115-
.map(|bal| alloy_primitives::keccak256(alloy_rlp::encode(bal))),
123+
block_access_list_hash,
116124
};
117125

118126
Ok(Block {
@@ -121,7 +129,7 @@ where
121129
transactions,
122130
ommers: Default::default(),
123131
withdrawals,
124-
block_access_list: block_access_list.clone(),
132+
block_access_list: built_block_access_list,
125133
},
126134
})
127135
}

0 commit comments

Comments
 (0)