Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cron: update known_blocks.yaml #4279

Closed
github-actions bot opened this issue May 1, 2024 · 0 comments · Fixed by #4287
Closed

cron: update known_blocks.yaml #4279

github-actions bot opened this issue May 1, 2024 · 0 comments · Fixed by #4287

Comments

@github-actions
Copy link

github-actions bot commented May 1, 2024

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 ~3G, ~1min on a droplet
    # - mainnet ~60G, ~15mins 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant