Skip to main content

Module init_state

Module init_state 

Source
Expand description

Initialize state from a binary dump file.

This command loads TIP20 storage slots from a binary file and applies them to the genesis state. The binary format is produced by tempo-xtask generate-state-bloat.

Structsยง

InitFromBinaryDump
Initialize state from a binary dump file.

Constantsยง

ETL_FILE_SIZE ๐Ÿ”’
ETL collector file size (200 MiB per temp file before spilling a new one).
HASH_WORKER_QUEUE_DEPTH ๐Ÿ”’
Bounded channel depth for the hashing worker thread.
MAGIC ๐Ÿ”’
Magic bytes for the state bloat binary format (8 bytes)
VERSION ๐Ÿ”’
Expected format version
WORKER_CHUNK_SIZE ๐Ÿ”’
Maximum number of storage entries to hash per worker batch.

Functionsยง

decode_raw_storage_key ๐Ÿ”’
load_etl_to_cursor ๐Ÿ”’
Iterate a sorted ETL collector, deduplicate consecutive entries with the same key (keeping the last value), and call append for each unique entry.
load_storage_etl ๐Ÿ”’
Iterate a raw storage ETL collector, deduplicate consecutive entries with the same (address, slot) key, and call write for each unique entry.
log_collection_progress ๐Ÿ”’
Log collection progress every 5 seconds and on the final entry.
raw_storage_key ๐Ÿ”’
Composite ETL key for unhashed storage, sorted by address then slot.
write_storage_changesets ๐Ÿ”’
write_storage_history ๐Ÿ”’