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

Upgrade cosmos-sdk v0.50 get error "max inflation less than min inflation" #17

Open
ledanghuy1811 opened this issue Oct 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ledanghuy1811
Copy link

ledanghuy1811 commented Oct 16, 2024

Context

Before we run upgrade to cosmos-sdk v0.50 in our mainnet, we fork current mainnet to a testnet with fully data of our mainnet. The purpose of this is that we want to upgrade in our fork-mainnet (testnet) first to see if we got error.

We run e2e-upgrade script first to check if there is error or not and it work without errors but when we try to upgrade to cosmos-sdk v0.50 in our testnet, the error is show up:

image

To Reproduce

Steps to reproduce the behavior:

  1. Need to fork mainnet and run node
  2. Clone our old repo and build oraid binary
  3. Try to make proposal to upgrade fork-mainnet
  4. Clone this repo and checkout to this commit
  5. Build new binary and re run node to see error

Expected behavior

The upgrade process pass and node start to commit block.

Additional context

Screenshot 2024-10-16 at 21 41 47
@ledanghuy1811
Copy link
Author

The error come up because when in old version, mint params we set have max inflation less than min inflation. When upgrade chain to cosmos-sdk v0.50, when reach logic migrate mint module, it come with error when validate old mint params.

@ledanghuy1811
Copy link
Author

To fix this error, in upgrade chain handler logic, we get mint params first and then set max inflation equal to min inflation, set this modified params back to store.
Screenshot 2024-10-16 at 21 53 47

Fixed in here

@ducphamle2 ducphamle2 added this to the Upgrade Oraichain to 0.50 milestone Oct 30, 2024
@ducphamle2 ducphamle2 added the bug Something isn't working label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants