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

feat: use medibloc/cosmos-sdk for min_commission_rate + add upgrade handler #291

Merged
merged 11 commits into from
Apr 6, 2022

Conversation

youngjoon-lee
Copy link
Contributor

@youngjoon-lee youngjoon-lee commented Mar 30, 2022

Closes #290

Important

This PR is based on the v2.0 branch which currently points to the tag v2.0.2. If this feature is decided to be deployed to mainnet, we must cherry-pick this PR to the master branch as well.

Changes

  • Used medibloc/cosmos-sdk: feat: add minimum commission rate to x/staking cosmos-sdk#27
    • You don't need to review *.proto and swagger.json which is regenerated by make proto-update-dep and make proto-swagger-gen.
  • Implemented an upgrade handler which does:
    • Set the new min-commission-rate genesis parameter to 3%.
    • Update the commission rate of validators whose commission rate is smaller than the min-commission-rate 3%.

Tests

It was hard to automate tests. I tested the upgrade progress manually.

TODO

https://github.com/medibloc/panacea-core/pull/291/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R59
https://github.com/medibloc/panacea-core/pull/291/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6R37

@youngjoon-lee youngjoon-lee self-assigned this Mar 30, 2022
@youngjoon-lee youngjoon-lee requested review from gyuguen and cl9200 and removed request for cl9200 and gyuguen March 30, 2022 12:12
@youngjoon-lee youngjoon-lee modified the milestone: v2.0.3 Mar 30, 2022
@youngjoon-lee youngjoon-lee linked an issue Mar 30, 2022 that may be closed by this pull request
@youngjoon-lee youngjoon-lee changed the title feat: WIP: use medibloc/cosmos-sdk fork which has min_commission_rate feat: use medibloc/cosmos-sdk fork which has min_commission_rate + add upgrade handler Mar 31, 2022
@youngjoon-lee youngjoon-lee changed the title feat: use medibloc/cosmos-sdk fork which has min_commission_rate + add upgrade handler feat: use medibloc/cosmos-sdk formin_commission_rate + add upgrade handler Mar 31, 2022
@youngjoon-lee youngjoon-lee marked this pull request as ready for review March 31, 2022 02:35
@youngjoon-lee youngjoon-lee changed the title feat: use medibloc/cosmos-sdk formin_commission_rate + add upgrade handler feat: use medibloc/cosmos-sdk for min_commission_rate + add upgrade handler Mar 31, 2022
Copy link
Contributor

@gyuguen gyuguen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@gyuguen
Copy link
Contributor

gyuguen commented Mar 31, 2022

We will have to edit CHANGELOG.md later too.

Copy link
Contributor

@0xHansLee 0xHansLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@youngjoon-lee
Copy link
Contributor Author

@gyuguen @hansol-medi
29373c3
I just pushed the last commit which uses the properly released version of medibloc/cosmos-sdk.

@youngjoon-lee youngjoon-lee merged commit f43497b into v2.0 Apr 6, 2022
@youngjoon-lee youngjoon-lee deleted the v2.0-min-commission-rate branch April 6, 2022 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Have minimum commission rate
3 participants