diff --git a/AllTests-mainnet.md b/AllTests-mainnet.md index 043a8eb15..1047dc9c7 100644 --- a/AllTests-mainnet.md +++ b/AllTests-mainnet.md @@ -5,7 +5,6 @@ AllTests-mainnet + BASE_REWARD_FACTOR 64 [Preset: mainnet] OK + BLS_WITHDRAWAL_PREFIX "0x00" [Preset: mainnet] OK + CHURN_LIMIT_QUOTIENT 65536 [Preset: mainnet] OK - CONFIG_NAME "mainnet" [Preset: mainnet] Skip DEPOSIT_CHAIN_ID 1 [Preset: mainnet] Skip DEPOSIT_CONTRACT_ADDRESS "0x00000000219ab540356cBB839Cbe05303d770 Skip DEPOSIT_NETWORK_ID 1 [Preset: mainnet] Skip @@ -63,7 +62,7 @@ AllTests-mainnet + VALIDATOR_REGISTRY_LIMIT 1099511627776 [Preset: mainnet] OK + WHISTLEBLOWER_REWARD_QUOTIENT 512 [Preset: mainnet] OK ``` -OK: 51/60 Fail: 0/60 Skip: 9/60 +OK: 51/59 Fail: 0/59 Skip: 8/59 ## Attestation pool processing [Preset: mainnet] ```diff + Attestations may arrive in any order [Preset: mainnet] OK @@ -323,4 +322,4 @@ OK: 3/3 Fail: 0/3 Skip: 0/3 OK: 1/1 Fail: 0/1 Skip: 0/1 ---TOTAL--- -OK: 180/189 Fail: 0/189 Skip: 9/189 +OK: 180/188 Fail: 0/188 Skip: 8/188 diff --git a/FixtureAll-mainnet.md b/FixtureAll-mainnet.md index c33e68517..67f165c68 100644 --- a/FixtureAll-mainnet.md +++ b/FixtureAll-mainnet.md @@ -24,9 +24,11 @@ FixtureAll-mainnet + Rewards - full_random_0 [Preset: mainnet] OK + Rewards - full_random_1 [Preset: mainnet] OK + Rewards - full_random_2 [Preset: mainnet] OK ++ Rewards - full_random_3 [Preset: mainnet] OK + Rewards - full_random_five_epoch_leak [Preset: mainnet] OK + Rewards - full_random_leak [Preset: mainnet] OK -+ Rewards - full_random_low_balances [Preset: mainnet] OK ++ Rewards - full_random_low_balances_0 [Preset: mainnet] OK ++ Rewards - full_random_low_balances_1 [Preset: mainnet] OK + Rewards - full_random_misc_balances [Preset: mainnet] OK + Rewards - full_random_ten_epoch_leak [Preset: mainnet] OK + Rewards - half_full [Preset: mainnet] OK @@ -84,12 +86,16 @@ FixtureAll-mainnet + [Invalid] att2_high_index OK + [Invalid] bad_source_root OK + [Invalid] before_inclusion_delay OK ++ [Invalid] correct_after_epoch_delay OK + [Invalid] empty_participants_seemingly_valid_sig OK + [Invalid] empty_participants_zeroes_sig OK + [Invalid] epochs_are_different OK + [Invalid] future_target_epoch OK + [Invalid] headers_are_same_sigs_are_different OK + [Invalid] headers_are_same_sigs_are_same OK ++ [Invalid] incorrect_head_after_epoch_delay OK ++ [Invalid] incorrect_head_and_target_after_epoch_delay OK ++ [Invalid] incorrect_target_after_epoch_delay OK + [Invalid] invalid_attestation_signature OK + [Invalid] invalid_current_source_root OK + [Invalid] invalid_different_proposer_indices OK @@ -138,11 +144,6 @@ FixtureAll-mainnet + [Valid] new_deposit_under_max OK + [Valid] success_top_up OK + [Valid] valid_sig_but_forked_state OK -+ [Valid] Official - Finality - finality_no_updates_at_genesis [Preset: mainnet] OK -+ [Valid] Official - Finality - finality_rule_1 [Preset: mainnet] OK -+ [Valid] Official - Finality - finality_rule_2 [Preset: mainnet] OK -+ [Valid] Official - Finality - finality_rule_3 [Preset: mainnet] OK -+ [Valid] Official - Finality - finality_rule_4 [Preset: mainnet] OK + [Valid] Official - Sanity - Blocks - attestation [Preset: mainnet] OK + [Valid] Official - Sanity - Blocks - attester_slashing [Preset: mainnet] OK + [Valid] Official - Sanity - Blocks - balance_driven_status_transitions [Preset: mainnet] OK @@ -166,27 +167,50 @@ FixtureAll-mainnet + [Valid] Official - Sanity - Blocks - skipped_slots [Preset: mainnet] OK + [Valid] Official - Sanity - Blocks - slash_and_exit_diff_index [Preset: mainnet] OK + [Valid] Official - Sanity - Blocks - voluntary_exit [Preset: mainnet] OK ++ [Valid] correct_epoch_delay OK ++ [Valid] correct_min_inclusion_delay OK ++ [Valid] correct_sqrt_epoch_delay OK + [Valid] default_exit_epoch_subsequent_exit OK ++ [Valid] incorrect_head_and_target_epoch_delay OK ++ [Valid] incorrect_head_and_target_min_inclusion_delay OK ++ [Valid] incorrect_head_and_target_sqrt_epoch_delay OK ++ [Valid] incorrect_head_epoch_delay OK ++ [Valid] incorrect_head_min_inclusion_delay OK ++ [Valid] incorrect_head_sqrt_epoch_delay OK ++ [Valid] incorrect_target_epoch_delay OK ++ [Valid] incorrect_target_min_inclusion_delay OK ++ [Valid] incorrect_target_sqrt_epoch_delay OK + [Valid] success OK + [Valid] success_already_exited_long_ago OK + [Valid] success_already_exited_recent OK + [Valid] success_block_header OK + [Valid] success_double OK + [Valid] success_exit_queue OK ++ [Valid] success_low_balances OK ++ [Valid] success_misc_balances OK + [Valid] success_multi_proposer_index_iterations OK + [Valid] success_previous_epoch OK + [Valid] success_slashed_and_proposer_index_the_same OK + [Valid] success_surround OK ++ [Valid] success_with_effective_balance_disparity OK ``` -OK: 175/175 Fail: 0/175 Skip: 0/175 -## Official - Epoch Processing - Final updates [Preset: mainnet] +OK: 191/191 Fail: 0/191 Skip: 0/191 +## Official - Epoch Processing - Effective balance updates [Preset: mainnet] ```diff -+ Final updates - effective_balance_hysteresis [Preset: mainnet] OK -+ Final updates - eth1_vote_no_reset [Preset: mainnet] OK -+ Final updates - eth1_vote_reset [Preset: mainnet] OK -+ Final updates - historical_root_accumulator [Preset: mainnet] OK ++ Effective balance updates - effective_balance_hysteresis [Preset: mainnet] OK ``` -OK: 4/4 Fail: 0/4 Skip: 0/4 +OK: 1/1 Fail: 0/1 Skip: 0/1 +## Official - Epoch Processing - Eth1 data reset [Preset: mainnet] +```diff ++ Eth1 data reset - eth1_vote_no_reset [Preset: mainnet] OK ++ Eth1 data reset - eth1_vote_reset [Preset: mainnet] OK +``` +OK: 2/2 Fail: 0/2 Skip: 0/2 +## Official - Epoch Processing - Historical roots update [Preset: mainnet] +```diff ++ Historical roots update - historical_root_accumulator [Preset: mainnet] OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 ## Official - Epoch Processing - Justification & Finalization [Preset: mainnet] ```diff + Justification & Finalization - 123_ok_support [Preset: mainnet] OK @@ -200,6 +224,16 @@ OK: 4/4 Fail: 0/4 Skip: 0/4 + Justification & Finalization - 23_poor_support [Preset: mainnet] OK ``` OK: 9/9 Fail: 0/9 Skip: 0/9 +## Official - Epoch Processing - Participation record updates [Preset: mainnet] +```diff ++ Participation record updates - updated_participation_record [Preset: mainnet] OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 +## Official - Epoch Processing - RANDAO mixes reset [Preset: mainnet] +```diff ++ RANDAO mixes reset - updated_randao_mixes [Preset: mainnet] OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 ## Official - Epoch Processing - Registry updates [Preset: mainnet] ```diff + Registry updates - activation_queue_activation_and_ejection [Preset: mainnet] OK @@ -214,11 +248,17 @@ OK: 9/9 Fail: 0/9 Skip: 0/9 OK: 8/8 Fail: 0/8 Skip: 0/8 ## Official - Epoch Processing - Slashings [Preset: mainnet] ```diff ++ Slashings - low_penalty [Preset: mainnet] OK + Slashings - max_penalties [Preset: mainnet] OK ++ Slashings - minimal_penalty [Preset: mainnet] OK + Slashings - scaled_penalties [Preset: mainnet] OK -+ Slashings - small_penalty [Preset: mainnet] OK ``` -OK: 3/3 Fail: 0/3 Skip: 0/3 +OK: 4/4 Fail: 0/4 Skip: 0/4 +## Official - Epoch Processing - Slashings reset [Preset: mainnet] +```diff ++ Slashings reset - flush_slashings [Preset: mainnet] OK +``` +OK: 1/1 Fail: 0/1 Skip: 0/1 ---TOTAL--- -OK: 199/199 Fail: 0/199 Skip: 0/199 +OK: 219/219 Fail: 0/219 Skip: 0/219 diff --git a/beacon_chain/spec/state_transition_epoch.nim b/beacon_chain/spec/state_transition_epoch.nim index b527c56c8..477917c42 100644 --- a/beacon_chain/spec/state_transition_epoch.nim +++ b/beacon_chain/spec/state_transition_epoch.nim @@ -466,7 +466,7 @@ func process_slashings*(state: var BeaconState, total_balance: Gwei) {.nbench.}= decrease_balance(state, index.ValidatorIndex, penalty) # https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md#eth1-data-votes-updates -func process_eth1_data_reset(state: var BeaconState) {.nbench.} = +func process_eth1_data_reset*(state: var BeaconState) {.nbench.} = let next_epoch = get_current_epoch(state) + 1 # Reset eth1 data votes @@ -474,7 +474,7 @@ func process_eth1_data_reset(state: var BeaconState) {.nbench.} = state.eth1_data_votes = default(type state.eth1_data_votes) # https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md#effective-balances-updates -func process_effective_balance_updates(state: var BeaconState) {.nbench.} = +func process_effective_balance_updates*(state: var BeaconState) {.nbench.} = # Update effective balances with hysteresis for index in 0..