Skip to content

Commit c233f4a

Browse files
committed
add EMPTY_REQUESTS_HASH for to flashblocks
1 parent 93b31a4 commit c233f4a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Diff for: crates/op-rbuilder/src/payload_builder.rs

+15-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use alloy_consensus::{
77
constants::EMPTY_WITHDRAWALS, Eip658Value, Header, Transaction, Typed2718,
88
EMPTY_OMMER_ROOT_HASH,
99
};
10+
use alloy_eips::eip7685::EMPTY_REQUESTS_HASH;
1011
use alloy_eips::{merge::BEACON_NONCE, Encodable2718};
1112
use alloy_op_evm::block::receipt_builder::OpReceiptBuilder;
1213
use alloy_primitives::{map::HashMap, Address, Bytes, B256, U256};
@@ -629,6 +630,13 @@ where
629630
let (excess_blob_gas, blob_gas_used) = ctx.blob_fields();
630631
let extra_data = ctx.extra_data()?;
631632

633+
// Isthmus require this param to be EMPTY_REQUESTS_HASH
634+
let requests_hash = if ctx.is_isthmus_active() {
635+
Some(EMPTY_REQUESTS_HASH)
636+
} else {
637+
None
638+
};
639+
632640
let header = Header {
633641
parent_hash: ctx.parent().hash(),
634642
ommers_hash: EMPTY_OMMER_ROOT_HASH,
@@ -650,7 +658,7 @@ where
650658
parent_beacon_block_root: ctx.attributes().payload_attributes.parent_beacon_block_root,
651659
blob_gas_used,
652660
excess_blob_gas,
653-
requests_hash: None,
661+
requests_hash,
654662
};
655663

656664
// seal the block
@@ -911,6 +919,12 @@ where
911919
self.chain_spec
912920
.is_holocene_active_at_timestamp(self.attributes().timestamp())
913921
}
922+
923+
/// Returns true if isthmus is active for the payload.
924+
pub fn is_isthmus_active(&self) -> bool {
925+
self.chain_spec
926+
.is_isthmus_active_at_timestamp(self.attributes().timestamp())
927+
}
914928
}
915929

916930
impl<ChainSpec> OpPayloadBuilderCtx<ChainSpec>

0 commit comments

Comments
 (0)