From e795d7c37822c7ee23549a07fbee1b1ebe0c63bd Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Tue, 10 Sep 2024 23:59:51 +0900 Subject: [PATCH] Make ci/run-sanity.sh more robust --- ci/run-sanity.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/run-sanity.sh b/ci/run-sanity.sh index cd4ca4d77ff365..ef955f274db29f 100755 --- a/ci/run-sanity.sh +++ b/ci/run-sanity.sh @@ -66,9 +66,13 @@ $solana_ledger_tool verify --abort-on-invalid-block \ --ledger config/snapshot-ledger --block-verification-method unified-scheduler first_simulated_slot=$((latest_slot / 2)) +purge_slot=$((first_simulated_slot + latest_slot / 4)) echo "First simulated slot: ${first_simulated_slot}" touch config/ledger/simulate_block_production_allowed +# Purge some slots so that later verify fails if sim is broken +$solana_ledger_tool purge --ledger config/ledger "$purge_slot" $solana_ledger_tool simulate-block-production --ledger config/ledger \ --first-simulated-slot $first_simulated_slot +# Slots should be available and correctly replayable upto snapshot_slot at least. $solana_ledger_tool verify --abort-on-invalid-block \ - --ledger config/ledger --enable-hash-overrides + --ledger config/ledger --enable-hash-overrides --halt-at-slot "$snapshot_slot"