Crate zksync_node_test_utils

Source
Expand description

Test utils.

Structs§

Snapshot
Concise representation of a storage snapshot for testing recovery.

Functions§

create_l1_batch
Creates an L1 batch header with the specified number and deterministic contents.
create_l1_batch_metadata
Creates metadata for an L1 batch with the specified number.
create_l2_block
Creates an L2 block header with the specified number and deterministic contents.
create_l2_transaction
Creates an L2 transaction with randomized parameters.
default_l1_batch_env
Creates a mock L1 batch env with reasonable params.
default_system_env
Creates a mock system env with reasonable params.
execute_l2_transaction
generate_storage_logs
Generates storage logs using provided indices as seeds.
insert_initial_writes_for_batch
Inserts initial writes for the specified L1 batch based on storage logs.
l1_batch_metadata_to_commitment_artifacts
prepare_recovery_snapshot
Prepares a recovery snapshot without performing genesis.
recover
Recovers storage from a snapshot. L2 block and L1 batch are intentionally not inserted into the storage.
snapshot
Takes a storage snapshot at the last sealed L1 batch.