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

go staking: increase reward amount denominator #3065

Merged
merged 3 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .changelog/3065.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
go/staking: Increase reward amount denominator

This allows the genesis block writer to specify finer reward rates.

Associated genesis controls analysis:

```
RewardAmountDenominator
|- AddRewards
| |- RewardFactorEpochElectionAny
| '- RewardFactorEpochSigned
'- AddRewardSingleAttenuated
'- RewardFactorBlockProposed
```

Note to the genesis block writer: scale rewards factors **up** by a
factor of **1,000**.
4 changes: 2 additions & 2 deletions go/staking/api/rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ type RewardStep struct {
}

func init() {
// Denominated in 1000th of a percent.
// Denominated in one millionth of a percent.
RewardAmountDenominator = quantity.NewQuantity()
err := RewardAmountDenominator.FromBigInt(big.NewInt(100_000))
err := RewardAmountDenominator.FromBigInt(big.NewInt(100_000_000))
if err != nil {
panic(err)
}
Expand Down