-
Notifications
You must be signed in to change notification settings - Fork 993
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
Fix buggy inflation calculation #1756
Conversation
pls spawn devnet [devnet-0.20,3,heliaxdev@1be9883,ON] |
2 similar comments
pls spawn devnet [devnet-0.20,3,heliaxdev@1be9883,ON] |
pls spawn devnet [devnet-0.20,3,heliaxdev@1be9883,ON] |
Devnet with chain id |
2c8602e
to
8b9105c
Compare
The bug is resolved for now by converting |
* origin/bengt/pos-inflation-fix: added changelog fix inflation calc hopefully fixes inflation ci: add masp params for integration tests make: run integration tests with unit test coverage ci/e2e: remove removed masp tests ci: put back accidentally removed changes
shared/src/ledger/inflation.rs
Outdated
let inflation = if last_inflation_amount + control_val > max_inflation { | ||
let control_val = token::Amount::from_uint( | ||
control_val | ||
.to_uint() |
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.
This panics when the locked ratio is > target as the control_val goes negative, which is valid value because it should be reducing the inflation from the last.
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.
fixed
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.
thx for realizing this and sorting it out
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
Pos inflation rewards were abnormally large. Now should be fixed