-
Notifications
You must be signed in to change notification settings - Fork 146
Conversation
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.
Great work!
) | ||
validator_index = 0 | ||
total_penalties = 10 ** 9 # 1 ETH | ||
penalty = penalty = _compute_individual_penalty( |
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.
penalty = penalty = _compute_individual_penalty( | |
penalty = _compute_individual_penalty( |
slot=get_epoch_start_slot(current_epoch, slots_per_epoch), | ||
) | ||
validator_index = 0 | ||
total_penalties = 10 ** 9 # 1 ETH |
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.
Redefined total_penalties
) | ||
state = state.update_validator_balance( | ||
validator_index=validator_index, | ||
balance=state.validator_balances[validator_index] - penalty, |
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.
Should we prevent balance underflow here?
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.
Hmm, logically, they would be ejected before it's under the risk of underflow.
Raise a question in the spec repo: ethereum/consensus-specs#727
) | ||
state = state.update_validator_registry(validator_index, validator) | ||
|
||
slashing_validator_index = 0 |
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.
slashing_validator_index
seems to be a duplicate of validator_index
3643146
to
ae3f54a
Compare
What was wrong?
Fix #322
How was it fixed?
Implement as the spec.
Cute Animal Picture