forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: add --unsafe-remove-modules flag to Rollback cmd #546
Merged
pirtleshell
merged 5 commits into
kava-release-v0.47.10-iavl-v1
from
rp-iavl-v1-rollback-update
Jun 21, 2024
Merged
feat: add --unsafe-remove-modules flag to Rollback cmd #546
pirtleshell
merged 5 commits into
kava-release-v0.47.10-iavl-v1
from
rp-iavl-v1-rollback-update
Jun 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* adds public DeleteKVStore method on root multistore * rollback command accepts list of store keys names to forcibly delete this is useful for rolling back an upgrade that adds modules. rollbacks are performed by loading & committing the previous version. without this new functionality, the rollback will fail because no store version will exist for modules added during the upgrade. to properly rollback the state, pass in a list of the added module names and they will be completely removed before the rollback of pre-existing modules takes place: ``` chain rollback --unsafe-remove-modules mynewmodule,othernewmodule ```
like DeleteVersionsTo, but deletes the given version & upwards
pirtleshell
requested review from
DracoLi,
nddeluca,
rhuairahrighairidh,
drklee3 and
evgeniy-scherbina
May 24, 2024 19:47
drklee3
reviewed
May 24, 2024
the DeleteVersionsFrom on the unwrapped KVStore should be sufficient
drklee3
approved these changes
Jun 21, 2024
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.
looks good! would be nice with passing CI jobs but that can be done later 😅
pirtleshell
merged commit Jun 21, 2024
dfce46d
into
kava-release-v0.47.10-iavl-v1
10 of 21 checks passed
drklee3
pushed a commit
that referenced
this pull request
Jan 21, 2025
* add --unsafe-remove-modules flag to Rollback cmd * adds public DeleteKVStore method on root multistore * rollback command accepts list of store keys names to forcibly delete this is useful for rolling back an upgrade that adds modules. rollbacks are performed by loading & committing the previous version. without this new functionality, the rollback will fail because no store version will exist for modules added during the upgrade. to properly rollback the state, pass in a list of the added module names and they will be completely removed before the rollback of pre-existing modules takes place: ``` chain rollback --unsafe-remove-modules mynewmodule,othernewmodule ``` * add DeleteVersionsFrom to Tree like DeleteVersionsTo, but deletes the given version & upwards * write deletion of current & future versions * rename DeleteKVStore -> DeleteLatestVersion * remove unnecessary deleteKVStore call the DeleteVersionsFrom on the unwrapped KVStore should be sufficient
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DeleteLatestVersion
method on root multistoreDeleteVersionsFrom
method on iavl store which writes deletion of versions from given version upwards to disk.v1.2.0-kava.1
.this is useful for rolling back an upgrade that adds modules.
rollbacks are performed by loading & committing the previous version.
without this new functionality, the rollback will fail because no store
version will exist for modules added during the upgrade.
to properly rollback the state, pass in a list of the added module names
and they will be completely removed before the rollback of pre-existing
modules takes place: