chore: remove crisis from simapp and deprecate (#23722)
This commit is contained in:
+1
-1
@@ -9,7 +9,6 @@ Here are some production-grade modules that can be used in Cosmos SDK applicatio
|
||||
* [Auth](./auth/README.md) - Authentication of accounts and transactions for Cosmos SDK applications.
|
||||
* [Authz](./authz/README.md) - Authorization for accounts to perform actions on behalf of other accounts.
|
||||
* [Bank](./bank/README.md) - Token transfer functionalities.
|
||||
* [Crisis](./crisis/README.md) - Halting the blockchain under certain circumstances (e.g. if an invariant is broken).
|
||||
* [Distribution](./distribution/README.md) - Fee distribution, and staking token provision distribution.
|
||||
* [Evidence](./evidence/README.md) - Evidence handling for double signing, misbehaviour, etc.
|
||||
* [Feegrant](./feegrant/README.md) - Grant fee allowances for executing transactions.
|
||||
@@ -23,6 +22,7 @@ Here are some production-grade modules that can be used in Cosmos SDK applicatio
|
||||
* [Consensus](./consensus/README.md) - Consensus module for modifying CometBFT's ABCI consensus params.
|
||||
* [Circuit](./circuit/README.md) - Circuit breaker module for pausing messages.
|
||||
* [Genutil](./genutil/README.md) - Genesis utilities for the Cosmos SDK.
|
||||
* [Crisis](./crisis/README.md) - *Deprecated* halting the blockchain under certain circumstances (e.g. if an invariant is broken).
|
||||
|
||||
To learn more about the process of building modules, visit the [building modules reference documentation](https://docs.cosmos.network/main/building-modules/intro).
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 1
|
||||
|
||||
# `x/crisis`
|
||||
|
||||
NOTE: `x/crisis` is deprecated as of Cosmos SDK v0.53 and will be removed in the next release.
|
||||
|
||||
## Overview
|
||||
|
||||
The crisis module halts the blockchain under the circumstance that a blockchain
|
||||
|
||||
@@ -16,6 +16,8 @@ import (
|
||||
)
|
||||
|
||||
// Keeper - crisis keeper
|
||||
//
|
||||
// Deprecated: the crisis keeper is deprecated and will be removed in the next Cosmos SDK major release.
|
||||
type Keeper struct {
|
||||
routes []types.InvarRoute
|
||||
invCheckPeriod uint
|
||||
@@ -37,6 +39,8 @@ type Keeper struct {
|
||||
}
|
||||
|
||||
// NewKeeper creates a new Keeper object
|
||||
//
|
||||
// Deprecated: the crisis keeper is deprecated and will be removed in the next Cosmos SDK major release.
|
||||
func NewKeeper(
|
||||
cdc codec.BinaryCodec, storeService storetypes.KVStoreService, invCheckPeriod uint,
|
||||
supplyKeeper types.SupplyKeeper, feeCollectorName, authority string, ac address.Codec,
|
||||
|
||||
@@ -43,6 +43,8 @@ var (
|
||||
|
||||
// Module init related flags
|
||||
const (
|
||||
// Deprecated: this flag is no longer used and will be removed along with x/crisis in the next major
|
||||
// Cosmos SDK release.
|
||||
FlagSkipGenesisInvariants = "x-crisis-skip-assert-invariants"
|
||||
)
|
||||
|
||||
@@ -85,6 +87,8 @@ func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)
|
||||
}
|
||||
|
||||
// AppModule implements an application module for the crisis module.
|
||||
//
|
||||
// Deprecated: the crisis module is deprecated and will be removed in the next Cosmos SDK major release.
|
||||
type AppModule struct {
|
||||
AppModuleBasic
|
||||
|
||||
@@ -103,6 +107,8 @@ type AppModule struct {
|
||||
// we will call keeper.AssertInvariants during InitGenesis (it may take a significant time)
|
||||
// - which doesn't impact the chain security unless 66+% of validators have a wrongly
|
||||
// modified genesis file.
|
||||
//
|
||||
// Deprecated: the crisis module is deprecated and will be removed in the next Cosmos SDK major release.
|
||||
func NewAppModule(keeper *keeper.Keeper, skipGenesisInvariants bool, ss exported.Subspace) AppModule {
|
||||
return AppModule{
|
||||
AppModuleBasic: AppModuleBasic{},
|
||||
@@ -120,6 +126,8 @@ func (am AppModule) IsOnePerModuleType() {}
|
||||
func (am AppModule) IsAppModule() {}
|
||||
|
||||
// AddModuleInitFlags implements servertypes.ModuleInitFlags interface.
|
||||
//
|
||||
// Deprecated: this flag is deprecated and will be removed in the next major Cosmos SDK release.
|
||||
func AddModuleInitFlags(startCmd *cobra.Command) {
|
||||
startCmd.Flags().Bool(FlagSkipGenesisInvariants, false, "Skip x/crisis invariants check on startup")
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -246,8 +246,6 @@ module_versions:
|
||||
version: "1"
|
||||
- name: bank
|
||||
version: "2"
|
||||
- name: crisis
|
||||
version: "1"
|
||||
- name: distribution
|
||||
version: "2"
|
||||
- name: evidence
|
||||
@@ -410,10 +408,6 @@ Example Output:
|
||||
"name": "bank",
|
||||
"version": "2"
|
||||
},
|
||||
{
|
||||
"name": "crisis",
|
||||
"version": "1"
|
||||
},
|
||||
{
|
||||
"name": "distribution",
|
||||
"version": "2"
|
||||
@@ -552,10 +546,6 @@ Example Output:
|
||||
"name": "bank",
|
||||
"version": "2"
|
||||
},
|
||||
{
|
||||
"name": "crisis",
|
||||
"version": "1"
|
||||
},
|
||||
{
|
||||
"name": "distribution",
|
||||
"version": "2"
|
||||
|
||||
Reference in New Issue
Block a user