Skip to main content

Module store

Module store 

Source

Structs§

AccountProof
AccountUpdatesList
Collection of account state changes from block execution.
AncestorIterator
BackfilledBlock
A block’s historical chain data to backfill below the snap-sync pivot: the (already-canonical) header, its body, and its receipts.
StorageSlotProof
Store
Main storage interface for the ethrex client.
StoreConfig
Tunable configuration for Store::new_with_config and related constructors.
StoreMetadata
UpdateBatch
Batch of updates to apply to the store atomically.

Enums§

EngineType
Storage backend type selection.

Constants§

BATCH_COMMIT_THRESHOLD
Depth-only commit threshold for batch execution (full sync / block import). Each batch layer holds ~1024 blocks of trie diffs (~1 GB), so we flush after a few layers to bound memory. The canonical head - DB_COMMIT_THRESHOLD safe-commit root never lands on a batch layer boundary, so batch mode commits by depth instead; this is sound because full sync and import only ever extend a single canonical chain (no competing forks to mis-commit).
DB_COMMIT_THRESHOLD
MAX_ROCKSDB_BLOCK_CACHE_SIZE_BYTES
Ceiling on the RocksDB shared block cache: 12 GiB.
MAX_WITNESSES
Maximum number of execution witnesses to keep in the database
MIN_ROCKSDB_BLOCK_CACHE_SIZE_BYTES
Floor on the RocksDB shared block cache: 512 MiB. Below this the per-SST index and filter blocks no longer stay resident and every trie read pays an extra disk seek, which is worse than the memory it saves. Applied even when it exceeds ROCKSDB_BLOCK_CACHE_MEMORY_PERCENT of a very small host, and even when it exceeds the detected limit outright: a node given less than this much memory cannot follow the chain anyway, so the floor is the more useful failure mode than a cache too small to hold the filters.
ROCKSDB_BLOCK_CACHE_MEMORY_PERCENT
Share of the host’s (or cgroup’s) memory the block cache may claim by default.

Functions§

default_rocksdb_block_cache_size
Default RocksDB shared block cache size, derived from the memory this process is actually allowed to use.
encode_code
has_valid_db
Checks whether a valid (or migratable) database exists at the given path by looking for a metadata.json file with a schema version between 1 and STORE_SCHEMA_VERSION (inclusive).
hash_address
hash_key
hash_key_fixed
read_chain_id_from_db
Reads the chain ID from an existing database without performing a full store initialization. Returns None if the database doesn’t exist or the chain config can’t be read. Always returns None when compiled without the rocksdb feature.
receipt_key
Builds a fixed-width RECEIPTS key: block_hash (32B) || index (8B BE).
rocksdb_block_cache_size_for
Pure part of default_rocksdb_block_cache_size: the clamp, with the detected memory limit supplied by the caller. None means detection failed.
tx_locations_merge
Merge function for the TRANSACTION_LOCATIONS column family.
write_flushed_upto
Writes the flushed_upto block number into an open write batch.

Type Aliases§

StorageTrieNodes
Storage trie nodes grouped by account address hash.
StorageUpdates
Storage trie updates grouped by account address hash.