Skip to content

Commit d87a8c4

Browse files
authored
fix: accept missing mix hashes in remote blocks (#516)
* fix: accept missing mix hashes in remote blocks * Create modern-ways-wash.md * Add TODO about missing mix_hash
1 parent fd9f5a3 commit d87a8c4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/modern-ways-wash.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@nomicfoundation/edr": patch
3+
---
4+
5+
Fixed a problem that prevented forking chains without mix hash fields in their blocks

crates/edr_evm/src/block/remote.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ impl IntoRemoteBlock<L1ChainSpec> for edr_rpc_eth::Block<edr_rpc_eth::Transactio
178178
gas_used: self.gas_used,
179179
timestamp: self.timestamp,
180180
extra_data: self.extra_data,
181-
mix_hash: self.mix_hash.ok_or(CreationError::MissingMixHash)?,
181+
// TODO don't accept remote blocks with missing mix hash,
182+
// see https://github.com/NomicFoundation/edr/issues/518
183+
mix_hash: self.mix_hash.unwrap_or_default(),
182184
nonce: self.nonce.ok_or(CreationError::MissingNonce)?,
183185
base_fee_per_gas: self.base_fee_per_gas,
184186
withdrawals_root: self.withdrawals_root,

0 commit comments

Comments
 (0)