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
2 changes: 1 addition & 1 deletion .github/actions/install-wasmvm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
description: Path to the Makefile containing WASMVM_VERSION
default: Makefile
version:
description: Override wasmvm version (e.g. v3.0.0-ibc2.0)
description: Override wasmvm version (e.g. v3.0.2)
required: false
outputs:
version:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6.0.1
with:
fetch-depth: 0

Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

---

## 1.10.0

Changes included since `v1.9.1` (range: `v1.9.1..v1.10.0`).

- Cosmos SDK: upgraded from v0.50.14 to v0.53.5, CometBFT upgraded to v0.38.20
- enabled unordered
- migrated consensus params from `x/params` to `x/consensus` via baseapp.MigrateParams; removed `x/params` usage.
- IBC: upgraded to IBC-Go from v10.3.0 to v10.5.0 with IBC v2 readiness (Router v2, v2 packet/event handling helpers).
- 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.
- Module changes: removed `x/crisis`, deleted its store key and disabled crisis invariants by default.
- Client/indexer impact: legacy tx logs removed in SDK v0.53.
- 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.

---

## 1.9.1

Changes included since `v1.9.0` (range: `v1.9.0..v1.9.1`).
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ IGNITE_INSTALL_SCRIPT ?= https://get.ignite.com/cli!

GOFLAGS = "-trimpath"

WASMVM_VERSION := v3@v3.0.0-ibc2.0
WASMVM_VERSION := v3@v3.0.2
RELEASE_CGO_LDFLAGS ?= -Wl,-rpath,/usr/lib -Wl,--disable-new-dtags
COSMOS_PROTO_VERSION := $(call module_version,github.com/cosmos/cosmos-proto)
GOGOPROTO_VERSION := $(call module_version,github.com/cosmos/gogoproto)
Expand Down
21 changes: 10 additions & 11 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/version"
"github.com/cosmos/cosmos-sdk/x/auth"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation"
Expand All @@ -47,8 +48,6 @@ import (
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
_ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects
consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
_ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects
crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper"
_ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
"github.com/cosmos/cosmos-sdk/x/genutil"
Expand Down Expand Up @@ -129,7 +128,6 @@ type App struct {
AuthzKeeper authzkeeper.Keeper
ConsensusParamsKeeper consensuskeeper.Keeper
CircuitBreakerKeeper circuitkeeper.Keeper
CrisisKeeper *crisiskeeper.Keeper
ParamsKeeper paramskeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
FeeGrantKeeper feegrantkeeper.Keeper
Expand Down Expand Up @@ -240,7 +238,6 @@ func New(
&app.MintKeeper,
&app.DistrKeeper,
&app.GovKeeper,
&app.CrisisKeeper,
&app.UpgradeKeeper,
&app.ParamsKeeper,
&app.AuthzKeeper,
Expand All @@ -264,6 +261,7 @@ func New(

// build app
app.App = appBuilder.Build(db, traceStore, baseAppOptions...)
app.SetVersion(version.Version)

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

/**** Module Options ****/
app.ModuleManager.RegisterInvariants(app.CrisisKeeper)

// create the simulation manager and define the order of the modules for deterministic simulations
overrideModules := map[string]module.AppModuleSimulation{
Expand Down Expand Up @@ -324,12 +321,14 @@ func (app *App) GetSubspace(moduleName string) paramstypes.Subspace {
// This needs to be called BEFORE app.Load()
func (app *App) setupUpgrades() {
params := appParams.AppUpgradeParams{
ChainID: app.ChainID(),
Logger: app.Logger(),
ModuleManager: app.ModuleManager,
Configurator: app.Configurator(),
ActionKeeper: &app.ActionKeeper,
SupernodeKeeper: app.SupernodeKeeper,
ChainID: app.ChainID(),
Logger: app.Logger(),
ModuleManager: app.ModuleManager,
Configurator: app.Configurator(),
ActionKeeper: &app.ActionKeeper,
SupernodeKeeper: app.SupernodeKeeper,
ParamsKeeper: &app.ParamsKeeper,
ConsensusParamsKeeper: &app.ConsensusParamsKeeper,
}

allUpgrades := upgrades.AllUpgrades(params)
Expand Down
13 changes: 4 additions & 9 deletions app/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1"
circuitmodulev1 "cosmossdk.io/api/cosmos/circuit/module/v1"
consensusmodulev1 "cosmossdk.io/api/cosmos/consensus/module/v1"
crisismodulev1 "cosmossdk.io/api/cosmos/crisis/module/v1"
distrmodulev1 "cosmossdk.io/api/cosmos/distribution/module/v1"
evidencemodulev1 "cosmossdk.io/api/cosmos/evidence/module/v1"
feegrantmodulev1 "cosmossdk.io/api/cosmos/feegrant/module/v1"
Expand Down Expand Up @@ -54,8 +53,6 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
_ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects
consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
_ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
_ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
Expand Down Expand Up @@ -99,7 +96,6 @@ var (
slashingtypes.ModuleName,
govtypes.ModuleName,
minttypes.ModuleName,
crisistypes.ModuleName,
genutiltypes.ModuleName,
evidencetypes.ModuleName,
authz.ModuleName,
Expand Down Expand Up @@ -155,7 +151,6 @@ var (

endBlockers = []string{
// cosmos sdk modules
crisistypes.ModuleName,
govtypes.ModuleName,
stakingtypes.ModuleName,
feegrant.ModuleName,
Expand All @@ -178,6 +173,7 @@ var (
// NOTE: upgrade module is required to be prioritized
preBlockers = []string{
upgradetypes.ModuleName,
authtypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/preBlockers
}

Expand Down Expand Up @@ -239,6 +235,9 @@ var (
Config: appconfig.WrapAny(&authmodulev1.Module{
Bech32Prefix: lcfg.AccountAddressPrefix,
ModuleAccountPermissions: moduleAccPerms,
// Cosmos SDK 0.53.x new feature - unordered transactions
// "Fire-and-forget" submission model with timeout_timestamp as TTL/replay protection
EnableUnorderedTransactions: true,
// By default modules authority is the governance module. This is configurable with the following:
// Authority: "group", // A custom module authority can be set using a module name
// Authority: "cosmos1cwwv22j5ca08ggdv9c2uky355k908694z577tv", // or a specific address
Expand Down Expand Up @@ -314,10 +313,6 @@ var (
Name: govtypes.ModuleName,
Config: appconfig.WrapAny(&govmodulev1.Module{}),
},
{
Name: crisistypes.ModuleName,
Config: appconfig.WrapAny(&crisismodulev1.Module{}),
},
{
Name: consensustypes.ModuleName,
Config: appconfig.WrapAny(&consensusmodulev1.Module{}),
Expand Down
3 changes: 1 addition & 2 deletions app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str
allowedAddrsMap[addr] = true
}

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

/* Handle fee distribution state. */

Expand Down
14 changes: 12 additions & 2 deletions app/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (app *App) registerIBCModules(
ibcRouterV2 := ibcapi.NewRouter()

// Wasm module
wasmStackIBCHandler, err := app.registerWasmModules(appOpts, ibcRouterV2, wasmOpts...)
wasmStackIBCHandler, err := app.registerWasmModules(appOpts, wasmOpts...)
if err != nil {
return err
}
Expand Down Expand Up @@ -224,7 +224,17 @@ func (app *App) registerIBCModules(
app.ibcRouter = ibcRouter

ibcRouterV2 = ibcRouterV2.
AddRoute(ibctransfertypes.PortID, ibcv2transferStack)
AddRoute(ibctransfertypes.PortID, ibcv2transferStack).
AddPrefixRoute(wasmkeeper.PortIDPrefixV2, wasmkeeper.NewIBC2Handler(app.WasmKeeper))

// Additional IBC v2 modules can be registered here.
if v := appOpts.Get(IBCModuleRegisterFnOptionV2); v != nil {
if registerFn, ok := v.(func(router *ibcapi.Router)); ok {
registerFn(ibcRouterV2)
} else {
return errors.New("invalid IBC v2 module register function option")
}
}
app.IBCKeeper.SetRouterV2(ibcRouterV2)

clientKeeper := app.IBCKeeper.ClientKeeper
Expand Down
7 changes: 5 additions & 2 deletions app/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ package app

import (
ibcporttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types"
ibcapi "github.com/cosmos/ibc-go/v10/modules/core/api"
)

const (
IBCModuleRegisterFnOption = "ibc_module_register_fn"
IBCModuleRegisterFnOption = "ibc_module_register_fn"
IBCModuleRegisterFnOptionV2 = "ibc_module_register_fn_v2"

FlagWasmHomeDir = "wasm-homedir"
FlagWasmHomeDir = "wasm-homedir"
)

type IBCModuleRegisterFn func(router *ibcporttypes.Router)
type IBCModuleRegisterFnV2 func(router *ibcapi.Router)
25 changes: 4 additions & 21 deletions app/sim_bench_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package app_test

import (
"fmt"
"os"
"testing"

cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/server"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
Expand Down Expand Up @@ -53,7 +51,7 @@ func BenchmarkFullAppSimulation(b *testing.B) {
bApp.BaseApp,
simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()),
simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1
simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config),
simtestutil.BuildSimulationOperations(bApp, bApp.AppCodec(), config, bApp.TxConfig()),
app.BlockedAddresses(),
config,
bApp.AppCodec(),
Expand Down Expand Up @@ -109,7 +107,7 @@ func BenchmarkInvariants(b *testing.B) {
bApp.BaseApp,
simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()),
simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1
simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config),
simtestutil.BuildSimulationOperations(bApp, bApp.AppCodec(), config, bApp.TxConfig()),
app.BlockedAddresses(),
config,
bApp.AppCodec(),
Expand All @@ -128,21 +126,6 @@ func BenchmarkInvariants(b *testing.B) {
simtestutil.PrintStats(db)
}

ctx := bApp.NewContextLegacy(true, cmtproto.Header{Height: bApp.LastBlockHeight() + 1})

// 3. Benchmark each invariant separately
//
// NOTE: We use the crisis keeper as it has all the invariants registered with
// their respective metadata which makes it useful for testing/benchmarking.
for _, cr := range bApp.CrisisKeeper.Routes() {
cr := cr
b.Run(fmt.Sprintf("%s/%s", cr.ModuleName, cr.Route), func(b *testing.B) {
if res, stop := cr.Invar(ctx); stop {
b.Fatalf(
"broken invariant at block %d of %d\n%s",
ctx.BlockHeight()-1, config.NumBlocks, res,
)
}
})
}
// NOTE: x/crisis is removed, so invariant benchmarks are not available.
b.Skip("x/crisis disabled; invariants benchmark not available")
}
10 changes: 5 additions & 5 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func BenchmarkSimulation(b *testing.B) {
bApp.BaseApp,
simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()),
simulationtypes.RandomAccounts,
simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config),
simtestutil.BuildSimulationOperations(bApp, bApp.AppCodec(), config, bApp.TxConfig()),
app.BlockedAddresses(),
config,
bApp.AppCodec(),
Expand Down Expand Up @@ -144,7 +144,7 @@ func TestAppImportExport(t *testing.T) {
bApp.BaseApp,
simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()),
simulationtypes.RandomAccounts,
simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config),
simtestutil.BuildSimulationOperations(bApp, bApp.AppCodec(), config, bApp.TxConfig()),
app.BlockedAddresses(),
config,
bApp.AppCodec(),
Expand Down Expand Up @@ -267,7 +267,7 @@ func TestAppSimulationAfterImport(t *testing.T) {
bApp.BaseApp,
simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()),
simulationtypes.RandomAccounts,
simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config),
simtestutil.BuildSimulationOperations(bApp, bApp.AppCodec(), config, bApp.TxConfig()),
app.BlockedAddresses(),
config,
bApp.AppCodec(),
Expand Down Expand Up @@ -318,7 +318,7 @@ func TestAppSimulationAfterImport(t *testing.T) {
newApp.BaseApp,
simtestutil.AppStateFn(bApp.AppCodec(), bApp.SimulationManager(), bApp.DefaultGenesis()),
simulationtypes.RandomAccounts,
simtestutil.SimulationOperations(newApp, newApp.AppCodec(), config),
simtestutil.BuildSimulationOperations(newApp, newApp.AppCodec(), config, newApp.TxConfig()),
app.BlockedAddresses(),
config,
bApp.AppCodec(),
Expand Down Expand Up @@ -404,7 +404,7 @@ func TestAppStateDeterminism(t *testing.T) {
bApp.DefaultGenesis(),
),
simulationtypes.RandomAccounts,
simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config),
simtestutil.BuildSimulationOperations(bApp, bApp.AppCodec(), config, bApp.TxConfig()),
app.BlockedAddresses(),
config,
bApp.AppCodec(),
Expand Down
22 changes: 20 additions & 2 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
"cosmossdk.io/log"
sdkmath "cosmossdk.io/math"
pruningtypes "cosmossdk.io/store/pruning/types"
"cosmossdk.io/store/snapshots"
snapshottypes "cosmossdk.io/store/snapshots/types"

abci "github.com/cometbft/cometbft/abci/types"
cmttypes "github.com/cometbft/cometbft/types"
Expand Down Expand Up @@ -47,9 +49,11 @@ import (

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
ibcporttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types"
ibcapi "github.com/cosmos/ibc-go/v10/modules/core/api"

lcfg "github.com/LumeraProtocol/lumera/config"
ibcmock "github.com/LumeraProtocol/lumera/tests/ibctesting/mock"
mockv2 "github.com/LumeraProtocol/lumera/tests/ibctesting/mock/v2"
claimtypes "github.com/LumeraProtocol/lumera/x/claim/types"
)

Expand Down Expand Up @@ -93,7 +97,6 @@ func NewTestApp(
&app.SlashingKeeper,
&app.MintKeeper,
&app.GovKeeper,
&app.CrisisKeeper,
&app.UpgradeKeeper,
&app.ParamsKeeper,
&app.AuthzKeeper,
Expand Down Expand Up @@ -197,6 +200,8 @@ func setup(t testing.TB, chainID string, withGenesis bool, invCheckPeriod uint,
require.NoError(t, err)
t.Cleanup(func() { snapshotDB.Close() })
require.NoError(t, err)
snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir)
require.NoError(t, err)

appOptions := make(simtestutil.AppOptionsMap, 0)
appOptions[flags.FlagHome] = nodeHome // ensure unique folder
Expand All @@ -206,8 +211,21 @@ func setup(t testing.TB, chainID string, withGenesis bool, invCheckPeriod uint,
// Register the mock IBC module for testing
ibcRouter.AddRoute(MockPort, ibcmock.NewMockIBCModule(nil, MockPort))
}
appOptions[IBCModuleRegisterFnOptionV2] = func(ibcRouter *ibcapi.Router) {
ibcRouter.AddRoute(mockv2.PortIDA, mockv2.NewIBCModule())
ibcRouter.AddRoute(mockv2.PortIDB, mockv2.NewIBCModule())
}

app := New(log.NewNopLogger(), db, nil, true, appOptions, wasmOpts, bam.SetChainID(chainID))
app := New(
log.NewNopLogger(),
db,
nil,
true,
appOptions,
wasmOpts,
bam.SetChainID(chainID),
bam.SetSnapshot(snapshotStore, snapshottypes.SnapshotOptions{KeepRecent: 2}),
)
if withGenesis {
return app, app.DefaultGenesis()
}
Expand Down
Loading