Skip to content

Commit

Permalink
fix!: add migration of non-legacy proposals (#3316)
Browse files Browse the repository at this point in the history
* init commit

* Update app/upgrades/v20/upgrades.go

Co-authored-by: Marius Poke <[email protected]>

* Update app/upgrades/v20/upgrades.go

Co-authored-by: Marius Poke <[email protected]>

* Update app/upgrades/v20/upgrades.go

Co-authored-by: Marius Poke <[email protected]>

* Update app/upgrades/v20/upgrades.go

Co-authored-by: Marius Poke <[email protected]>

* small fixes; took into account comments

* fix linter issues

* bump ICS to v6

* fix linter

* make format

---------

Co-authored-by: Marius Poke <[email protected]>
  • Loading branch information
insumity and mpoke authored Sep 9, 2024
1 parent ff22e5b commit e465609
Show file tree
Hide file tree
Showing 13 changed files with 509 additions and 172 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/gogoproto/proto"
ibctesting "github.com/cosmos/ibc-go/v8/testing"
providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types"
providertypes "github.com/cosmos/interchain-security/v6/x/ccv/provider/types"

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
Expand Down
4 changes: 2 additions & 2 deletions app/app_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
ibctestingtypes "github.com/cosmos/ibc-go/v8/testing/types"
icstest "github.com/cosmos/interchain-security/v5/testutil/integration"
ibcproviderkeeper "github.com/cosmos/interchain-security/v5/x/ccv/provider/keeper"
icstest "github.com/cosmos/interchain-security/v6/testutil/integration"
ibcproviderkeeper "github.com/cosmos/interchain-security/v6/x/ccv/provider/keeper"
)

// ProviderApp interface implementations for icstest tests
Expand Down
9 changes: 4 additions & 5 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import (
porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types"
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
icsprovider "github.com/cosmos/interchain-security/v5/x/ccv/provider"
icsproviderkeeper "github.com/cosmos/interchain-security/v5/x/ccv/provider/keeper"
providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types"
icsprovider "github.com/cosmos/interchain-security/v6/x/ccv/provider"
icsproviderkeeper "github.com/cosmos/interchain-security/v6/x/ccv/provider/keeper"
providertypes "github.com/cosmos/interchain-security/v6/x/ccv/provider/types"

"cosmossdk.io/log"
storetypes "cosmossdk.io/store/types"
Expand Down Expand Up @@ -376,8 +376,7 @@ func NewAppKeeper(
govRouter := govv1beta1.NewRouter()
govRouter.
AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(appKeepers.ParamsKeeper)).
AddRoute(providertypes.RouterKey, icsprovider.NewProviderProposalHandler(appKeepers.ProviderKeeper))
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(appKeepers.ParamsKeeper))

// Set legacy router for backwards compatibility with gov v1beta1
appKeepers.GovKeeper.SetLegacyRouter(govRouter)
Expand Down
2 changes: 1 addition & 1 deletion app/keepers/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types"
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types"
providertypes "github.com/cosmos/interchain-security/v6/x/ccv/provider/types"

storetypes "cosmossdk.io/store/types"
evidencetypes "cosmossdk.io/x/evidence/types"
Expand Down
6 changes: 3 additions & 3 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
ibc "github.com/cosmos/ibc-go/v8/modules/core"
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
no_valupdates_genutil "github.com/cosmos/interchain-security/v5/x/ccv/no_valupdates_genutil"
no_valupdates_staking "github.com/cosmos/interchain-security/v5/x/ccv/no_valupdates_staking"
providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types"
no_valupdates_genutil "github.com/cosmos/interchain-security/v6/x/ccv/no_valupdates_genutil"
no_valupdates_staking "github.com/cosmos/interchain-security/v6/x/ccv/no_valupdates_staking"
providertypes "github.com/cosmos/interchain-security/v6/x/ccv/provider/types"

"cosmossdk.io/x/evidence"
evidencetypes "cosmossdk.io/x/evidence/types"
Expand Down
Loading

0 comments on commit e465609

Please sign in to comment.