-
Notifications
You must be signed in to change notification settings - Fork 123
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
upgrade handler flag #706
upgrade handler flag #706
Conversation
IMO this is the way. Ideally there would be a more fleshed out executive actions module that could halt the chain, do upgrades, etc. |
Going to pound on the logic here and call it a night. There are a bunch of reasons that you're correct @MikeSofaer -- this is better off as part of a set of tools. |
nice |
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 to me.
…/pylons into upgrade-handler-flag
With the magic, It does not show my info when I push the commit sir lol @faddat |
What magic? |
just fixing linting now |
…dler-flag merge from main
…/pylons into upgrade-handler-flag
…into upgrade-handler-flag merge
what I did?
why docker? so that environmnents for testing for all machine will be the same. |
…into upgrade-handler-flag merge
So I think this pr work on my local test net.
And I think this is just a temporary solution to reduce the waiting time (we are on testnet). Using gov is still a standard and safe way |
…/pylons into upgrade-handler-flag
// Because we upgrade directly on the node without the proposal. | ||
// So create an upgrade plan at the block that needs to be upgraded | ||
if app.upgradeHeight != 0 && app.upgradeHeight == ctx.BlockHeight() { | ||
err := app.UpgradeKeeper.ScheduleUpgrade(ctx, upgradetypes.Plan{Name: upgradev46.UpgradeName, Height: ctx.BlockHeight()}) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
if app.upgradeHeight != 0 && app.upgradeHeight == ctx.BlockHeight() { | ||
err := app.UpgradeKeeper.ScheduleUpgrade(ctx, upgradetypes.Plan{Name: upgradev46.UpgradeName, Height: ctx.BlockHeight()}) | ||
if err != nil { | ||
panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
…into upgrade-handler-flag merge
nice reproducibility |
Description
This PR adds an upgrade handler flag to Pylons.
It works like this:
This will allow pylons to upgrade, without the governance process. It's anti-pattern for the sdk, but I like the degree of control that it gives, especially during difficult situations. I'll probably upstream it.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change