-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add --unsafe-skip-upgrade CLI flag #5
Comments
If flag is present, we must mark the current plan as done before https://github.com/cosmos/cosmos-sdk/blob/9652ec5a504c12019ce62e8b90d7fd8676d4610f/x/upgrade/abci.go#L23-L24 Marking as done is easy, once you have the Keeper: https://github.com/cosmos/cosmos-sdk/blob/9652ec5a504c12019ce62e8b90d7fd8676d4610f/x/upgrade/internal/keeper/keeper.go#L73-L78 |
You need the upgrade Keeper and access to cli flags, not sure where the best place to do so is - app init or in upgrades/BeginBlock. Please add your reasoning which is the better place for it |
We need to add the flag here: https://github.com/cosmos/cosmos-sdk/blob/9652ec5a504c12019ce62e8b90d7fd8676d4610f/server/start.go#L83-L84 But where do we run the logic from the flag |
Please start with a proposal on where to add the logic (if flag set, clear keeper plan) and why this is the best location |
I think it should go to upgrade/beginblock,as importing from child to parent isn't a good idea. |
Also, we don't think it's possible to import keeper in init. Instead accessing flag inside BeginBlocker makes sense. |
@aaronc @ethanfrey, please review this solution |
Context
There are scenarios in which a planned upgrade handled by the upgrade module needs to be aborted. This could happen when:
--unsafe-roll-back
)Acceptance Criteria
Given that an upgrade needs to be aborted because the new binary simply doesn't work right
When a user invokes the old binary with the
--unsafe-skip-upgrade
flag (ex.xrnd start --unsafe-skip-upgrade
)Then old binary will continue to operate as before and clear the planned upgrade from state
The text was updated successfully, but these errors were encountered: