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.