mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-26 07:38:59 -05:00
chore: relax localpending block bounds (#16979)
This commit is contained in:
@@ -9,7 +9,6 @@ use reth_evm::ConfigureEvm;
|
||||
use reth_node_api::NodePrimitives;
|
||||
use reth_optimism_evm::OpNextBlockEnvAttributes;
|
||||
use reth_optimism_forks::OpHardforks;
|
||||
use reth_optimism_primitives::{OpBlock, OpReceipt, OpTransactionSigned};
|
||||
use reth_primitives_traits::{RecoveredBlock, SealedHeader};
|
||||
use reth_rpc_eth_api::{
|
||||
helpers::{LoadPendingBlock, SpawnBlocking},
|
||||
@@ -33,17 +32,13 @@ where
|
||||
Error: FromEvmError<Self::Evm>,
|
||||
>,
|
||||
N: RpcNodeCore<
|
||||
Provider: BlockReaderIdExt<
|
||||
Transaction = OpTransactionSigned,
|
||||
Block = OpBlock,
|
||||
Receipt = OpReceipt,
|
||||
Header = alloy_consensus::Header,
|
||||
> + ChainSpecProvider<ChainSpec: EthChainSpec + OpHardforks>
|
||||
Provider: BlockReaderIdExt
|
||||
+ ChainSpecProvider<ChainSpec: EthChainSpec + OpHardforks>
|
||||
+ StateProviderFactory,
|
||||
Pool: TransactionPool<Transaction: PoolTransaction<Consensus = ProviderTx<N::Provider>>>,
|
||||
Evm: ConfigureEvm<
|
||||
Primitives = <Self as RpcNodeCore>::Primitives,
|
||||
NextBlockEnvCtx = OpNextBlockEnvAttributes,
|
||||
NextBlockEnvCtx: From<OpNextBlockEnvAttributes>,
|
||||
>,
|
||||
Primitives: NodePrimitives<
|
||||
BlockHeader = ProviderHeader<Self::Provider>,
|
||||
@@ -72,8 +67,9 @@ where
|
||||
prev_randao: B256::random(),
|
||||
gas_limit: parent.gas_limit(),
|
||||
parent_beacon_block_root: parent.parent_beacon_block_root(),
|
||||
extra_data: parent.extra_data.clone(),
|
||||
})
|
||||
extra_data: parent.extra_data().clone(),
|
||||
}
|
||||
.into())
|
||||
}
|
||||
|
||||
/// Returns the locally built pending block
|
||||
|
||||
@@ -24,22 +24,20 @@ impl<Provider, Pool, Network, EvmConfig> LoadPendingBlock
|
||||
for EthApi<Provider, Pool, Network, EvmConfig>
|
||||
where
|
||||
Self: SpawnBlocking<
|
||||
NetworkTypes: RpcTypes<Header = alloy_rpc_types_eth::Header>,
|
||||
NetworkTypes: RpcTypes<
|
||||
Header = alloy_rpc_types_eth::Header<ProviderHeader<Self::Provider>>,
|
||||
>,
|
||||
Error: FromEvmError<Self::Evm>,
|
||||
> + RpcNodeCore<
|
||||
Provider: BlockReaderIdExt<
|
||||
Transaction = reth_ethereum_primitives::TransactionSigned,
|
||||
Block = reth_ethereum_primitives::Block,
|
||||
Receipt = reth_ethereum_primitives::Receipt,
|
||||
Header = alloy_consensus::Header,
|
||||
> + ChainSpecProvider<ChainSpec: EthChainSpec + EthereumHardforks>
|
||||
Provider: BlockReaderIdExt<Receipt = Provider::Receipt, Block = Provider::Block>
|
||||
+ ChainSpecProvider<ChainSpec: EthChainSpec + EthereumHardforks>
|
||||
+ StateProviderFactory,
|
||||
Pool: TransactionPool<
|
||||
Transaction: PoolTransaction<Consensus = ProviderTx<Self::Provider>>,
|
||||
>,
|
||||
Evm: ConfigureEvm<
|
||||
Primitives = <Self as RpcNodeCore>::Primitives,
|
||||
NextBlockEnvCtx = NextBlockEnvAttributes,
|
||||
NextBlockEnvCtx: From<NextBlockEnvAttributes>,
|
||||
>,
|
||||
Primitives: NodePrimitives<
|
||||
BlockHeader = ProviderHeader<Self::Provider>,
|
||||
@@ -48,10 +46,7 @@ where
|
||||
Block = ProviderBlock<Self::Provider>,
|
||||
>,
|
||||
>,
|
||||
Provider: BlockReader<
|
||||
Block = reth_ethereum_primitives::Block,
|
||||
Receipt = reth_ethereum_primitives::Receipt,
|
||||
>,
|
||||
Provider: BlockReader,
|
||||
{
|
||||
#[inline]
|
||||
fn pending_block(
|
||||
@@ -73,6 +68,7 @@ where
|
||||
gas_limit: parent.gas_limit(),
|
||||
parent_beacon_block_root: parent.parent_beacon_block_root().map(|_| B256::ZERO),
|
||||
withdrawals: None,
|
||||
})
|
||||
}
|
||||
.into())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user