Moved two calculations back to the FFG reward section
This commit is contained in:
parent
3b7164c2d6
commit
f2af5fd9df
|
@ -1038,11 +1038,6 @@ def adjust_for_inclusion_distance(magnitude: int, dist: int) -> int:
|
||||||
|
|
||||||
For any validator `v`, `base_reward(v) = balance_at_stake(v) // reward_quotient`
|
For any validator `v`, `base_reward(v) = balance_at_stake(v) // reward_quotient`
|
||||||
|
|
||||||
Miscellaneous:
|
|
||||||
|
|
||||||
* Let `quadratic_penalty_quotient = SQRT_E_DROP_TIME**2`. (The portion lost by offline validators after `D` cycles is about `D*D/2/quadratic_penalty_quotient`.)
|
|
||||||
* Let `time_since_finality = block.slot - state.last_finalized_slot`.
|
|
||||||
|
|
||||||
#### Adjust justified slots and crosslink status
|
#### Adjust justified slots and crosslink status
|
||||||
|
|
||||||
* Set `state.justified_slot_bitfield = (state.justified_slot_bitfield * 2) % 2**64`.
|
* Set `state.justified_slot_bitfield = (state.justified_slot_bitfield * 2) % 2**64`.
|
||||||
|
@ -1061,6 +1056,9 @@ For every `ShardAndCommittee` object `obj`:
|
||||||
|
|
||||||
Note: When applying penalties in the following balance recalculations implementers should make sure the `uint64` does not underflow.
|
Note: When applying penalties in the following balance recalculations implementers should make sure the `uint64` does not underflow.
|
||||||
|
|
||||||
|
* Let `quadratic_penalty_quotient = SQRT_E_DROP_TIME**2`. (The portion lost by offline validators after `D` cycles is about `D*D/2/quadratic_penalty_quotient`.)
|
||||||
|
* Let `time_since_finality = block.slot - state.last_finalized_slot`.
|
||||||
|
|
||||||
Case 1: `time_since_finality <= 4 * CYCLE_LENGTH`:
|
Case 1: `time_since_finality <= 4 * CYCLE_LENGTH`:
|
||||||
|
|
||||||
* Any validator `v` in `prev_cycle_boundary_attesters` gains `adjust_for_inclusion_distance(base_reward(v) * prev_cycle_boundary_attesting_balance // total_balance, inclusion_distance(v))`.
|
* Any validator `v` in `prev_cycle_boundary_attesters` gains `adjust_for_inclusion_distance(base_reward(v) * prev_cycle_boundary_attesting_balance // total_balance, inclusion_distance(v))`.
|
||||||
|
|
Loading…
Reference in New Issue