Scenario: Initialize new cycle
Given each validator must deposit "32 ETH"
And CYCLE_LENGTH is "64"
And DEFAULT_NUM_VALIDATORS is "40"
When a new cycle is initialised
Then total_deposits is calculated at "1280"
And justified_streak is calculated at "64"
NOTES
vote_balance and total_deposits are currently used to calculate last_justified_slot and justified_streak.
Some thing that is still unclear to me though is how much a validator have to stake for each cycle – can that be an arbitrary amount or is it always the full 32 ETH that was staked? The current tests for initialize_new_cycle suggest there could be a 3 ETH total_deposit which assumes the former.
REF #104
Do not merge this PR yet, created for tracking and discussions.
Hi! Turns out fixing this test was non-trivial. I've submitted a new PR in which I'm fixing it. Sorry to bypass your work. Thanks for bringing the issue to my attention.
EXPECTED BEHAVIOR?
NOTES
vote_balance
andtotal_deposits
are currently used to calculatelast_justified_slot
andjustified_streak
.Some thing that is still unclear to me though is how much a validator have to stake for each cycle – can that be an arbitrary amount or is it always the full 32 ETH that was staked? The current tests for
initialize_new_cycle
suggest there could be a 3 ETHtotal_deposit
which assumes the former.