Module init

Source
Expand description

Reth genesis initialization utility functions.

Enums§

InitStorageError
Storage initialization error type.

Constants§

AVERAGE_COUNT_ACCOUNTS_PER_GB_STATE_DUMP
Approximate number of accounts per 1 GB of state dump file. One account is approximately 3.5 KB
DEFAULT_SOFT_LIMIT_BYTE_LEN_ACCOUNTS_CHUNK
Default soft limit for number of bytes to read from state dump file, before inserting into database.

Functions§

init_from_state_dump
Reads account state from a BufRead reader and initializes it at the highest block that can be found on database.
init_genesis
Write the genesis block if it has not already been written
insert_genesis_hashes
Inserts hashes for the genesis state.
insert_genesis_header
Inserts header for the genesis state.
insert_genesis_history
Inserts history indices for genesis accounts and storage.
insert_genesis_state
Inserts the genesis state into the database.
insert_history
Inserts history indices for genesis accounts and storage.
insert_state
Inserts state at given block into database.