Module archive_cmd

Module 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Β§

ArchiveInfo

EnumsΒ§

ArchiveCommands
ExportMode

ConstantsΒ§

FOREST_ARCHIVE_S3_ENDPOINT πŸ”’

FunctionsΒ§

bucket_has_diff_snapshot πŸ”’
bucket_has_lite_snapshot πŸ”’
build_output_path πŸ”’
check_aws_config πŸ”’
Check if the AWS CLI is installed and correctly configured.
do_export
epoch_to_date πŸ”’
export_diff_snapshot πŸ”’
Given a block store, export a diff snapshot for a given epoch.
export_lite_snapshot πŸ”’
Given a block store, export a lite snapshot for a given epoch.
format_diff_snapshot πŸ”’
format_lite_snapshot πŸ”’
list_checkpoints πŸ”’
merge_f3_snapshot πŸ”’
merge_snapshots πŸ”’
Merge a set of snapshots (diff snapshots or lite snapshots). The output snapshot links to the heaviest tipset in the input set.
print_checkpoints πŸ”’
show_tipset_diff πŸ”’
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).
steps_in_range πŸ”’
sync_bucket πŸ”’
upload_to_forest_bucket πŸ”’
Use the AWS CLI to upload a snapshot file to the S3 bucket.