pub trait RpcNodeCore:
Clone
+ Send
+ Sync
+ Unpin
+ 'static {
type Primitives: NodePrimitives;
type Provider: BlockReaderIdExt<Block = <Self::Primitives as NodePrimitives>::Block, Receipt = <Self::Primitives as NodePrimitives>::Receipt, Header = <Self::Primitives as NodePrimitives>::BlockHeader, Transaction = <Self::Primitives as NodePrimitives>::SignedTx> + ChainSpecProvider + StateProviderFactory<Primitives = Self::Primitives> + NodePrimitivesProvider<Primitives = Self::Primitives> + CanonStateSubscriptions<Primitives = Self::Primitives> + StageCheckpointReader + PruneCheckpointReader + BalProvider + Clone + Unpin + 'static
where <Self::Provider as ChainSpecProvider>::ChainSpec: EthChainSpec<Header = <Self::Primitives as NodePrimitives>::BlockHeader> + Hardforks + EthereumHardforks;
type Pool: TransactionPool
where <Self::Pool as TransactionPool>::Transaction: PoolTransaction<Consensus = <Self::Primitives as NodePrimitives>::SignedTx>;
type Evm: ConfigureEvm<Primitives = Self::Primitives> + 'static;
type Network: NetworkInfo + Clone;
// Required methods
fn pool(&self) -> &Self::Pool;
fn evm_config(&self) -> &Self::Evm;
fn network(&self) -> &Self::Network;
fn provider(&self) -> &Self::Provider;
}Expand description
Helper trait that exposes the node components needed by RPC types: the provider, pool, network and EVM config.
Unlike a full node components trait, it doesn’t enforce the bounds required to run a node. This
makes it useful for RPC types that only need these components. Use RpcNodeCoreAdapter to
construct an implementation from the components.
Required Associated Types§
Sourcetype Primitives: NodePrimitives
type Primitives: NodePrimitives
Blockchain data primitives.
Sourcetype Provider: BlockReaderIdExt<Block = <Self::Primitives as NodePrimitives>::Block, Receipt = <Self::Primitives as NodePrimitives>::Receipt, Header = <Self::Primitives as NodePrimitives>::BlockHeader, Transaction = <Self::Primitives as NodePrimitives>::SignedTx> + ChainSpecProvider + StateProviderFactory<Primitives = Self::Primitives> + NodePrimitivesProvider<Primitives = Self::Primitives> + CanonStateSubscriptions<Primitives = Self::Primitives> + StageCheckpointReader + PruneCheckpointReader + BalProvider + Clone + Unpin + 'static
where
<Self::Provider as ChainSpecProvider>::ChainSpec: EthChainSpec<Header = <Self::Primitives as NodePrimitives>::BlockHeader> + Hardforks + EthereumHardforks
type Provider: BlockReaderIdExt<Block = <Self::Primitives as NodePrimitives>::Block, Receipt = <Self::Primitives as NodePrimitives>::Receipt, Header = <Self::Primitives as NodePrimitives>::BlockHeader, Transaction = <Self::Primitives as NodePrimitives>::SignedTx> + ChainSpecProvider + StateProviderFactory<Primitives = Self::Primitives> + NodePrimitivesProvider<Primitives = Self::Primitives> + CanonStateSubscriptions<Primitives = Self::Primitives> + StageCheckpointReader + PruneCheckpointReader + BalProvider + Clone + Unpin + 'static where <Self::Provider as ChainSpecProvider>::ChainSpec: EthChainSpec<Header = <Self::Primitives as NodePrimitives>::BlockHeader> + Hardforks + EthereumHardforks
The provider type used to interact with the node.
Sourcetype Pool: TransactionPool
where
<Self::Pool as TransactionPool>::Transaction: PoolTransaction<Consensus = <Self::Primitives as NodePrimitives>::SignedTx>
type Pool: TransactionPool where <Self::Pool as TransactionPool>::Transaction: PoolTransaction<Consensus = <Self::Primitives as NodePrimitives>::SignedTx>
The transaction pool of the node.
Sourcetype Evm: ConfigureEvm<Primitives = Self::Primitives> + 'static
type Evm: ConfigureEvm<Primitives = Self::Primitives> + 'static
The node’s EVM configuration, defining settings for the Ethereum Virtual Machine.
Sourcetype Network: NetworkInfo + Clone
type Network: NetworkInfo + Clone
Network API.
Required Methods§
Sourcefn evm_config(&self) -> &Self::Evm
fn evm_config(&self) -> &Self::Evm
Returns the node’s evm config.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".