mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add Block AT to BlockReader (#12837)
This commit is contained in:
@ -135,7 +135,11 @@ impl OpNode {
|
||||
>
|
||||
where
|
||||
Node: FullNodeTypes<
|
||||
Types: NodeTypesWithEngine<Engine = OpEngineTypes, ChainSpec = OpChainSpec>,
|
||||
Types: NodeTypesWithEngine<
|
||||
Engine = OpEngineTypes,
|
||||
ChainSpec = OpChainSpec,
|
||||
Primitives = OpPrimitives,
|
||||
>,
|
||||
>,
|
||||
{
|
||||
let RollupArgs { disable_txpool_gossip, compute_pending_block, discovery_v4, .. } = args;
|
||||
@ -293,7 +297,7 @@ pub struct OpPoolBuilder {
|
||||
|
||||
impl<Node> PoolBuilder<Node> for OpPoolBuilder
|
||||
where
|
||||
Node: FullNodeTypes<Types: NodeTypes<ChainSpec = OpChainSpec>>,
|
||||
Node: FullNodeTypes<Types: NodeTypes<ChainSpec = OpChainSpec, Primitives = OpPrimitives>>,
|
||||
{
|
||||
type Pool = OpTransactionPool<Node::Provider, DiskFileBlobStore>;
|
||||
|
||||
@ -522,7 +526,7 @@ impl OpNetworkBuilder {
|
||||
|
||||
impl<Node, Pool> NetworkBuilder<Node, Pool> for OpNetworkBuilder
|
||||
where
|
||||
Node: FullNodeTypes<Types: NodeTypes<ChainSpec = OpChainSpec>>,
|
||||
Node: FullNodeTypes<Types: NodeTypes<ChainSpec = OpChainSpec, Primitives = OpPrimitives>>,
|
||||
Pool: TransactionPool + Unpin + 'static,
|
||||
{
|
||||
async fn build_network(
|
||||
|
||||
@ -69,7 +69,7 @@ impl<Client, Tx> OpTransactionValidator<Client, Tx> {
|
||||
|
||||
impl<Client, Tx> OpTransactionValidator<Client, Tx>
|
||||
where
|
||||
Client: StateProviderFactory + BlockReaderIdExt,
|
||||
Client: StateProviderFactory + BlockReaderIdExt<Block = reth_primitives::Block>,
|
||||
Tx: EthPoolTransaction,
|
||||
{
|
||||
/// Create a new [`OpTransactionValidator`].
|
||||
@ -195,7 +195,7 @@ where
|
||||
|
||||
impl<Client, Tx> TransactionValidator for OpTransactionValidator<Client, Tx>
|
||||
where
|
||||
Client: StateProviderFactory + BlockReaderIdExt,
|
||||
Client: StateProviderFactory + BlockReaderIdExt<Block = reth_primitives::Block>,
|
||||
Tx: EthPoolTransaction,
|
||||
{
|
||||
type Transaction = Tx;
|
||||
|
||||
@ -25,6 +25,7 @@ use reth_optimism_node::{
|
||||
OpEngineTypes, OpNode,
|
||||
};
|
||||
use reth_optimism_payload_builder::builder::OpPayloadTransactions;
|
||||
use reth_optimism_primitives::OpPrimitives;
|
||||
use reth_payload_util::{PayloadTransactions, PayloadTransactionsChain, PayloadTransactionsFixed};
|
||||
use reth_primitives::{SealedBlock, Transaction, TransactionSigned, TransactionSignedEcRecovered};
|
||||
use reth_provider::providers::BlockchainProvider2;
|
||||
@ -90,8 +91,13 @@ fn build_components<Node>(
|
||||
OpConsensusBuilder,
|
||||
>
|
||||
where
|
||||
Node:
|
||||
FullNodeTypes<Types: NodeTypesWithEngine<Engine = OpEngineTypes, ChainSpec = OpChainSpec>>,
|
||||
Node: FullNodeTypes<
|
||||
Types: NodeTypesWithEngine<
|
||||
Engine = OpEngineTypes,
|
||||
ChainSpec = OpChainSpec,
|
||||
Primitives = OpPrimitives,
|
||||
>,
|
||||
>,
|
||||
{
|
||||
let RollupArgs { disable_txpool_gossip, compute_pending_block, discovery_v4, .. } =
|
||||
RollupArgs::default();
|
||||
|
||||
@ -20,8 +20,8 @@ use reth_evm::ConfigureEvm;
|
||||
use reth_network_api::NetworkInfo;
|
||||
use reth_node_builder::EthApiBuilderCtx;
|
||||
use reth_provider::{
|
||||
BlockNumReader, BlockReaderIdExt, CanonStateSubscriptions, ChainSpecProvider, EvmEnvProvider,
|
||||
StageCheckpointReader, StateProviderFactory,
|
||||
BlockNumReader, BlockReader, BlockReaderIdExt, CanonStateSubscriptions, ChainSpecProvider,
|
||||
EvmEnvProvider, StageCheckpointReader, StateProviderFactory,
|
||||
};
|
||||
use reth_rpc::eth::{core::EthApiInner, DevSigner};
|
||||
use reth_rpc_eth_api::{
|
||||
@ -249,7 +249,7 @@ where
|
||||
|
||||
impl<N> Trace for OpEthApi<N>
|
||||
where
|
||||
Self: LoadState<Evm: ConfigureEvm<Header = Header>>,
|
||||
Self: RpcNodeCore<Provider: BlockReader> + LoadState<Evm: ConfigureEvm<Header = Header>>,
|
||||
N: RpcNodeCore,
|
||||
{
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ impl<N> LoadPendingBlock for OpEthApi<N>
|
||||
where
|
||||
Self: SpawnBlocking,
|
||||
N: RpcNodeCore<
|
||||
Provider: BlockReaderIdExt
|
||||
Provider: BlockReaderIdExt<Block = reth_primitives::Block>
|
||||
+ EvmEnvProvider
|
||||
+ ChainSpecProvider<ChainSpec: EthChainSpec + EthereumHardforks>
|
||||
+ StateProviderFactory,
|
||||
|
||||
Reference in New Issue
Block a user