Closed hwwhww closed 5 years ago
The balance B
is 3.2E+19
, reward_quotient
is 1146880
.
slot = config['cycle_length'] * 3
, then time_since_finality <= 3 * config['cycle_length']
:Slot | rewards_and_penalties | cumulative rewards_and_penalties | B + cumulative rewards_and_penalties |
---|---|---|---|
0 | -2.7901785714E+13 | -2.7901785714E+13 | 3.1999972098E+19 |
1 | -5.5803571429E+13 | -8.3705357143E+13 | 3.1999916295E+19 |
2 | -8.3705357143E+13 | -1.6741071429E+14 | 3.1999832589E+19 |
3 | -1.1160714286E+14 | -2.7901785714E+14 | 3.1999720982E+19 |
4 | -1.3950892857E+14 | -4.1852678571E+14 | 3.1999581473E+19 |
slot = config['cycle_length'] * 4
then time_since_finality > 3 * config['cycle_length']
:
time_since_finality
: 256
quadratic_penalty_quotient
: 17179869184
validators[index].balance * time_since_finality // quadratic_penalty_quotient
: 4.76837E+11
Slot | rewards_and_penalties | cumulative rewards_and_penalties | B + cumulative rewards_and_penalties |
---|---|---|---|
0 | -2.8378622872E+13 | -2.8378622872E+13 | 3.1999971621E+19 |
1 | -5.6757245745E+13 | -8.5135868617E+13 | 3.1999914864E+19 |
2 | -8.5135868617E+13 | -1.7027173723E+14 | 3.1999829728E+19 |
3 | -1.1351449149E+14 | -2.8378622872E+14 | 3.1999716214E+19 |
4 | -1.4189311436E+14 | -4.2567934309E+14 | 3.1999574321E+19 |
@djrtwo this one is also ready to review! 🙂
lgtm
mergginnnggggggg
active_state.chain
maintenance during processing blockvoter_indices = block_vote_cache[block_hash]['total_voter_deposits']
->voter_indices = block_vote_cache[block_hash]['voter_indices']
range(last_state_recalc - config['cycle_length'], last_state_recalc)
->range(max(last_state_recalc - config['cycle_length'], 0), last_state_recalc)
quadratic_penalty_quotient = int(sqrt(config['sqrt_e_drop_time'] / config['slot_duration']))
->quadratic_penalty_quotient = (config['sqrt_e_drop_time'] / config['slot_duration']) ** 2