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_ compat serde-bincode-compat
- Bincode-compatible serde implementations for commonly used types for (EVM) block execution.
- test_
utils test-utils
- Common test helpers for mocking the Provider.
- writer
- Writer standalone type.
Structs§
- Block
Execution Output BlockExecutionResult
combined with state.- Block
Execution Result - The result of executing a block.
- Block
Receipts - Used to hold receipts and their attachment.
- Canon
State Notification Stream - A Stream of
CanonStateNotification
. - Chain
- A chain of blocks and their final state.
- Chain
Blocks - All blocks in the chain
- Changed
Account - Represents a changed account
- Display
Blocks Chain - Wrapper type for
blocks
display inChain
- EthStorage
- Ethereum storage implementation.
- Execution
Outcome - Represents the outcome of block execution, including post-execution changes and reverts.
- Header
Sync Gap - Represents a gap to sync: from
local_head
totarget
Enums§
- Block
Source - A helper enum that represents the origin of the requested block.
- Canon
State Notification - A notification that is sent when a new block is imported, or an old block is reverted.
- Chain
Split - Result of a split chain.
- Chain
Split Target - The target block where the chain should be split.
- Original
Values Known - Re-export
OriginalValuesKnown
Option for [BundleState
] when converting it to the plain state. - Provider
Error - Re-export provider error. Bundled errors variants thrown by various providers.
- Storage
Location - An enum that represents the storage location for a piece of data.
- Transaction
Variant - Enum to control transaction hash inclusion.
Traits§
- Account
ExtReader - Account reader
- Account
Reader - Account reader
- Block
Body Indices Provider - Client trait for fetching block body indices related data.
- Block
Body Reader - Trait that implements how block bodies are read from the storage.
- Block
Body Writer - Trait that implements how block bodies are written to the storage.
- Block
Execution Fork Provider - Fork data needed for execution on it.
- Block
Execution Writer BlockExecution
Writer- Block
Hash Reader - Client trait for fetching block hashes by number.
- Block
IdReader - Client trait for transforming [
BlockId
] into block numbers or hashes. - Block
NumReader - 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.
- Block
Reader - Api trait for fetching
Block
related data. - Block
Reader IdExt - Trait extension for
BlockReader
, for types that implementBlockId
conversion. - Block
Writer - Block Writer
- Blockchain
Tree Pending State Provider - Blockchain trait provider that gives access to the blockchain state that is not yet committed (pending).
- Canon
Chain Tracker - A type that can track updates related to fork choice updates.
- Canon
State Subscriptions - A type that allows to register chain related event subscriptions.
- Chain
Spec Provider - A trait for reading the current chainspec.
- Chain
State Block Reader - Functionality to read the last known chain blocks from the database.
- Chain
State Block Writer - Functionality to write the last known chain blocks to the database.
- Chain
Storage Reader - Trait that implements how chain-specific types are read from storage.
- Chain
Storage Writer - Trait that implements how chain-specific types are written to the storage.
- Change
SetReader - AccountChange reader
- DBProvider
- Database provider.
- Database
Provider Factory - Database provider factory.
- Execution
Data Provider - Provides data required for post-block execution.
- Full
Execution Data Provider - Provides comprehensive post-execution state data required for further execution.
- Full
Provider - Helper trait to unify all provider traits for simplicity.
- Full
RpcProvider - Helper trait to unify all provider traits required to support
eth
RPC server behaviour, for simplicity. - Hashed
Post State Provider - Trait that provides the hashed state from various sources.
- Hashing
Writer - Hashing Writer
- Header
Provider - Client trait for fetching
Header
related data. - Header
Sync GapProvider - Client trait for determining the current headers sync gap.
- History
Writer - History Writer
- Node
Primitives Provider - Provider implementation that knows configured [
NodePrimitives
]. - Ommers
Provider - Client trait for fetching ommers.
- Prune
Checkpoint Reader - The trait for fetching prune checkpoint related data.
- Prune
Checkpoint Writer - The trait for updating prune checkpoint related data.
- Receipt
Provider - Client trait for fetching receipt data.
- Receipt
Provider IdExt - Trait extension for
ReceiptProvider
, for types that implementBlockId
conversion. - Stage
Checkpoint Reader - The trait for fetching stage checkpoint related data.
- Stage
Checkpoint Writer - The trait for updating stage checkpoint related data.
- State
Commitment Provider db-api
- Trait implemented for database providers that can provide the [
reth_trie_db::StateCommitment
] type. - State
Proof Provider - A type that can generate state proof on top of a given post state.
- State
Provider - An abstraction for a type that provides state data.
- State
Provider Factory - Light wrapper that returns
StateProvider
implementations that correspond to the givenBlockNumber
, the latest state, or the pending state. - State
Reader - This just receives state, or
ExecutionOutcome
, from the provider - State
Root Provider - A type that can compute the state root of a given post state.
- State
Writer - A trait specifically for writing state changes or reverts
- Static
File Provider Factory - Static file provider factory.
- Stats
Reader - The trait for fetching provider statistics.
- Storage
Change SetReader db-api
- Storage ChangeSet reader
- Storage
Reader - Storage reader
- Storage
Root Provider - A type that can compute the storage root for a given account.
- Storage
Trie Writer - Storage Trie Writer
- Transactions
Provider - Client trait for fetching transactions related data.
- Transactions
Provider Ext - Client trait for fetching additional transactions related data.
- Trie
Writer - Trie Writer
- TryInto
Historical State Provider - Trait implemented for database providers that can be converted into a historical state provider.
- Withdrawals
Provider - Client trait for fetching [
alloy_eips::eip4895::Withdrawal
] related data.
Type Aliases§
- Account
Revert Init - Types used inside
RevertsInit
to initialize revms reverts. - Bundle
State Init - Type used to initialize revms bundle state.
- Canon
State Notification Sender - Type alias for a sender that sends
CanonStateNotification
- Canon
State Notifications - Type alias for a receiver that receives
CanonStateNotification
- Factory
Tx - Helper type alias to get the associated transaction type from a
DatabaseProviderFactory
. - Provider
Block - A helper type alias to access
BlockReader::Block
. - Provider
Header - A helper type alias to access
HeaderProvider::Header
. - Provider
Receipt - A helper type alias to access
ReceiptProvider::Receipt
. - Provider
Result - Re-export provider error. Provider result type.
- Provider
Tx - A helper type alias to access
TransactionsProvider::Transaction
. - Read
Body Input - Input for reading a block body. Contains a header of block being read and a list of pre-fetched transactions.
- Reverts
Init - Type used to initialize revms reverts.
- State
Provider Box - Type alias of boxed
StateProvider
.