Skip to content
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## UNRELEASED

### Improvements
- [#1203](https://github.com/crypto-org-chain/chain-main/pull/1203) feat: use cosmos-sdk v0.53.4.
- [#1205](https://github.com/crypto-org-chain/chain-main/pull/1205) Bump module version to v8 to follow semver convention
### Bugfixes
- [#1209](https://github.com/crypto-org-chain/chain-main/pull/1209) Patch comet bft (GHSA-hrhf-2vcr-ghch)
Expand Down
36 changes: 32 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ type ChainApp struct {
DistrKeeper distrkeeper.Keeper
GovKeeper govkeeper.Keeper
UpgradeKeeper upgradekeeper.Keeper
ParamsKeeper paramskeeper.Keeper
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
ParamsKeeper paramskeeper.Keeper //nolint:staticcheck // params keeper deprecated upstream but required until SDK replaces module
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
ICAControllerKeeper icacontrollerkeeper.Keeper
ICAHostKeeper icahostkeeper.Keeper
AuthzKeeper authzkeeper.Keeper
Expand Down Expand Up @@ -550,7 +550,7 @@ func New(
// IBC light clients
ibctm.NewAppModule(tmLightClientModule),
solom.NewAppModule(smLightClientModule),
params.NewAppModule(app.ParamsKeeper),
params.NewAppModule(app.ParamsKeeper), //nolint:staticcheck // params module pending upstream removal
consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper),
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
Expand Down Expand Up @@ -579,6 +579,32 @@ func New(

app.ModuleManager.SetOrderPreBlockers(
upgradetypes.ModuleName,
minttypes.ModuleName,
distrtypes.ModuleName,
slashingtypes.ModuleName,
evidencetypes.ModuleName,
stakingtypes.ModuleName,
ibcexported.ModuleName,
ibctm.ModuleName,
solom.ModuleName,
ibctransfertypes.ModuleName,
authtypes.ModuleName,
banktypes.ModuleName,
govtypes.ModuleName,
genutiltypes.ModuleName,
authz.ModuleName,
feegrant.ModuleName,
group.ModuleName,
paramstypes.ModuleName,
vestingtypes.ModuleName,
icatypes.ModuleName,
chainmaintypes.ModuleName,
nfttypes.ModuleName,
nfttransfertypes.ModuleName,
supplytypes.ModuleName,
maxsupplytypes.ModuleName,
consensusparamtypes.ModuleName,
circuittypes.ModuleName,
)

// During begin block slashing happens after distr.BeginBlocker so that
Expand Down Expand Up @@ -988,8 +1014,10 @@ func GetMaccPerms() map[string][]string {

// initParamsKeeper init params keeper and its subspaces
// (Amino is still needed for Ledger at the moment)
//
//nolint:staticcheck // params keeper is deprecated upstream but still required until params replacement lands
func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper {
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey)
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) //nolint:staticcheck

paramsKeeper.Subspace(authtypes.ModuleName)
paramsKeeper.Subspace(banktypes.ModuleName)
Expand Down
18 changes: 9 additions & 9 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func interBlockCacheOpt() func(*baseapp.BaseApp) {
func NewSimApp(logger log.Logger, db dbm.DB, baseAppOptions ...func(*baseapp.BaseApp)) (*app.ChainApp, error) {
appOptions := make(simtestutil.AppOptionsMap, 0)
appOptions[flags.FlagHome] = app.DefaultNodeHome
appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue
appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue //nolint:staticcheck // upstream flag marked deprecated but still required for sim tests
app := app.New(logger, db, nil, false, appOptions, baseAppOptions...)
if err := app.LoadLatestVersion(); err != nil {
return nil, err
Expand All @@ -84,7 +84,7 @@ func TestFullAppSimulation(t *testing.T) {
config := simcli.NewConfigFromFlags()
config.ChainID = SimAppChainID

db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue)
db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) //nolint:staticcheck
if skip {
t.Skip("skipping application simulation")
}
Expand Down Expand Up @@ -125,7 +125,7 @@ func TestAppImportExport(t *testing.T) {
config := simcli.NewConfigFromFlags()
config.ChainID = SimAppChainID

db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue)
db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) //nolint:staticcheck
if skip {
t.Skip("skipping application import/export simulation")
}
Expand Down Expand Up @@ -168,7 +168,7 @@ func TestAppImportExport(t *testing.T) {
require.NoError(t, err)

fmt.Printf("importing genesis...\n")
newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue)
newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue) //nolint:staticcheck
require.NoError(t, err, "simulation setup failed")

defer func() {
Expand Down Expand Up @@ -241,7 +241,7 @@ func TestAppSimulationAfterImport(t *testing.T) {
config := simcli.NewConfigFromFlags()
config.ChainID = SimAppChainID

db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue)
db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) //nolint:staticcheck
if skip {
t.Skip("skipping application simulation after import")
}
Expand Down Expand Up @@ -291,7 +291,7 @@ func TestAppSimulationAfterImport(t *testing.T) {
require.NoError(t, err)

fmt.Printf("importing genesis...\n")
newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue)
newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue) //nolint:staticcheck
require.NoError(t, err, "simulation setup failed")

defer func() {
Expand Down Expand Up @@ -326,15 +326,15 @@ func TestAppSimulationAfterImport(t *testing.T) {
// TODO: Make another test for the fuzzer itself, which just has noOp txs
// and doesn't depend on the application.
func TestAppStateDeterminism(t *testing.T) {
if !simcli.FlagEnabledValue {
if !simcli.FlagEnabledValue { //nolint:staticcheck
t.Skip("skipping application simulation")
}

config := simcli.NewConfigFromFlags()
config.InitialBlockHeight = 1
config.ExportParamsPath = ""
config.OnOperation = false
config.AllInvariants = false
config.OnOperation = false //nolint:staticcheck
config.AllInvariants = false //nolint:staticcheck
config.ChainID = SimAppChainID

numSeeds := 3
Expand Down
2 changes: 1 addition & 1 deletion app/versiondb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestVersionDB(t *testing.T) {

appOptions := make(simtestutil.AppOptionsMap, 0)
appOptions[flags.FlagHome] = app.DefaultNodeHome
appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue
appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue //nolint:staticcheck
appOptions["versiondb.enable"] = true
logger := log.NewNopLogger()
_ = app.New(logger, db, nil, false, appOptions, nil...)
Expand Down
Loading
Loading