Skip to main content

Crate reth_chain_state

Crate reth_chain_state 

Source
Expand description

Reth state related types and functionality.

Modules§

test_utilstest-utils
Common test helpers

Structs§

BlockState
State after applying the given block, this block is part of the canonical chain that partially stored in memory and can be traced back to a canonical block on disk.
CanonStateNotificationStream
A Stream of CanonStateNotification.
CanonicalInMemoryState
This type is responsible for providing the blocks, receipts, and state for all canonical blocks not on disk yet and keeps track of the block range that is in memory.
CanonicalInMemoryStateWriter
Creates a CanonicalInMemoryState and changes it: the blocks it tracks, its chain info, and the notifications it sends.
ChainInfoHeaders
The headers a ChainInfoTracker starts from: the canonical head and, if known, the safe and finalized blocks.
ChainInfoTracker
Tracks the chain info: canonical head, safe block, finalized block.
EthPrimitives
Helper struct that specifies the ethereum NodePrimitives types.
ExecutedBlock
Represents an executed block stored in-memory.
ExecutionTimingStats
Statistics collected during block execution for cross-client performance analysis.
ForkChoiceNotifications
Wrapper around a broadcast receiver that receives fork choice notifications.
InMemoryState
Container type for in memory state data of the executed blocks that are not on disk yet.
InMemoryStateBlockCounts
The numbers of blocks an InMemoryState tracks.
InMemoryStateSnapshot
The executed in-memory blocks an InMemoryState tracked at one moment, taken with InMemoryState::snapshot_during.
InMemoryStateWriter
Write access to the blocks of an InMemoryState.
PersistedBlockNotifications
Wrapper around a watch receiver that receives persisted block notifications.
PreservedSparseTrie
A preserved sparse trie that can be reused across payload validations.
Snapshotted
A value and the in-memory blocks that were tracked during the whole time it was produced, returned by InMemoryState::snapshot_during.
SparseTrieWithStorageRoots
A finalized sparse trie and its revealed storage roots for the next block’s proof workers.
WatchValueStream
A stream that yields values from a watch::Receiver<Option<T>>, filtering out None values.

Enums§

CanonStateNotification
A notification that is sent when a new block is imported, or an old block is reverted.
NewCanonicalChain
Non-empty chain of blocks.
PreservedSparseTrieError
Error returned when consuming a preserved sparse trie.

Constants§

SNAPSHOT_DURING_ATTEMPTS
How many times InMemoryState::snapshot_during runs its closure at most.

Traits§

CanonStateSubscriptions
A type that allows to register chain related event subscriptions.
ForkChoiceSubscriptions
A trait that allows to register to fork choice related events and get notified when a new fork choice is available.
PersistedBlockSubscriptions
A trait that allows subscribing to persisted block events.

Type Aliases§

CanonStateNotificationSender
Type alias for a sender that sends CanonStateNotification
CanonStateNotifications
Type alias for a receiver that receives CanonStateNotification
ForkChoiceStream
Alias for WatchValueStream for fork choice watch channels.