Skip to content

Commit

Permalink
Shard receipts cannot penalize withdrawn validators
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuterin authored and hwwhww committed Aug 11, 2019
1 parent 7132778 commit 36a2283
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions specs/core/1_beacon-chain-misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ def process_shard_receipt(state: BeaconState, receipt_proof: ShardReceiptProof):
root=state.current_crosslinks[shard].data_root
)
for delta in receipt_proof.receipt:
increase_balance(state, delta.index, state.validators[delta.index].effective_balance * delta.reward_coefficient // REWARD_COEFFICIENT_BASE)
decrease_balance(state, delta.index, delta.block_fee)
if get_current_epoch(state) < state.validators[delta.index].withdrawable_epoch:
increase_balance(state, delta.index, state.validators[delta.index].effective_balance * delta.reward_coefficient // REWARD_COEFFICIENT_BASE)
decrease_balance(state, delta.index, delta.block_fee)
state.next_shard_receipt_period[receipt_proof.shard] += 1
increase_balance(state, get_beacon_proposer_index(state), MICRO_REWARD)
```
Expand Down

0 comments on commit 36a2283

Please sign in to comment.