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 6, 2023
1 parent e64adf9 commit a0baaf3
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ 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-level 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

TMP_GENESIS_DIR=$(mktemp -t -d agd-genesis-upgrade-11-XXX)
cp $HOME/.agoric/config/genesis.json $TMP_GENESIS_DIR/old_genesis.json
export_genesis > $TMP_GENESIS_DIR/new_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
cp $TMP_GENESIS_DIR/priv_validator_state.json $HOME/.agoric/data
cp $TMP_GENESIS_DIR/new_genesis.json $HOME/.agoric/config/genesis.json
startAgd
rm -rf $TMP_GENESIS_DIR

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

0 comments on commit a0baaf3

Please sign in to comment.