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§
- Export
Config - Export history from storage-api between 2 blocks
with parameters defined in
ExportConfig. Configuration to export block history to era1 files - Process
Iter - 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_collectorinto [tables::HeaderNumbers]. - calculate_
td_ by_ number - Imports history from ERA files. Calculates the total difficulty for a given block number by summing the difficulty of all blocks from genesis to the given block.
- 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
downloaderusingprovider. - 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
metaand appends them usingwriterandprovider. - process_
iter - Imports history from ERA files.
Extracts block headers and bodies from
iterand appends them usingwriterandprovider. - save_
stage_ checkpoints - Imports history from ERA files. Saves progress of ERA import into stages sync.