CLI Interface

casper-archive get </ipfs/<hash>/> --validate <trusted-block-hash> --bootstrap-peer <bootstrap-peer>
casper-archive make-archive <storage-db-file> <global-state-db-file> -o <output-directory>

You get the trusted block hash from cspr.live or from a validator such as Joe

The </ipfs/<hash>/> is a MANIFEST.csv file that contains hashes of other ipfs files of either monthly or daily archives. The archives are:

  • Zstd compressed bytesrepr dump of storage as blocks + deploys
    • highest block to genesis, where the highest block has the trusted-block hash
  • Zstd compressed bytesrepr dump of finality signatures
  • Zstd compressed bytesrepr snapshot of global state under a particular root hash
  • Zstd compressed bytesrepr dump of global state diffs under a series of root hashes

Check while streaming:

  • Every block is present starting with the trusted-block-hash
  • Every block body is present
  • Every deploy / transfer is present
  • Check sufficient finality signatures
  • Snapshot is valid
  • Global state diffs

MANIFEST.csv Layout

The MANIFEST.csv layout is as follows

type start time end time highest block height lowest block height filename ipfs hash

YYYYMMDDHHSSTMM_TYPE_HIGHEST_LOWEST.archive.zstd
end time

The possible values for type are blocks, finality signatures, global state snapshot, and global state diff.

The start time and end time entries are u64 milliseconds since epoch, which are exactly the timestamp of the blocks stored in those entries

Manifests obey the following rules:

  • The first entry must be a storage
  • The global state snapshot must be the first entry
    • Its start time must be the same as its end time
    • Its highest block hash must be the same as its lowest block hash
    • The start time and highest block hash should agree with the first entry
  • No other entry can be a global state snapshot
  • The third entry should be a global state diff, with the same times and block hashes as the first entry
  • All subsequent entries come in storage/global state diff pairs with the same times and block hashes