diff --git a/upgrade-test/Dockerfile b/upgrade-test/Dockerfile index 37427f02..e258c158 100644 --- a/upgrade-test/Dockerfile +++ b/upgrade-test/Dockerfile @@ -1,6 +1,5 @@ # Defaults ARG DEST_IMAGE=ghcr.io/agoric/agoric-sdk:dev -ARG BOOTSTRAP_MODE=main # TODO different naming scheme for upgrade handler (in app.go) and the image name @@ -15,10 +14,8 @@ ARG BOOTSTRAP_MODE=main ## START # on agoric-uprade-7-2, with upgrade to agoric-upgrade-8 FROM ghcr.io/agoric/ag0:agoric-upgrade-7-2 as agoric-upgrade-7-2 -ARG BOOTSTRAP_MODE ARG UPGRADE_INFO_8 -ENV UPGRADE_TO=agoric-upgrade-8 UPGRADE_INFO=${UPGRADE_INFO_8} THIS_NAME=agoric-upgrade-7-2 BOOTSTRAP_MODE=${BOOTSTRAP_MODE} -RUN echo "${BOOTSTRAP_MODE}" +ENV UPGRADE_TO=agoric-upgrade-8 UPGRADE_INFO=${UPGRADE_INFO_8} THIS_NAME=agoric-upgrade-7-2 RUN mkdir -p /usr/src/agoric-sdk/upgrade-test-scripts WORKDIR /usr/src/agoric-sdk/ COPY ./start_ag0.sh ./upgrade-test-scripts/ @@ -30,8 +27,7 @@ RUN . ./upgrade-test-scripts/start_ag0.sh ## UPGRADE+TEST ## this is agoric-upgrade-8 aka pismoA FROM ghcr.io/agoric/agoric-sdk:29 as agoric-upgrade-8 -ARG BOOTSTRAP_MODE -ENV THIS_NAME=agoric-upgrade-8 BOOTSTRAP_MODE=${BOOTSTRAP_MODE} +ENV THIS_NAME=agoric-upgrade-8 # copy from previous build COPY --from=agoric-upgrade-7-2 /root/.agoric /root/.agoric @@ -47,8 +43,8 @@ RUN . ./upgrade-test-scripts/start_to_to.sh ARG DEST_IMAGE #this is agoric-upgrade-8-1 aka pismoB FROM ghcr.io/agoric/agoric-sdk:30 as agoric-upgrade-8-1 -ARG BOOTSTRAP_MODE UPGRADE_INFO_9 -ENV THIS_NAME=agoric-upgrade-8-1 UPGRADE_TO=agoric-upgrade-9 UPGRADE_INFO=${UPGRADE_INFO_9} BOOTSTRAP_MODE=${BOOTSTRAP_MODE} +ARG UPGRADE_INFO_9 +ENV THIS_NAME=agoric-upgrade-8-1 UPGRADE_TO=agoric-upgrade-9 UPGRADE_INFO=${UPGRADE_INFO_9} WORKDIR /usr/src/agoric-sdk/ COPY ./env_setup.sh ./start_to_to.sh ./upgrade-test-scripts/ COPY ./${THIS_NAME} ./upgrade-test-scripts/${THIS_NAME}/ @@ -61,8 +57,8 @@ RUN . ./upgrade-test-scripts/start_to_to.sh ARG DEST_IMAGE # this is agoric-upgrade-9 / pismoC with upgrade to agoric-upgrade-10 FROM ghcr.io/agoric/agoric-sdk:31 as agoric-upgrade-9 -ARG BOOTSTRAP_MODE UPGRADE_INFO_10 -ENV THIS_NAME=agoric-upgrade-9 UPGRADE_TO=agoric-upgrade-10 UPGRADE_INFO=${UPGRADE_INFO_10} BOOTSTRAP_MODE=${BOOTSTRAP_MODE} +ARG UPGRADE_INFO_10 +ENV THIS_NAME=agoric-upgrade-9 UPGRADE_TO=agoric-upgrade-10 UPGRADE_INFO=${UPGRADE_INFO_10} WORKDIR /usr/src/agoric-sdk/ COPY ./env_setup.sh ./start_to_to.sh ./upgrade-test-scripts/ @@ -77,8 +73,7 @@ RUN . ./upgrade-test-scripts/start_to_to.sh ARG DEST_IMAGE #this is agoric-upgrade-10 / vaults FROM ghcr.io/agoric/agoric-sdk:35 as agoric-upgrade-10 -ARG BOOTSTRAP_MODE -ENV THIS_NAME=agoric-upgrade-10 USE_JS=1 BOOTSTRAP_MODE=${BOOTSTRAP_MODE} +ENV THIS_NAME=agoric-upgrade-10 USE_JS=1 WORKDIR /usr/src/agoric-sdk/ COPY ./env_setup.sh ./start_to_to.sh ./package.json ./*.js ./upgrade-test-scripts/ @@ -96,8 +91,8 @@ ARG DEST_IMAGE #this is agoric-upgrade-10 upgrading to 11 #it's a separate target because agoric-upgrade-10 takes so long to test FROM ghcr.io/agoric/agoric-sdk:35 as propose-agoric-upgrade-11 -ARG BOOTSTRAP_MODE UPGRADE_INFO_11 -ENV THIS_NAME=propose-agoric-upgrade-11 UPGRADE_TO=agoric-upgrade-11 UPGRADE_INFO=${UPGRADE_INFO_11} BOOTSTRAP_MODE=${BOOTSTRAP_MODE} +ARG UPGRADE_INFO_11 +ENV THIS_NAME=propose-agoric-upgrade-11 UPGRADE_TO=agoric-upgrade-11 UPGRADE_INFO=${UPGRADE_INFO_11} WORKDIR /usr/src/agoric-sdk/ COPY ./env_setup.sh ./start_to_to.sh ./upgrade-test-scripts/ RUN cd upgrade-test-scripts && yarn @@ -113,8 +108,7 @@ RUN . ./upgrade-test-scripts/start_to_to.sh #this is agoric-upgrade-11 / vaults+1 ARG DEST_IMAGE FROM ghcr.io/agoric/agoric-sdk:36 as agoric-upgrade-11 -ARG BOOTSTRAP_MODE -ENV THIS_NAME=agoric-upgrade-11 BOOTSTRAP_MODE=${BOOTSTRAP_MODE} USE_JS=1 +ENV THIS_NAME=agoric-upgrade-11 USE_JS=1 # start-chain boilerplate WORKDIR /usr/src/agoric-sdk/ COPY ./env_setup.sh ./start_to_to.sh ./package.json ./*.js ./upgrade-test-scripts/ @@ -131,8 +125,8 @@ RUN . ./upgrade-test-scripts/start_to_to.sh ARG DEST_IMAGE FROM ghcr.io/agoric/agoric-sdk:36 as propose-agoric-upgrade-12 # TODO: Replace with actual Zoe core proposal for upgrade 12 (MCS, Kread, Zoe, restart-contracts, etc) -ARG BOOTSTRAP_MODE UPGRADE_INFO_12='{"coreProposals":["@agoric/builders/scripts/vats/init-network.js"]}' -ENV THIS_NAME=propose-agoric-upgrade-12 UPGRADE_TO=agoric-upgrade-12 UPGRADE_INFO=${UPGRADE_INFO_12} BOOTSTRAP_MODE=${BOOTSTRAP_MODE} +ARG UPGRADE_INFO_12='{"coreProposals":["@agoric/builders/scripts/vats/init-network.js"]}' +ENV THIS_NAME=propose-agoric-upgrade-12 UPGRADE_TO=agoric-upgrade-12 UPGRADE_INFO=${UPGRADE_INFO_12} COPY --from=agoric-upgrade-11 /root/.agoric /root/.agoric # start-chain boilerplate WORKDIR /usr/src/agoric-sdk/ @@ -149,8 +143,7 @@ RUN . ./upgrade-test-scripts/start_to_to.sh #this is agoric-upgrade-12 / multi-collateral, etc. ARG DEST_IMAGE FROM ${DEST_IMAGE} as agoric-upgrade-12 -ARG BOOTSTRAP_MODE -ENV THIS_NAME=agoric-upgrade-12 BOOTSTRAP_MODE=${BOOTSTRAP_MODE} +ENV THIS_NAME=agoric-upgrade-12 COPY --from=propose-agoric-upgrade-12 /root/.agoric /root/.agoric # start-chain boilerplate WORKDIR /usr/src/agoric-sdk/ diff --git a/upgrade-test/Makefile b/upgrade-test/Makefile index fb070ef6..80ab780a 100644 --- a/upgrade-test/Makefile +++ b/upgrade-test/Makefile @@ -1,12 +1,6 @@ REPOSITORY = agoric/upgrade-test # use :dev (latest prerelease image) unless we build local sdk DEST_IMAGE ?= $(if $(findstring local_sdk,$(MAKECMDGOALS)),ghcr.io/agoric/agoric-sdk:latest,ghcr.io/agoric/agoric-sdk:dev) -BOOTSTRAP_MODE?=main -ifeq ($(BOOTSTRAP_MODE),main) - TAG_SUFFIX= -else - TAG_SUFFIX=-$(BOOTSTRAP_MODE) -endif TARGET?=agoric-upgrade-12 dockerLabel?=$(TARGET) @echo target: $(TARGET) @@ -15,7 +9,7 @@ local_sdk: (cd ../ && make docker-build-sdk) BUILD = docker build --progress=plain $(BUILD_OPTS) \ - --build-arg BOOTSTRAP_MODE=$(BOOTSTRAP_MODE) --build-arg DEST_IMAGE=$(DEST_IMAGE) \ + --build-arg DEST_IMAGE=$(DEST_IMAGE) \ -f Dockerfile upgrade-test-scripts agoric-upgrade-7-2: @@ -48,10 +42,6 @@ agoric-upgrade-12: propose-agoric-upgrade-12 # build main bootstrap build: $(TARGET) -# build test bootstrap -build_test: BOOTSTRAP_MODE=test -build_test: $(TARGET) - DEBUG ?= SwingSet:ls,SwingSet:vat RUN = docker run --rm -it \ -p 26656:26656 -p 26657:26657 -p 1317:1317 \ diff --git a/upgrade-test/upgrade-test-scripts/agoric-upgrade-10/pre.test.js b/upgrade-test/upgrade-test-scripts/agoric-upgrade-10/pre.test.js index 57acca70..f5b1c96d 100644 --- a/upgrade-test/upgrade-test-scripts/agoric-upgrade-10/pre.test.js +++ b/upgrade-test/upgrade-test-scripts/agoric-upgrade-10/pre.test.js @@ -8,7 +8,6 @@ import { GOV1ADDR, GOV2ADDR, GOV3ADDR, - BOOTSTRAP_MODE, PSM_PAIR, } from '../constants.js'; import { openVault } from '../econHelpers.js'; @@ -99,12 +98,7 @@ test('Validate PSM denoms', async t => { t.not(psmISTChildren.children.legnth, 0); - let denoms = ['USDC_axl', 'DAI_axl', 'DAI_grv']; - if (BOOTSTRAP_MODE === 'main') { - denoms = [...denoms, 'USDC_grv', 'USDT_axl', 'USDT_grv']; - } else { - denoms = [...denoms, 'ToyUSD']; - } + const denoms = ['USDC_axl', 'DAI_axl', 'DAI_grv', 'USDC_grv', 'USDT_axl', 'USDT_grv']; for (const denom of denoms) { t.truthy(psmISTChildren.children.includes(denom)); diff --git a/upgrade-test/upgrade-test-scripts/agoric-upgrade-9/test.sh b/upgrade-test/upgrade-test-scripts/agoric-upgrade-9/test.sh index 69420ab8..ed41d262 100644 --- a/upgrade-test/upgrade-test-scripts/agoric-upgrade-9/test.sh +++ b/upgrade-test/upgrade-test-scripts/agoric-upgrade-9/test.sh @@ -1,14 +1,9 @@ #!/bin/bash . ./upgrade-test-scripts/env_setup.sh -# provision pool has right balance +# provision pool has right balance test_val $(agd query bank balances agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346 -o json | jq -r '.balances | first | .amount') "19000000" -# ensure PSM IST has only ToyUSD -expnum=4 -if [[ "$BOOTSTRAP_MODE" == "test" ]]; then - expnum=1 -fi -test_val $(agd q vstorage children published.psm.IST -o json | jq -r '.children | length') "$expnum" +test_val $(agd q vstorage children published.psm.IST -o json | jq -r '.children | length') 4 test_val $(agd q vstorage children published.psm.IST -o json | jq -r '.children | first') ${PSM_PAIR//IST./} # Gov params diff --git a/upgrade-test/upgrade-test-scripts/constants.js b/upgrade-test/upgrade-test-scripts/constants.js index ce9ef265..e33bcd67 100644 --- a/upgrade-test/upgrade-test-scripts/constants.js +++ b/upgrade-test/upgrade-test-scripts/constants.js @@ -6,7 +6,6 @@ export const GOV3ADDR = process.env.GOV3ADDR; export const USER1ADDR = process.env.USER1ADDR; export const VALIDATORADDR = process.env.VALIDATORADDR; -export const BOOTSTRAP_MODE = process.env.BOOTSTRAP_MODE; export const PSM_PAIR = process.env.PSM_PAIR; export const ATOM_DENOM = process.env.ATOM_DENOM; diff --git a/upgrade-test/upgrade-test-scripts/env_setup.sh b/upgrade-test/upgrade-test-scripts/env_setup.sh index 28945cd4..b71afa39 100755 --- a/upgrade-test/upgrade-test-scripts/env_setup.sh +++ b/upgrade-test/upgrade-test-scripts/env_setup.sh @@ -239,15 +239,9 @@ printKeys() { } -export USDC_DENOM="ibc/toyusdc" -# Recent transfer to Emerynet -export ATOM_DENOM="ibc/06362C6F7F4FB702B94C13CD2E7C03DEC357683FD978936340B43FBFBC5351EB" -export PSM_PAIR="IST.ToyUSD" -if [[ "$BOOTSTRAP_MODE" == "main" ]]; then - export USDC_DENOM="ibc/295548A78785A1007F232DE286149A6FF512F180AF5657780FC89C009E2C348F" - export ATOM_DENOM="ibc/BA313C4A19DFBF943586C0387E6B11286F9E416B4DD27574E6909CABE0E342FA" - export PSM_PAIR="IST.USDC_axl" -fi +export USDC_DENOM="ibc/295548A78785A1007F232DE286149A6FF512F180AF5657780FC89C009E2C348F" +export ATOM_DENOM="ibc/BA313C4A19DFBF943586C0387E6B11286F9E416B4DD27574E6909CABE0E342FA" +export PSM_PAIR="IST.USDC_axl" # additional env specific to a version if test -f ./upgrade-test-scripts/$THIS_NAME/env_setup.sh; then diff --git a/upgrade-test/upgrade-test-scripts/start_ag0.sh b/upgrade-test/upgrade-test-scripts/start_ag0.sh index 4281ae92..45e30133 100644 --- a/upgrade-test/upgrade-test-scripts/start_ag0.sh +++ b/upgrade-test/upgrade-test-scripts/start_ag0.sh @@ -61,9 +61,6 @@ waitForBlock 2 voting_period_s=10 latest_height=$(ag0 status | jq -r .SyncInfo.latest_block_height) height=$(( $latest_height + $voting_period_s + 10 )) -if [[ "$BOOTSTRAP_MODE" == "test" ]]; then - UPGRADE_TO=${UPGRADE_TO//agoric-/agorictest-} -fi info=${UPGRADE_INFO-"{}"} if echo "$info" | jq .; then : diff --git a/upgrade-test/upgrade-test-scripts/start_to_to.sh b/upgrade-test/upgrade-test-scripts/start_to_to.sh index 2106129f..eeef7fa3 100644 --- a/upgrade-test/upgrade-test-scripts/start_to_to.sh +++ b/upgrade-test/upgrade-test-scripts/start_to_to.sh @@ -32,11 +32,6 @@ if [[ "$DEST" != "1" ]]; then exit 0 fi - if [[ "$BOOTSTRAP_MODE" == "test" ]]; then - UPGRADE_TO=${UPGRADE_TO//agoric-/agorictest-} - fi - - voting_period_s=10 latest_height=$(agd status | jq -r .SyncInfo.latest_block_height) height=$(( $latest_height + $voting_period_s + 10 ))