-
Notifications
You must be signed in to change notification settings - Fork 645
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
Implement kickout for chunk producers #1204
Conversation
near/src/runtime.rs
Outdated
account.amount += return_stake; | ||
assert!( | ||
account.stake >= max_of_stakes, | ||
"FATAL: staking invariant does not hold" |
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.
Let's make this error "User's stake {} is smaller than expected return stake {}"
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.
account.stake - max_of_stakes
is the expected return stake.
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.
I mean change the error message to actually show what was the erroring values
Validators will now be kicked out for not producing sufficient number of chunks.