mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-21 14:58:12 +00:00
Merge pull request #1257 from ethereum/scale-inclusion-reward
scale inclusion reward properly
This commit is contained in:
commit
4ea79ee13b
@ -1394,7 +1394,11 @@ def get_attestation_deltas(state: BeaconState) -> Tuple[Sequence[Gwei], Sequence
|
|||||||
proposer_reward = Gwei(get_base_reward(state, index) // PROPOSER_REWARD_QUOTIENT)
|
proposer_reward = Gwei(get_base_reward(state, index) // PROPOSER_REWARD_QUOTIENT)
|
||||||
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(max_attester_reward * MIN_ATTESTATION_INCLUSION_DELAY // attestation.inclusion_delay)
|
rewards[index] += Gwei(
|
||||||
|
max_attester_reward
|
||||||
|
* (SLOTS_PER_EPOCH + MIN_ATTESTATION_INCLUSION_DELAY - attestation.inclusion_delay)
|
||||||
|
// SLOTS_PER_EPOCH
|
||||||
|
)
|
||||||
|
|
||||||
# Inactivity penalty
|
# Inactivity penalty
|
||||||
finality_delay = previous_epoch - state.finalized_checkpoint.epoch
|
finality_delay = previous_epoch - state.finalized_checkpoint.epoch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user