Merge pull request #1434 from ethereum/vbuterin-patch-2-1

Fix delay-based attestation inclusion reward
This commit is contained in:
Danny Ryan 2019-10-19 22:34:37 -05:00 committed by GitHub
commit f533b709ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -1365,9 +1365,7 @@ def get_attestation_deltas(state: BeaconState) -> Tuple[Sequence[Gwei], Sequence
rewards[attestation.proposer_index] += proposer_reward rewards[attestation.proposer_index] += proposer_reward
max_attester_reward = get_base_reward(state, index) - proposer_reward max_attester_reward = get_base_reward(state, index) - proposer_reward
rewards[index] += Gwei( rewards[index] += Gwei(
max_attester_reward max_attester_reward // attestation.inclusion_delay
* (SLOTS_PER_EPOCH + MIN_ATTESTATION_INCLUSION_DELAY - attestation.inclusion_delay)
// SLOTS_PER_EPOCH
) )
# Inactivity penalty # Inactivity penalty