Crate zksync_consensus_storage

Source
Expand description

Abstraction for persistent data storage. It provides schema-aware type-safe database access.

Modules§

proto
testonly
Test-only utilities.

Structs§

BlockStore
A wrapper around a PersistentBlockStore which adds caching blocks in-memory and other useful utilities.
BlockStoreRunner
Runner of the BlockStore background tasks.
BlockStoreState
State of the BlockStore: continuous range of blocks.
ChonkyV2State
The struct that contains the state of a ChonkyBFT v2 replica to be persisted.
Proposal
A payload of a proposed block which is not known to be finalized yet. Replicas have to persist such proposed payloads for liveness: consensus may finalize a block without knowing a payload in case of reproposals. Currently we do not store the BlockHeader, because it is always available in the LeaderPrepare message.
ReplicaState
The struct that contains the replica state to be persisted.

Enums§

Last
Last block in the block store (see BlockStoreState). Note that the commit qc is required in the case the block has been finalized by the consensus.

Traits§

PersistentBlockStore
Storage of a continuous range of L2 blocks.
ReplicaStore
Storage for ReplicaState.