Skip to content

cron: update known_blocks.yaml #6378

@github-actions

Description

@github-actions

Forest uses checkpoints to improve performance when loading a snapshot. Without checkpoints, the blockchain has to be fully traversed to verify we have the right genesis block. Checkpoints short-circuit this search and shave off tens of minutes in boot time.

Checkpoints have to be regularly updated, though, and this issue is automatically created once per month. Follow the procedure below to update build/known_blocks.yaml, and close this issue.

Procedure

#!/bin/bash

# Perform this for `calibnet` AND `mainnet`
chains=("mainnet" "calibnet")

for chain in "${chains[@]}"
do
    # download the latest snapshot.
    # =============================
    # - calibnet ~6G, ~5min on a droplet
    # - mainnet ~74G, ~60mins on a droplet
    aria2c -x5 https://forest-archive.chainsafe.dev/latest/"$chain"/ -o "$chain"

    # print out the checkpoints.
    # ==========================
    # The whole operation takes a long time, BUT you only need the first line or so.
    timeout 15s forest-tool archive checkpoints "$chain"
done

# Update `build/known_blocks.yaml` as appropriate, manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: TaskDiscrete task to implement

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions