Crate reth_era_utils

Crate reth_era_utils 

Source
Expand description

Utilities to store history from downloaded ERA files with storage-api and export it to recreate era1 files.

The import is downloaded using [reth_era_downloader] and parsed using [reth_era].

Structs§

ExportConfig
Export history from storage-api between 2 blocks with parameters defined in ExportConfig. Configuration to export block history to era1 files
ProcessIter
Imports history from ERA files. An iterator that wraps era file extraction. After the final item [EraMeta::mark_as_processed] is called to ensure proper cleanup.

Functions§

build_index
Imports history from ERA files. Dumps the contents of hash_collector into [tables::HeaderNumbers].
decode
Imports history from ERA files. Extracts a pair of [FullBlockHeader] and [FullBlockBody] from [BlockTuple].
export
Export history from storage-api between 2 blocks with parameters defined in ExportConfig. Fetches block history data from the provider and prepares it for export to era1 files for a given number of blocks then writes them to disk.
import
Imports history from ERA files. Imports blocks from downloader using provider.
open
Imports history from ERA files. Opens the era file described by meta.
process
Imports history from ERA files. Extracts block headers and bodies from meta and appends them using writer and provider.
process_iter
Imports history from ERA files. Extracts block headers and bodies from iter and appends them using writer and provider.
save_stage_checkpoints
Imports history from ERA files. Saves progress of ERA import into stages sync.