Remove crisis module wiring and code#3510
Conversation
Drop x/crisis from the Sei app module manager, init-genesis order, end blocker, invariant registration, init flags, and app-owned keeper state. Crisis has no dedicated mounted KV store in app/app.go, so the rootmulti store key list is unchanged. Also decouple crisis package tests from the full app now that App no longer exposes CrisisKeeper. Tested with: go test ./app ./app/legacyabci ./cmd/seid/cmd ./sei-cosmos/x/crisis/... Upgrade tested with a 4-node Docker cluster: started from the pre-removal binary, passed software upgrade v99.0.1-crisis-removal at height 342, restarted all validators on the removal binary, and verified all nodes reached height 514 with catching_up=false and matching app hash A53F9F78B05C8F6C07247186EF5BFB89D5BCFE7535AE52E54895B57E1844485E.
PR SummaryHigh Risk Overview Genesis and tooling are aligned with the removal: local genesis no longer sets There is no dedicated crisis KV store teardown in this diff—crisis data lived under the params subspace, consistent with the PR note that no Reviewed by Cursor Bugbot for commit 667afb9. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3510 +/- ##
==========================================
- Coverage 59.30% 59.25% -0.06%
==========================================
Files 2127 2129 +2
Lines 175876 176767 +891
==========================================
+ Hits 104305 104745 +440
- Misses 62473 62888 +415
- Partials 9098 9134 +36
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| @@ -170,8 +169,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { | |||
| rootCmd.AddCommand(server.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Marshaler)) | |||
| } | |||
|
|
|||
| func addModuleInitFlags(startCmd *cobra.Command) { | |||
| crisis.AddModuleInitFlags(startCmd) | |||
There was a problem hiding this comment.
This would break the startup for anyone setting the flag.
Perhaps a more graceful approach is to print a WARNING saying this is noop, and flag will be removed in the next release.
Alternatively a more meaningful fatal error to point them to some TBD comms (e.g. release notes) that would explain the module removal).
There was a problem hiding this comment.
This simapp is only used in unit tests so I think it should be okay, and once ibc is removed we will remove this simapp altogether too
| app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) | ||
| } | ||
|
|
||
| if (upgradeInfo.Name == "v6.6.0") && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { |
There was a problem hiding this comment.
Going forward since v6.5, upgrade names will follow v<major>.<minor> format. No more repetitive .0 suffix.
| if (upgradeInfo.Name == "v6.6.0") && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { | |
| if (upgradeInfo.Name == "v6.6") && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { |
|
|
||
| if (upgradeInfo.Name == "v6.6.0") && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { | ||
| storeUpgrades := storetypes.StoreUpgrades{ | ||
| Deleted: []string{crisisStoreKeyName}, |
There was a problem hiding this comment.
But there is no such key name and this would result in an error i believe.
philipsu522
left a comment
There was a problem hiding this comment.
In the past, when updating some fields for modules I believe we saw some incompatibilities. For this particular PR, in the genesis file we see:
https://github.com/sei-protocol/chain-configs/blob/main/pacific-1/genesis.json#L715
We should probably test workflows like state sync'ing with the new binary and the genesis file
|
Checked the genesis/state-sync concern. The concern is valid for paths that stream or validate app_state from existing genesis files, because pacific-1/arctic-1/atlantic-2 genesis still include a I did find and fix the risky streaming paths in 667afb9:
Validated with:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 667afb9. Configure here.
| func addModuleInitFlags(startCmd *cobra.Command) { | ||
| crisis.AddModuleInitFlags(startCmd) | ||
| } | ||
| func addModuleInitFlags(_ *cobra.Command) {} |
There was a problem hiding this comment.
Removed CLI flag breaks operators using it
Medium Severity
The --x-crisis-skip-assert-invariants flag is silently removed by making addModuleInitFlags a no-op. Any operator who has this flag in their seid start command (e.g. in a systemd unit file or launch script) will get an "unknown flag" error from cobra, preventing the node from starting after the upgrade. As the PR reviewer noted, a graceful deprecation (accepting the flag as a no-op with a warning) would avoid unexpected startup failures.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 667afb9. Configure here.


Summary
Test Plan