Skip to content

Commit

Permalink
feat(deployment): add genesis export test
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman committed Aug 21, 2023
1 parent 9eef33f commit 35414a0
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@ waitForBlock 2
# CWD is agoric-sdk
upgrade11=./upgrade-test-scripts/agoric-upgrade-11

# verify swing-store export-data is consistent
# verify swing-store export-data is consistent and perform genesis style "upgrade"
killAgd
EXPORT_DIR=$(mktemp -t -d swing-store-export-upgrade-11-XXX)
make_swing_store_snapshot $EXPORT_DIR --artifact-mode none || fail "Couldn't make swing-store snapshot"
test_val "$(compare_swing_store_export_data $EXPORT_DIR)" "match" "swing-store consistent state-sync"
rm -rf $EXPORT_DIR
test_val "$(compare_swing_store_export_data $EXPORT_DIR)" "match" "swing-store consistent cosmos kvstore"

TMP_GENESIS_DIR=$EXPORT_DIR/genesis-export
cp $HOME/.agoric/config/genesis.json $TMP_GENESIS_DIR/old_genesis.json
cp $HOME/.agoric/data/priv_validator_state.json $TMP_GENESIS_DIR/priv_validator_state.json
rm -rf $HOME/.agoric/data
mkdir $HOME/.agoric/data
mv $TMP_GENESIS_DIR/priv_validator_state.json $HOME/.agoric/data
mv $TMP_GENESIS_DIR/* $HOME/.agoric/config/
startAgd
rm -rf $EXPORT_DIR

# zoe vat is at incarnation 1
echo "FIXME: bypassed zoe-full-upgrade validation"; return 0
Expand Down

0 comments on commit 35414a0

Please sign in to comment.