Skip to content

Commit 7d53154

Browse files
authored
v1.10.0: upgrade Cosmos SDK to v0.53.5 with IBC v10.5.0 + Wasm 0.61.6 (#97)
- Upgraded Lumera’s core stack to Cosmos SDK v0.53.5, IBC-Go v10.5.0, wasmd v0.61.6, and wasmvm v3.0.2 for the v1.10.0 release. - Added the v1.10.0 on-chain upgrade handler to migrate consensus params into x/consensus and run module migrations. - Removed the x/crisis module and deleted its store key as part of the upgrade. Dependencies: - Cosmos SDK v0.53.5 - IBC-Go v10.5.0 + PFM v10.1.0 - wasmd v0.61.6 and wasmvm v3.0.2 - CometBFT v0.38.20 Upgrade flow: - New v1.10.0 handler migrates consensus params from x/params to x/consensus via baseapp.MigrateParams. - Store upgrade deletes the x/crisis store key. - Runs all module migrations after consensus params are moved. App wiring: - Keeps depinject/appconfig module wiring aligned with SDK 0.53.x. - Enabled unordered transactions. This is a coordinated, consensus‑breaking upgrade; the chain must schedule plan name v1.10.0. Consensus params are migrated to x/consensus at upgrade height. x/crisis is removed; any tooling or invariants relying on the crisis module must be updated. SDK v0.53 removes legacy tx logs; indexers parsing legacy logs must switch to events.
1 parent cb78eb9 commit 7d53154

79 files changed

Lines changed: 3354 additions & 4377 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/install-wasmvm/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ inputs:
55
description: Path to the Makefile containing WASMVM_VERSION
66
default: Makefile
77
version:
8-
description: Override wasmvm version (e.g. v3.0.0-ibc2.0)
8+
description: Override wasmvm version (e.g. v3.0.2)
99
required: false
1010
outputs:
1111
version:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@v6.0.1
2727
with:
2828
fetch-depth: 0
2929

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
---
44

5+
## 1.10.0
6+
7+
Changes included since `v1.9.1` (range: `v1.9.1..v1.10.0`).
8+
9+
- Cosmos SDK: upgraded from v0.50.14 to v0.53.5, CometBFT upgraded to v0.38.20
10+
- enabled unordered
11+
- migrated consensus params from `x/params` to `x/consensus` via baseapp.MigrateParams; removed `x/params` usage.
12+
- IBC: upgraded to IBC-Go from v10.3.0 to v10.5.0 with IBC v2 readiness (Router v2, v2 packet/event handling helpers).
13+
- Wasm: upgraded wasmd from v0.55.0-ibc2.0 to v0.61.6 and wasmvm from v3.0.0-ibc2.0 to v3.0.2.
14+
- Module changes: removed `x/crisis`, deleted its store key and disabled crisis invariants by default.
15+
- Client/indexer impact: legacy tx logs removed in SDK v0.53.
16+
- Unordered transactions feature (SDK v0.52) is enabled: "fire-and-forget" tx submission model with timeout_timestamp as TTL/replay protection, useful for throughput-focused clients where strict ordering is not required.
17+
18+
---
19+
520
## 1.9.1
621

722
Changes included since `v1.9.0` (range: `v1.9.0..v1.9.1`).

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ IGNITE_INSTALL_SCRIPT ?= https://get.ignite.com/cli!
1616

1717
GOFLAGS = "-trimpath"
1818

19-
WASMVM_VERSION := v3@v3.0.0-ibc2.0
19+
WASMVM_VERSION := v3@v3.0.2
2020
RELEASE_CGO_LDFLAGS ?= -Wl,-rpath,/usr/lib -Wl,--disable-new-dtags
2121
COSMOS_PROTO_VERSION := $(call module_version,github.com/cosmos/cosmos-proto)
2222
GOGOPROTO_VERSION := $(call module_version,github.com/cosmos/gogoproto)

app/app.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import (
3535
servertypes "github.com/cosmos/cosmos-sdk/server/types"
3636
sdk "github.com/cosmos/cosmos-sdk/types"
3737
"github.com/cosmos/cosmos-sdk/types/module"
38+
"github.com/cosmos/cosmos-sdk/version"
3839
"github.com/cosmos/cosmos-sdk/x/auth"
3940
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
4041
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation"
@@ -47,8 +48,6 @@ import (
4748
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
4849
_ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects
4950
consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
50-
_ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects
51-
crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper"
5251
_ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects
5352
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
5453
"github.com/cosmos/cosmos-sdk/x/genutil"
@@ -129,7 +128,6 @@ type App struct {
129128
AuthzKeeper authzkeeper.Keeper
130129
ConsensusParamsKeeper consensuskeeper.Keeper
131130
CircuitBreakerKeeper circuitkeeper.Keeper
132-
CrisisKeeper *crisiskeeper.Keeper
133131
ParamsKeeper paramskeeper.Keeper
134132
EvidenceKeeper evidencekeeper.Keeper
135133
FeeGrantKeeper feegrantkeeper.Keeper
@@ -240,7 +238,6 @@ func New(
240238
&app.MintKeeper,
241239
&app.DistrKeeper,
242240
&app.GovKeeper,
243-
&app.CrisisKeeper,
244241
&app.UpgradeKeeper,
245242
&app.ParamsKeeper,
246243
&app.AuthzKeeper,
@@ -264,6 +261,7 @@ func New(
264261

265262
// build app
266263
app.App = appBuilder.Build(db, traceStore, baseAppOptions...)
264+
app.SetVersion(version.Version)
267265

268266
// register legacy modules
269267
if err := app.registerIBCModules(appOpts, wasmOpts...); err != nil {
@@ -280,7 +278,6 @@ func New(
280278
app.setupUpgrades()
281279

282280
/**** Module Options ****/
283-
app.ModuleManager.RegisterInvariants(app.CrisisKeeper)
284281

285282
// create the simulation manager and define the order of the modules for deterministic simulations
286283
overrideModules := map[string]module.AppModuleSimulation{
@@ -324,12 +321,14 @@ func (app *App) GetSubspace(moduleName string) paramstypes.Subspace {
324321
// This needs to be called BEFORE app.Load()
325322
func (app *App) setupUpgrades() {
326323
params := appParams.AppUpgradeParams{
327-
ChainID: app.ChainID(),
328-
Logger: app.Logger(),
329-
ModuleManager: app.ModuleManager,
330-
Configurator: app.Configurator(),
331-
ActionKeeper: &app.ActionKeeper,
332-
SupernodeKeeper: app.SupernodeKeeper,
324+
ChainID: app.ChainID(),
325+
Logger: app.Logger(),
326+
ModuleManager: app.ModuleManager,
327+
Configurator: app.Configurator(),
328+
ActionKeeper: &app.ActionKeeper,
329+
SupernodeKeeper: app.SupernodeKeeper,
330+
ParamsKeeper: &app.ParamsKeeper,
331+
ConsensusParamsKeeper: &app.ConsensusParamsKeeper,
333332
}
334333

335334
allUpgrades := upgrades.AllUpgrades(params)

app/app_config.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1"
1515
circuitmodulev1 "cosmossdk.io/api/cosmos/circuit/module/v1"
1616
consensusmodulev1 "cosmossdk.io/api/cosmos/consensus/module/v1"
17-
crisismodulev1 "cosmossdk.io/api/cosmos/crisis/module/v1"
1817
distrmodulev1 "cosmossdk.io/api/cosmos/distribution/module/v1"
1918
evidencemodulev1 "cosmossdk.io/api/cosmos/evidence/module/v1"
2019
feegrantmodulev1 "cosmossdk.io/api/cosmos/feegrant/module/v1"
@@ -54,8 +53,6 @@ import (
5453
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
5554
_ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects
5655
consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
57-
_ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects
58-
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
5956
_ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects
6057
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
6158
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
@@ -99,7 +96,6 @@ var (
9996
slashingtypes.ModuleName,
10097
govtypes.ModuleName,
10198
minttypes.ModuleName,
102-
crisistypes.ModuleName,
10399
genutiltypes.ModuleName,
104100
evidencetypes.ModuleName,
105101
authz.ModuleName,
@@ -155,7 +151,6 @@ var (
155151

156152
endBlockers = []string{
157153
// cosmos sdk modules
158-
crisistypes.ModuleName,
159154
govtypes.ModuleName,
160155
stakingtypes.ModuleName,
161156
feegrant.ModuleName,
@@ -178,6 +173,7 @@ var (
178173
// NOTE: upgrade module is required to be prioritized
179174
preBlockers = []string{
180175
upgradetypes.ModuleName,
176+
authtypes.ModuleName,
181177
// this line is used by starport scaffolding # stargate/app/preBlockers
182178
}
183179

@@ -239,6 +235,9 @@ var (
239235
Config: appconfig.WrapAny(&authmodulev1.Module{
240236
Bech32Prefix: lcfg.AccountAddressPrefix,
241237
ModuleAccountPermissions: moduleAccPerms,
238+
// Cosmos SDK 0.53.x new feature - unordered transactions
239+
// "Fire-and-forget" submission model with timeout_timestamp as TTL/replay protection
240+
EnableUnorderedTransactions: true,
242241
// By default modules authority is the governance module. This is configurable with the following:
243242
// Authority: "group", // A custom module authority can be set using a module name
244243
// Authority: "cosmos1cwwv22j5ca08ggdv9c2uky355k908694z577tv", // or a specific address
@@ -314,10 +313,6 @@ var (
314313
Name: govtypes.ModuleName,
315314
Config: appconfig.WrapAny(&govmodulev1.Module{}),
316315
},
317-
{
318-
Name: crisistypes.ModuleName,
319-
Config: appconfig.WrapAny(&crisismodulev1.Module{}),
320-
},
321316
{
322317
Name: consensustypes.ModuleName,
323318
Config: appconfig.WrapAny(&consensusmodulev1.Module{}),

app/export.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str
6969
allowedAddrsMap[addr] = true
7070
}
7171

72-
/* Just to be safe, assert the invariants on current state. */
73-
app.CrisisKeeper.AssertInvariants(ctx)
72+
// NOTE: x/crisis is removed, so invariants are not asserted here.
7473

7574
/* Handle fee distribution state. */
7675

app/ibc.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func (app *App) registerIBCModules(
140140
ibcRouterV2 := ibcapi.NewRouter()
141141

142142
// Wasm module
143-
wasmStackIBCHandler, err := app.registerWasmModules(appOpts, ibcRouterV2, wasmOpts...)
143+
wasmStackIBCHandler, err := app.registerWasmModules(appOpts, wasmOpts...)
144144
if err != nil {
145145
return err
146146
}
@@ -224,7 +224,17 @@ func (app *App) registerIBCModules(
224224
app.ibcRouter = ibcRouter
225225

226226
ibcRouterV2 = ibcRouterV2.
227-
AddRoute(ibctransfertypes.PortID, ibcv2transferStack)
227+
AddRoute(ibctransfertypes.PortID, ibcv2transferStack).
228+
AddPrefixRoute(wasmkeeper.PortIDPrefixV2, wasmkeeper.NewIBC2Handler(app.WasmKeeper))
229+
230+
// Additional IBC v2 modules can be registered here.
231+
if v := appOpts.Get(IBCModuleRegisterFnOptionV2); v != nil {
232+
if registerFn, ok := v.(func(router *ibcapi.Router)); ok {
233+
registerFn(ibcRouterV2)
234+
} else {
235+
return errors.New("invalid IBC v2 module register function option")
236+
}
237+
}
228238
app.IBCKeeper.SetRouterV2(ibcRouterV2)
229239

230240
clientKeeper := app.IBCKeeper.ClientKeeper

app/options.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ package app
22

33
import (
44
ibcporttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types"
5+
ibcapi "github.com/cosmos/ibc-go/v10/modules/core/api"
56
)
67

78
const (
8-
IBCModuleRegisterFnOption = "ibc_module_register_fn"
9+
IBCModuleRegisterFnOption = "ibc_module_register_fn"
10+
IBCModuleRegisterFnOptionV2 = "ibc_module_register_fn_v2"
911

10-
FlagWasmHomeDir = "wasm-homedir"
12+
FlagWasmHomeDir = "wasm-homedir"
1113
)
1214

1315
type IBCModuleRegisterFn func(router *ibcporttypes.Router)
16+
type IBCModuleRegisterFnV2 func(router *ibcapi.Router)

app/sim_bench_test.go

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package app_test
22

33
import (
4-
"fmt"
54
"os"
65
"testing"
76

8-
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
97
"github.com/cosmos/cosmos-sdk/client/flags"
108
"github.com/cosmos/cosmos-sdk/server"
119
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
@@ -53,7 +51,7 @@ func BenchmarkFullAppSimulation(b *testing.B) {
5351
bApp.BaseApp,
5452
simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()),
5553
simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1
56-
simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config),
54+
simtestutil.BuildSimulationOperations(bApp, bApp.AppCodec(), config, bApp.TxConfig()),
5755
app.BlockedAddresses(),
5856
config,
5957
bApp.AppCodec(),
@@ -109,7 +107,7 @@ func BenchmarkInvariants(b *testing.B) {
109107
bApp.BaseApp,
110108
simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()),
111109
simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1
112-
simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config),
110+
simtestutil.BuildSimulationOperations(bApp, bApp.AppCodec(), config, bApp.TxConfig()),
113111
app.BlockedAddresses(),
114112
config,
115113
bApp.AppCodec(),
@@ -128,21 +126,6 @@ func BenchmarkInvariants(b *testing.B) {
128126
simtestutil.PrintStats(db)
129127
}
130128

131-
ctx := bApp.NewContextLegacy(true, cmtproto.Header{Height: bApp.LastBlockHeight() + 1})
132-
133-
// 3. Benchmark each invariant separately
134-
//
135-
// NOTE: We use the crisis keeper as it has all the invariants registered with
136-
// their respective metadata which makes it useful for testing/benchmarking.
137-
for _, cr := range bApp.CrisisKeeper.Routes() {
138-
cr := cr
139-
b.Run(fmt.Sprintf("%s/%s", cr.ModuleName, cr.Route), func(b *testing.B) {
140-
if res, stop := cr.Invar(ctx); stop {
141-
b.Fatalf(
142-
"broken invariant at block %d of %d\n%s",
143-
ctx.BlockHeight()-1, config.NumBlocks, res,
144-
)
145-
}
146-
})
147-
}
129+
// NOTE: x/crisis is removed, so invariant benchmarks are not available.
130+
b.Skip("x/crisis disabled; invariants benchmark not available")
148131
}

0 commit comments

Comments
 (0)