Module tables
Available on crate feature
provider
only.Expand description
Modules§
- codecs
- Integrates different codecs into
table::Encode
andtable::Decode
.
Structs§
- Account
Change Sets - Stores the state of an account before a certain transaction changed it. Change on state can be: account is created, selfdestructed, touched while empty or changed balance,nonce.
- Accounts
History - Stores pointers to block changeset with changes for each account key.
- Accounts
Trie - Stores the current state’s Merkle Patricia Tree.
- Block
Body Indices - Stores block indices that contains indexes of transaction and the count of them.
- Block
Ommers - Stores the uncles/ommers of the block.
- Block
Withdrawals - Stores the block withdrawals.
- Bytecodes
- Stores all smart contract bytecodes. There will be multiple accounts that have same bytecode So we would need to introduce reference counter. This will be small optimization on state.
- Canonical
Headers - Stores the header hashes belonging to the canonical chain.
- Chain
State - Stores generic chain state info, like the last finalized block.
- Hashed
Accounts - Stores the current state of an
Account
indexed withkeccak256Address
This table is in preparation for merklization and calculation of state root. We are saving whole account data as it is needed for partial update when part of storage is changed. Benefit for merklization is that hashed addresses are sorted. - Hashed
Storages - Stores the current storage values indexed with
keccak256Address
and hash of storage keykeccak256key
. This table is in preparation for merklization and calculation of state root. Benefit for merklization is that hashed addresses/keys are sorted. - Header
Numbers - Stores the block number corresponding to a header.
- Header
Terminal Difficulties - Stores the total difficulty from a block header.
- Headers
- Stores header bodies.
- Plain
Account State - Stores the current state of an
Account
. - Plain
Storage State - Stores the current value of a storage key.
- Prune
Checkpoints - Stores the highest pruned block number and prune mode of each prune segment.
- RawDup
Sort - Raw
DupSort
table that can be used to access any table and its data in raw mode. This is useful for delayed decoding/encoding of data. - RawKey
- Raw table key.
- RawTable
- Raw table that can be used to access any table and its data in raw mode. This is useful for delayed decoding/encoding of data.
- RawValue
- Raw table value.
- Receipts
- Canonical only Stores transaction receipts.
- Stage
Checkpoint Progresses - Stores arbitrary data to keep track of a stage first-sync progress.
- Stage
Checkpoints - Stores the highest synced block number and stage-specific checkpoint of each stage.
- Storage
Change Sets - Stores the state of a storage key before a certain transaction changed it.
If
StorageEntry::value
is zero, this means storage was not existing and needs to be removed. - Storages
History - Stores pointers to block number changeset with changes for each storage key.
- Storages
Trie - From HashedAddress => NibblesSubKey => Intermediate value
- Transaction
Blocks - Stores the mapping of transaction number to the blocks number.
- Transaction
Hash Numbers - Stores the mapping of the transaction hash to the transaction number.
- Transaction
Senders - Stores the transaction sender for each canonical transaction. It is needed to speed up execution stage and allows fetching signer without doing transaction signed recovery
- Transactions
- Canonical only Stores the transaction body for canonical transactions.
- Version
History - Stores the history of client versions that have accessed the database with write privileges by unix timestamp in seconds.
Enums§
- Chain
State Key - Keys for the
ChainState
table. - Table
Type - Enum for the types of tables present in libmdbx.
- Tables
- A table in the database.
Traits§
- Table
Set - General trait for defining the set of tables Used to initialize database
- Table
Viewer - The general purpose of this is to use with a combination of Tables enum,
by implementing a
TableViewer
trait you can operate on db tables in an abstract way.
Type Aliases§
- Block
Number List - List with transaction numbers.
- StageId
- Encoded stage id.
- Table
RawRow - Tuple with
RawKey<T::Key>
andRawValue<T::Value>
.