-
Notifications
You must be signed in to change notification settings - Fork 879
Remove crisis module code and store #3510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,9 +67,6 @@ import ( | |
| "github.com/sei-protocol/sei-chain/sei-cosmos/x/capability" | ||
| capabilitykeeper "github.com/sei-protocol/sei-chain/sei-cosmos/x/capability/keeper" | ||
| capabilitytypes "github.com/sei-protocol/sei-chain/sei-cosmos/x/capability/types" | ||
| "github.com/sei-protocol/sei-chain/sei-cosmos/x/crisis" | ||
| crisiskeeper "github.com/sei-protocol/sei-chain/sei-cosmos/x/crisis/keeper" | ||
| crisistypes "github.com/sei-protocol/sei-chain/sei-cosmos/x/crisis/types" | ||
| distr "github.com/sei-protocol/sei-chain/sei-cosmos/x/distribution" | ||
| distrclient "github.com/sei-protocol/sei-chain/sei-cosmos/x/distribution/client" | ||
| distrkeeper "github.com/sei-protocol/sei-chain/sei-cosmos/x/distribution/keeper" | ||
|
|
@@ -166,7 +163,6 @@ import ( | |
| tokenfactorymodule "github.com/sei-protocol/sei-chain/x/tokenfactory" | ||
| tokenfactorykeeper "github.com/sei-protocol/sei-chain/x/tokenfactory/keeper" | ||
| tokenfactorytypes "github.com/sei-protocol/sei-chain/x/tokenfactory/types" | ||
| "github.com/spf13/cast" | ||
| dbm "github.com/tendermint/tm-db" | ||
| "go.opentelemetry.io/otel/attribute" | ||
| otelmetric "go.opentelemetry.io/otel/metric" | ||
|
|
@@ -229,7 +225,6 @@ var ( | |
| distr.AppModuleBasic{}, | ||
| gov.NewAppModuleBasic(getGovProposalHandlers()...), | ||
| params.AppModuleBasic{}, | ||
| crisis.AppModuleBasic{}, | ||
| slashing.AppModuleBasic{}, | ||
| feegrantmodule.AppModuleBasic{}, | ||
| ibc.AppModuleBasic{}, | ||
|
|
@@ -389,8 +384,6 @@ type App struct { | |
| appCodec codec.Codec | ||
| interfaceRegistry types.InterfaceRegistry | ||
|
|
||
| invCheckPeriod uint | ||
|
|
||
| // keys to access the substores | ||
| keys map[string]*sdk.KVStoreKey | ||
| tkeys map[string]*sdk.TransientStoreKey | ||
|
|
@@ -407,7 +400,6 @@ type App struct { | |
| MintKeeper mintkeeper.Keeper | ||
| DistrKeeper distrkeeper.Keeper | ||
| GovKeeper govkeeper.Keeper | ||
| CrisisKeeper crisiskeeper.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 | ||
|
|
@@ -504,7 +496,7 @@ func New( | |
| _ bool, | ||
| skipUpgradeHeights map[int64]bool, | ||
| homePath string, | ||
| invCheckPeriod uint, | ||
| _ uint, | ||
| enableCustomEVMPrecompiles bool, | ||
| tmConfig *tmcfg.Config, | ||
| encodingConfig appparams.EncodingConfig, | ||
|
|
@@ -539,7 +531,6 @@ func New( | |
| cdc: cdc, | ||
| appCodec: appCodec, | ||
| interfaceRegistry: interfaceRegistry, | ||
| invCheckPeriod: invCheckPeriod, | ||
| keys: keys, | ||
| tkeys: tkeys, | ||
| memKeys: memKeys, | ||
|
|
@@ -597,9 +588,6 @@ func New( | |
| app.SlashingKeeper = slashingkeeper.NewKeeper( | ||
| appCodec, keys[slashingtypes.StoreKey], &stakingKeeper, app.GetSubspace(slashingtypes.ModuleName), | ||
| ) | ||
| app.CrisisKeeper = crisiskeeper.NewKeeper( | ||
| app.GetSubspace(crisistypes.ModuleName), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, | ||
| ) | ||
|
|
||
| app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) | ||
| app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp) | ||
|
|
@@ -869,12 +857,6 @@ func New( | |
| app.EvmKeeper.SetCustomPrecompiles(customPrecompiles, LatestUpgrade) | ||
| } | ||
|
|
||
| /**** 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. | ||
|
|
||
|
|
@@ -888,7 +870,6 @@ func New( | |
| bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), | ||
| capability.NewAppModule(appCodec, *app.CapabilityKeeper), | ||
| feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), | ||
| crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), | ||
| gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), | ||
| mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), | ||
| slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), | ||
|
|
@@ -920,7 +901,6 @@ func New( | |
| EvmKeeper: &app.EvmKeeper, | ||
| } | ||
| app.EndBlockKeepers = legacyabci.EndBlockKeepers{ | ||
| CrisisKeeper: &app.CrisisKeeper, | ||
| GovKeeper: &app.GovKeeper, | ||
| StakingKeeper: &app.StakingKeeper, | ||
| OracleKeeper: &app.OracleKeeper, | ||
|
|
@@ -967,7 +947,6 @@ func New( | |
| govtypes.ModuleName, | ||
| minttypes.ModuleName, | ||
| vestingtypes.ModuleName, | ||
| crisistypes.ModuleName, | ||
| ibchost.ModuleName, | ||
| genutiltypes.ModuleName, | ||
| evidencetypes.ModuleName, | ||
|
|
@@ -982,7 +961,6 @@ func New( | |
| // this line is used by starport scaffolding # stargate/app/initGenesis | ||
| ) | ||
|
|
||
| app.mm.RegisterInvariants(&app.CrisisKeeper) | ||
| app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) | ||
| app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) | ||
| app.mm.RegisterServices(app.configurator) | ||
|
|
@@ -1164,6 +1142,7 @@ func (app *App) SetStoreUpgradeHandlers() { | |
| } | ||
|
|
||
| accesscontrolStoreKeyName := "aclaccesscontrol" | ||
| crisisStoreKeyName := "crisis" | ||
|
|
||
| if upgradeInfo.Name == "1.0.4beta" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { | ||
| storeUpgrades := storetypes.StoreUpgrades{ | ||
|
|
@@ -1235,6 +1214,15 @@ func (app *App) SetStoreUpgradeHandlers() { | |
| // configure store loader that checks if version == upgradeHeight and applies store upgrades | ||
| app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) | ||
| } | ||
|
|
||
| if (upgradeInfo.Name == "v6.6.0") && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { | ||
| storeUpgrades := storetypes.StoreUpgrades{ | ||
| Deleted: []string{crisisStoreKeyName}, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But there is no such key name and this would result in an error i believe. |
||
| } | ||
|
|
||
| // configure store loader that checks if version == upgradeHeight and applies store upgrades | ||
| app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) | ||
| } | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| } | ||
|
|
||
| // AppName returns the name of the App | ||
|
|
@@ -2865,7 +2853,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino | |
| paramsKeeper.Subspace(distrtypes.ModuleName) | ||
| paramsKeeper.Subspace(slashingtypes.ModuleName) | ||
| paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable()) | ||
| paramsKeeper.Subspace(crisistypes.ModuleName) | ||
| paramsKeeper.Subspace(ibctransfertypes.ModuleName) | ||
| paramsKeeper.Subspace(ibchost.ModuleName) | ||
| paramsKeeper.Subspace(oracletypes.ModuleName) | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going forward since v6.5, upgrade names will follow
v<major>.<minor>format. No more repetitive.0suffix.