Skip to content

Build archival state from raw blocks #887

Description

@Sword-Smith

If blocks are stored in the node's data directory but no, or incomplete, archival databases are present, then the archival databases should be built from the block data. This is a check, or task, that could be performed on startup. Potentially only when a specific CLI flag is set.

We already have ArchivalState::blocks_from_file_without_record to parse blocks directly from raw block data (blk<n>.dat files) that we use when we import blocks from directory with the import_blocks_from_directory CLI argument.

Given that you have all block data (for example from a downloaded torrent), this would be a much faster way to build the state of the node since the current import_blocks_from_directory writes all blocks to disk even though they already exist on disk, in the source directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions