Conversation
joncinque
left a comment
There was a problem hiding this comment.
Looks good overall! Mostly nits and a few suggestions
009dc87 to
9c0ba5c
Compare
joncinque
left a comment
There was a problem hiding this comment.
This is looking really good! The proptests are excellent, just some bits about the deprecation strategy
|
Spending a bit of time thinking of this: // Overflowing u128 is not a realistic scenario except in tests. However, in that case
// it's reasonable to allow activation/deactivation of the account's entire portion.
None => account_portion,Going to run a few mainnet scenarios. I have a hunch we should saturate the numerators instead. |
joncinque
left a comment
There was a problem hiding this comment.
This looks ready to me! Feel free to do any other testing you want
|
@joncinque can you have a look at the latest update? I think saturating the numerators is safer in the extreme cases versus defaulting to the entire |
joncinque
left a comment
There was a problem hiding this comment.
Makes sense to me! Just a nit and a question
joncinque
left a comment
There was a problem hiding this comment.
Looks great to me, thanks for addressing all the comments!
rustopian
left a comment
There was a problem hiding this comment.
Excellent testing approach 🦾
011303e to
8203da7
Compare
8203da7 to
5f3fe65
Compare
rustopian
left a comment
There was a problem hiding this comment.
Looks good, just rebased 👍
joncinque
left a comment
There was a problem hiding this comment.
Sorry for the lateness, looks good to me!
This pull request implements SIMD-0391, replacing all floating-point (
f64) arithmetic in the Stake Program's warmup and cooldown logic with a fixed-point implementation using integer arithmetic. See SIMD for background rationale.What's new?
warmup_cooldown_allowancemoduleDelegationstruct has been updated to maintain backward compatibility with on-chain data. Thewarmup_cooldown_rate: f64field is replaced with_reserved: [u8; 8](preserves memory layout)