Skip to content

Commit

Permalink
merge: post merge fixes and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Dec 8, 2023
1 parent 58b5b96 commit b16d84d
Show file tree
Hide file tree
Showing 22 changed files with 116 additions and 164 deletions.
3 changes: 0 additions & 3 deletions ante/ante.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package ante

import (
ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper"

errorsmod "cosmossdk.io/errors"

"github.com/cosmos/cosmos-sdk/codec"
Expand Down
2 changes: 1 addition & 1 deletion ante/gov_ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/authz"
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"

gaiaerrors "github.com/cosmos/gaia/v15/types/errors"
)
Expand Down
23 changes: 3 additions & 20 deletions ante/gov_ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"testing"

<<<<<<< HEAD
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/suite"

Expand All @@ -14,16 +13,6 @@ import (
"github.com/cosmos/cosmos-sdk/testutil/testdata"

govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
=======
"github.com/stretchr/testify/suite"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
>>>>>>> main

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/testutil/testdata"
sdk "github.com/cosmos/cosmos-sdk/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

"github.com/cosmos/gaia/v15/ante"
gaiaapp "github.com/cosmos/gaia/v15/app"
Expand Down Expand Up @@ -81,17 +70,11 @@ func (s *GovAnteHandlerTestSuite) TestGlobalFeeMinimumGasFeeAnteHandler() {
initialDeposit sdk.Coins
expectPass bool
}{
<<<<<<< HEAD
{"Passing proposal 1", "the purpose of this proposal is to pass", govv1beta1.ProposalTypeText, testAddr, minCoins, true},
{"Passing proposal 2", "the purpose of this proposal is to pass with more coins than minimum", govv1beta1.ProposalTypeText, testAddr, moreThanMinCoins, true},
{"Failing proposal", "the purpose of this proposal is to fail", govv1beta1.ProposalTypeText, testAddr, insufficientCoins, false},
=======
{"Passing proposal 1", "the purpose of this proposal is to pass", govtypes.ProposalTypeText, testAddr, minCoins, true},
{"Passing proposal 2", "the purpose of this proposal is to pass with more coins than minimum", govtypes.ProposalTypeText, testAddr, moreThanMinCoins, true},
{"Passing proposal 3", "the purpose of this proposal is to pass with multi denom coins", govtypes.ProposalTypeText, testAddr, moreThanMinMultiDenomCoins, true},
{"Failing proposal 1", "the purpose of this proposal is to fail", govtypes.ProposalTypeText, testAddr, insufficientCoins, false},
{"Failing proposal 2", "the purpose of this proposal is to fail with multi denom coins", govtypes.ProposalTypeText, testAddr, insufficientMultiDenomCoins, false},
>>>>>>> main
{"Passing proposal 3", "the purpose of this proposal is to pass with multi denom coins", govv1beta1.ProposalTypeText, testAddr, moreThanMinMultiDenomCoins, true},
{"Failing proposal 1", "the purpose of this proposal is to fail", govv1beta1.ProposalTypeText, testAddr, insufficientCoins, false},
{"Failing proposal 2", "the purpose of this proposal is to fail with multi denom coins", govv1beta1.ProposalTypeText, testAddr, insufficientMultiDenomCoins, false},
}

decorator := ante.NewGovPreventSpamDecorator(s.app.AppCodec(), s.app.GovKeeper)
Expand Down
8 changes: 1 addition & 7 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"path/filepath"

"github.com/cosmos/gaia/v11/app/params"
"github.com/cosmos/gaia/v15/app/params"

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
Expand Down Expand Up @@ -50,7 +50,6 @@ import (

gaiaante "github.com/cosmos/gaia/v15/ante"
"github.com/cosmos/gaia/v15/app/keepers"
gaiaappparams "github.com/cosmos/gaia/v15/app/params"
"github.com/cosmos/gaia/v15/app/upgrades"
v15 "github.com/cosmos/gaia/v15/app/upgrades/v15"
"github.com/cosmos/gaia/v15/x/globalfee"
Expand Down Expand Up @@ -373,11 +372,6 @@ func (app *GaiaApp) RegisterTendermintService(clientCtx client.Context) {
)
}

// RegisterTxService allows query minimum-gas-prices in app.toml
func (app *GaiaApp) RegisterNodeService(clientCtx client.Context) {
nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter())
}

// configure store loader that checks if version == upgradeHeight and applies store upgrades
func (app *GaiaApp) setupUpgradeStoreLoaders() {
upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
Expand Down
2 changes: 1 addition & 1 deletion app/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gaia
import (
"encoding/json"

"github.com/cosmos/gaia/v11/app/params"
"github.com/cosmos/gaia/v15/app/params"
)

// The genesis state of the blockchain is represented here as a map of raw json
Expand Down
21 changes: 7 additions & 14 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ import (
"github.com/cosmos/cosmos-sdk/x/upgrade"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
pfmrouter "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward"
pfmrouterkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper"
pfmroutertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts"
icahost "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host"
icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper"
Expand All @@ -63,9 +66,6 @@ import (
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
ibcprovider "github.com/cosmos/interchain-security/v3/x/ccv/provider"
ibcproviderkeeper "github.com/cosmos/interchain-security/v3/x/ccv/provider/keeper"
pfmrouter "github.com/strangelove-ventures/packet-forward-middleware/v7/router"
pfmrouterkeeper "github.com/strangelove-ventures/packet-forward-middleware/v7/router/keeper"
pfmroutertypes "github.com/strangelove-ventures/packet-forward-middleware/v7/router/types"

// unnamed import of statik for swagger UI support
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
Expand Down Expand Up @@ -203,13 +203,6 @@ func NewAppKeeper(
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

appKeepers.CrisisKeeper = crisiskeeper.NewKeeper(
appKeepers.GetSubspace(crisistypes.ModuleName),
invCheckPeriod,
appKeepers.BankKeeper,
authtypes.FeeCollectorName,
)

appKeepers.AuthzKeeper = authzkeeper.NewKeeper(
appKeepers.keys[authzkeeper.StoreKey],
appCodec,
Expand Down Expand Up @@ -337,7 +330,6 @@ func NewAppKeeper(
// Set legacy router for backwards compatibility with gov v1beta1
appKeepers.GovKeeper.SetLegacyRouter(govRouter)

// appKeepers.GovKeeper = *govKeeper
appKeepers.GovKeeper = appKeepers.GovKeeper.SetHooks(
appKeepers.ProviderKeeper.Hooks(),
)
Expand Down Expand Up @@ -366,15 +358,16 @@ func NewAppKeeper(
)

// PFMRouterKeeper must be created before TransferKeeper
authority := authtypes.NewModuleAddress(govtypes.ModuleName).String()
appKeepers.PFMRouterKeeper = pfmrouterkeeper.NewKeeper(
appCodec,
appKeepers.keys[pfmroutertypes.StoreKey],
appKeepers.GetSubspace(pfmroutertypes.ModuleName),
appKeepers.TransferKeeper,
nil, // Will be zero-value here. Reference is set later on with SetTransferKeeper.
appKeepers.IBCKeeper.ChannelKeeper,
appKeepers.DistrKeeper,
appKeepers.BankKeeper,
appKeepers.IBCKeeper.ChannelKeeper,
authority,
)

appKeepers.TransferKeeper = ibctransferkeeper.NewKeeper(
Expand All @@ -401,7 +394,7 @@ func NewAppKeeper(
// TODO: Move inline
appKeepers.ICAModule = ica.NewAppModule(nil, &appKeepers.ICAHostKeeper)
// TODO: Move inline
appKeepers.PFMRouterModule = pfmrouter.NewAppModule(appKeepers.PFMRouterKeeper)
appKeepers.PFMRouterModule = pfmrouter.NewAppModule(appKeepers.PFMRouterKeeper, appKeepers.GetSubspace(pfmroutertypes.ModuleName))

// create IBC module from bottom to top of stack
var transferStack porttypes.IBCModule
Expand Down
8 changes: 1 addition & 7 deletions app/keepers/keys.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package keepers

import (
routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types"
icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types"
ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"
ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host"
providertypes "github.com/cosmos/interchain-security/v2/x/ccv/provider/types"
routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"

storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -28,8 +24,6 @@ import (
ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
providertypes "github.com/cosmos/interchain-security/v3/x/ccv/provider/types"
routertypes "github.com/strangelove-ventures/packet-forward-middleware/v7/router/types"
// liquiditytypes "github.com/gravity-devs/liquidity/x/liquidity/types"
)

func (appKeepers *AppKeepers) GenerateKeys() {
Expand Down
31 changes: 9 additions & 22 deletions app/modules.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
package gaia

import (
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router"
routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v4/router/types"
ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts"
icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types"
"github.com/cosmos/ibc-go/v4/modules/apps/transfer"
ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v4/modules/core"
ibcclientclient "github.com/cosmos/ibc-go/v4/modules/core/02-client/client"
ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host"
ibcprovider "github.com/cosmos/interchain-security/v2/x/ccv/provider"
ibcproviderclient "github.com/cosmos/interchain-security/v2/x/ccv/provider/client"
providertypes "github.com/cosmos/interchain-security/v2/x/ccv/provider/types"
pfmrouter "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward"
pfmroutertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"

"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/auth"
Expand Down Expand Up @@ -65,9 +55,6 @@ import (
icsproviderclient "github.com/cosmos/interchain-security/v3/x/ccv/provider/client"
providertypes "github.com/cosmos/interchain-security/v3/x/ccv/provider/types"

"github.com/strangelove-ventures/packet-forward-middleware/v7/router"
routertypes "github.com/strangelove-ventures/packet-forward-middleware/v7/router/types"

gaiaappparams "github.com/cosmos/gaia/v15/app/params"
"github.com/cosmos/gaia/v15/x/globalfee"
)
Expand Down Expand Up @@ -105,7 +92,7 @@ var ModuleBasics = module.NewBasicManager(
ibcclientclient.UpgradeProposalHandler,
icsproviderclient.ConsumerAdditionProposalHandler,
icsproviderclient.ConsumerRemovalProposalHandler,
ibcproviderclient.ChangeRewardDenomsProposalHandler,
icsproviderclient.ChangeRewardDenomsProposalHandler,
},
),
sdkparams.AppModuleBasic{},
Expand All @@ -119,7 +106,7 @@ var ModuleBasics = module.NewBasicManager(
evidence.AppModuleBasic{},
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
router.AppModuleBasic{},
pfmrouter.AppModuleBasic{},
ica.AppModuleBasic{},
globalfee.AppModule{},
icsprovider.AppModuleBasic{},
Expand All @@ -128,7 +115,7 @@ var ModuleBasics = module.NewBasicManager(

func appModules(
app *GaiaApp,
encodingConfig gaiaparams.EncodingConfig,
encodingConfig gaiaappparams.EncodingConfig,
skipGenesisInvariants bool,
) []module.AppModule {
appCodec := encodingConfig.Marshaler
Expand Down Expand Up @@ -168,7 +155,7 @@ func appModules(
// define the order of the modules for deterministic simulations
func simulationModules(
app *GaiaApp,
encodingConfig gaiaparams.EncodingConfig,
encodingConfig gaiaappparams.EncodingConfig,
_ bool,
) []module.AppModuleSimulation {
appCodec := encodingConfig.Marshaler
Expand Down Expand Up @@ -222,7 +209,7 @@ func orderBeginBlockers() []string {
ibcexported.ModuleName,
ibctransfertypes.ModuleName,
icatypes.ModuleName,
routertypes.ModuleName,
pfmroutertypes.ModuleName,
genutiltypes.ModuleName,
authz.ModuleName,
feegrant.ModuleName,
Expand Down Expand Up @@ -250,7 +237,7 @@ func orderEndBlockers() []string {
ibcexported.ModuleName,
ibctransfertypes.ModuleName,
icatypes.ModuleName,
routertypes.ModuleName,
pfmroutertypes.ModuleName,
capabilitytypes.ModuleName,
authtypes.ModuleName,
banktypes.ModuleName,
Expand Down Expand Up @@ -296,7 +283,7 @@ func orderInitBlockers() []string {
evidencetypes.ModuleName,
authz.ModuleName,
feegrant.ModuleName,
routertypes.ModuleName,
pfmroutertypes.ModuleName,
paramstypes.ModuleName,
upgradetypes.ModuleName,
vestingtypes.ModuleName,
Expand Down
2 changes: 1 addition & 1 deletion app/sim/sim_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"time"

"github.com/cosmos/gaia/v11/app/params"
"github.com/cosmos/gaia/v15/app/params"

"cosmossdk.io/math"

Expand Down
4 changes: 2 additions & 2 deletions app/sim_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli"
"github.com/stretchr/testify/require"

gaia "github.com/cosmos/gaia/v11/app"
gaia "github.com/cosmos/gaia/v15/app"

simulation2 "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/cosmos-sdk/x/simulation"

"github.com/cosmos/gaia/v11/app/sim"
"github.com/cosmos/gaia/v15/app/sim"
)

// Profile with:
Expand Down
7 changes: 0 additions & 7 deletions app/upgrades/v8/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,14 @@ import (
"errors"
"fmt"

icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types"
ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types"

"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
<<<<<<< HEAD
icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types"
ibcchanneltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"
=======
>>>>>>> main

"github.com/cosmos/gaia/v15/app/keepers"
)
Expand Down
13 changes: 5 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
cosmossdk.io/tools/rosetta v0.2.1
github.com/cometbft/cometbft v0.37.2
github.com/cometbft/cometbft-db v0.8.0
github.com/cosmos/cosmos-sdk v0.47.5
github.com/cosmos/cosmos-sdk v0.47.6
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/gogoproto v1.4.10
github.com/cosmos/ibc-go/v7 v7.3.1
Expand All @@ -20,12 +20,13 @@ require (
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.16.0
github.com/strangelove-ventures/packet-forward-middleware/v7 v7.0.0-20230412224111-136e94e98861
github.com/stretchr/testify v1.8.4
)

require (
cosmossdk.io/errors v1.0.0
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.2
github.com/google/gofuzz v1.2.0
github.com/ory/dockertest/v3 v3.10.0
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97
)
Expand Down Expand Up @@ -214,10 +215,10 @@ replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0

// Use special SDK release with support for both ICS and LSM
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.45.16-ics-lsm
github.com/cosmos/cosmos-sdk => github.com/informalsystems/cosmos-sdk v0.46.0-alpha2.0.20231206144452-5b8e28f3247b

// Use special ICS release with support for LSM
github.com/cosmos/interchain-security/v2 => github.com/cosmos/interchain-security/v2 v2.4.0-lsm
github.com/cosmos/interchain-security/v3 => github.com/cosmos/interchain-security/v3 v3.3.0-rc0.0.20231207121941-02bc47252590

// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
Expand All @@ -231,7 +232,3 @@ replace (
// the following version across all dependencies.
google.golang.org/grpc => google.golang.org/grpc v1.54.0
)

replace github.com/cosmos/cosmos-sdk => github.com/informalsystems/cosmos-sdk v0.46.0-alpha2.0.20231206144452-5b8e28f3247b

replace github.com/cosmos/interchain-security/v3 => github.com/cosmos/interchain-security/v3 v3.3.0-rc0.0.20231207121941-02bc47252590
Loading

0 comments on commit b16d84d

Please sign in to comment.