Skip to main content

generate_manifest

Function generate_manifest 

Source
pub fn generate_manifest(
    source_datadir: &Path,
    output_dir: &Path,
    base_url: Option<&str>,
    block: u64,
    chain_id: u64,
    blocks_per_file: u64,
    previous: Option<&SnapshotManifest>,
    rocksdb_archive_per_file: bool,
) -> Result<SnapshotManifest>
Expand description

Package chunk archives from a source datadir and generate a manifest.

block selects chunks whose nominal ranges start at or before the snapshot height. Each selected file is archived in full; component block counts come from its actual stored ranges.

With a previous manifest, a chunk that is not the last chunk of its component in either manifest is not packaged again: its source files are hashed and must match the previous manifest’s chunk_output_files, and the new manifest points chunk_files at the previously published archive. A mismatch is an error, since sealed history must not change.

RocksDB indices are packaged into one archive unless rocksdb_archive_per_file is set, in which case each SST and blob file gets its own archive. A file whose path and checksum match such an archive in the previous manifest is not packaged again and points at the previously published archive. Files that are new or changed are packaged, since compaction replaces them between snapshots.