Skip to content

Commit 7e20596

Browse files
committed
offline-replay, backtest: message improvements
1 parent 7199a22 commit 7e20596

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

contrib/offline-replay/run_offline_replay_backtest.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ while true; do
297297

298298
# create new snapshot at that slot
299299
if [ "$PREVIOUS_ROOTED_SLOT" -gt "$REPLAY_SNAPSHOT_SLOT_NUMBER" ]; then
300-
echo "Creating new snapshot at $PREVIOUS_ROOTED_SLOT"
300+
echo "Creating new snapshot at $PREVIOUS_ROOTED_SLOT"
301301
$AGAVE_LEDGER_TOOL create-snapshot $PREVIOUS_ROOTED_SLOT -l $LEDGER_DIR
302302
sleep 10
303303
rm $LEDGER_DIR/ledger_tool -rf
@@ -315,17 +315,20 @@ while true; do
315315
sleep 10
316316
rm $LEDGER_DIR/ledger_tool -rf
317317

318-
echo "New snapshot created at $LEDGER_REPLAY_SNAPSHOT"
319-
# minify a rocksdb for the minimized snapshot
318+
echo "New (right after) snapshot created at $NEXT_ROOTED_SLOT"
319+
NEXT_REPLAY_SNAPSHOT=$LEDGER_DIR/snapshot-${NEXT_ROOTED_SLOT}*
320+
for NEXT_REPLAY_SNAPSHOT_FILE in $NEXT_REPLAY_SNAPSHOT; do
321+
send_slack_message "New (right after) snapshot created at \`$NEXT_REPLAY_SNAPSHOT_FILE\`"
322+
done
320323

321324
# create a minimized snapshot for the mismatch slot using the new snapshot
322325
MISMATCH_DIR=$LEDGER_DIR/$NETWORK-${MISMATCH_SLOT}
323326
mkdir -p $MISMATCH_DIR
324327
cp $LEDGER_DIR/genesis.tar.bz2 $MISMATCH_DIR
325328
# mv $LEDGER_DIR/snapshot-${PREVIOUS_ROOTED_SLOT}* $MISMATCH_DIR
326329

330+
# minify a rocksdb for the minimized snapshot
327331
MINIMIZED_END_SLOT=$((NEXT_ROOTED_SLOT+32))
328-
329332
send_slack_message "Minifying rocksdb for mismatch"
330333
"$OBJDIR"/bin/fd_ledger \
331334
--reset 1 \
@@ -366,7 +369,7 @@ while true; do
366369
ledger_name=$(basename $MISMATCH_DIR)
367370
snapshot_name=$(basename $MISMATCH_SNAPSHOT_FILE)
368371
end_slot=$((NEXT_ROOTED_SLOT+5))
369-
send_slack_message "Command to reproduce mismatch: \`\`\`src/flamenco/runtime/tests/run_ledger_backtest.sh -l $ledger_name -s $snapshot_name -y 10 -m 2000000 -e $end_slot -c $FD_CLUSTER_VERSION \`\`\`"
372+
send_slack_message "Command to reproduce mismatch: \`\`\`src/flamenco/runtime/tests/run_ledger_backtest.sh -l $ledger_name -s $snapshot_name -y 10 -m 2000000 -e $end_slot -c $FD_CLUSTER_VERSION\`\`\`"
370373

371374
fi
372375
done

0 commit comments

Comments
 (0)