mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 21:08:32 +00:00
Add module-level documentation to ERA consumer and producer
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
//! Import ERA files into a Lighthouse database.
|
||||
//!
|
||||
//! `EraFileDir` reads a directory of ERA files and imports them sequentially into the cold DB.
|
||||
//! Each ERA file is verified against `historical_roots` / `historical_summaries` from the
|
||||
//! highest-numbered ERA state, ensuring block and state integrity without trusting the files.
|
||||
//!
|
||||
//! Block roots are cross-checked against the ERA boundary state's `block_roots` vector.
|
||||
//! Block signatures are NOT verified — ERA files are trusted at that level.
|
||||
|
||||
use bls::FixedBytesExtended;
|
||||
use rayon::prelude::*;
|
||||
use reth_era::common::file_ops::StreamReader;
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
//! Export ERA files from a Lighthouse database.
|
||||
//!
|
||||
//! Reads blocks and states from the cold DB and writes them into the standardized ERA format.
|
||||
//! ERA files are produced either during historical reconstruction (backfilling) or upon
|
||||
//! finalization of new eras. Each file is named `{network}-{era_number}-{short_root}.era`.
|
||||
//!
|
||||
//! Files are written atomically (temp file + rename) so partial writes never appear as valid
|
||||
//! ERA files. Existing files are skipped, making production idempotent.
|
||||
|
||||
use rand::random;
|
||||
use reth_era::common::file_ops::{EraFileFormat, EraFileId, StreamWriter};
|
||||
use reth_era::era::file::{EraFile, EraWriter};
|
||||
|
||||
Reference in New Issue
Block a user