-
Notifications
You must be signed in to change notification settings - Fork 194
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
Configurable tier slots calculation formula #1179
Conversation
{ | ||
assert!( | ||
init_tier_config.number_of_slots >= init_tier_config.slots_per_tier.iter().sum::<u16>() as u16, | ||
"Safety check, sum of slots per tier must be equal or less than max number of slots (due to possible rounding)" |
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 this can be >
? Should we enforce =
?
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.
Initially I've put it like that but forgot about the rounding, or flooring to be precise.
We might lose a slot per tier due to 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.
Minimum allowed line rate is |
Pull Request Summary
Discussion reference: https://forum.astar.network/t/dapp-staking-v3-on-shiden/6190