-
Notifications
You must be signed in to change notification settings - Fork 3
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: add minimum commission rate to x/staking #27
feat: add minimum commission rate to x/staking #27
Conversation
d325e85
to
fc2177f
Compare
fc2177f
to
f9ba875
Compare
455c861
to
7e81e1b
Compare
a335170
to
9241201
Compare
DOCKER := $(shell which docker) | ||
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf | ||
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:0.56.0 |
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.
I specified the version explicitly because the buf > 0.56.0
has so many CLI breaking changes. It's safe to use 0.56.0 since this Makefile was written when the latest version of buf was 0.56.0.
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.
LGTM 👍
Ah, I have one question. |
Yeah. That's why I forked
After merging this PR, we will release the |
I merged this PR even though I got only one approval, in order to submit the software upgrade gov proposal soon. |
As Osmosis does in their osmosis-labs/cosmos-sdk forked repo, it would be okay to not update the |
Important
This PR is based on the
v0.42-panacea
branch which points to the v0.42.11 tag. Although the current panacea-core v2.0.2 uses cosmos-sdk v0.42.9, I thought it's okay to use cosmos-sdk v0.42.11 because there's no serious breaking changes. Also, if we decided to implement this feature based on v0.42.9, the branch strategy may become complicated.Changes
min_commission_rate
genesis param of thex/staking
module.CreateValidator
andUpdateValidator
to check if the desired commission rate is>= min_commission_rate
.max_commission_change_rate
.min_commission_rate
. In normal mode, this logic can cause an error:commission change rate cannot be more than the max rate
. That's why we need a special function which doesn't ignore themax_commission_change_rate
param.Tips for reviewers
You don't need to review changes which are displayed as
Some generated files are not rendered
because those file are generated bymake proto-gen
. Unfortunately, Cosmos guys didn't executemake proto-gen
after modifying proto files. That's why so many unexpected.pb.go
files have been regenerated in this PR.References
MustUpdateValidatorCommission()
). I've considered more corner cases when upgrading the chain with updating commission rates.What's next?
Please jump to medibloc/panacea-core#291.