cosmos-sdk/x/staking/keeper
Amaury 5cd741a878
revert: Turn staking power reduction into an on-chain param (#9495)
<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

Closes: #9447

This PR partially reverts #8505. Namely:
- it removes PowerReduction as a staking on-chain param
- however, it keeps #8505's API changes regarding adding a `powerReduction` function argument to staking functions. This allows us to rely less on global variables in said functions.

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

---

### 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...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### 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...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
2021-06-14 14:45:15 +00:00
..
alias_functions.go various linter fixes (#8666) 2021-02-23 08:46:01 +00:00
common_test.go on-chain power reduction param conversion basic work 2021-01-27 20:24:00 +10:00
delegation_test.go SDK Core Audit - simapp updates (#9315) 2021-05-17 15:42:44 +00:00
delegation.go Remove Redundant Staking Errors (#9231) 2021-05-19 12:20:17 +00:00
grpc_query_test.go fix: Staking delegations should return empty list instead of rpc error when no records found (#9423) 2021-06-01 15:17:44 +00:00
grpc_query.go fix: Staking delegations should return empty list instead of rpc error when no records found (#9423) 2021-06-01 15:17:44 +00:00
historical_info_test.go Less function to not use default power reduction 2021-02-02 13:12:05 +10:00
historical_info.go codec: Rename codec and marshaler interfaces (#9226) 2021-04-29 10:46:22 +00:00
hooks.go Merge PR #4417: cleanup staking references from types pkg 2019-06-04 15:06:58 -07:00
invariants.go on-chain power reduction param conversion basic work 2021-01-27 20:24:00 +10:00
keeper_test.go use on-chain params on tests + fix tests + add new tests for power reduction change 2021-01-28 23:54:39 +10:00
keeper.go codec: Rename codec and marshaler interfaces (#9226) 2021-04-29 10:46:22 +00:00
migrations.go revert: Turn staking power reduction into an on-chain param (#9495) 2021-06-14 14:45:15 +00:00
msg_server.go Remove Redundant Staking Errors (#9231) 2021-05-19 12:20:17 +00:00
params.go revert: Turn staking power reduction into an on-chain param (#9495) 2021-06-14 14:45:15 +00:00
pool.go Index supply by denom (#8517) 2021-03-03 09:58:16 +00:00
power_reduction_test.go revert: Turn staking power reduction into an on-chain param (#9495) 2021-06-14 14:45:15 +00:00
power_reduction.go on-chain power reduction param conversion basic work 2021-01-27 20:24:00 +10:00
querier_test.go use on-chain params on tests + fix tests + add new tests for power reduction change 2021-01-28 23:54:39 +10:00
querier.go various linter fixes (#8666) 2021-02-23 08:46:01 +00:00
query_utils.go various linter fixes (#8666) 2021-02-23 08:46:01 +00:00
slash_test.go SDK Core Audit - simapp updates (#9315) 2021-05-17 15:42:44 +00:00
slash.go use on-chain params on tests + fix tests + add new tests for power reduction change 2021-01-28 23:54:39 +10:00
test_common.go Use any as validator pubkey (#7597) 2020-10-23 12:07:52 +00:00
val_state_change.go revert: Turn staking power reduction into an on-chain param (#9495) 2021-06-14 14:45:15 +00:00
validator_bench_test.go Removed GetValidator caching to fix concurrency error (#8546) 2021-02-12 11:52:03 +00:00
validator_test.go SDK Core Audit - simapp updates (#9315) 2021-05-17 15:42:44 +00:00
validator.go codec: Rename codec and marshaler interfaces (#9226) 2021-04-29 10:46:22 +00:00