Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## UNRELEASED

### DEPENDENCIES
- Bump [cosmos-sdk](https://github.com/cosmos/cosmos-sdk) to [v0.53.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.53.0) (#3773)

### STATE BREAKING
- Bump [cosmos-sdk](https://github.com/cosmos/cosmos-sdk) to [v0.53.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.53.0) (#3773)

## v24.0.0

*May 30, 2025*

### DEPENDENCIES
- Bump [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.6 to 2.0.9 ([#3710](https://github.com/cosmos/gaia/pull/3710))
- Bump [golang.org/x/crypto](https://github.com/golang/crypto) from 0.32.0 to 0.35.0 ([#3709](https://github.com/cosmos/gaia/pull/3709))
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ start-localnet-ci: build
./build/gaiad genesis gentx val 1000000000stake --home ~/.gaiad-liveness --chain-id liveness --keyring-backend test
./build/gaiad genesis collect-gentxs --home ~/.gaiad-liveness
sed -i.bak'' 's/minimum-gas-prices = ""/minimum-gas-prices = "0uatom"/' ~/.gaiad-liveness/config/app.toml
./build/gaiad start --home ~/.gaiad-liveness --x-crisis-skip-assert-invariants
./build/gaiad start --home ~/.gaiad-liveness

.PHONY: start-localnet-ci

Expand Down
3 changes: 2 additions & 1 deletion ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"

Expand All @@ -36,7 +37,7 @@ type HandlerOptions struct {
SignModeHandler *txsigning.HandlerMap
SigGasConsumer func(meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error

AccountKeeper feemarketante.AccountKeeper
AccountKeeper *authkeeper.AccountKeeper
BankKeeper feemarketante.BankKeeper
Codec codec.BinaryCodec
IBCkeeper *ibckeeper.Keeper
Expand Down
23 changes: 6 additions & 17 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ import (
"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
feemarketkeeper "github.com/skip-mev/feemarket/x/feemarket/keeper"
"github.com/spf13/cast"

abci "github.com/cometbft/cometbft/abci/types"
tmjson "github.com/cometbft/cometbft/libs/json"
tmos "github.com/cometbft/cometbft/libs/os"
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"

dbm "github.com/cosmos/cosmos-db"
Expand Down Expand Up @@ -62,7 +60,6 @@ import (
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/crisis"
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

Expand Down Expand Up @@ -101,8 +98,6 @@ type GaiaApp struct { //nolint: revive
txConfig client.TxConfig
interfaceRegistry types.InterfaceRegistry

invCheckPeriod uint

// the module manager
mm *module.Manager
ModuleBasics module.BasicManager
Expand Down Expand Up @@ -154,10 +149,6 @@ func NewGaiaApp(
std.RegisterLegacyAminoCodec(legacyAmino)
std.RegisterInterfaces(interfaceRegistry)

// App Opts
skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants))
invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod))

bApp := baseapp.NewBaseApp(
appName,
logger,
Expand All @@ -176,7 +167,6 @@ func NewGaiaApp(
txConfig: txConfig,
appCodec: appCodec,
interfaceRegistry: interfaceRegistry,
invCheckPeriod: invCheckPeriod,
}

moduleAccountAddresses := app.ModuleAccountAddrs()
Expand All @@ -191,7 +181,6 @@ func NewGaiaApp(
app.BlockedModuleAccountAddrs(moduleAccountAddresses),
skipUpgradeHeights,
homePath,
invCheckPeriod,
logger,
appOpts,
wasmOpts,
Expand All @@ -208,7 +197,7 @@ func NewGaiaApp(

// NOTE: Any module instantiated in the module manager that is later modified
// must be passed by reference here.
app.mm = module.NewManager(appModules(app, appCodec, txConfig, skipGenesisInvariants, tmLightClientModule)...)
app.mm = module.NewManager(appModules(app, appCodec, txConfig, tmLightClientModule)...)
app.ModuleBasics = newBasicManagerFromManager(app)

enabledSignModes := append([]sigtypes.SignMode(nil), authtx.DefaultSignModes...)
Expand All @@ -230,6 +219,7 @@ func NewGaiaApp(
// NOTE: upgrade module is required to be prioritized
app.mm.SetOrderPreBlockers(
upgradetypes.ModuleName,
authtypes.ModuleName,
)
// During begin block slashing happens after distr.BeginBlocker so that
// there is nothing left over in the validator fee pool, so as to keep the
Expand All @@ -248,7 +238,6 @@ func NewGaiaApp(
// Uncomment if you want to set a custom migration order here.
// app.mm.SetOrderMigrations(custom order)

app.mm.RegisterInvariants(app.CrisisKeeper)
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
err = app.mm.RegisterServices(app.configurator)
if err != nil {
Expand All @@ -270,7 +259,7 @@ func NewGaiaApp(
//
// NOTE: this is not required apps that don't use the simulator for fuzz testing
// transactions
app.sm = module.NewSimulationManager(simulationModules(app, appCodec, skipGenesisInvariants)...)
app.sm = module.NewSimulationManager(simulationModules(app, appCodec)...)

app.sm.RegisterStoreDecoders()

Expand All @@ -286,7 +275,7 @@ func NewGaiaApp(

anteHandler, err := gaiaante.NewAnteHandler(
gaiaante.HandlerOptions{
AccountKeeper: app.AccountKeeper,
AccountKeeper: &app.AccountKeeper,
BankKeeper: app.BankKeeper,
FeegrantKeeper: app.FeeGrantKeeper,
SignModeHandler: txConfig.SignModeHandler(),
Expand Down Expand Up @@ -354,13 +343,13 @@ func NewGaiaApp(

if loadLatest {
if err := app.LoadLatestVersion(); err != nil {
tmos.Exit(fmt.Sprintf("failed to load latest version: %s", err))
panic(fmt.Sprintf("failed to load latest version: %s", err))
}

ctx := app.NewUncachedContext(true, tmproto.Header{})

if err := app.WasmKeeper.InitializePinnedCodes(ctx); err != nil {
tmos.Exit(fmt.Sprintf("WasmKeeper failed initialize pinned codes %s", err))
panic(fmt.Sprintf("WasmKeeper failed initialize pinned codes %s", err))
}

if err := app.WasmClientKeeper.InitializePinnedCodes(ctx); err != nil {
Expand Down
3 changes: 0 additions & 3 deletions app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [
allowedAddrsMap[addr] = true
}

/* Just to be safe, assert the invariants on current state. */
app.CrisisKeeper.AssertInvariants(ctx)

/* Handle fee distribution state. */

// withdraw all validator commission
Expand Down
23 changes: 5 additions & 18 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
Expand Down Expand Up @@ -109,9 +107,8 @@ type AppKeepers struct {
DistrKeeper distrkeeper.Keeper
LiquidKeeper *liquidkeeper.Keeper
GovKeeper *govkeeper.Keeper
CrisisKeeper *crisiskeeper.Keeper
UpgradeKeeper *upgradekeeper.Keeper
ParamsKeeper paramskeeper.Keeper
ParamsKeeper paramskeeper.Keeper //nolint:staticcheck
WasmKeeper wasmkeeper.Keeper
// IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
IBCKeeper *ibckeeper.Keeper
Expand Down Expand Up @@ -148,7 +145,6 @@ func NewAppKeeper(
blockedAddress map[string]bool,
skipUpgradeHeights map[int64]bool,
homePath string,
invCheckPeriod uint,
logger log.Logger,
appOpts servertypes.AppOptions,
wasmOpts []wasmkeeper.Option,
Expand Down Expand Up @@ -205,16 +201,6 @@ func NewAppKeeper(
logger,
)

appKeepers.CrisisKeeper = crisiskeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(appKeepers.keys[crisistypes.StoreKey]),
invCheckPeriod,
appKeepers.BankKeeper,
authtypes.FeeCollectorName,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
appKeepers.AccountKeeper.AddressCodec(),
)

appKeepers.AuthzKeeper = authzkeeper.NewKeeper(
runtime.NewKVStoreService(appKeepers.keys[authzkeeper.StoreKey]),
appCodec,
Expand Down Expand Up @@ -596,8 +582,10 @@ func (appKeepers *AppKeepers) GetSubspace(moduleName string) paramstypes.Subspac
}

// initParamsKeeper init params keeper and its subspaces
func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper {
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey)
func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key,
tkey storetypes.StoreKey,
) paramskeeper.Keeper { //nolint:staticcheck
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) //nolint:staticcheck

// register the key tables for legacy param subspaces
keyTable := ibcclienttypes.ParamKeyTable()
Expand All @@ -609,7 +597,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(distrtypes.ModuleName).WithKeyTable(distrtypes.ParamKeyTable()) //nolint: staticcheck // SA1019
paramsKeeper.Subspace(slashingtypes.ModuleName).WithKeyTable(slashingtypes.ParamKeyTable()) //nolint: staticcheck // SA1019
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) //nolint: staticcheck // SA1019
paramsKeeper.Subspace(crisistypes.ModuleName).WithKeyTable(crisistypes.ParamKeyTable()) //nolint: staticcheck // SA1019
paramsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(keyTable)
paramsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable())
paramsKeeper.Subspace(icacontrollertypes.SubModuleName).WithKeyTable(icacontrollertypes.ParamKeyTable())
Expand Down
2 changes: 0 additions & 2 deletions app/keepers/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
Expand All @@ -41,7 +40,6 @@ func (appKeepers *AppKeepers) GenerateKeys() {
authtypes.StoreKey,
banktypes.StoreKey,
stakingtypes.StoreKey,
crisistypes.StoreKey,
minttypes.StoreKey,
distrtypes.StoreKey,
slashingtypes.StoreKey,
Expand Down
7 changes: 1 addition & 6 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/cosmos/cosmos-sdk/x/consensus"
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
"github.com/cosmos/cosmos-sdk/x/crisis"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
distr "github.com/cosmos/cosmos-sdk/x/distribution"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
Expand Down Expand Up @@ -86,7 +85,6 @@ func appModules(
app *GaiaApp,
appCodec codec.Codec,
txConfig client.TxEncodingConfig,
skipGenesisInvariants bool,
tmLightClientModule tendermint.LightClientModule,
) []module.AppModule {
return []module.AppModule{
Expand All @@ -99,7 +97,6 @@ func appModules(
auth.NewAppModule(appCodec, app.AccountKeeper, nil, app.GetSubspace(authtypes.ModuleName)),
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper),
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)),
crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
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)),
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName), app.interfaceRegistry),
Expand All @@ -111,7 +108,7 @@ func appModules(
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
ibc.NewAppModule(app.IBCKeeper),
ibcwasm.NewAppModule(app.WasmClientKeeper),
sdkparams.NewAppModule(app.ParamsKeeper),
sdkparams.NewAppModule(app.ParamsKeeper), //nolint:staticcheck
consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper),
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
app.TransferModule,
Expand Down Expand Up @@ -150,7 +147,6 @@ func newBasicManagerFromManager(app *GaiaApp) module.BasicManager {
func simulationModules(
app *GaiaApp,
appCodec codec.Codec,
_ bool,
) []module.AppModuleSimulation {
return []module.AppModuleSimulation{
auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)),
Expand All @@ -161,7 +157,6 @@ func simulationModules(
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)),
distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)),
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName), app.interfaceRegistry),
sdkparams.NewAppModule(app.ParamsKeeper),
evidence.NewAppModule(app.EvidenceKeeper),
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
Expand Down
5 changes: 2 additions & 3 deletions app/sim_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/stretchr/testify/require"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/server"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
simulation2 "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/cosmos/cosmos-sdk/x/simulation"
Expand All @@ -25,7 +24,8 @@ func BenchmarkFullAppSimulation(b *testing.B) {
config := simcli.NewConfigFromFlags()
config.ChainID = AppChainID

db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "goleveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue)
db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "goleveldb-app-sim", "Simulation",
simcli.FlagVerboseValue, false)
if err != nil {
b.Fatalf("simulation setup failed: %s", err.Error())
}
Expand All @@ -40,7 +40,6 @@ func BenchmarkFullAppSimulation(b *testing.B) {
}()

appOptions := make(simtestutil.AppOptionsMap, 0)
appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue

app := gaia.NewGaiaApp(
logger,
Expand Down
6 changes: 4 additions & 2 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"math/rand"
"os"
"testing"
"time"

"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -54,8 +55,9 @@ func TestAppStateDeterminism(t *testing.T) {
config := sim.NewConfigFromFlags()
config.InitialBlockHeight = 1
config.ExportParamsPath = ""
config.OnOperation = false
config.AllInvariants = false
config.OnOperation = false //nolint:staticcheck
config.AllInvariants = false //nolint:staticcheck
config.GenesisTime = time.Now().UTC().Unix()
config.ChainID = AppChainID

numSeeds := 3
Expand Down
15 changes: 0 additions & 15 deletions app/upgrades/v19/constants.go

This file was deleted.

31 changes: 0 additions & 31 deletions app/upgrades/v19/upgrades.go

This file was deleted.

Loading
Loading