Crate zksync_state

Source
Expand description

Execution of transaction in ZKsync Era

Structs§

AsyncCatchupTask
A runnable task that blocks until the provided RocksDB cache instance is caught up with Postgres.
BatchDiff
DB difference introduced by one batch.
InMemoryStorage
In-memory storage.
PostgresStorage
ReadStorage implementation backed by the Postgres database.
PostgresStorageCaches
Caches used during VM execution.
PostgresStorageCachesTask
An asynchronous task that updates the VM storage values cache.
RocksdbCell
A lazily initialized handle to RocksDB cache returned from AsyncCatchupTask::new().
RocksdbStorage
ReadStorage implementation backed by RocksDB.
RocksdbStorageBuilder
Builder of RocksdbStorage. The storage data is inaccessible until the storage is Self::synchronize()d with Postgres.
RocksdbStorageOptions
Options for RocksdbStorage.
RocksdbWithMemory
A RocksDB cache instance with in-memory DB diffs that gives access to DB state at batches N to N + K, where K is the number of diffs.
SequentialCache
A generic cache structure for storing key-value pairs in sequential order. It allows for non-unique keys and supports efficient retrieval of values based on a key threshold. The cache maintains a specified maximum capacity, removing the oldest entries as new ones are added.
ShadowStorage
ReadStorage implementation backed by 2 different backends: source_storage – backend that will return values for function calls and be the source of truth to_check_storage – secondary storage, which will verify it’s own return values against source_storage Note that if to_check_storage value is different than source value, execution continues and metrics/ logs are emitted.
StorageView
StorageView is a buffer for StorageLogs between storage and transaction execution code. In order to commit transactions logs should be submitted to the underlying storage after a transaction is executed.
StorageViewCache
StorageViewCache is a struct for caching storage reads and contains_key() checks.
StorageViewMetrics
Metrics for StorageView.
WitnessStorage
ReadStorage implementation backed by binary serialized [WitnessHashBlockState]. Note that load_factory_deps is not used. FactoryDeps data is used straight inside witness generator, loaded with the blob.

Enums§

PgOrRocksdbStorage
A ReadStorage implementation that uses either PostgresStorage or RocksdbStorage underneath.
StateKeeperColumnFamily
RocksDB column families used by the state keeper.

Constants§

IN_MEMORY_STORAGE_DEFAULT_NETWORK_ID
Network ID we use by default for in memory storage.

Traits§

ReadStorage
Functionality to read from the VM storage.
ReadStorageFactory
Factory that can produce a ReadStorage implementation on demand.
WriteStorage
Functionality to write to the VM storage in a batch.

Type Aliases§

StoragePtr
Smart pointer to WriteStorage.