Skip to content

Commit

Permalink
Add backfilling for lotus
Browse files Browse the repository at this point in the history
  • Loading branch information
elmattic committed Jan 23, 2025
1 parent 9fcccaa commit 72dcd36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/tests/api_compare/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,13 @@ services:
# `sethead` right after `sync wait` to ensure the head is not set in middle of a sync
lotus sync wait
FULLNODE_API_INFO="$(cat /var/lib/lotus/token):/dns/lotus/tcp/${LOTUS_RPC_PORT}/http"
lotus chain sethead --epoch $(($(ls /data/*.car.zst | tail -n 1 | grep -Eo '[0-9]+' | tail -n 1) - 50))
HEAD_EPOCH=$(ls /data/*.car.zst | tail -n 1 | grep -Eo '[0-9]+' | tail -n 1)
lotus chain sethead --epoch $(($HEAD_EPOCH - 50))
# wait for 30s to make sure the re-validation starts
sleep 30
lotus sync wait
# backfill the index db
lotus index validate-backfill --from $(($HEAD_EPOCH - 50)) --to $(($HEAD_EPOCH - 100))
# After the sync is done, import the wallet for signing blocks. It might be already there, which will return an error. We ignore it.
echo $MINER_WORKER_KEY | lotus wallet import || true
api-compare:
Expand Down

0 comments on commit 72dcd36

Please sign in to comment.