diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml index 71e1c553..42d45002 100644 --- a/.github/workflows/create-release.yaml +++ b/.github/workflows/create-release.yaml @@ -44,6 +44,12 @@ jobs: uses: burnt-labs/xion/.github/workflows/docker-push.yaml@main secrets: inherit + push-heighliner: + name: Push Heighliner Images + needs: build-docker + uses: burnt-labs/xion/.github/workflows/heighliner-push.yaml@main + secrets: inherit + docker-scout: name: Docker Scout needs: build-docker diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index e8d55834..aa005089 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -42,7 +42,7 @@ jobs: with: distribution: goreleaser version: "~> v2" - args: build --clean --id xiond_${{ matrix.os }}_${{ matrix.arch }} + args: build --clean --skip validate --id xiond_${{ matrix.os }}_${{ matrix.arch }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/heighliner-push.yaml b/.github/workflows/heighliner-push.yaml new file mode 100644 index 00000000..1f4c842d --- /dev/null +++ b/.github/workflows/heighliner-push.yaml @@ -0,0 +1,94 @@ +name: Push Heighliner images + +# reusable workflow, do not add triggers +on: + workflow_call: + workflow_dispatch: + +env: + REPO: ghcr.io/${{ github.repository }}/heighliner + +jobs: + merge: + name: Create registry manifests + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + packages: write + steps: + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: us-east-1 + role-to-assume: ${{ secrets.AWS_OIDC_ROLE }} + + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Prepare environment + run: | + echo "TAG_VERSION=${GITHUB_SHA:0:7}" | tee -a $GITHUB_ENV + + - name: Metadata for xion container + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REPO }} + tags: | + type=raw,value=${{ env.TAG_VERSION }} + type=semver,pattern={{version}},enable=${{ github.event_name == 'push' }} + type=raw,value=latest,enable={{is_default_branch}} + + - name: Download images + uses: actions/download-artifact@v4 + with: + path: ${{ runner.temp }} + pattern: heighliner* + merge-multiple: true + + - name: Load images + working-directory: ${{ runner.temp }} + run: | + for image in heighliner*.tar; do + PLATFORM=$(basename $image .tar | cut -d- -f2-) + docker load < $image; + docker tag heighliner:$PLATFORM ${REPO}:$PLATFORM + docker push ${REPO}:$PLATFORM; + done; + + - name: Prepare mainfest vars + run: | + IMAGE_TARGETS=$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< $DOCKER_METADATA_OUTPUT_JSON) + IMAGE_TAGS=$(docker image ls $REPO --digests --format json | jq -r '"\(.Repository):\(.Tag)"' | tr '\n' ' ') + echo "IMAGE_TAGS=$IMAGE_TAGS" | tee -a $GITHUB_ENV + echo "IMAGE_TARGETS=${IMAGE_TARGETS}" | tee -a $GITHUB_ENV + + - name: Create manifest list and push + run: | + eval "docker buildx imagetools create ${IMAGE_TARGETS} ${IMAGE_TAGS}" + + - name: Inspect image + run: | + jq -cr '.tags | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON" | \ + xargs -n1 docker buildx imagetools inspect% diff --git a/app/app.go b/app/app.go index 8a694f08..1e8a7a59 100644 --- a/app/app.go +++ b/app/app.go @@ -12,6 +12,7 @@ import ( "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + wasmvm "github.com/CosmWasm/wasmvm/v2" "github.com/gorilla/mux" aa "github.com/larry0x/abstract-account/x/abstractaccount" aakeeper "github.com/larry0x/abstract-account/x/abstractaccount/keeper" @@ -40,6 +41,9 @@ import ( "github.com/cosmos/ibc-go/modules/capability" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + ibcwasm "github.com/cosmos/ibc-go/modules/light-clients/08-wasm" + ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper" + ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller" icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" @@ -274,6 +278,7 @@ type WasmApp struct { ICAHostKeeper icahostkeeper.Keeper TransferKeeper ibctransferkeeper.Keeper WasmKeeper wasmkeeper.Keeper + WasmClientKeeper ibcwasmkeeper.Keeper AbstractAccountKeeper aakeeper.Keeper IBCHooksKeeper *ibchookskeeper.Keeper ContractKeeper *wasmkeeper.PermissionedKeeper @@ -353,7 +358,7 @@ func NewWasmApp( nftkeeper.StoreKey, group.StoreKey, // non sdk store keys ibcexported.StoreKey, ibctransfertypes.StoreKey, ibcfeetypes.StoreKey, - wasmtypes.StoreKey, icahosttypes.StoreKey, + ibcwasmtypes.StoreKey, wasmtypes.StoreKey, icahosttypes.StoreKey, aatypes.StoreKey, icacontrollertypes.StoreKey, globalfee.StoreKey, xiontypes.StoreKey, ibchookstypes.StoreKey, packetforwardtypes.StoreKey, feeabstypes.StoreKey, jwktypes.StoreKey, tokenfactorytypes.StoreKey, @@ -708,6 +713,22 @@ func NewWasmApp( wasmOpts = append(owasm.RegisterStargateQueries(*app.GRPCQueryRouter(), appCodec), wasmOpts...) wasmOpts = append(wasmOpts, tokenFactoryOpts...) + // instantiate the Wasm VM with the chosen parameters + // we need to create this double wasm dir because the wasmd Keeper appends an extra `wasm/` to the value you give it + doubleWasmDir := filepath.Join(wasmDir, "wasm") + wasmVM, err := wasmvm.NewVM( + doubleWasmDir, + availableCapabilities, + WasmContractMemoryLimit, // default of 32 + wasmConfig.ContractDebugMode, + wasmConfig.MemoryCacheSize, + ) + if err != nil { + panic(err) + } + + wasmOpts = append(wasmOpts, wasmkeeper.WithWasmEngine(wasmVM)) + app.WasmKeeper = wasmkeeper.NewKeeper( appCodec, runtime.NewKVStoreService(keys[wasmtypes.StoreKey]), @@ -729,6 +750,15 @@ func NewWasmApp( wasmOpts..., ) + app.WasmClientKeeper = ibcwasmkeeper.NewKeeperWithVM( + appCodec, + runtime.NewKVStoreService(keys[ibcwasmtypes.StoreKey]), + app.IBCKeeper.ClientKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + wasmVM, + app.GRPCQueryRouter(), + ) + app.AbstractAccountKeeper = aakeeper.NewKeeper( appCodec, keys[aatypes.StoreKey], @@ -837,6 +867,7 @@ func NewWasmApp( xion.NewAppModule(app.XionKeeper), ibc.NewAppModule(app.IBCKeeper), ibctm.NewAppModule(), + ibcwasm.NewAppModule(app.WasmClientKeeper), transfer.NewAppModule(app.TransferKeeper), ibcfee.NewAppModule(app.IBCFeeKeeper), ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), @@ -889,6 +920,7 @@ func NewWasmApp( feeabstypes.ModuleName, icatypes.ModuleName, ibcfeetypes.ModuleName, + ibcwasmtypes.ModuleName, wasmtypes.ModuleName, aatypes.ModuleName, xiontypes.ModuleName, @@ -914,6 +946,7 @@ func NewWasmApp( feeabstypes.ModuleName, icatypes.ModuleName, ibcfeetypes.ModuleName, + ibcwasmtypes.ModuleName, wasmtypes.ModuleName, aatypes.ModuleName, ibchookstypes.ModuleName, @@ -945,6 +978,7 @@ func NewWasmApp( feeabstypes.ModuleName, icatypes.ModuleName, ibcfeetypes.ModuleName, + ibcwasmtypes.ModuleName, // wasm after ibc transfer wasmtypes.ModuleName, aatypes.ModuleName, @@ -1313,6 +1347,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(aatypes.ModuleName) paramsKeeper.Subspace(packetforwardtypes.ModuleName) paramsKeeper.Subspace(feeabstypes.ModuleName) + paramsKeeper.Subspace(ibcwasmtypes.ModuleName) // IBC params migration - legacySubspace to selfManaged // https://github.com/cosmos/ibc-go/blob/main/docs/docs/05-migrations/11-v7-to-v8.md#params-migration diff --git a/app/upgrades.go b/app/upgrades.go index f4f1e594..e7b6c9bd 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" ) -const UpgradeName = "v12" +const UpgradeName = "v13" func (app *WasmApp) RegisterUpgradeHandlers() { app.WrapSetUpgradeHandler(UpgradeName) diff --git a/benchmarks/app_test.go b/benchmarks/app_test.go index 9239f93b..4b7a7c01 100644 --- a/benchmarks/app_test.go +++ b/benchmarks/app_test.go @@ -219,7 +219,7 @@ func InitializeWasmApp(b testing.TB, db dbm.DB, numAccounts int) AppInfo { Label: "Demo contract", Msg: initBz, } - gasWanted := 500000 + 10000*uint64(numAccounts) + gasWanted := 500000 + 10000*uint64(numAccounts) // nolint:gosec initTx, err := simtestutil.GenSignedMockTx(r, txGen, []sdk.Msg{&initMsg}, nil, gasWanted, "", []uint64{0}, []uint64{1}, minter) require.NoError(b, err) _, res, err := wasmApp.SimDeliver(txGen.TxEncoder(), initTx) diff --git a/go.mod b/go.mod index 41d10282..203d8aac 100644 --- a/go.mod +++ b/go.mod @@ -27,6 +27,7 @@ require ( github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2 github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20240530162148-4827cf263165 github.com/cosmos/ibc-go/modules/capability v1.0.1 + github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72 github.com/cosmos/ibc-go/v8 v8.5.1 github.com/cosmos/rosetta v0.50.6 github.com/dvsekhvalnov/jose2go v1.6.0 diff --git a/go.sum b/go.sum index 70749689..0bf97dc3 100644 --- a/go.sum +++ b/go.sum @@ -381,6 +381,8 @@ github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0 github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd/go.mod h1:JWfpWVKJKiKtd53/KbRoKfxWl8FsT2GPcNezTOk0o5Q= github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI= github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E= +github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72 h1:QjCi4bJoy9AXLL1e4jqi+4rHYN0gGZAQxf937cdWhw4= +github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72/go.mod h1:yiulzyQAZ+Ci802z/kVQqTA3lGiSJOmDpTq7kZxOUNE= github.com/cosmos/ibc-go/v8 v8.5.1 h1:3JleEMKBjRKa3FeTKt4fjg22za/qygLBo7mDkoYTNBs= github.com/cosmos/ibc-go/v8 v8.5.1/go.mod h1:P5hkAvq0Qbg0h18uLxDVA9q1kOJ0l36htMsskiNwXbo= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= diff --git a/integration_tests/go.mod b/integration_tests/go.mod index b2fed9a0..0ffc7731 100644 --- a/integration_tests/go.mod +++ b/integration_tests/go.mod @@ -13,6 +13,7 @@ require ( github.com/cosmos/cosmos-sdk v0.50.10 github.com/cosmos/gogoproto v1.7.0 github.com/cosmos/ibc-go/modules/capability v1.0.1 + github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72 github.com/cosmos/ibc-go/v8 v8.5.1 github.com/cosmos/interchain-security/v5 v5.0.0-alpha1.0.20240424193412-7cd900ad2a74 github.com/docker/docker v24.0.9+incompatible diff --git a/integration_tests/go.sum b/integration_tests/go.sum index aa1ac463..2654286a 100644 --- a/integration_tests/go.sum +++ b/integration_tests/go.sum @@ -404,6 +404,8 @@ github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0 github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd/go.mod h1:JWfpWVKJKiKtd53/KbRoKfxWl8FsT2GPcNezTOk0o5Q= github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI= github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E= +github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72 h1:QjCi4bJoy9AXLL1e4jqi+4rHYN0gGZAQxf937cdWhw4= +github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72/go.mod h1:yiulzyQAZ+Ci802z/kVQqTA3lGiSJOmDpTq7kZxOUNE= github.com/cosmos/ibc-go/v8 v8.5.1 h1:3JleEMKBjRKa3FeTKt4fjg22za/qygLBo7mDkoYTNBs= github.com/cosmos/ibc-go/v8 v8.5.1/go.mod h1:P5hkAvq0Qbg0h18uLxDVA9q1kOJ0l36htMsskiNwXbo= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= diff --git a/integration_tests/upgrade_ibc_test.go b/integration_tests/upgrade_ibc_test.go index 7ca79f41..65a7359f 100644 --- a/integration_tests/upgrade_ibc_test.go +++ b/integration_tests/upgrade_ibc_test.go @@ -2,10 +2,45 @@ package integration_tests import ( "context" + "encoding/json" + "os" + "path" "strconv" "testing" "time" + "cosmossdk.io/x/upgrade" + + "github.com/CosmWasm/wasmd/x/wasm" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/burnt-labs/xion/x/jwk" + "github.com/burnt-labs/xion/x/mint" + "github.com/burnt-labs/xion/x/xion" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" + authz "github.com/cosmos/cosmos-sdk/x/authz/module" + "github.com/cosmos/cosmos-sdk/x/bank" + "github.com/cosmos/cosmos-sdk/x/consensus" + distr "github.com/cosmos/cosmos-sdk/x/distribution" + "github.com/cosmos/cosmos-sdk/x/genutil" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + "github.com/cosmos/cosmos-sdk/x/gov" + govclient "github.com/cosmos/cosmos-sdk/x/gov/client" + "github.com/cosmos/cosmos-sdk/x/params" + paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" + "github.com/cosmos/cosmos-sdk/x/slashing" + "github.com/cosmos/cosmos-sdk/x/staking" + "github.com/cosmos/ibc-go/modules/capability" + ibcwasm "github.com/cosmos/ibc-go/modules/light-clients/08-wasm" + "github.com/cosmos/ibc-go/v8/modules/apps/transfer" + ibccore "github.com/cosmos/ibc-go/v8/modules/core" + ibcsolomachine "github.com/cosmos/ibc-go/v8/modules/light-clients/06-solomachine" + ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" + ibclocalhost "github.com/cosmos/ibc-go/v8/modules/light-clients/09-localhost" + ccvprovider "github.com/cosmos/interchain-security/v5/x/ccv/provider" + aa "github.com/larry0x/abstract-account/x/abstractaccount" + "github.com/strangelove-ventures/tokenfactory/x/tokenfactory" + "cosmossdk.io/math" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/strangelove-ventures/interchaintest/v8/conformance" @@ -22,10 +57,10 @@ import ( const ( xionImageFrom = "ghcr.io/burnt-labs/xion/heighliner" - xionVersionFrom = "9.0.1-rc2" - xionImageTo = "ghcr.io/burnt-labs/xion/heighliner" - xionVersionTo = "sha-7bba345" - xionUpgradeName = "v12" + xionVersionFrom = "12.0.1" + xionImageTo = "xion" + xionVersionTo = "local" + xionUpgradeName = "v13" osmosisImage = "ghcr.io/strangelove-ventures/heighliner/osmosis" osmosisVersion = "v25.2.1" @@ -61,7 +96,45 @@ func TestXionUpgradeIBC(t *testing.T) { Bech32Prefix: "xion", Denom: "uxion", TrustingPeriod: ibcClientTrustingPeriod, - ModifyGenesis: ModifyInterChainGenesis(ModifyInterChainGenesisFn{ModifyGenesisShortProposals}, [][]string{{votingPeriod, maxDepositPeriod}}), + EncodingConfig: func() *moduletestutil.TestEncodingConfig { + cfg := moduletestutil.MakeTestEncodingConfig( + auth.AppModuleBasic{}, + genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), + bank.AppModuleBasic{}, + capability.AppModuleBasic{}, + staking.AppModuleBasic{}, + mint.AppModuleBasic{}, + distr.AppModuleBasic{}, + gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, + }, + ), + params.AppModuleBasic{}, + slashing.AppModuleBasic{}, + upgrade.AppModuleBasic{}, + consensus.AppModuleBasic{}, + transfer.AppModuleBasic{}, + ibccore.AppModuleBasic{}, + ibctm.AppModuleBasic{}, + ibcwasm.AppModuleBasic{}, + ccvprovider.AppModuleBasic{}, + ibcsolomachine.AppModuleBasic{}, + + // custom + wasm.AppModuleBasic{}, + authz.AppModuleBasic{}, + tokenfactory.AppModuleBasic{}, + xion.AppModuleBasic{}, + jwk.AppModuleBasic{}, + aa.AppModuleBasic{}, + ) + // TODO: add encoding types here for the modules you want to use + ibclocalhost.RegisterInterfaces(cfg.InterfaceRegistry) + return &cfg + }(), + + ModifyGenesis: ModifyInterChainGenesis(ModifyInterChainGenesisFn{ModifyGenesisShortProposals}, [][]string{{votingPeriod, maxDepositPeriod}}), }, }, { @@ -91,7 +164,7 @@ func TestXionUpgradeIBC(t *testing.T) { chain, counterpartyChain := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain) const ( - path = "ibc-upgrade-test-path" + testPath = "ibc-upgrade-test-testPath" relayerName = "relayer" ) @@ -112,7 +185,7 @@ func TestXionUpgradeIBC(t *testing.T) { Chain1: chain, Chain2: counterpartyChain, Relayer: r, - Path: path, + Path: testPath, }) ctx := context.Background() @@ -134,8 +207,68 @@ func TestXionUpgradeIBC(t *testing.T) { users := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), userFunds, chain) chainUser := users[0] + // deploy the account contract, and pin it + fp, err := os.Getwd() + require.NoError(t, err) + codeIDStr, err := chain.StoreContract(ctx, chainUser.FormattedAddress(), + path.Join(fp, "integration_tests", "testdata", "contracts", "account_updatable-aarch64.wasm")) + require.NoError(t, err) + + authority, err := chain.UpgradeQueryAuthority(ctx) + require.NoError(t, err) + codeID, err := strconv.Atoi(codeIDStr) + require.NoError(t, err) + + pinCodeMsg := wasmtypes.MsgPinCodes{ + Authority: authority, + CodeIDs: []uint64{uint64(codeID)}, + } + msg, err := chain.Config().EncodingConfig.Codec.MarshalInterfaceJSON(&pinCodeMsg) + require.NoError(t, err) + + pinCodeTx, err := chain.SubmitProposal(ctx, chainUser.KeyName(), cosmos.TxProposalv1{ + Messages: []json.RawMessage{msg}, + Metadata: "", + Deposit: "100uxion", + Title: "Pin AA Contract Code", + Summary: "To verify that the wasm cache doesn't move or change during upgrade", + }) + require.NoError(t, err) + + proposalID, err := strconv.Atoi(pinCodeTx.ProposalID) + require.NoError(t, err) + + require.Eventuallyf(t, func() bool { + proposalInfo, err := chain.GovQueryProposal(ctx, uint64(proposalID)) + if err != nil { + require.NoError(t, err) + } else { + if proposalInfo.Status == govv1beta1.StatusVotingPeriod { + return true + } + t.Logf("Waiting for proposal to enter voting status VOTING, current status: %s", proposalInfo.Status) + } + return false + }, time.Second*11, time.Second, "failed to reach status VOTING after 11s") + + err = chain.VoteOnProposalAllValidators(ctx, uint64(proposalID), cosmos.ProposalVoteYes) + require.NoError(t, err) + + require.Eventuallyf(t, func() bool { + proposalInfo, err := chain.GovQueryProposal(ctx, uint64(proposalID)) + if err != nil { + require.NoError(t, err) + } else { + if proposalInfo.Status == govv1beta1.StatusPassed { + return true + } + t.Logf("Waiting for proposal to enter voting status PASSED, current status: %s", proposalInfo.Status) + } + return false + }, time.Second*11, time.Second, "failed to reach status PASSED after 11s") + // test IBC conformance before chain upgrade - conformance.TestChainPair(t, ctx, client, network, chain, counterpartyChain, rf, rep, r, path) + conformance.TestChainPair(t, ctx, client, network, chain, counterpartyChain, rf, rep, r, testPath) height, err := chain.Height(ctx) require.NoError(t, err, "error fetching height before submit upgrade proposal") @@ -197,5 +330,5 @@ func TestXionUpgradeIBC(t *testing.T) { require.NoError(t, err, "chain did not produce blocks after upgrade") // test IBC conformance after chain upgrade on same path - conformance.TestChainPair(t, ctx, client, network, chain, counterpartyChain, rf, rep, r, path) + conformance.TestChainPair(t, ctx, client, network, chain, counterpartyChain, rf, rep, r, testPath) } diff --git a/x/mint/common_test.go b/x/mint/common_test.go index 4d7417f1..31d7117f 100644 --- a/x/mint/common_test.go +++ b/x/mint/common_test.go @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + // banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"