Skip to content
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

How to manual upgrade change denom of min_deposit gov param when it's not correct with native denom #21393

Closed
htiennv opened this issue Aug 24, 2024 · 4 comments
Assignees

Comments

@htiennv
Copy link

htiennv commented Aug 24, 2024

As mentioned on issue #21389, I want change denom of min_deposit gov param. Now this denom is stake not correct with native denom uduke.

Is it not possible to upgrade via proposal?

Can you suggest manual upgrade steps?

@github-actions github-actions bot added the needs-triage Issue that needs to be triaged label Aug 24, 2024
@julienrbrt
Copy link
Member

Hey, yeah so you are stuck, you cannot do a gov proposal as 'stake' isn't a token.
You need to do the modification in an upgrade handler and upgrade the binary without upgrade gov proposal.

@glowly29
Copy link

Thanks @julienrbrt, Can you suggest me the steps to upgrade this?

@julienrbrt julienrbrt added T:question and removed needs-triage Issue that needs to be triaged labels Aug 25, 2024
@facundomedica
Copy link
Member

There are a couple of ways you can do this, here's an example on how Evmos did it: https://github.com/evmos/evmos/pull/2589/files

Basically:

  • Create a binary that schedules the upgrade (before anything in Preblocker or BeginBlocker, depending on the version you are running, v0.50+ should be Preblocker). This should be non-breaking, so validators can upgrade to this binary async, but make sure you make it to 2/3s+1 power before the upgrade height or you'll have consensus issues.

  • In the upgrade handler, you should add any changes that you want to have, like (pseudo-code-ish):

params := app.govKeeper.Params.Get(ctx)
params.MinDeposit = sdk.NewCoin(10000, "blah")
app.govKeeper.Params.Set(ctx, params)
  • Test, test, test. In my experience it is hard to get this right, so do a lot of testing in a local environment with at least 4 validators with %25 power each (running just one might make you think it works but it really doesn't)

  • This is not the standard way to do upgrades, just a way to get you back on track. After this, you should be able to do normal gov initiated upgrades.

@facundomedica facundomedica self-assigned this Aug 26, 2024
@htiennv
Copy link
Author

htiennv commented Aug 26, 2024

Very useful! Thanks @facundomedica

@htiennv htiennv closed this as completed Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🥳 Done
Development

No branches or pull requests

4 participants