Function reth_db_common::init::init_from_state_dump

source ·
pub fn init_from_state_dump<Provider>(
    reader: impl BufRead,
    provider_rw: &Provider,
    etl_config: EtlConfig,
) -> Result<B256>
where Provider: DBProvider<Tx: DbTxMut> + BlockNumReader + BlockHashReader + ChainSpecProvider<ChainSpec = ChainSpec> + StageCheckpointWriter + HistoryWriter + HeaderProvider + HashingWriter + StateChangeWriter + TrieWriter + AsRef<Provider>,
Expand description

Reads account state from a BufRead reader and initializes it at the highest block that can be found on database.

It’s similar to init_genesis but supports importing state too big to fit in memory, and can be set to the highest block present. One practical usecase is to import OP mainnet state at bedrock transition block.