mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: gracefully handle missing persisted_trie_updates (#13942)
This commit is contained in:
@ -14,7 +14,7 @@ use alloy_rpc_types_engine::PayloadId;
|
||||
use op_alloy_consensus::{OpDepositReceipt, OpTxType};
|
||||
use op_alloy_rpc_types_engine::OpPayloadAttributes;
|
||||
use reth_basic_payload_builder::*;
|
||||
use reth_chain_state::ExecutedBlock;
|
||||
use reth_chain_state::{ExecutedBlock, ExecutedBlockWithTrieUpdates};
|
||||
use reth_chainspec::{ChainSpecProvider, EthereumHardforks};
|
||||
use reth_evm::{
|
||||
env::EvmEnv, system_calls::SystemCaller, ConfigureEvm, ConfigureEvmEnv, Evm,
|
||||
@ -435,13 +435,15 @@ where
|
||||
debug!(target: "payload_builder", id=%ctx.attributes().payload_id(), sealed_block_header = ?sealed_block.header(), "sealed built block");
|
||||
|
||||
// create the executed block data
|
||||
let executed: ExecutedBlock<OpPrimitives> = ExecutedBlock {
|
||||
recovered_block: Arc::new(RecoveredBlock::new_sealed(
|
||||
sealed_block.as_ref().clone(),
|
||||
info.executed_senders,
|
||||
)),
|
||||
execution_output: Arc::new(execution_outcome),
|
||||
hashed_state: Arc::new(hashed_state),
|
||||
let executed: ExecutedBlockWithTrieUpdates<OpPrimitives> = ExecutedBlockWithTrieUpdates {
|
||||
block: ExecutedBlock {
|
||||
recovered_block: Arc::new(RecoveredBlock::new_sealed(
|
||||
sealed_block.as_ref().clone(),
|
||||
info.executed_senders,
|
||||
)),
|
||||
execution_output: Arc::new(execution_outcome),
|
||||
hashed_state: Arc::new(hashed_state),
|
||||
},
|
||||
trie: Arc::new(trie_output),
|
||||
};
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ use op_alloy_consensus::{encode_holocene_extra_data, EIP1559ParamError};
|
||||
/// Re-export for use in downstream arguments.
|
||||
pub use op_alloy_rpc_types_engine::OpPayloadAttributes;
|
||||
use op_alloy_rpc_types_engine::{OpExecutionPayloadEnvelopeV3, OpExecutionPayloadEnvelopeV4};
|
||||
use reth_chain_state::ExecutedBlock;
|
||||
use reth_chain_state::ExecutedBlockWithTrieUpdates;
|
||||
use reth_chainspec::EthereumHardforks;
|
||||
use reth_optimism_chainspec::OpChainSpec;
|
||||
use reth_optimism_primitives::{OpBlock, OpPrimitives, OpTransactionSigned};
|
||||
@ -137,7 +137,7 @@ pub struct OpBuiltPayload {
|
||||
/// The built block
|
||||
pub(crate) block: Arc<SealedBlock<OpBlock>>,
|
||||
/// Block execution data for the payload, if any.
|
||||
pub(crate) executed_block: Option<ExecutedBlock<OpPrimitives>>,
|
||||
pub(crate) executed_block: Option<ExecutedBlockWithTrieUpdates<OpPrimitives>>,
|
||||
/// The fees of the block
|
||||
pub(crate) fees: U256,
|
||||
/// The blobs, proofs, and commitments in the block. If the block is pre-cancun, this will be
|
||||
@ -159,7 +159,7 @@ impl OpBuiltPayload {
|
||||
fees: U256,
|
||||
chain_spec: Arc<OpChainSpec>,
|
||||
attributes: OpPayloadBuilderAttributes,
|
||||
executed_block: Option<ExecutedBlock<OpPrimitives>>,
|
||||
executed_block: Option<ExecutedBlockWithTrieUpdates<OpPrimitives>>,
|
||||
) -> Self {
|
||||
Self { id, block, executed_block, fees, sidecars: Vec::new(), chain_spec, attributes }
|
||||
}
|
||||
@ -196,7 +196,7 @@ impl BuiltPayload for OpBuiltPayload {
|
||||
self.fees
|
||||
}
|
||||
|
||||
fn executed_block(&self) -> Option<ExecutedBlock<OpPrimitives>> {
|
||||
fn executed_block(&self) -> Option<ExecutedBlockWithTrieUpdates<OpPrimitives>> {
|
||||
self.executed_block.clone()
|
||||
}
|
||||
|
||||
@ -216,7 +216,7 @@ impl BuiltPayload for &OpBuiltPayload {
|
||||
(**self).fees()
|
||||
}
|
||||
|
||||
fn executed_block(&self) -> Option<ExecutedBlock<OpPrimitives>> {
|
||||
fn executed_block(&self) -> Option<ExecutedBlockWithTrieUpdates<OpPrimitives>> {
|
||||
self.executed_block.clone()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user