Crate reth_provider

Source
Expand description

Collection of traits and trait implementations for common database operations.

§Feature Flags

  • test-utils: Export utilities for testing

Re-exports§

pub use providers::DatabaseProvider;
pub use providers::DatabaseProviderRO;
pub use providers::DatabaseProviderRW;
pub use providers::HistoricalStateProvider;
pub use providers::HistoricalStateProviderRef;
pub use providers::LatestStateProvider;
pub use providers::LatestStateProviderRef;
pub use providers::ProviderFactory;
pub use providers::StaticFileAccess;
pub use providers::StaticFileWriter;

Modules§

bundle_state
Bundle state module. This module contains all the logic related to bundle state.
errors
Commonly used error types used when interacting with storage.
noop
Various noop implementations for traits.
providers
Provider trait implementations. Contains the main provider types and traits for interacting with the blockchain’s storage.
serde_bincode_compatserde-bincode-compat
Bincode-compatible serde implementations for commonly used types for (EVM) block execution.
test_utilstest-utils
Common test helpers for mocking the Provider.
writer
Writer standalone type.

Structs§

BlockExecutionOutput
BlockExecutionResult combined with state.
BlockExecutionResult
The result of executing a block.
BlockReceipts
Used to hold receipts and their attachment.
CanonStateNotificationStream
A Stream of CanonStateNotification.
Chain
A chain of blocks and their final state.
ChainBlocks
All blocks in the chain
ChangedAccount
Represents a changed account
DisplayBlocksChain
Wrapper type for blocks display in Chain
EthStorage
Ethereum storage implementation.
ExecutionOutcome
Represents the outcome of block execution, including post-execution changes and reverts.
HeaderSyncGap
Represents a gap to sync: from local_head to target

Enums§

BlockSource
A helper enum that represents the origin of the requested block.
CanonStateNotification
A notification that is sent when a new block is imported, or an old block is reverted.
ChainSplit
Result of a split chain.
ChainSplitTarget
The target block where the chain should be split.
OriginalValuesKnown
Re-export OriginalValuesKnown Option for [BundleState] when converting it to the plain state.
ProviderError
Re-export provider error. Bundled errors variants thrown by various providers.
StorageLocation
An enum that represents the storage location for a piece of data.
TransactionVariant
Enum to control transaction hash inclusion.

Traits§

AccountExtReader
Account reader
AccountReader
Account reader
BlockBodyIndicesProvider
Client trait for fetching block body indices related data.
BlockBodyReader
Trait that implements how block bodies are read from the storage.
BlockBodyWriter
Trait that implements how block bodies are written to the storage.
BlockExecutionForkProvider
Fork data needed for execution on it.
BlockExecutionWriter
BlockExecution Writer
BlockHashReader
Client trait for fetching block hashes by number.
BlockIdReader
Client trait for transforming [BlockId] into block numbers or hashes.
BlockNumReader
Client trait for getting important block numbers (such as the latest block number), converting block hashes to numbers, and fetching a block hash from its block number.
BlockReader
Api trait for fetching Block related data.
BlockReaderIdExt
Trait extension for BlockReader, for types that implement BlockId conversion.
BlockWriter
Block Writer
BlockchainTreePendingStateProvider
Blockchain trait provider that gives access to the blockchain state that is not yet committed (pending).
CanonChainTracker
A type that can track updates related to fork choice updates.
CanonStateSubscriptions
A type that allows to register chain related event subscriptions.
ChainSpecProvider
A trait for reading the current chainspec.
ChainStateBlockReader
Functionality to read the last known chain blocks from the database.
ChainStateBlockWriter
Functionality to write the last known chain blocks to the database.
ChainStorageReader
Trait that implements how chain-specific types are read from storage.
ChainStorageWriter
Trait that implements how chain-specific types are written to the storage.
ChangeSetReader
AccountChange reader
DBProvider
Database provider.
DatabaseProviderFactory
Database provider factory.
ExecutionDataProvider
Provides data required for post-block execution.
FullExecutionDataProvider
Provides comprehensive post-execution state data required for further execution.
FullProvider
Helper trait to unify all provider traits for simplicity.
FullRpcProvider
Helper trait to unify all provider traits required to support eth RPC server behaviour, for simplicity.
HashedPostStateProvider
Trait that provides the hashed state from various sources.
HashingWriter
Hashing Writer
HeaderProvider
Client trait for fetching Header related data.
HeaderSyncGapProvider
Client trait for determining the current headers sync gap.
HistoryWriter
History Writer
NodePrimitivesProvider
Provider implementation that knows configured [NodePrimitives].
OmmersProvider
Client trait for fetching ommers.
PruneCheckpointReader
The trait for fetching prune checkpoint related data.
PruneCheckpointWriter
The trait for updating prune checkpoint related data.
ReceiptProvider
Client trait for fetching receipt data.
ReceiptProviderIdExt
Trait extension for ReceiptProvider, for types that implement BlockId conversion.
StageCheckpointReader
The trait for fetching stage checkpoint related data.
StageCheckpointWriter
The trait for updating stage checkpoint related data.
StateCommitmentProviderdb-api
Trait implemented for database providers that can provide the [reth_trie_db::StateCommitment] type.
StateProofProvider
A type that can generate state proof on top of a given post state.
StateProvider
An abstraction for a type that provides state data.
StateProviderFactory
Light wrapper that returns StateProvider implementations that correspond to the given BlockNumber, the latest state, or the pending state.
StateReader
This just receives state, or ExecutionOutcome, from the provider
StateRootProvider
A type that can compute the state root of a given post state.
StateWriter
A trait specifically for writing state changes or reverts
StaticFileProviderFactory
Static file provider factory.
StatsReader
The trait for fetching provider statistics.
StorageChangeSetReaderdb-api
Storage ChangeSet reader
StorageReader
Storage reader
StorageRootProvider
A type that can compute the storage root for a given account.
StorageTrieWriter
Storage Trie Writer
TransactionsProvider
Client trait for fetching transactions related data.
TransactionsProviderExt
Client trait for fetching additional transactions related data.
TrieWriter
Trie Writer
TryIntoHistoricalStateProvider
Trait implemented for database providers that can be converted into a historical state provider.
WithdrawalsProvider
Client trait for fetching [alloy_eips::eip4895::Withdrawal] related data.

Type Aliases§

AccountRevertInit
Types used inside RevertsInit to initialize revms reverts.
BundleStateInit
Type used to initialize revms bundle state.
CanonStateNotificationSender
Type alias for a sender that sends CanonStateNotification
CanonStateNotifications
Type alias for a receiver that receives CanonStateNotification
FactoryTx
Helper type alias to get the associated transaction type from a DatabaseProviderFactory.
ProviderBlock
A helper type alias to access BlockReader::Block.
ProviderHeader
A helper type alias to access HeaderProvider::Header.
ProviderReceipt
A helper type alias to access ReceiptProvider::Receipt.
ProviderResult
Re-export provider error. Provider result type.
ProviderTx
A helper type alias to access TransactionsProvider::Transaction.
ReadBodyInput
Input for reading a block body. Contains a header of block being read and a list of pre-fetched transactions.
RevertsInit
Type used to initialize revms reverts.
StateProviderBox
Type alias of boxed StateProvider.