Module forest_filecoin::tool::subcommands::archive_cmd

source ·
Expand description

Archives are key-value pairs encoded as CAR files. The key-value pairs represent a directed, acyclic graph (DAG). This graph is often a subset of a larger graph and references to missing keys are common.

Each graph contains blocks, messages, state trees, and miscellaneous data such as compiled WASM code. The amount of data differs greatly in different kinds of archives. While there are no fixed definitions, there are three common kind of archives:

  • A full archive contains a complete graph with no missing nodes. These archives are large (14 TiB for Filecoin’s mainnet) and only used in special situations.
  • A lite-archive typically has roughly 3 million blocks, 2000 complete sets of state-roots, and 2000 sets of messages. These archives usually take up roughly 100 GiB.
  • A diff-archive contains the subset of nodes that are not shared by two other archives. These archives are much smaller but can rarely be used on their own. They are typically merged with other archives before use.

The sub-commands in this module manipulate archive files without needing a running Forest-daemon or a separate database. Operations are carried out directly on CAR files.

Additional reading: crate::db::car::plain

Structs§

Enums§

Functions§

  • do_export 🔒
  • Merge a set of snapshots (diff snapshots or lite snapshots). The output snapshot links to the heaviest tipset in the input set.
  • Compute the tree of actor states for a given epoch and compare it to the expected result (as encoded in the blockchain). Differences are printed using the diff format (red for the blockchain state, green for the computed state).