Skip to content

Commit

Permalink
deps: latest local cosmos-sdk with ante and simapp fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Sep 18, 2024
1 parent fc9a0e8 commit 1daaa31
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 29 deletions.
13 changes: 8 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ go 1.23.1
module github.com/cosmos/ibc-go/v9

// TODO
require cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91
require cosmossdk.io/x/accounts v0.0.0-20240913065641-0064ccbce64e

require (
cosmossdk.io/api v0.8.0
Expand Down Expand Up @@ -47,6 +47,7 @@ require (
)

require (
cosmossdk.io/x/accounts/defaults/base v0.0.0-00010101000000-000000000000
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5
cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190
)
Expand All @@ -63,7 +64,7 @@ require (
cosmossdk.io/collections v0.4.1-0.20240802064046-23fac2f1b8ab // indirect
cosmossdk.io/core/testing v0.0.0-20240913164418-aaf72f20c10b // indirect
cosmossdk.io/depinject v1.0.0 // indirect
cosmossdk.io/schema v0.2.0 // indirect
cosmossdk.io/schema v0.3.0 // indirect
cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
Expand Down Expand Up @@ -169,7 +170,7 @@ require (
github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.20.3 // indirect
github.com/prometheus/client_golang v1.20.4 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.59.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
Expand Down Expand Up @@ -241,18 +242,20 @@ replace (
cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20240905174638-8ce77cbb2450
github.com/cometbft/cometbft => github.com/cometbft/cometbft v1.0.0-rc1
// pseudo version lower than the latest tag
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-alpha.1.0.20240905174638-8ce77cbb2450
github.com/cosmos/cosmos-sdk => ../cosmos-sdk
github.com/cosmos/ibc-go/modules/capability => ./modules/capability //TODO: remove after capability is tagged
)

// TODO: remove
replace (
cosmossdk.io/tools/confix => ../cosmos-sdk/tools/confix
cosmossdk.io/x/accounts => ../cosmos-sdk/x/accounts
cosmossdk.io/x/accounts/defaults => ../cosmos-sdk/x/accounts/defaults
cosmossdk.io/x/accounts/defaults/base => ../cosmos-sdk/x/accounts/defaults/base
cosmossdk.io/x/accounts/defaults/lockup => ../cosmos-sdk/x/accounts/defaults/lockup
cosmossdk.io/x/accounts/defaults/multisig => ../cosmos-sdk/x/accounts/defaults/multisig
cosmossdk.io/x/circuit => ../cosmos-sdk/x/circuit
cosmossdk.io/x/mint => ../cosmos-sdk/x/mint
cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20240918153713-01212de2d9dc // main
cosmossdk.io/x/nft => ../cosmos-sdk/x/nft
cosmossdk.io/x/protocolpool => ../cosmos-sdk/x/protocolpool
)
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM=
cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU=
cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE=
cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k=
cosmossdk.io/schema v0.2.0 h1:UH5CR1DqUq8yP+5Np8PbvG4YX0zAUsTN2Qk6yThmfMk=
cosmossdk.io/schema v0.2.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ=
cosmossdk.io/schema v0.3.0 h1:01lcaM4trhzZ1HQTfTV8z6Ma1GziOZ/YmdzBN3F720c=
cosmossdk.io/schema v0.3.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ=
cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897 h1:o024zaPHYtmUGL2BCX1ns9rfZmMc19U4hQ2CAPt2Xgg=
cosmossdk.io/store v1.0.0-rc.0.0.20240815194237-858ec2fcb897/go.mod h1:Ma4uny4RFegWTbU71fBmkSIoHrWHlLC/JwwgWgehZm4=
cosmossdk.io/x/authz v0.0.0-20240905174638-8ce77cbb2450 h1:dIvjFGZiu+yOAdY0ru9BWuh3S9DTBXuTqdthjoZQJQ0=
Expand All @@ -228,6 +228,8 @@ cosmossdk.io/x/gov v0.0.0-20240905174638-8ce77cbb2450 h1:4qpruZEf5JgMPmdQr2neXsc
cosmossdk.io/x/gov v0.0.0-20240905174638-8ce77cbb2450/go.mod h1:vxdu3r1+keQ0zugjZYwoaa0IcRscfqM/XQ8mw/MwFGc=
cosmossdk.io/x/group v0.0.0-20240905174638-8ce77cbb2450 h1:6UP+BMaQIf12+Zdm50nHJzBd47Ue9pq+CvTRIhOM4q0=
cosmossdk.io/x/group v0.0.0-20240905174638-8ce77cbb2450/go.mod h1:SPQg4DfFURVX3xOLzOWzv30vxUj8mf5Ehm0OagfdMN8=
cosmossdk.io/x/mint v0.0.0-20240918153713-01212de2d9dc h1:j1cS2Noa/95tsiWJhz61arGdbNw4gKw4rITDDtzvJCM=
cosmossdk.io/x/mint v0.0.0-20240918153713-01212de2d9dc/go.mod h1:hIn+AWTCnAV6Zc1Kx9nfbIboYz2V78WFWRb0NO1i3+w=
cosmossdk.io/x/params v0.0.0-20240905174638-8ce77cbb2450 h1:8LThIewMzM3xM7/iQv/LOO4hrC6Hg7yohFeCaLALeg4=
cosmossdk.io/x/params v0.0.0-20240905174638-8ce77cbb2450/go.mod h1:Zj4HqEipshPgZxUlCnUtQHJN/vIpzkqjmvi6V6iO13Y=
cosmossdk.io/x/slashing v0.0.0-20240905174638-8ce77cbb2450 h1:padUT7OMCH3gekVGhdAwisgDjF3aXM2W3aLWmTjSFn8=
Expand Down Expand Up @@ -350,8 +352,6 @@ github.com/cosmos/cosmos-db v1.0.3-0.20240911104526-ddc3f09bfc22 h1:V3WlarcZwlYY
github.com/cosmos/cosmos-db v1.0.3-0.20240911104526-ddc3f09bfc22/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA=
github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA=
github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec=
github.com/cosmos/cosmos-sdk v0.52.0-alpha.1.0.20240905174638-8ce77cbb2450 h1:H4Kf0u7SAB1poVZJwfnKbkGUhbLTqFSaPw8ARPa1/Ww=
github.com/cosmos/cosmos-sdk v0.52.0-alpha.1.0.20240905174638-8ce77cbb2450/go.mod h1:1GgLZiqibXldZpyqhyuszX5PUIQhc8q6lYxAbNocNlI=
github.com/cosmos/crypto v0.1.2 h1:Yn500sPY+9sKVdhiPUSDtt8JOpBGMB515dOmla4zfls=
github.com/cosmos/crypto v0.1.2/go.mod h1:b6VWz3HczIpBaQPvI7KrbQeF3pXHh0al3T5e0uwMBQw=
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
Expand Down Expand Up @@ -743,8 +743,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
github.com/prometheus/client_golang v1.20.3 h1:oPksm4K8B+Vt35tUhw6GbSNSgVlVSBH0qELP/7u83l4=
github.com/prometheus/client_golang v1.20.3/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI=
github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
Expand Down
19 changes: 2 additions & 17 deletions simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
"github.com/cosmos/cosmos-sdk/x/crisis"
crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
"github.com/cosmos/cosmos-sdk/x/genutil"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"

Expand Down Expand Up @@ -184,7 +181,6 @@ type SimApp struct {
MintKeeper mintkeeper.Keeper
DistrKeeper distrkeeper.Keeper
GovKeeper govkeeper.Keeper
CrisisKeeper *crisiskeeper.Keeper
UpgradeKeeper *upgradekeeper.Keeper
ParamsKeeper paramskeeper.Keeper
AuthzKeeper authzkeeper.Keeper
Expand Down Expand Up @@ -294,7 +290,7 @@ func NewSimApp(
bApp.SetTxEncoder(txConfig.TxEncoder())

keys := storetypes.NewKVStoreKeys(
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, crisistypes.StoreKey,
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey,
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, group.StoreKey, paramstypes.StoreKey, ibcexported.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
evidencetypes.StoreKey, ibctransfertypes.StoreKey, icacontrollertypes.StoreKey, icahosttypes.StoreKey, capabilitytypes.StoreKey,
Expand Down Expand Up @@ -370,10 +366,6 @@ func NewSimApp(
appCodec, legacyAmino, runtime.NewKVStoreService(keys[slashingtypes.StoreKey]), app.StakingKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod))
app.CrisisKeeper = crisiskeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[crisistypes.StoreKey]), invCheckPeriod,
app.BankKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String(), app.AccountKeeper.AddressCodec())

app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[feegrant.StoreKey]), app.AccountKeeper)

// register the staking hooks
Expand Down Expand Up @@ -569,10 +561,6 @@ func NewSimApp(

// **** Module Options ****

// NOTE: we may consider parsing `appOpts` inside module constructors. For the moment
// we prefer to be more strict in what arguments the modules expect.
skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants))

// NOTE: Any module instantiated in the module manager that is later modified
// must be passed by reference here.
app.ModuleManager = module.NewManager(
Expand All @@ -584,7 +572,6 @@ func NewSimApp(
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper),
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)),
capability.NewAppModule(appCodec, *app.CapabilityKeeper, false),
crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)),
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)),
Expand Down Expand Up @@ -654,7 +641,6 @@ func NewSimApp(
mock.ModuleName,
)
app.ModuleManager.SetOrderEndBlockers(
crisistypes.ModuleName,
govtypes.ModuleName,
stakingtypes.ModuleName,
ibcexported.ModuleName,
Expand All @@ -678,7 +664,7 @@ func NewSimApp(
capabilitytypes.ModuleName,
authtypes.ModuleName,
banktypes.ModuleName, distrtypes.ModuleName, stakingtypes.ModuleName,
slashingtypes.ModuleName, govtypes.ModuleName, minttypes.ModuleName, crisistypes.ModuleName,
slashingtypes.ModuleName, govtypes.ModuleName, minttypes.ModuleName,
ibcexported.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, authz.ModuleName, ibctransfertypes.ModuleName,
icatypes.ModuleName, ibcfeetypes.ModuleName, mock.ModuleName, feegrant.ModuleName, paramstypes.ModuleName, upgradetypes.ModuleName,
vestingtypes.ModuleName, group.ModuleName, consensusparamtypes.ModuleName, circuittypes.ModuleName,
Expand All @@ -689,7 +675,6 @@ func NewSimApp(
// Uncomment if you want to set a custom migration order here.
// app.ModuleManager.SetOrderMigrations(custom order)

app.ModuleManager.RegisterInvariants(app.CrisisKeeper)
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
err := app.ModuleManager.RegisterServices(app.configurator)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion testing/simapp/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
}

anteDecorators := []sdk.AnteDecorator{
ante.NewSetUpContextDecorator(options.Environment), // outermost AnteDecorator. SetUpContext must be called first
ante.NewSetUpContextDecorator(options.Environment, options.ConsensusKeeper), // outermost AnteDecorator. SetUpContext must be called first
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
ante.NewValidateBasicDecorator(options.Environment),
ante.NewTxTimeoutHeightDecorator(options.Environment),
Expand Down

0 comments on commit 1daaa31

Please sign in to comment.