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

Implement kickout for chunk producers #1204

Merged
merged 4 commits into from
Aug 23, 2019
Merged

Conversation

bowenwang1996
Copy link
Collaborator

Validators will now be kicked out for not producing sufficient number of chunks.

chain/epoch_manager/src/lib.rs Show resolved Hide resolved
chain/epoch_manager/src/lib.rs Outdated Show resolved Hide resolved
core/primitives/src/block.rs Show resolved Hide resolved
account.amount += return_stake;
assert!(
account.stake >= max_of_stakes,
"FATAL: staking invariant does not hold"
Copy link
Member

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 {}"

Copy link
Collaborator Author

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.

Copy link
Member

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

near/src/runtime.rs Show resolved Hide resolved
near/src/runtime.rs Outdated Show resolved Hide resolved
@bowenwang1996 bowenwang1996 merged commit 2cfddf2 into chunks Aug 23, 2019
@bowenwang1996 bowenwang1996 deleted the chunk-validator-kickout branch August 23, 2019 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants