Skip to content

Commit

Permalink
Add v7 to v8 e2e upgrade test (cosmos#4591)
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton authored Sep 14, 2023
1 parent 374a260 commit e49f741
Show file tree
Hide file tree
Showing 18 changed files with 282 additions and 116 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/e2e-upgrade.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
name: Tests / E2E Upgrade
on:
on:
workflow_dispatch:

pull_request:
branches:
- main
paths:
# upgrade tests will run on any changes to the upgrade_test.go file.
- 'e2e/tests/upgrades/upgrade_test.go'
schedule:
- cron: '0 0 * * *'


jobs:
upgrade-v5:
uses: cosmos/ibc-go/.github/workflows/e2e-test-workflow-call.yml@main
Expand Down Expand Up @@ -57,3 +63,16 @@ jobs:
test-entry-point: "TestUpgradeTestSuite"
test: "TestV7ToV7_1ChainUpgrade"
upload-logs: true

upgrade-v8:
uses: cosmos/ibc-go/.github/workflows/e2e-test-workflow-call.yml@main
with:
chain-image: ghcr.io/cosmos/ibc-go-simd
chain-binary: simd
chain-a-tag: v7.0.0
chain-b-tag: v7.0.0
chain-upgrade-tag: pr-4591 # TODO: update this to a real tag once v8 is released
upgrade-plan-name: "v8"
test-entry-point: "TestUpgradeTestSuite"
test: "TestV7ToV8ChainUpgrade"
upload-logs: true
12 changes: 6 additions & 6 deletions e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ require (
cosmossdk.io/errors v1.0.0
cosmossdk.io/math v1.1.2
cosmossdk.io/x/upgrade v0.0.0-20230818115413-c402c51a1508
github.com/cometbft/cometbft v0.38.0-rc3
github.com/cosmos/cosmos-sdk v0.50.0-rc.0.0.20230911190209-e4033faa38ef
github.com/cometbft/cometbft v0.38.0
github.com/cosmos/cosmos-sdk v0.50.0-rc.0.0.20230913040121-1c9c5ae64ea8
github.com/cosmos/gogoproto v1.4.11
github.com/cosmos/ibc-go/v8 v8.0.0-20230906115913-46ee5f92e1af
github.com/docker/docker v24.0.6+incompatible
github.com/strangelove-ventures/interchaintest/v8 v8.0.0-20230817191535-cc35cd35adbc
github.com/stretchr/testify v1.8.4
go.uber.org/zap v1.25.0
golang.org/x/mod v0.12.0
google.golang.org/grpc v1.57.0
google.golang.org/grpc v1.58.0
gopkg.in/yaml.v2 v2.4.0
)

Expand All @@ -28,7 +28,7 @@ require (
cosmossdk.io/api v0.7.0 // indirect
cosmossdk.io/client/v2 v2.0.0-20230818115413-c402c51a1508 // indirect
cosmossdk.io/collections v0.4.0 // indirect
cosmossdk.io/core v0.10.0 // indirect
cosmossdk.io/core v0.11.0 // indirect
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
cosmossdk.io/log v1.2.1 // indirect
cosmossdk.io/store v1.0.0-rc.0 // indirect
Expand Down Expand Up @@ -190,7 +190,7 @@ require (
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.12.0 // indirect
Expand All @@ -201,7 +201,7 @@ require (
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
24 changes: 12 additions & 12 deletions e2e/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ cosmossdk.io/client/v2 v2.0.0-20230818115413-c402c51a1508 h1:tt5OMwdouv7dkwkWJYx
cosmossdk.io/client/v2 v2.0.0-20230818115413-c402c51a1508/go.mod h1:iHeSk2AT6O8RNGlfcEQq6Yty6Z/6gydQsXXBh5I715Q=
cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s=
cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0=
cosmossdk.io/core v0.10.0 h1:NP28Ol9YyRODmZLJg2ko/mUl40hMegeMzhJnG+XPkcY=
cosmossdk.io/core v0.10.0/go.mod h1:MygXNld9DvMgYY4yE76DM/mdZpgfeyRjy6FPjEEehlY=
cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo=
cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w=
cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc=
cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU=
cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04=
Expand Down Expand Up @@ -341,8 +341,8 @@ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/colin-axner/interchaintest/v8 v8.0.0-20230906142353-5d89200aad4a h1:rWxVtMsp/X9FVOzIvLCrJ8FWzuAGwpI7jwh51Pgt5Lc=
github.com/colin-axner/interchaintest/v8 v8.0.0-20230906142353-5d89200aad4a/go.mod h1:aXLHcZ5Tv0R5/LynEsE86bc4UwuHl5TZpzGSLqo79AE=
github.com/cometbft/cometbft v0.38.0-rc3 h1:Ly3eVPWoFu0y68PmZwLljucPdEBtfigZtqm+OV1W6dE=
github.com/cometbft/cometbft v0.38.0-rc3/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k=
github.com/cometbft/cometbft v0.38.0 h1:ogKnpiPX7gxCvqTEF4ly25/wAxUqf181t30P3vqdpdc=
github.com/cometbft/cometbft v0.38.0/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k=
github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo=
github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0=
github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg=
Expand All @@ -359,8 +359,8 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0
github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U=
github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o=
github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I=
github.com/cosmos/cosmos-sdk v0.50.0-rc.0.0.20230911190209-e4033faa38ef h1:mlpjg/QOANo0VdkZLDegmMbeNyFQcDxO2C1CaRxtL5k=
github.com/cosmos/cosmos-sdk v0.50.0-rc.0.0.20230911190209-e4033faa38ef/go.mod h1:Wt09sg4Ir44vkMXDq5w/4ZixxEUcA0SgXeAl9Yge7uQ=
github.com/cosmos/cosmos-sdk v0.50.0-rc.0.0.20230913040121-1c9c5ae64ea8 h1:mGGlOhfCQcrwsMoOGH8zCHxtn1lcxG63LkYg37L5YhM=
github.com/cosmos/cosmos-sdk v0.50.0-rc.0.0.20230913040121-1c9c5ae64ea8/go.mod h1:PXE/bVnJ2v6KZkczOxLqNVEnTYcOJ3dpObNHnoxA9JY=
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE=
Expand Down Expand Up @@ -1226,8 +1226,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A=
golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8=
golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE=
golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8=
golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -1616,8 +1616,8 @@ google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWof
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8=
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw=
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 h1:lv6/DhyiFFGsmzxbsUUTOkN29II+zeWHxvT8Lpdxsv0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
Expand Down Expand Up @@ -1659,8 +1659,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu
google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw=
google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o=
google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests/core/02-client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (s *ClientTestSuite) TestScheduleIBCUpgrade_Succeeds() {
upgradedClientState,
)
s.Require().NoError(err)
s.ExecuteGovV1Proposal(ctx, scheduleUpgradeMsg, chainA, chainAWallet, 1)
s.ExecuteGovV1Proposal(ctx, scheduleUpgradeMsg, chainA, chainAWallet)
})

t.Run("check that IBC software upgrade has been scheduled successfully on chainA", func(t *testing.T) {
Expand Down Expand Up @@ -200,7 +200,7 @@ func (s *ClientTestSuite) TestRecoverClient_Succeeds() {
s.Require().NoError(err)
recoverClientMsg := clienttypes.NewMsgRecoverClient(authority.String(), subjectClientID, substituteClientID)
s.Require().NotNil(recoverClientMsg)
s.ExecuteGovV1Proposal(ctx, recoverClientMsg, chainA, chainAWallet, 1)
s.ExecuteGovV1Proposal(ctx, recoverClientMsg, chainA, chainAWallet)
})

t.Run("check status of each client", func(t *testing.T) {
Expand Down Expand Up @@ -351,7 +351,7 @@ func (s *ClientTestSuite) TestAllowedClientsParam() {
s.Require().NotNil(authority)

msg := clienttypes.NewMsgUpdateParams(authority.String(), clienttypes.NewParams(allowedClient))
s.ExecuteGovV1Proposal(ctx, msg, chainA, chainAWallet, 1)
s.ExecuteGovV1Proposal(ctx, msg, chainA, chainAWallet)
} else {
value, err := tmjson.Marshal([]string{allowedClient})
s.Require().NoError(err)
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/core/03-connection/connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (s *ConnectionTestSuite) TestMaxExpectedTimePerBlockParam() {
s.Require().NotNil(authority)

msg := connectiontypes.NewMsgUpdateParams(authority.String(), connectiontypes.NewParams(delay))
s.ExecuteGovV1Proposal(ctx, msg, chainA, chainAWallet, 1)
s.ExecuteGovV1Proposal(ctx, msg, chainA, chainAWallet)
} else {
changes := []paramsproposaltypes.ParamChange{
paramsproposaltypes.NewParamChange(ibcexported.ModuleName, string(connectiontypes.KeyMaxExpectedTimePerBlock), fmt.Sprintf(`"%d"`, delay)),
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/interchain_accounts/gov_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (s *InterchainAccountsGovTestSuite) TestInterchainAccountsGovIntegration()
t.Run("execute proposal for MsgRegisterInterchainAccount", func(t *testing.T) {
version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID)
msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, govModuleAddress.String(), version)
s.ExecuteGovV1Proposal(ctx, msgRegisterAccount, chainA, controllerAccount, 1)
s.ExecuteGovV1Proposal(ctx, msgRegisterAccount, chainA, controllerAccount)
})

t.Run("start relayer", func(t *testing.T) {
Expand Down Expand Up @@ -102,7 +102,7 @@ func (s *InterchainAccountsGovTestSuite) TestInterchainAccountsGovIntegration()
}

msgSendTx := controllertypes.NewMsgSendTx(govModuleAddress.String(), ibctesting.FirstConnectionID, uint64(time.Hour.Nanoseconds()), packetData)
s.ExecuteGovV1Proposal(ctx, msgSendTx, chainA, controllerAccount, 2)
s.ExecuteGovV1Proposal(ctx, msgSendTx, chainA, controllerAccount)
})

t.Run("verify tokens transferred", func(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/interchain_accounts/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (s *InterchainAccountsParamsTestSuite) TestControllerEnabledParam() {
Signer: authority.String(),
Params: controllertypes.NewParams(false),
}
s.ExecuteGovV1Proposal(ctx, &msg, chainA, controllerAccount, 1)
s.ExecuteGovV1Proposal(ctx, &msg, chainA, controllerAccount)
} else {
changes := []paramsproposaltypes.ParamChange{
paramsproposaltypes.NewParamChange(controllertypes.StoreKey, string(controllertypes.KeyControllerEnabled), "false"),
Expand Down Expand Up @@ -131,7 +131,7 @@ func (s *InterchainAccountsParamsTestSuite) TestHostEnabledParam() {
Signer: authority.String(),
Params: hosttypes.NewParams(false, []string{hosttypes.AllowAllHostMsgs}),
}
s.ExecuteGovV1Proposal(ctx, &msg, chainB, chainBUser, 1)
s.ExecuteGovV1Proposal(ctx, &msg, chainB, chainBUser)
} else {
changes := []paramsproposaltypes.ParamChange{
paramsproposaltypes.NewParamChange(hosttypes.StoreKey, string(hosttypes.KeyHostEnabled), "false"),
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/transfer/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func (s *TransferTestSuite) TestSendEnabledParam() {
t.Run("change send enabled parameter to disabled", func(t *testing.T) {
if isSelfManagingParams {
msg := transfertypes.NewMsgUpdateParams(govModuleAddress.String(), transfertypes.NewParams(false, true))
s.ExecuteGovV1Proposal(ctx, msg, chainA, chainAWallet, 1)
s.ExecuteGovV1Proposal(ctx, msg, chainA, chainAWallet)
} else {
changes := []paramsproposaltypes.ParamChange{
paramsproposaltypes.NewParamChange(transfertypes.StoreKey, string(transfertypes.KeySendEnabled), "false"),
Expand Down Expand Up @@ -366,7 +366,7 @@ func (s *TransferTestSuite) TestReceiveEnabledParam() {
t.Run("change receive enabled parameter to disabled ", func(t *testing.T) {
if isSelfManagingParams {
msg := transfertypes.NewMsgUpdateParams(govModuleAddress.String(), transfertypes.NewParams(false, false))
s.ExecuteGovV1Proposal(ctx, msg, chainA, chainAWallet, 1)
s.ExecuteGovV1Proposal(ctx, msg, chainA, chainAWallet)
} else {
changes := []paramsproposaltypes.ParamChange{
paramsproposaltypes.NewParamChange(transfertypes.StoreKey, string(transfertypes.KeyReceiveEnabled), "false"),
Expand Down
Loading

0 comments on commit e49f741

Please sign in to comment.