From 531aaa3bf639f1425f61d186b83d1e114fa55255 Mon Sep 17 00:00:00 2001 From: Aidan Salzmann Date: Fri, 8 Mar 2024 00:58:48 -0500 Subject: [PATCH] revert upgrade-ics-4.0 (#1132) --- CHANGELOG.md | 7 +++---- app/ante_handler.go | 4 ++-- app/app.go | 12 ++++++------ app/apptesting/test_helpers.go | 22 +++++++++------------- app/test_setup.go | 12 ++++++------ app/upgrades.go | 3 +-- app/upgrades/v12/upgrades.go | 7 ++++--- app/upgrades/v14/upgrades.go | 2 +- app/upgrades/v19/upgrades.go | 27 +-------------------------- cmd/consumer.go | 8 ++++---- go.mod | 12 +++++------- go.sum | 16 +++++++--------- scripts/consumer/README.md | 2 +- testutil/consumer.go | 18 +++++++++--------- testutil/network/network.go | 6 +++--- x/stakeibc/types/expected_keepers.go | 2 +- 16 files changed, 63 insertions(+), 97 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6ebe381d2..dcd58c769f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,10 +54,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 7. stakeibc file re-org part 4 (grpc query) ([#1117](https://github.com/Stride-Labs/stride/pull/1117)) 8. stakeibc file re-org part 5 (msg_server) ([#1120](https://github.com/Stride-Labs/stride/pull/1120)) 9. set wasm permissions ([#1125](https://github.com/Stride-Labs/stride/pull/1125)) -10. Upgrade to ICS v4.0.0 and sdk v0.47.10 ([#1114](https://github.com/Stride-Labs/stride/pull/1114)) -11. switched to open sourced rate limit module ([#1123](https://github.com/Stride-Labs/stride/pull/1123)) -12. added sttia rate limit ([#1127](https://github.com/Stride-Labs/stride/pull/1127)) -13. Add x/stakedym ([#1126](https://github.com/Stride-Labs/stride/pull/1126)) +10. switched to open sourced rate limit module ([#1123](https://github.com/Stride-Labs/stride/pull/1123)) +11. added sttia rate limit ([#1127](https://github.com/Stride-Labs/stride/pull/1127)) +12. Add x/stakedym ([#1126](https://github.com/Stride-Labs/stride/pull/1126)) ### Off-Chain changes 1. chore(dev-deps): upgrade ledger dependencies ([#1099](https://github.com/Stride-Labs/stride/pull/1099)) diff --git a/app/ante_handler.go b/app/ante_handler.go index 51003b73ef..888c48bff9 100644 --- a/app/ante_handler.go +++ b/app/ante_handler.go @@ -10,8 +10,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/ante" ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" - consumerante "github.com/cosmos/interchain-security/v4/app/consumer/ante" - ccvconsumerkeeper "github.com/cosmos/interchain-security/v4/x/ccv/consumer/keeper" + consumerante "github.com/cosmos/interchain-security/v3/app/consumer/ante" + ccvconsumerkeeper "github.com/cosmos/interchain-security/v3/x/ccv/consumer/keeper" ) // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC diff --git a/app/app.go b/app/app.go index fbab68cb8c..0cc199d8e1 100644 --- a/app/app.go +++ b/app/app.go @@ -106,12 +106,12 @@ import ( tendermint "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" ibctesting "github.com/cosmos/ibc-go/v7/testing" ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types" - ccvconsumer "github.com/cosmos/interchain-security/v4/x/ccv/consumer" - ccvconsumerkeeper "github.com/cosmos/interchain-security/v4/x/ccv/consumer/keeper" - ccvconsumertypes "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types" - ccvdistr "github.com/cosmos/interchain-security/v4/x/ccv/democracy/distribution" - ccvgov "github.com/cosmos/interchain-security/v4/x/ccv/democracy/governance" - ccvstaking "github.com/cosmos/interchain-security/v4/x/ccv/democracy/staking" + ccvconsumer "github.com/cosmos/interchain-security/v3/x/ccv/consumer" + ccvconsumerkeeper "github.com/cosmos/interchain-security/v3/x/ccv/consumer/keeper" + ccvconsumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" + ccvdistr "github.com/cosmos/interchain-security/v3/x/ccv/democracy/distribution" + ccvgov "github.com/cosmos/interchain-security/v3/x/ccv/democracy/governance" + ccvstaking "github.com/cosmos/interchain-security/v3/x/ccv/democracy/staking" evmosvesting "github.com/evmos/vesting/x/vesting" evmosvestingclient "github.com/evmos/vesting/x/vesting/client" evmosvestingkeeper "github.com/evmos/vesting/x/vesting/keeper" diff --git a/app/apptesting/test_helpers.go b/app/apptesting/test_helpers.go index c3412f028c..93ae00697d 100644 --- a/app/apptesting/test_helpers.go +++ b/app/apptesting/test_helpers.go @@ -26,12 +26,11 @@ import ( tendermint "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/cosmos/ibc-go/v7/testing/simapp" - appProvider "github.com/cosmos/interchain-security/v4/app/provider" - icstestingutils "github.com/cosmos/interchain-security/v4/testutil/ibc_testing" - e2e "github.com/cosmos/interchain-security/v4/testutil/integration" - testkeeper "github.com/cosmos/interchain-security/v4/testutil/keeper" - consumertypes "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types" - ccvtypes "github.com/cosmos/interchain-security/v4/x/ccv/types" + appProvider "github.com/cosmos/interchain-security/v3/app/provider" + icstestingutils "github.com/cosmos/interchain-security/v3/testutil/ibc_testing" + e2e "github.com/cosmos/interchain-security/v3/testutil/integration" + testkeeper "github.com/cosmos/interchain-security/v3/testutil/keeper" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -191,7 +190,7 @@ func (s *AppTestHelper) SetupIBCChains(hostChainID string) { // use the initial validator set from the consumer genesis as the stride chain's initial set var strideValSet []*tmtypes.Validator - for _, update := range strideConsumerGenesis.Provider.InitialValSet { + for _, update := range strideConsumerGenesis.InitialValSet { tmPubKey, err := tmencoding.PubKeyFromProto(update.PubKey) s.Require().NoError(err) strideValSet = append(strideValSet, &tmtypes.Validator{ @@ -203,7 +202,7 @@ func (s *AppTestHelper) SetupIBCChains(hostChainID string) { } // Initialize the stride consumer chain, casted as a TestingApp - ibctesting.DefaultTestingAppInit = app.InitStrideIBCTestingApp(strideConsumerGenesis.Provider.InitialValSet) + ibctesting.DefaultTestingAppInit = app.InitStrideIBCTestingApp(strideConsumerGenesis.InitialValSet) s.StrideChain = ibctesting.NewTestChainWithValSet( s.T(), s.Coordinator, @@ -213,10 +212,7 @@ func (s *AppTestHelper) SetupIBCChains(hostChainID string) { ) // Call InitGenesis on the consumer - genesisState := consumertypes.DefaultGenesisState() - genesisState.Params = strideConsumerGenesis.Params - genesisState.Provider = strideConsumerGenesis.Provider - s.StrideChain.App.(*app.StrideApp).GetConsumerKeeper().InitGenesis(s.StrideChain.GetContext(), genesisState) + s.StrideChain.App.(*app.StrideApp).GetConsumerKeeper().InitGenesis(s.StrideChain.GetContext(), &strideConsumerGenesis) s.StrideChain.NextBlock() // Update coordinator @@ -247,7 +243,7 @@ func (s *AppTestHelper) CreateTransferChannel(hostChainID string) { s.Ctx = s.StrideChain.GetContext() // Finally confirm the channel was setup properly - s.Require().Equal("07-tendermint-0", s.TransferPath.EndpointA.ClientID, "stride clientID") + s.Require().Equal("07-tendermint-1", s.TransferPath.EndpointA.ClientID, "stride clientID") s.Require().Equal(ibctesting.FirstConnectionID, s.TransferPath.EndpointA.ConnectionID, "stride connectionID") s.Require().Equal(ibctesting.FirstChannelID, s.TransferPath.EndpointA.ChannelID, "stride transfer channelID") } diff --git a/app/test_setup.go b/app/test_setup.go index b7944ec428..6bd18303e2 100644 --- a/app/test_setup.go +++ b/app/test_setup.go @@ -21,9 +21,9 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ibctesting "github.com/cosmos/ibc-go/v7/testing" - appconsumer "github.com/cosmos/interchain-security/v4/app/consumer" - consumertypes "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types" - ccvtypes "github.com/cosmos/interchain-security/v4/x/ccv/types" + appconsumer "github.com/cosmos/interchain-security/v3/app/consumer" + consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" cmdcfg "github.com/Stride-Labs/stride/v19/cmd/strided/config" testutil "github.com/Stride-Labs/stride/v19/testutil" @@ -169,8 +169,8 @@ func GenesisStateWithValSet(app *StrideApp) GenesisState { } consumerGenesisState := testutil.CreateMinimalConsumerTestGenesis() - consumerGenesisState.Provider.InitialValSet = initValPowers - consumerGenesisState.Provider.ConsensusState.NextValidatorsHash = tmtypes.NewValidatorSet(vals).Hash() + consumerGenesisState.InitialValSet = initValPowers + consumerGenesisState.ProviderConsensusState.NextValidatorsHash = tmtypes.NewValidatorSet(vals).Hash() consumerGenesisState.Params.Enabled = true genesisState[consumertypes.ModuleName] = app.AppCodec().MustMarshalJSON(consumerGenesisState) @@ -187,7 +187,7 @@ func InitStrideIBCTestingApp(initValPowers []types.ValidatorUpdate) func() (ibct // Feed consumer genesis with provider validators var consumerGenesis ccvtypes.ConsumerGenesisState encoding.Codec.MustUnmarshalJSON(genesisState[consumertypes.ModuleName], &consumerGenesis) - consumerGenesis.Provider.InitialValSet = initValPowers + consumerGenesis.InitialValSet = initValPowers consumerGenesis.Params.Enabled = true genesisState[consumertypes.ModuleName] = encoding.Codec.MustMarshalJSON(&consumerGenesis) diff --git a/app/upgrades.go b/app/upgrades.go index f505a82b78..afa0dc974f 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -12,7 +12,7 @@ import ( crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" - consumertypes "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types" + consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" evmosvestingtypes "github.com/evmos/vesting/x/vesting/types" ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" @@ -258,7 +258,6 @@ func (app *StrideApp) setupUpgradeHandlers(appOpts servertypes.AppOptions) { app.mm, app.configurator, app.appCodec, - app.ConsumerKeeper, app.RatelimitKeeper, app.WasmKeeper, ), diff --git a/app/upgrades/v12/upgrades.go b/app/upgrades/v12/upgrades.go index d0ee55ba32..5c74fe0bfb 100644 --- a/app/upgrades/v12/upgrades.go +++ b/app/upgrades/v12/upgrades.go @@ -13,8 +13,9 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ibcconnectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" - ccvconsumerkeeper "github.com/cosmos/interchain-security/v4/x/ccv/consumer/keeper" - consumertypes "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types" + ccvconsumerkeeper "github.com/cosmos/interchain-security/v3/x/ccv/consumer/keeper" + consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" "github.com/spf13/cast" ) @@ -49,7 +50,7 @@ func CreateUpgradeHandler( return fromVM, fmt.Errorf("failed to unmarshal genesis state: %w", err) } - var consumerGenesis = consumertypes.GenesisState{} + var consumerGenesis = ccvtypes.ConsumerGenesisState{} cdc.MustUnmarshalJSON(appState[consumertypes.ModuleName], &consumerGenesis) consumerGenesis.PreCCV = true diff --git a/app/upgrades/v14/upgrades.go b/app/upgrades/v14/upgrades.go index 915708b819..d8f1724645 100644 --- a/app/upgrades/v14/upgrades.go +++ b/app/upgrades/v14/upgrades.go @@ -18,7 +18,7 @@ import ( bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ccvconsumerkeeper "github.com/cosmos/interchain-security/v4/x/ccv/consumer/keeper" + ccvconsumerkeeper "github.com/cosmos/interchain-security/v3/x/ccv/consumer/keeper" evmosvestingkeeper "github.com/evmos/vesting/x/vesting/keeper" "github.com/evmos/vesting/x/vesting/types" evmosvestingtypes "github.com/evmos/vesting/x/vesting/types" diff --git a/app/upgrades/v19/upgrades.go b/app/upgrades/v19/upgrades.go index 7f76ff27f3..d24d0b470b 100644 --- a/app/upgrades/v19/upgrades.go +++ b/app/upgrades/v19/upgrades.go @@ -12,7 +12,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ccvconsumerkeeper "github.com/cosmos/interchain-security/v4/x/ccv/consumer/keeper" ) const ( @@ -32,7 +31,6 @@ func CreateUpgradeHandler( mm *module.Manager, configurator module.Configurator, cdc codec.Codec, - consumerKeeper ccvconsumerkeeper.Keeper, ratelimitKeeper ratelimitkeeper.Keeper, wasmKeeper wasmkeeper.Keeper, ) upgradetypes.UpgradeHandler { @@ -43,12 +41,7 @@ func CreateUpgradeHandler( ctx.Logger().Info("Running module migrations...") newVm, err := mm.RunMigrations(ctx, configurator, vm) if err != nil { - return newVm, errorsmod.Wrapf(err, "unable to run module migrations") - } - - // Migrate ICS to v4 - if err := MigrateICSOutstandingDowntime(ctx, consumerKeeper); err != nil { - return newVm, errorsmod.Wrapf(err, "unable to migrate ICS to v14") + return newVm, err } // Update wasm upload permissions @@ -68,24 +61,6 @@ func CreateUpgradeHandler( } } -// Migrates Outstanding Downtime for upgrade to ICS v4 -// https://github.com/cosmos/interchain-security/blob/release/v4.0.x/UPGRADING.md#v40x -func MigrateICSOutstandingDowntime(ctx sdk.Context, ck ccvconsumerkeeper.Keeper) error { - ctx.Logger().Info("Migrating ICS outstanding downtime...") - - downtimes := ck.GetAllOutstandingDowntimes(ctx) - for _, od := range downtimes { - consAddr, err := sdk.ConsAddressFromBech32(od.ValidatorConsensusAddress) - if err != nil { - return err - } - ck.DeleteOutstandingDowntime(ctx, consAddr) - } - - ctx.Logger().Info("Finished ICS outstanding downtime") - return nil -} - // Migrate the rate limit module to the open sourced version // The module has the same store key so all the rate limit types // can remain unchanged diff --git a/cmd/consumer.go b/cmd/consumer.go index 3fd7cf27d5..d6fc112eac 100644 --- a/cmd/consumer.go +++ b/cmd/consumer.go @@ -15,8 +15,8 @@ import ( "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - ccvconsumertypes "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types" - ccvtypes "github.com/cosmos/interchain-security/v4/x/ccv/types" + ccvconsumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" "github.com/spf13/cobra" "github.com/Stride-Labs/stride/v19/testutil" @@ -71,8 +71,8 @@ func AddConsumerSectionCmd(defaultNodeHome string) *cobra.Command { return errorsmod.Wrap(err, "could not convert val updates to validator set") } - genesisState.Provider.InitialValSet = initialValset - genesisState.Provider.ConsensusState.NextValidatorsHash = tmtypes.NewValidatorSet(vals).Hash() + genesisState.InitialValSet = initialValset + genesisState.ProviderConsensusState.NextValidatorsHash = tmtypes.NewValidatorSet(vals).Hash() state.ConsumerModuleState = genesisState return nil diff --git a/go.mod b/go.mod index 4dd15d9c0c..2577b9f8de 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/Stride-Labs/stride/v19 -go 1.21.1 - -toolchain go1.21.3 +go 1.21 require ( cosmossdk.io/errors v1.0.1 @@ -17,15 +15,15 @@ require ( github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.3-0.20240228213828-cce7f56d000b github.com/cosmos/ibc-go/v7 v7.3.1 github.com/cosmos/ics23/go v0.10.0 - github.com/cosmos/interchain-security/v4 v4.0.0 + github.com/cosmos/interchain-security/v3 v3.2.0 github.com/evmos/vesting v0.0.0-20230818101748-9ea561e4529c github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.3 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/prometheus/client_golang v1.16.0 - github.com/spf13/cast v1.6.0 - github.com/spf13/cobra v1.8.0 + github.com/spf13/cast v1.5.1 + github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 @@ -172,7 +170,7 @@ require ( go.opentelemetry.io/otel/metric v1.19.0 // indirect go.opentelemetry.io/otel/trace v1.19.0 // indirect go.uber.org/mock v0.2.0 // indirect - golang.org/x/crypto v0.17.0 // indirect + golang.org/x/crypto v0.16.0 // indirect golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/oauth2 v0.13.0 // indirect diff --git a/go.sum b/go.sum index 00458dd648..b4bacf0602 100644 --- a/go.sum +++ b/go.sum @@ -352,16 +352,14 @@ github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoK github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.2 h1:6zjj+yIpMbCTRI2eJ2fXuflElENs3mrUSLH/TSWL8fk= -github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.2/go.mod h1:UvDmcGIWJPIytq+Q78/ff5NTOsuX/7IrNgEugTW5i0s= github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.3-0.20240228213828-cce7f56d000b h1:VwhHRRIPdMshBMb2TP7xrkY4Ee8CJWsHZvucYeJ56no= github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.3-0.20240228213828-cce7f56d000b/go.mod h1:UvDmcGIWJPIytq+Q78/ff5NTOsuX/7IrNgEugTW5i0s= github.com/cosmos/ibc-go/v7 v7.3.1 h1:bil1IjnHdyWDASFYKfwdRiNtFP6WK3osW7QFEAgU4I8= github.com/cosmos/ibc-go/v7 v7.3.1/go.mod h1:wvx4pPBofe5ZdMNV3OFRxSI4auEP5Qfqf8JXLLNV04g= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/interchain-security/v4 v4.0.0 h1:6olP/UIrvckLgDpzJLAqPjmzo3+AoHjMM1TRrcrpME0= -github.com/cosmos/interchain-security/v4 v4.0.0/go.mod h1:h86YbhHmSDHVMDsDipAHi8zugzyTUwZ6EuSCOzp9shI= +github.com/cosmos/interchain-security/v3 v3.2.0 h1:WlRbu6Mm94RWBf52onUvX8oQZQVSqdZ4wH8bOkO2FBE= +github.com/cosmos/interchain-security/v3 v3.2.0/go.mod h1:OPw1AqxTeZnNGIxZVTZN7qAQfOyb25MBFR/kSc48erY= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= @@ -370,7 +368,7 @@ github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzU github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -951,8 +949,8 @@ github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -1065,8 +1063,8 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= diff --git a/scripts/consumer/README.md b/scripts/consumer/README.md index 7b317a0a4a..e443fffa68 100644 --- a/scripts/consumer/README.md +++ b/scripts/consumer/README.md @@ -4,7 +4,7 @@ Binaries: -- interchain-security-pd - [Interchain security](https://github.com/cosmos/interchain-security/v4) version: v4.0.0 +- interchain-security-pd - [Interchain security](https://github.com/cosmos/interchain-security/v3) version: v0.2.1 - strided - hermes(version: v0.15.0) diff --git a/testutil/consumer.go b/testutil/consumer.go index 753d9e0955..ef1285593c 100644 --- a/testutil/consumer.go +++ b/testutil/consumer.go @@ -6,8 +6,8 @@ import ( ibctypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" ibctmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" - ccvprovidertypes "github.com/cosmos/interchain-security/v4/x/ccv/provider/types" - ccvtypes "github.com/cosmos/interchain-security/v4/x/ccv/types" + ccvprovidertypes "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) // This function creates consumer module genesis state that is used as starting point for modifications @@ -17,17 +17,17 @@ func CreateMinimalConsumerTestGenesis() *ccvtypes.ConsumerGenesisState { genesisState := ccvtypes.DefaultConsumerGenesisState() genesisState.Params.Enabled = true genesisState.NewChain = true - genesisState.Provider.ClientState = ccvprovidertypes.DefaultParams().TemplateClient - genesisState.Provider.ClientState.ChainId = "stride" - genesisState.Provider.ClientState.LatestHeight = ibctypes.Height{RevisionNumber: 0, RevisionHeight: 1} + genesisState.ProviderClientState = ccvprovidertypes.DefaultParams().TemplateClient + genesisState.ProviderClientState.ChainId = "stride" + genesisState.ProviderClientState.LatestHeight = ibctypes.Height{RevisionNumber: 0, RevisionHeight: 1} trustPeriod, err := ccvtypes.CalculateTrustPeriod(genesisState.Params.UnbondingPeriod, ccvprovidertypes.DefaultTrustingPeriodFraction) if err != nil { panic("provider client trusting period error") } - genesisState.Provider.ClientState.TrustingPeriod = trustPeriod - genesisState.Provider.ClientState.UnbondingPeriod = genesisState.Params.UnbondingPeriod - genesisState.Provider.ClientState.MaxClockDrift = ccvprovidertypes.DefaultMaxClockDrift - genesisState.Provider.ConsensusState = &ibctmtypes.ConsensusState{ + genesisState.ProviderClientState.TrustingPeriod = trustPeriod + genesisState.ProviderClientState.UnbondingPeriod = genesisState.Params.UnbondingPeriod + genesisState.ProviderClientState.MaxClockDrift = ccvprovidertypes.DefaultMaxClockDrift + genesisState.ProviderConsensusState = &ibctmtypes.ConsensusState{ Timestamp: time.Now().UTC(), Root: types.MerkleRoot{Hash: []byte("dummy")}, } diff --git a/testutil/network/network.go b/testutil/network/network.go index 5a9c9d1f39..20dcfaf90c 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -24,7 +24,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" genutil "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - ccvconsumertypes "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types" + ccvconsumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" "github.com/Stride-Labs/stride/v19/app" testutil "github.com/Stride-Labs/stride/v19/testutil" @@ -130,8 +130,8 @@ func modifyConsumerGenesis(val network.Validator) error { } consumerGenesisState := testutil.CreateMinimalConsumerTestGenesis() - consumerGenesisState.Provider.InitialValSet = initialValset - consumerGenesisState.Provider.ConsensusState.NextValidatorsHash = tmtypes.NewValidatorSet(vals).Hash() + consumerGenesisState.InitialValSet = initialValset + consumerGenesisState.ProviderConsensusState.NextValidatorsHash = tmtypes.NewValidatorSet(vals).Hash() if err := consumerGenesisState.Validate(); err != nil { return errorsmod.Wrap(err, "invalid consumer genesis") diff --git a/x/stakeibc/types/expected_keepers.go b/x/stakeibc/types/expected_keepers.go index 76487ff121..19c97f8088 100644 --- a/x/stakeibc/types/expected_keepers.go +++ b/x/stakeibc/types/expected_keepers.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - ccvtypes "github.com/cosmos/interchain-security/v4/x/ccv/types" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ratelimittypes "github.com/Stride-Labs/ibc-rate-limiting/ratelimit/types" )