-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
revert: Turn staking power reduction into an on-chain param #9495
Conversation
Would love to have @sunnya97 @alexanderbez and/or @anilcse ACK before merging this |
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.
Why not editing the Keeper.PowerReduction
instead of removing it and doing lot of changes in the code?
a05b55c
to
745154a
Compare
…447-revert-powerred
Yeah, good idea, I changed. The diff is way smaller now, R4R again. |
Codecov Report
@@ Coverage Diff @@
## master #9495 +/- ##
==========================================
+ Coverage 60.54% 60.59% +0.05%
==========================================
Files 590 589 -1
Lines 37296 37211 -85
==========================================
- Hits 22579 22547 -32
+ Misses 12768 12721 -47
+ Partials 1949 1943 -6
|
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.
utACK. Thanks for updating the PR.
@@ -112,7 +112,7 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate { | |||
func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []abci.ValidatorUpdate, err error) { | |||
params := k.GetParams(ctx) | |||
maxValidators := params.MaxValidators | |||
powerReduction := params.PowerReduction | |||
powerReduction := k.PowerReduction(ctx) |
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.
👍
Description
Closes: #9447
This PR partially reverts #8505. Namely:
powerReduction
function argument to staking functions. This allows us to rely less on global variables in said functions.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