use v1.3.0-alpha.1 consensus spec test vectors (#4338)

This commit is contained in:
tersec 2022-11-21 07:44:49 +00:00 committed by GitHub
parent eb661565ed
commit 1146470f7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 312 additions and 367 deletions

View File

@ -131,6 +131,11 @@ OK: 1/1 Fail: 0/1 Skip: 0/1
+ Tail block only in common OK
```
OK: 2/2 Fail: 0/2 Skip: 0/2
## Doppelganger protection test suite
```diff
+ doppelgangerCheck() test OK
```
OK: 1/1 Fail: 0/1 Skip: 0/1
## EF - SSZ generic types
```diff
Testing basic_vector inputs - invalid Skip
@ -608,4 +613,4 @@ OK: 2/2 Fail: 0/2 Skip: 0/2
OK: 9/9 Fail: 0/9 Skip: 0/9
---TOTAL---
OK: 337/342 Fail: 0/342 Skip: 5/342
OK: 338/343 Fail: 0/343 Skip: 5/343

View File

@ -284,15 +284,15 @@ ConsensusSpecPreset-mainnet
ForkChoice - mainnet/phase0/fork_choice/on_block/pyspec_tests/on_block_future_block Skip
+ ForkChoice - mainnet/phase0/fork_choice/on_block/pyspec_tests/proposer_boost OK
+ ForkChoice - mainnet/phase0/fork_choice/on_block/pyspec_tests/proposer_boost_root_same_slo OK
+ Light client - Single merkle proof - mainnet/altair/light_client/single_merkle_proof/pyspe OK
+ Light client - Single merkle proof - mainnet/altair/light_client/single_merkle_proof/pyspe OK
+ Light client - Single merkle proof - mainnet/altair/light_client/single_merkle_proof/pyspe OK
+ Light client - Single merkle proof - mainnet/bellatrix/light_client/single_merkle_proof/py OK
+ Light client - Single merkle proof - mainnet/bellatrix/light_client/single_merkle_proof/py OK
+ Light client - Single merkle proof - mainnet/bellatrix/light_client/single_merkle_proof/py OK
+ Light client - Single merkle proof - mainnet/capella/light_client/single_merkle_proof/pysp OK
+ Light client - Single merkle proof - mainnet/capella/light_client/single_merkle_proof/pysp OK
+ Light client - Single merkle proof - mainnet/capella/light_client/single_merkle_proof/pysp OK
+ Light client - Single merkle proof - mainnet/altair/light_client/single_merkle_proof/Beaco OK
+ Light client - Single merkle proof - mainnet/altair/light_client/single_merkle_proof/Beaco OK
+ Light client - Single merkle proof - mainnet/altair/light_client/single_merkle_proof/Beaco OK
+ Light client - Single merkle proof - mainnet/bellatrix/light_client/single_merkle_proof/Be OK
+ Light client - Single merkle proof - mainnet/bellatrix/light_client/single_merkle_proof/Be OK
+ Light client - Single merkle proof - mainnet/bellatrix/light_client/single_merkle_proof/Be OK
+ Light client - Single merkle proof - mainnet/capella/light_client/single_merkle_proof/Beac OK
+ Light client - Single merkle proof - mainnet/capella/light_client/single_merkle_proof/Beac OK
+ Light client - Single merkle proof - mainnet/capella/light_client/single_merkle_proof/Beac OK
+ Slots - double_empty_epoch OK
+ Slots - empty_epoch OK
+ Slots - over_epoch_boundary OK
@ -300,56 +300,63 @@ ConsensusSpecPreset-mainnet
+ Slots - slots_2 OK
+ Sync - mainnet/bellatrix/sync/optimistic/pyspec_tests/from_syncing_to_invalid OK
+ Sync - mainnet/capella/sync/optimistic/pyspec_tests/from_syncing_to_invalid OK
+ [Invalid] EF - Altair - Sanity - Blocks - double_same_proposer_slashings_same_block [Prese OK
+ [Invalid] EF - Altair - Sanity - Blocks - double_similar_proposer_slashings_same_block [Pr OK
+ [Invalid] EF - Altair - Sanity - Blocks - double_validator_exit_same_block [Preset: mainne OK
+ [Invalid] EF - Altair - Sanity - Blocks - duplicate_attester_slashing [Preset: mainnet] OK
+ [Invalid] EF - Altair - Sanity - Blocks - expected_deposit_in_block [Preset: mainnet] OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_block_sig [Preset: mainnet] OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_duplicate_attester_slashing_same_block [ OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_duplicate_deposit_same_block [Preset: ma OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_duplicate_proposer_slashings_same_block OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_duplicate_validator_exit_same_block [Pre OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_proposer_index_sig_from_expected_propose OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_proposer_index_sig_from_proposer_index [ OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_similar_proposer_slashings_same_block [P OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_state_root [Preset: mainnet] OK
+ [Invalid] EF - Altair - Sanity - Blocks - parent_from_same_slot [Preset: mainnet] OK
+ [Invalid] EF - Altair - Sanity - Blocks - prev_slot_block_transition [Preset: mainnet] OK
+ [Invalid] EF - Altair - Sanity - Blocks - same_slot_block_transition [Preset: mainnet] OK
+ [Invalid] EF - Altair - Sanity - Blocks - slash_and_exit_same_index [Preset: mainnet] OK
+ [Invalid] EF - Altair - Sanity - Blocks - zero_block_sig [Preset: mainnet] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - double_same_proposer_slashings_same_block [Pr OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - double_similar_proposer_slashings_same_block OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - double_validator_exit_same_block [Preset: mai OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - duplicate_attester_slashing [Preset: mainnet] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - expected_deposit_in_block [Preset: mainnet] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_block_sig [Preset: mainnet] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_duplicate_attester_slashing_same_bloc OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_duplicate_deposit_same_block [Preset: OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_duplicate_proposer_slashings_same_blo OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_duplicate_validator_exit_same_block [ OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_proposer_index_sig_from_expected_prop OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_proposer_index_sig_from_proposer_inde OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_similar_proposer_slashings_same_block OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_state_root [Preset: mainnet] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - parent_from_same_slot [Preset: mainnet] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - prev_slot_block_transition [Preset: mainnet] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - same_slot_block_transition [Preset: mainnet] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - slash_and_exit_same_index [Preset: mainnet] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - zero_block_sig [Preset: mainnet] OK
+ [Invalid] EF - Capella - Sanity - Blocks - double_same_proposer_slashings_same_block [Pres OK
+ [Invalid] EF - Capella - Sanity - Blocks - double_similar_proposer_slashings_same_block [P OK
+ [Invalid] EF - Capella - Sanity - Blocks - double_validator_exit_same_block [Preset: mainn OK
+ [Invalid] EF - Capella - Sanity - Blocks - duplicate_attester_slashing [Preset: mainnet] OK
+ [Invalid] EF - Capella - Sanity - Blocks - expected_deposit_in_block [Preset: mainnet] OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_block_sig [Preset: mainnet] OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_duplicate_attester_slashing_same_block OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_duplicate_bls_changes_same_block [Prese OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_duplicate_deposit_same_block [Preset: m OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_duplicate_proposer_slashings_same_block OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_duplicate_validator_exit_same_block [Pr OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_proposer_index_sig_from_expected_propos OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_proposer_index_sig_from_proposer_index OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_similar_proposer_slashings_same_block [ OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_state_root [Preset: mainnet] OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_two_bls_changes_of_different_addresses_ OK
+ [Invalid] EF - Capella - Sanity - Blocks - parent_from_same_slot [Preset: mainnet] OK
+ [Invalid] EF - Capella - Sanity - Blocks - prev_slot_block_transition [Preset: mainnet] OK
+ [Invalid] EF - Capella - Sanity - Blocks - same_slot_block_transition [Preset: mainnet] OK
+ [Invalid] EF - Capella - Sanity - Blocks - slash_and_exit_same_index [Preset: mainnet] OK
+ [Invalid] EF - Capella - Sanity - Blocks - withdrawal_fail_second_block_payload_isnt_compa OK
+ [Invalid] EF - Capella - Sanity - Blocks - zero_block_sig [Preset: mainnet] OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - double_same_proposer_slashings_same_block [Pres OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - double_similar_proposer_slashings_same_block [P OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - double_validator_exit_same_block [Preset: mainn OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - duplicate_attester_slashing [Preset: mainnet] OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - expected_deposit_in_block [Preset: mainnet] OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_block_sig [Preset: mainnet] OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_duplicate_attester_slashing_same_block OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_duplicate_deposit_same_block [Preset: m OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_duplicate_proposer_slashings_same_block OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_duplicate_validator_exit_same_block [Pr OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_proposer_index_sig_from_expected_propos OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_proposer_index_sig_from_proposer_index OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_similar_proposer_slashings_same_block [ OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_state_root [Preset: mainnet] OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - parent_from_same_slot [Preset: mainnet] OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - prev_slot_block_transition [Preset: mainnet] OK
@ -383,6 +390,7 @@ ConsensusSpecPreset-mainnet
+ [Valid] EF - Altair - Sanity - Blocks - balance_driven_status_transitions [Preset: mainn OK
+ [Valid] EF - Altair - Sanity - Blocks - deposit_in_block [Preset: mainnet] OK
+ [Valid] EF - Altair - Sanity - Blocks - deposit_top_up [Preset: mainnet] OK
+ [Valid] EF - Altair - Sanity - Blocks - duplicate_attestation_same_block [Preset: mainne OK
+ [Valid] EF - Altair - Sanity - Blocks - empty_block_transition [Preset: mainnet] OK
+ [Valid] EF - Altair - Sanity - Blocks - empty_epoch_transition [Preset: mainnet] OK
+ [Valid] EF - Altair - Sanity - Blocks - empty_sync_committee_committee [Preset: mainnet] OK
@ -435,6 +443,7 @@ ConsensusSpecPreset-mainnet
+ [Valid] EF - Bellatrix - Sanity - Blocks - balance_driven_status_transitions [Preset: ma OK
+ [Valid] EF - Bellatrix - Sanity - Blocks - deposit_in_block [Preset: mainnet] OK
+ [Valid] EF - Bellatrix - Sanity - Blocks - deposit_top_up [Preset: mainnet] OK
+ [Valid] EF - Bellatrix - Sanity - Blocks - duplicate_attestation_same_block [Preset: mai OK
+ [Valid] EF - Bellatrix - Sanity - Blocks - empty_block_transition [Preset: mainnet] OK
+ [Valid] EF - Bellatrix - Sanity - Blocks - empty_block_transition_no_tx [Preset: mainnet OK
+ [Valid] EF - Bellatrix - Sanity - Blocks - empty_block_transition_randomized_payload [Pr OK
@ -490,13 +499,13 @@ ConsensusSpecPreset-mainnet
+ [Valid] EF - Capella - Sanity - Blocks - balance_driven_status_transitions [Preset: main OK
+ [Valid] EF - Capella - Sanity - Blocks - deposit_in_block [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - deposit_top_up [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - duplicate_attestation_same_block [Preset: mainn OK
+ [Valid] EF - Capella - Sanity - Blocks - empty_block_transition [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - empty_block_transition_no_tx [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - empty_block_transition_randomized_payload [Pres OK
+ [Valid] EF - Capella - Sanity - Blocks - empty_epoch_transition [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - empty_sync_committee_committee [Preset: mainnet OK
+ [Valid] EF - Capella - Sanity - Blocks - empty_sync_committee_committee_genesis [Preset: OK
+ [Valid] EF - Capella - Sanity - Blocks - exit_and_bls_change [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - full_random_operations_0 [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - full_random_operations_1 [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - full_random_operations_2 [Preset: mainnet] OK
@ -522,8 +531,10 @@ ConsensusSpecPreset-mainnet
+ [Valid] EF - Capella - Sanity - Blocks - proposer_slashing [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - skipped_slots [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - slash_and_exit_diff_index [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - successful_bls_change [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - success_bls_change [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - success_exit_and_bls_change [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - voluntary_exit [Preset: mainnet] OK
+ [Valid] EF - Capella - Sanity - Blocks - withdrawal_success_two_blocks [Preset: mainnet] OK
+ [Valid] EF - Phase 0 - Finality - finality_no_updates_at_genesis [Preset: mainnet] OK
+ [Valid] EF - Phase 0 - Finality - finality_rule_1 [Preset: mainnet] OK
+ [Valid] EF - Phase 0 - Finality - finality_rule_2 [Preset: mainnet] OK
@ -550,6 +561,7 @@ ConsensusSpecPreset-mainnet
+ [Valid] EF - Phase 0 - Sanity - Blocks - balance_driven_status_transitions [Preset: main OK
+ [Valid] EF - Phase 0 - Sanity - Blocks - deposit_in_block [Preset: mainnet] OK
+ [Valid] EF - Phase 0 - Sanity - Blocks - deposit_top_up [Preset: mainnet] OK
+ [Valid] EF - Phase 0 - Sanity - Blocks - duplicate_attestation_same_block [Preset: mainn OK
+ [Valid] EF - Phase 0 - Sanity - Blocks - empty_block_transition [Preset: mainnet] OK
+ [Valid] EF - Phase 0 - Sanity - Blocks - empty_epoch_transition [Preset: mainnet] OK
+ [Valid] EF - Phase 0 - Sanity - Blocks - full_random_operations_0 [Preset: mainnet] OK
@ -582,6 +594,12 @@ ConsensusSpecPreset-mainnet
+ bellatrix_fork_random_3 OK
+ bellatrix_fork_random_low_balances OK
+ bellatrix_fork_random_misc_balances OK
+ capella_fork_random_0 OK
+ capella_fork_random_1 OK
+ capella_fork_random_2 OK
+ capella_fork_random_3 OK
+ capella_fork_random_low_balances OK
+ capella_fork_random_misc_balances OK
+ fork_base_state OK
+ fork_many_next_epoch OK
+ fork_next_epoch OK
@ -589,7 +607,7 @@ ConsensusSpecPreset-mainnet
+ fork_random_low_balances OK
+ fork_random_misc_balances OK
```
OK: 578/586 Fail: 0/586 Skip: 8/586
OK: 596/604 Fail: 0/604 Skip: 8/604
## Attestation
```diff
+ [Invalid] EF - Altair - Operations - Attestation - after_epoch_slots OK
@ -1341,22 +1359,6 @@ OK: 1/1 Fail: 0/1 Skip: 0/1
+ Eth1 data reset - eth1_vote_reset [Preset: mainnet] OK
```
OK: 2/2 Fail: 0/2 Skip: 0/2
## EF - Capella - Epoch Processing - Full withdrawals [Preset: mainnet]
```diff
+ Full withdrawals - all_withdrawal [Preset: mainnet] OK
+ Full withdrawals - multi_withdrawal [Preset: mainnet] OK
+ Full withdrawals - no_withdrawable_validators [Preset: mainnet] OK
+ Full withdrawals - no_withdrawals_but_some_next_epoch [Preset: mainnet] OK
+ Full withdrawals - random_withdrawals_0 [Preset: mainnet] OK
+ Full withdrawals - random_withdrawals_1 [Preset: mainnet] OK
+ Full withdrawals - random_withdrawals_2 [Preset: mainnet] OK
+ Full withdrawals - random_withdrawals_3 [Preset: mainnet] OK
+ Full withdrawals - single_withdrawal [Preset: mainnet] OK
+ Full withdrawals - withdrawable_epoch_but_0_balance [Preset: mainnet] OK
+ Full withdrawals - withdrawable_epoch_but_0_effective_balance_0_balance [Preset: mainnet] OK
+ Full withdrawals - withdrawable_epoch_but_0_effective_balance_nonzero_balance [Preset: mai OK
```
OK: 12/12 Fail: 0/12 Skip: 0/12
## EF - Capella - Epoch Processing - Historical roots update [Preset: mainnet]
```diff
+ Historical roots update - historical_root_accumulator [Preset: mainnet] OK
@ -1399,28 +1401,6 @@ OK: 19/19 Fail: 0/19 Skip: 0/19
+ Justification & Finalization - balance_threshold_with_exited_validators [Preset: mainnet] OK
```
OK: 10/10 Fail: 0/10 Skip: 0/10
## EF - Capella - Epoch Processing - Partial withdrawals [Preset: mainnet]
```diff
+ Partial withdrawals - random_0 [Preset: mainnet] OK
+ Partial withdrawals - random_1 [Preset: mainnet] OK
+ Partial withdrawals - random_2 [Preset: mainnet] OK
+ Partial withdrawals - random_3 [Preset: mainnet] OK
+ Partial withdrawals - random_4 [Preset: mainnet] OK
+ Partial withdrawals - random_5 [Preset: mainnet] OK
+ Partial withdrawals - success_excess_balance_but_no_max_effective_balance [Preset: mainnet OK
+ Partial withdrawals - success_max_partial_withdrawable [Preset: mainnet] OK
+ Partial withdrawals - success_no_excess_balance [Preset: mainnet] OK
+ Partial withdrawals - success_no_max_effective_balance [Preset: mainnet] OK
+ Partial withdrawals - success_no_withdrawable [Preset: mainnet] OK
+ Partial withdrawals - success_one_partial_withdrawable [Preset: mainnet] OK
+ Partial withdrawals - success_one_partial_withdrawable_active_and_slashed [Preset: mainnet OK
+ Partial withdrawals - success_one_partial_withdrawable_exited [Preset: mainnet] OK
+ Partial withdrawals - success_one_partial_withdrawable_exited_and_slashed [Preset: mainnet OK
+ Partial withdrawals - success_one_partial_withdrawable_in_exit_queue [Preset: mainnet] OK
+ Partial withdrawals - success_one_partial_withdrawable_not_yet_active [Preset: mainnet] OK
+ Partial withdrawals - success_two_partial_withdrawable [Preset: mainnet] OK
```
OK: 18/18 Fail: 0/18 Skip: 0/18
## EF - Capella - Epoch Processing - Participation flag updates [Preset: mainnet]
```diff
+ Participation flag updates - all_zeroed [Preset: mainnet] OK
@ -1903,22 +1883,58 @@ OK: 66/66 Fail: 0/66 Skip: 0/66
OK: 48/48 Fail: 0/48 Skip: 0/48
## Withdrawals
```diff
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_a_lot_in_queue_too_few_in_withdra OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_empty_queue_non_empty_withdrawals OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_dequeue_address OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_dequeue_amount OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_dequeue_index OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_many_dequeued_incorrectly OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_max_per_slot_in_queue_one_less_in OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_in_queue_none_in_withdrawals OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_in_queue_two_in_withdrawals OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_of_many_dequeued_incorrectly OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_a_lot_in_queue OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_empty_queue OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_max_per_slot_in_queue OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_in_queue OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_a_lot_fully_withdrawable_too_few_ OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_a_lot_mixed_withdrawable_in_queue OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_a_lot_partially_withdrawable_too_ OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_address_full OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_address_partial OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_amount_full OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_amount_partial OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_withdrawal_index OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_many_incorrectly_full OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_many_incorrectly_partial OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_max_per_slot_full_withdrawals_and OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_max_per_slot_partial_withdrawals_ OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_non_withdrawable_non_empty_withdr OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_expected_full_withdrawal_and_ OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_expected_full_withdrawal_and_ OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_expected_partial_withdrawal_a OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_of_many_incorrectly_full OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_of_many_incorrectly_partial OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_two_expected_partial_withdrawal_a OK
+ [Valid] EF - Capella - Operations - Withdrawals - all_withdrawal OK
+ [Valid] EF - Capella - Operations - Withdrawals - no_withdrawals_but_some_next_epoch OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_0 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_full_withdrawals_0 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_full_withdrawals_1 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_full_withdrawals_2 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_full_withdrawals_3 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_partial_withdrawals_1 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_partial_withdrawals_2 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_partial_withdrawals_3 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_partial_withdrawals_4 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_partial_withdrawals_5 OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_all_fully_withdrawable OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_all_partially_withdrawable OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_excess_balance_but_no_max_effe OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_max_partial_withdrawable OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_max_per_slot OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_no_excess_balance OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_no_max_effective_balance OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_full_withdrawal OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_partial_withdrawable_activ OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_partial_withdrawable_exite OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_partial_withdrawable_exite OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_partial_withdrawable_in_ex OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_partial_withdrawable_not_y OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_partial_withdrawal OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_two_partial_withdrawable OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_zero_expected_withdrawals OK
+ [Valid] EF - Capella - Operations - Withdrawals - withdrawable_epoch_but_0_balance OK
+ [Valid] EF - Capella - Operations - Withdrawals - withdrawable_epoch_but_0_effective_bal OK
+ [Valid] EF - Capella - Operations - Withdrawals - withdrawable_epoch_but_0_effective_bal OK
```
OK: 14/14 Fail: 0/14 Skip: 0/14
OK: 50/50 Fail: 0/50 Skip: 0/50
---TOTAL---
OK: 1667/1675 Fail: 0/1675 Skip: 8/1675
OK: 1691/1699 Fail: 0/1699 Skip: 8/1699

View File

@ -328,15 +328,15 @@ ConsensusSpecPreset-minimal
+ ForkChoice - minimal/phase0/fork_choice/on_block/pyspec_tests/on_block_update_justified_ch OK
+ ForkChoice - minimal/phase0/fork_choice/on_block/pyspec_tests/proposer_boost OK
+ ForkChoice - minimal/phase0/fork_choice/on_block/pyspec_tests/proposer_boost_root_same_slo OK
+ Light client - Single merkle proof - minimal/altair/light_client/single_merkle_proof/pyspe OK
+ Light client - Single merkle proof - minimal/altair/light_client/single_merkle_proof/pyspe OK
+ Light client - Single merkle proof - minimal/altair/light_client/single_merkle_proof/pyspe OK
+ Light client - Single merkle proof - minimal/bellatrix/light_client/single_merkle_proof/py OK
+ Light client - Single merkle proof - minimal/bellatrix/light_client/single_merkle_proof/py OK
+ Light client - Single merkle proof - minimal/bellatrix/light_client/single_merkle_proof/py OK
+ Light client - Single merkle proof - minimal/capella/light_client/single_merkle_proof/pysp OK
+ Light client - Single merkle proof - minimal/capella/light_client/single_merkle_proof/pysp OK
+ Light client - Single merkle proof - minimal/capella/light_client/single_merkle_proof/pysp OK
+ Light client - Single merkle proof - minimal/altair/light_client/single_merkle_proof/Beaco OK
+ Light client - Single merkle proof - minimal/altair/light_client/single_merkle_proof/Beaco OK
+ Light client - Single merkle proof - minimal/altair/light_client/single_merkle_proof/Beaco OK
+ Light client - Single merkle proof - minimal/bellatrix/light_client/single_merkle_proof/Be OK
+ Light client - Single merkle proof - minimal/bellatrix/light_client/single_merkle_proof/Be OK
+ Light client - Single merkle proof - minimal/bellatrix/light_client/single_merkle_proof/Be OK
+ Light client - Single merkle proof - minimal/capella/light_client/single_merkle_proof/Beac OK
+ Light client - Single merkle proof - minimal/capella/light_client/single_merkle_proof/Beac OK
+ Light client - Single merkle proof - minimal/capella/light_client/single_merkle_proof/Beac OK
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/advance_finality_witho OK
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/light_client_sync OK
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/supply_sync_committee_ OK
@ -349,6 +349,7 @@ ConsensusSpecPreset-minimal
+ Light client - Update ranking - minimal/altair/light_client/update_ranking/pyspec_tests/up OK
+ Light client - Update ranking - minimal/bellatrix/light_client/update_ranking/pyspec_tests OK
+ Light client - Update ranking - minimal/capella/light_client/update_ranking/pyspec_tests/u OK
+ Light client - Update ranking - minimal/eip4844/light_client/update_ranking/pyspec_tests/u OK
+ Slots - double_empty_epoch OK
+ Slots - empty_epoch OK
+ Slots - over_epoch_boundary OK
@ -356,56 +357,63 @@ ConsensusSpecPreset-minimal
+ Slots - slots_2 OK
+ Sync - minimal/bellatrix/sync/optimistic/pyspec_tests/from_syncing_to_invalid OK
+ Sync - minimal/capella/sync/optimistic/pyspec_tests/from_syncing_to_invalid OK
+ [Invalid] EF - Altair - Sanity - Blocks - double_same_proposer_slashings_same_block [Prese OK
+ [Invalid] EF - Altair - Sanity - Blocks - double_similar_proposer_slashings_same_block [Pr OK
+ [Invalid] EF - Altair - Sanity - Blocks - double_validator_exit_same_block [Preset: minima OK
+ [Invalid] EF - Altair - Sanity - Blocks - duplicate_attester_slashing [Preset: minimal] OK
+ [Invalid] EF - Altair - Sanity - Blocks - expected_deposit_in_block [Preset: minimal] OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_block_sig [Preset: minimal] OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_duplicate_attester_slashing_same_block [ OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_duplicate_deposit_same_block [Preset: mi OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_duplicate_proposer_slashings_same_block OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_duplicate_validator_exit_same_block [Pre OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_proposer_index_sig_from_expected_propose OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_proposer_index_sig_from_proposer_index [ OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_similar_proposer_slashings_same_block [P OK
+ [Invalid] EF - Altair - Sanity - Blocks - invalid_state_root [Preset: minimal] OK
+ [Invalid] EF - Altair - Sanity - Blocks - parent_from_same_slot [Preset: minimal] OK
+ [Invalid] EF - Altair - Sanity - Blocks - prev_slot_block_transition [Preset: minimal] OK
+ [Invalid] EF - Altair - Sanity - Blocks - same_slot_block_transition [Preset: minimal] OK
+ [Invalid] EF - Altair - Sanity - Blocks - slash_and_exit_same_index [Preset: minimal] OK
+ [Invalid] EF - Altair - Sanity - Blocks - zero_block_sig [Preset: minimal] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - double_same_proposer_slashings_same_block [Pr OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - double_similar_proposer_slashings_same_block OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - double_validator_exit_same_block [Preset: min OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - duplicate_attester_slashing [Preset: minimal] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - expected_deposit_in_block [Preset: minimal] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_block_sig [Preset: minimal] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_duplicate_attester_slashing_same_bloc OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_duplicate_deposit_same_block [Preset: OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_duplicate_proposer_slashings_same_blo OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_duplicate_validator_exit_same_block [ OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_proposer_index_sig_from_expected_prop OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_proposer_index_sig_from_proposer_inde OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_similar_proposer_slashings_same_block OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - invalid_state_root [Preset: minimal] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - parent_from_same_slot [Preset: minimal] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - prev_slot_block_transition [Preset: minimal] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - same_slot_block_transition [Preset: minimal] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - slash_and_exit_same_index [Preset: minimal] OK
+ [Invalid] EF - Bellatrix - Sanity - Blocks - zero_block_sig [Preset: minimal] OK
+ [Invalid] EF - Capella - Sanity - Blocks - double_same_proposer_slashings_same_block [Pres OK
+ [Invalid] EF - Capella - Sanity - Blocks - double_similar_proposer_slashings_same_block [P OK
+ [Invalid] EF - Capella - Sanity - Blocks - double_validator_exit_same_block [Preset: minim OK
+ [Invalid] EF - Capella - Sanity - Blocks - duplicate_attester_slashing [Preset: minimal] OK
+ [Invalid] EF - Capella - Sanity - Blocks - expected_deposit_in_block [Preset: minimal] OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_block_sig [Preset: minimal] OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_duplicate_attester_slashing_same_block OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_duplicate_bls_changes_same_block [Prese OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_duplicate_deposit_same_block [Preset: m OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_duplicate_proposer_slashings_same_block OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_duplicate_validator_exit_same_block [Pr OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_proposer_index_sig_from_expected_propos OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_proposer_index_sig_from_proposer_index OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_similar_proposer_slashings_same_block [ OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_state_root [Preset: minimal] OK
+ [Invalid] EF - Capella - Sanity - Blocks - invalid_two_bls_changes_of_different_addresses_ OK
+ [Invalid] EF - Capella - Sanity - Blocks - parent_from_same_slot [Preset: minimal] OK
+ [Invalid] EF - Capella - Sanity - Blocks - prev_slot_block_transition [Preset: minimal] OK
+ [Invalid] EF - Capella - Sanity - Blocks - same_slot_block_transition [Preset: minimal] OK
+ [Invalid] EF - Capella - Sanity - Blocks - slash_and_exit_same_index [Preset: minimal] OK
+ [Invalid] EF - Capella - Sanity - Blocks - withdrawal_fail_second_block_payload_isnt_compa OK
+ [Invalid] EF - Capella - Sanity - Blocks - zero_block_sig [Preset: minimal] OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - double_same_proposer_slashings_same_block [Pres OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - double_similar_proposer_slashings_same_block [P OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - double_validator_exit_same_block [Preset: minim OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - duplicate_attester_slashing [Preset: minimal] OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - expected_deposit_in_block [Preset: minimal] OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_block_sig [Preset: minimal] OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_duplicate_attester_slashing_same_block OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_duplicate_deposit_same_block [Preset: m OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_duplicate_proposer_slashings_same_block OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_duplicate_validator_exit_same_block [Pr OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_proposer_index_sig_from_expected_propos OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_proposer_index_sig_from_proposer_index OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_similar_proposer_slashings_same_block [ OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - invalid_state_root [Preset: minimal] OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - parent_from_same_slot [Preset: minimal] OK
+ [Invalid] EF - Phase 0 - Sanity - Blocks - prev_slot_block_transition [Preset: minimal] OK
@ -439,6 +447,7 @@ ConsensusSpecPreset-minimal
+ [Valid] EF - Altair - Sanity - Blocks - balance_driven_status_transitions [Preset: minim OK
+ [Valid] EF - Altair - Sanity - Blocks - deposit_in_block [Preset: minimal] OK
+ [Valid] EF - Altair - Sanity - Blocks - deposit_top_up [Preset: minimal] OK
+ [Valid] EF - Altair - Sanity - Blocks - duplicate_attestation_same_block [Preset: minima OK
+ [Valid] EF - Altair - Sanity - Blocks - empty_block_transition [Preset: minimal] OK
+ [Valid] EF - Altair - Sanity - Blocks - empty_block_transition_large_validator_set [Pres OK
+ [Valid] EF - Altair - Sanity - Blocks - empty_epoch_transition [Preset: minimal] OK
@ -496,6 +505,7 @@ ConsensusSpecPreset-minimal
+ [Valid] EF - Bellatrix - Sanity - Blocks - balance_driven_status_transitions [Preset: mi OK
+ [Valid] EF - Bellatrix - Sanity - Blocks - deposit_in_block [Preset: minimal] OK
+ [Valid] EF - Bellatrix - Sanity - Blocks - deposit_top_up [Preset: minimal] OK
+ [Valid] EF - Bellatrix - Sanity - Blocks - duplicate_attestation_same_block [Preset: min OK
+ [Valid] EF - Bellatrix - Sanity - Blocks - empty_block_transition [Preset: minimal] OK
+ [Valid] EF - Bellatrix - Sanity - Blocks - empty_block_transition_large_validator_set [P OK
+ [Valid] EF - Bellatrix - Sanity - Blocks - empty_block_transition_no_tx [Preset: minimal OK
@ -556,6 +566,7 @@ ConsensusSpecPreset-minimal
+ [Valid] EF - Capella - Sanity - Blocks - balance_driven_status_transitions [Preset: mini OK
+ [Valid] EF - Capella - Sanity - Blocks - deposit_in_block [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - deposit_top_up [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - duplicate_attestation_same_block [Preset: minim OK
+ [Valid] EF - Capella - Sanity - Blocks - empty_block_transition [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - empty_block_transition_large_validator_set [Pre OK
+ [Valid] EF - Capella - Sanity - Blocks - empty_block_transition_no_tx [Preset: minimal] OK
@ -567,7 +578,6 @@ ConsensusSpecPreset-minimal
+ [Valid] EF - Capella - Sanity - Blocks - empty_sync_committee_committee_genesis [Preset: OK
+ [Valid] EF - Capella - Sanity - Blocks - eth1_data_votes_consensus [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - eth1_data_votes_no_consensus [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - exit_and_bls_change [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - full_random_operations_0 [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - full_random_operations_1 [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - full_random_operations_2 [Preset: minimal] OK
@ -593,8 +603,10 @@ ConsensusSpecPreset-minimal
+ [Valid] EF - Capella - Sanity - Blocks - proposer_slashing [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - skipped_slots [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - slash_and_exit_diff_index [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - successful_bls_change [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - success_bls_change [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - success_exit_and_bls_change [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - voluntary_exit [Preset: minimal] OK
+ [Valid] EF - Capella - Sanity - Blocks - withdrawal_success_two_blocks [Preset: minimal] OK
+ [Valid] EF - Phase 0 - Finality - finality_no_updates_at_genesis [Preset: minimal] OK
+ [Valid] EF - Phase 0 - Finality - finality_rule_1 [Preset: minimal] OK
+ [Valid] EF - Phase 0 - Finality - finality_rule_2 [Preset: minimal] OK
@ -621,6 +633,7 @@ ConsensusSpecPreset-minimal
+ [Valid] EF - Phase 0 - Sanity - Blocks - balance_driven_status_transitions [Preset: mini OK
+ [Valid] EF - Phase 0 - Sanity - Blocks - deposit_in_block [Preset: minimal] OK
+ [Valid] EF - Phase 0 - Sanity - Blocks - deposit_top_up [Preset: minimal] OK
+ [Valid] EF - Phase 0 - Sanity - Blocks - duplicate_attestation_same_block [Preset: minim OK
+ [Valid] EF - Phase 0 - Sanity - Blocks - empty_block_transition [Preset: minimal] OK
+ [Valid] EF - Phase 0 - Sanity - Blocks - empty_block_transition_large_validator_set [Pre OK
+ [Valid] EF - Phase 0 - Sanity - Blocks - empty_epoch_transition [Preset: minimal] OK
@ -660,6 +673,13 @@ ConsensusSpecPreset-minimal
+ bellatrix_fork_random_large_validator_set OK
+ bellatrix_fork_random_low_balances OK
+ bellatrix_fork_random_misc_balances OK
+ capella_fork_random_0 OK
+ capella_fork_random_1 OK
+ capella_fork_random_2 OK
+ capella_fork_random_3 OK
+ capella_fork_random_large_validator_set OK
+ capella_fork_random_low_balances OK
+ capella_fork_random_misc_balances OK
+ fork_base_state OK
+ fork_many_next_epoch OK
+ fork_next_epoch OK
@ -668,7 +688,7 @@ ConsensusSpecPreset-minimal
+ fork_random_low_balances OK
+ fork_random_misc_balances OK
```
OK: 657/665 Fail: 0/665 Skip: 8/665
OK: 677/685 Fail: 0/685 Skip: 8/685
## Attestation
```diff
+ [Invalid] EF - Altair - Operations - Attestation - after_epoch_slots OK
@ -1450,22 +1470,6 @@ OK: 1/1 Fail: 0/1 Skip: 0/1
+ Eth1 data reset - eth1_vote_reset [Preset: minimal] OK
```
OK: 2/2 Fail: 0/2 Skip: 0/2
## EF - Capella - Epoch Processing - Full withdrawals [Preset: minimal]
```diff
+ Full withdrawals - all_withdrawal [Preset: minimal] OK
+ Full withdrawals - multi_withdrawal [Preset: minimal] OK
+ Full withdrawals - no_withdrawable_validators [Preset: minimal] OK
+ Full withdrawals - no_withdrawals_but_some_next_epoch [Preset: minimal] OK
+ Full withdrawals - random_withdrawals_0 [Preset: minimal] OK
+ Full withdrawals - random_withdrawals_1 [Preset: minimal] OK
+ Full withdrawals - random_withdrawals_2 [Preset: minimal] OK
+ Full withdrawals - random_withdrawals_3 [Preset: minimal] OK
+ Full withdrawals - single_withdrawal [Preset: minimal] OK
+ Full withdrawals - withdrawable_epoch_but_0_balance [Preset: minimal] OK
+ Full withdrawals - withdrawable_epoch_but_0_effective_balance_0_balance [Preset: minimal] OK
+ Full withdrawals - withdrawable_epoch_but_0_effective_balance_nonzero_balance [Preset: min OK
```
OK: 12/12 Fail: 0/12 Skip: 0/12
## EF - Capella - Epoch Processing - Historical roots update [Preset: minimal]
```diff
+ Historical roots update - historical_root_accumulator [Preset: minimal] OK
@ -1508,29 +1512,6 @@ OK: 19/19 Fail: 0/19 Skip: 0/19
+ Justification & Finalization - balance_threshold_with_exited_validators [Preset: minimal] OK
```
OK: 10/10 Fail: 0/10 Skip: 0/10
## EF - Capella - Epoch Processing - Partial withdrawals [Preset: minimal]
```diff
+ Partial withdrawals - random_0 [Preset: minimal] OK
+ Partial withdrawals - random_1 [Preset: minimal] OK
+ Partial withdrawals - random_2 [Preset: minimal] OK
+ Partial withdrawals - random_3 [Preset: minimal] OK
+ Partial withdrawals - random_4 [Preset: minimal] OK
+ Partial withdrawals - random_5 [Preset: minimal] OK
+ Partial withdrawals - success_excess_balance_but_no_max_effective_balance [Preset: minimal OK
+ Partial withdrawals - success_max_partial_withdrawable [Preset: minimal] OK
+ Partial withdrawals - success_max_plus_one_withdrawable [Preset: minimal] OK
+ Partial withdrawals - success_no_excess_balance [Preset: minimal] OK
+ Partial withdrawals - success_no_max_effective_balance [Preset: minimal] OK
+ Partial withdrawals - success_no_withdrawable [Preset: minimal] OK
+ Partial withdrawals - success_one_partial_withdrawable [Preset: minimal] OK
+ Partial withdrawals - success_one_partial_withdrawable_active_and_slashed [Preset: minimal OK
+ Partial withdrawals - success_one_partial_withdrawable_exited [Preset: minimal] OK
+ Partial withdrawals - success_one_partial_withdrawable_exited_and_slashed [Preset: minimal OK
+ Partial withdrawals - success_one_partial_withdrawable_in_exit_queue [Preset: minimal] OK
+ Partial withdrawals - success_one_partial_withdrawable_not_yet_active [Preset: minimal] OK
+ Partial withdrawals - success_two_partial_withdrawable [Preset: minimal] OK
```
OK: 19/19 Fail: 0/19 Skip: 0/19
## EF - Capella - Epoch Processing - Participation flag updates [Preset: minimal]
```diff
+ Participation flag updates - all_zeroed [Preset: minimal] OK
@ -2042,22 +2023,59 @@ OK: 72/72 Fail: 0/72 Skip: 0/72
OK: 52/52 Fail: 0/52 Skip: 0/52
## Withdrawals
```diff
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_a_lot_in_queue_too_few_in_withdra OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_empty_queue_non_empty_withdrawals OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_dequeue_address OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_dequeue_amount OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_dequeue_index OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_many_dequeued_incorrectly OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_max_per_slot_in_queue_one_less_in OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_in_queue_none_in_withdrawals OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_in_queue_two_in_withdrawals OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_of_many_dequeued_incorrectly OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_a_lot_in_queue OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_empty_queue OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_max_per_slot_in_queue OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_in_queue OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_a_lot_fully_withdrawable_too_few_ OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_a_lot_mixed_withdrawable_in_queue OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_a_lot_partially_withdrawable_too_ OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_address_full OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_address_partial OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_amount_full OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_amount_partial OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_incorrect_withdrawal_index OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_many_incorrectly_full OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_many_incorrectly_partial OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_max_per_slot_full_withdrawals_and OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_max_per_slot_partial_withdrawals_ OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_non_withdrawable_non_empty_withdr OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_expected_full_withdrawal_and_ OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_expected_full_withdrawal_and_ OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_expected_partial_withdrawal_a OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_of_many_incorrectly_full OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_one_of_many_incorrectly_partial OK
+ [Invalid] EF - Capella - Operations - Withdrawals - fail_two_expected_partial_withdrawal_a OK
+ [Valid] EF - Capella - Operations - Withdrawals - all_withdrawal OK
+ [Valid] EF - Capella - Operations - Withdrawals - no_withdrawals_but_some_next_epoch OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_0 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_full_withdrawals_0 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_full_withdrawals_1 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_full_withdrawals_2 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_full_withdrawals_3 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_partial_withdrawals_1 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_partial_withdrawals_2 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_partial_withdrawals_3 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_partial_withdrawals_4 OK
+ [Valid] EF - Capella - Operations - Withdrawals - random_partial_withdrawals_5 OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_all_fully_withdrawable OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_all_partially_withdrawable OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_excess_balance_but_no_max_effe OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_max_partial_withdrawable OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_max_per_slot OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_max_plus_one_withdrawable OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_no_excess_balance OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_no_max_effective_balance OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_full_withdrawal OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_partial_withdrawable_activ OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_partial_withdrawable_exite OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_partial_withdrawable_exite OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_partial_withdrawable_in_ex OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_partial_withdrawable_not_y OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_one_partial_withdrawal OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_two_partial_withdrawable OK
+ [Valid] EF - Capella - Operations - Withdrawals - success_zero_expected_withdrawals OK
+ [Valid] EF - Capella - Operations - Withdrawals - withdrawable_epoch_but_0_balance OK
+ [Valid] EF - Capella - Operations - Withdrawals - withdrawable_epoch_but_0_effective_bal OK
+ [Valid] EF - Capella - Operations - Withdrawals - withdrawable_epoch_but_0_effective_bal OK
```
OK: 14/14 Fail: 0/14 Skip: 0/14
OK: 51/51 Fail: 0/51 Skip: 0/51
---TOTAL---
OK: 1794/1802 Fail: 0/1802 Skip: 8/1802
OK: 1820/1828 Fail: 0/1828 Skip: 8/1828

View File

@ -185,7 +185,7 @@ type
# Execution
latest_execution_payload_header*: bellatrix.ExecutionPayloadHeader # [New in Bellatrix]
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/beacon-chain.md#beaconstate
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.1/specs/capella/beacon-chain.md#beaconstate
# Memory-representation-equivalent to a Capella BeaconState for in-place SSZ
# reading and writing
CapellaBeaconStateNoImmutableValidators* = object
@ -246,6 +246,5 @@ type
latest_execution_payload_header*: capella.ExecutionPayloadHeader
# Withdrawals
withdrawal_queue*: HashList[Withdrawal, WITHDRAWAL_QUEUE_LIMIT] # [New in Capella]
next_withdrawal_index*: WithdrawalIndex # [New in Capella]
next_partial_withdrawal_validator_index*: uint64 # [New in Capella]
next_withdrawal_validator_index*: uint64 # [New in Capella]

View File

@ -957,7 +957,7 @@ func upgrade_to_bellatrix*(cfg: RuntimeConfig, pre: altair.BeaconState):
latest_execution_payload_header: default(bellatrix.ExecutionPayloadHeader)
)
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/fork.md#upgrading-the-state
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.1/specs/capella/fork.md#upgrading-the-state
func upgrade_to_capella*(cfg: RuntimeConfig, pre: bellatrix.BeaconState):
ref capella.BeaconState =
let
@ -1033,9 +1033,8 @@ func upgrade_to_capella*(cfg: RuntimeConfig, pre: bellatrix.BeaconState):
latest_execution_payload_header: latest_execution_payload_header,
# Withdrawals
withdrawal_queue: HashList[Withdrawal, Limit WITHDRAWAL_QUEUE_LIMIT](),
next_withdrawal_index: 0,
next_partial_withdrawal_validator_index: 0
next_withdrawal_validator_index: 0
)
template isValidInState*(idx: ValidatorIndex, state: ForkyBeaconState): bool =

View File

@ -77,7 +77,7 @@ export
tables, results, json_serialization, timer, sszTypes, beacon_time, crypto,
digest, presets
const SPEC_VERSION* = "1.3.0-alpha.0"
const SPEC_VERSION* = "1.3.0-alpha.1"
## Spec version we're aiming to be compatible with, right now
const

View File

@ -150,9 +150,8 @@ type
latest_execution_payload_header*: ExecutionPayloadHeader
# Withdrawals
withdrawal_queue*: HashList[Withdrawal, WITHDRAWAL_QUEUE_LIMIT] # [New in Capella]
next_withdrawal_index*: WithdrawalIndex # [New in Capella]
next_partial_withdrawal_validator_index*: uint64 # [New in Capella]
next_withdrawal_validator_index*: uint64 # [New in Capella]
# TODO Careful, not nil analysis is broken / incomplete and the semantics will
# likely change in future versions of the language:

View File

@ -1,18 +1,6 @@
# Mainnet preset - Capella
# https://github.com/ethereum/consensus-specs/blob/86e2f8fd7de25a7478c240f0cf5ba3c5264e96bf/presets/mainnet/capella.yaml
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.1/presets/mainnet/capella.yaml
const
# Misc
# ---------------------------------------------------------------
# 2**8 (= 256) withdrawals
MAX_PARTIAL_WITHDRAWALS_PER_EPOCH* = 256
# State list lengths
# ---------------------------------------------------------------
# 2**40 (= 1,099,511,627,776) withdrawals
WITHDRAWAL_QUEUE_LIMIT* = 1099511627776
# Max operations per block
# ---------------------------------------------------------------
# 2**4 (= 16)

View File

@ -1,18 +1,6 @@
# Minimal preset - Capella
# https://github.com/ethereum/consensus-specs/blob/86e2f8fd7de25a7478c240f0cf5ba3c5264e96bf/presets/minimal/capella.yaml
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.1/presets/minimal/capella.yaml
const
# Misc
# ---------------------------------------------------------------
# # [customized] 16 for more interesting tests at low validator count
MAX_PARTIAL_WITHDRAWALS_PER_EPOCH* = 16
# State list lengths
# ---------------------------------------------------------------
# 2**40 (= 1,099,511,627,776) withdrawals
WITHDRAWAL_QUEUE_LIMIT* = 1099511627776
# Max operations per block
# ---------------------------------------------------------------
# 2**4 (= 16)
@ -21,6 +9,5 @@ const
# Execution
# ---------------------------------------------------------------
# [customized] Lower than MAX_PARTIAL_WITHDRAWALS_PER_EPOCH so not all
# processed in one block
MAX_WITHDRAWALS_PER_PAYLOAD* = 8
# [customized] 2**2 (= 4)
MAX_WITHDRAWALS_PER_PAYLOAD* = 4

View File

@ -30,7 +30,8 @@ import
"."/[beaconstate, eth2_merkleization, helpers, validator, signatures]
from ./datatypes/capella import
BeaconState, MAX_WITHDRAWALS_PER_PAYLOAD, SignedBLSToExecutionChange
BeaconState, MAX_WITHDRAWALS_PER_PAYLOAD, SignedBLSToExecutionChange,
Withdrawal
export extras, phase0, altair
@ -619,26 +620,84 @@ proc process_execution_payload*(
ok()
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/beacon-chain.md#new-process_withdrawals
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/beacon-chain.md#has_eth1_withdrawal_credential
func has_eth1_withdrawal_credential(validator: Validator): bool =
## Check if ``validator`` has an 0x01 prefixed "eth1" withdrawal credential.
validator.withdrawal_credentials.data[0] == ETH1_ADDRESS_WITHDRAWAL_PREFIX
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/beacon-chain.md#is_fully_withdrawable_validator
func is_fully_withdrawable_validator(
validator: Validator, balance: Gwei, epoch: Epoch): bool =
## Check if ``validator`` is fully withdrawable.
has_eth1_withdrawal_credential(validator) and
validator.withdrawable_epoch <= epoch and balance > 0
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/beacon-chain.md#is_partially_withdrawable_validator
func is_partially_withdrawable_validator(
validator: Validator, balance: Gwei): bool =
## Check if ``validator`` is partially withdrawable.
let
has_max_effective_balance =
validator.effective_balance == MAX_EFFECTIVE_BALANCE
has_excess_balance = balance > MAX_EFFECTIVE_BALANCE
has_eth1_withdrawal_credential(validator) and
has_max_effective_balance and has_excess_balance
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.1/specs/capella/beacon-chain.md#new-get_expected_withdrawals
func get_expected_withdrawals(state: capella.BeaconState): seq[Withdrawal] =
let epoch = get_current_epoch(state)
var
withdrawal_index = state.next_withdrawal_index
validator_index = state.next_withdrawal_validator_index
withdrawals: seq[Withdrawal] = @[]
for _ in 0 ..< len(state.validators):
let
validator = state.validators[validator_index]
balance = state.balances[validator_index]
if is_fully_withdrawable_validator(validator, balance, epoch):
var w = Withdrawal(
index: withdrawal_index,
validator_index: validator_index,
amount: balance)
w.address.data[0..19] = validator.withdrawal_credentials.data[12..^1]
withdrawals.add w
withdrawal_index = WithdrawalIndex(withdrawal_index + 1)
elif is_partially_withdrawable_validator(validator, balance):
var w = Withdrawal(
index: withdrawal_index,
validator_index: validator_index,
amount: balance - MAX_EFFECTIVE_BALANCE)
w.address.data[0..19] = validator.withdrawal_credentials.data[12..^1]
withdrawals.add w
withdrawal_index = WithdrawalIndex(withdrawal_index + 1)
if len(withdrawals) == MAX_WITHDRAWALS_PER_PAYLOAD:
break
validator_index = (validator_index + 1) mod lenu64(state.validators)
withdrawals
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.1/specs/capella/beacon-chain.md#new-process_withdrawals
func process_withdrawals*(
state: var capella.BeaconState, payload: capella.ExecutionPayload):
Result[void, cstring] =
let
num_withdrawals =
min(MAX_WITHDRAWALS_PER_PAYLOAD, len(state.withdrawal_queue))
dequeued_withdrawals = state.withdrawal_queue.asSeq[0 ..< num_withdrawals]
let expected_withdrawals = get_expected_withdrawals(state)
if not (len(dequeued_withdrawals) == len(payload.withdrawals)):
return err("process_withdrawals: different numbers of dequeued and payload withdrawals")
if not (len(payload.withdrawals) == len(expected_withdrawals)):
return err("process_withdrawals: different numbers of payload and expected withdrawals")
for i in 0 ..< len(dequeued_withdrawals):
if not (dequeued_withdrawals[i] == payload.withdrawals[i]):
return err("process_withdrawals: mismatched queued and payload withdrawals")
# Remove dequeued withdrawals from state
if num_withdrawals > 0:
state.withdrawal_queue.asSeq.delete(0, num_withdrawals - 1)
state.withdrawal_queue.resetCache()
for i in 0 ..< len(expected_withdrawals):
if expected_withdrawals[i] != payload.withdrawals[i]:
return err("process_withdrawals: mismatched expected and payload withdrawal")
let validator_index =
ValidatorIndex.init(expected_withdrawals[i].validator_index).valueOr:
return err("process_withdrawals: invalid validator index")
decrease_balance(
state, validator_index, expected_withdrawals[i].amount)
if len(expected_withdrawals) > 0:
let latest_withdrawal = expected_withdrawals[^1]
state.next_withdrawal_index = WithdrawalIndex(latest_withdrawal.index + 1)
let next_validator_index =
(latest_withdrawal.validator_index + 1) mod lenu64(state.validators)
state.next_withdrawal_validator_index = next_validator_index
ok()

View File

@ -1046,83 +1046,6 @@ func process_inactivity_updates*(
if pre_inactivity_score != inactivity_score:
state.inactivity_scores[index] = inactivity_score
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/beacon-chain.md#has_eth1_withdrawal_credential
func has_eth1_withdrawal_credential(validator: Validator): bool =
## Check if ``validator`` has an 0x01 prefixed "eth1" withdrawal credential.
validator.withdrawal_credentials.data[0] == ETH1_ADDRESS_WITHDRAWAL_PREFIX
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/beacon-chain.md#is_fully_withdrawable_validator
func is_fully_withdrawable_validator(
validator: Validator, balance: Gwei, epoch: Epoch): bool =
## Check if ``validator`` is fully withdrawable.
has_eth1_withdrawal_credential(validator) and
validator.withdrawable_epoch <= epoch and balance > 0
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/beacon-chain.md#is_partially_withdrawable_validator
func is_partially_withdrawable_validator(
validator: Validator, balance: Gwei): bool =
## Check if ``validator`` is partially withdrawable.
let
has_max_effective_balance =
validator.effective_balance == MAX_EFFECTIVE_BALANCE
has_excess_balance = balance > MAX_EFFECTIVE_BALANCE
has_eth1_withdrawal_credential(validator) and
has_max_effective_balance and has_excess_balance
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/beacon-chain.md#withdraw_balance
func withdraw_balance(
state: var capella.BeaconState, validator_index: ValidatorIndex,
amount: Gwei) =
# Decrease the validator's balance
decrease_balance(state, validator_index, amount)
# Create a corresponding withdrawal receipt
var withdrawal = Withdrawal(
index: state.next_withdrawal_index,
validator_index: validator_index.uint64,
amount: amount)
withdrawal.address.data[0 .. 19] =
state.validators.item(
validator_index).withdrawal_credentials.data.toOpenArray(12, 31)
state.next_withdrawal_index = WithdrawalIndex(state.next_withdrawal_index + 1)
#TODO TODO don't just discard, check if full
discard state.withdrawal_queue.add(withdrawal)
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/beacon-chain.md#full-withdrawals
func process_full_withdrawals*(state: var capella.BeaconState) =
let current_epoch = get_current_epoch(state)
for index in 0 ..< len(state.validators):
let
balance = state.balances.item(index)
validator = state.validators.item(index)
if is_fully_withdrawable_validator(validator, balance, current_epoch):
withdraw_balance(state, ValidatorIndex(index), balance)
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/beacon-chain.md#partial-withdrawals
func process_partial_withdrawals*(state: var capella.BeaconState) =
var partial_withdrawals_count = 0
# Begin where we left off last time
var validator_index = state.next_partial_withdrawal_validator_index
for _ in 0 ..< len(state.validators):
let
balance = state.balances.item(validator_index)
validator = state.validators.item(validator_index)
if is_partially_withdrawable_validator(validator, balance):
withdraw_balance(
state, validator_index.ValidatorIndex, balance - MAX_EFFECTIVE_BALANCE)
partial_withdrawals_count += 1
# Iterate to next validator to check for partial withdrawal
validator_index = (validator_index + 1) mod lenu64(state.validators)
# Exit if performed maximum allowable withdrawals
if partial_withdrawals_count == MAX_PARTIAL_WITHDRAWALS_PER_EPOCH:
break
state.next_partial_withdrawal_validator_index = validator_index
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/phase0/beacon-chain.md#epoch-processing
proc process_epoch*(
cfg: RuntimeConfig, state: var phase0.BeaconState, flags: UpdateFlags,
@ -1182,7 +1105,8 @@ func init*(
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/altair/beacon-chain.md#epoch-processing
proc process_epoch*(
cfg: RuntimeConfig, state: var (altair.BeaconState | bellatrix.BeaconState),
cfg: RuntimeConfig,
state: var (altair.BeaconState | bellatrix.BeaconState | capella.BeaconState),
flags: UpdateFlags, cache: var StateCache, info: var altair.EpochInfo):
Result[void, cstring] =
let currentEpoch = get_current_epoch(state)
@ -1224,51 +1148,3 @@ proc process_epoch*(
process_sync_committee_updates(state) # [New in Altair]
ok()
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/capella/beacon-chain.md#epoch-processing
proc process_epoch*(
cfg: RuntimeConfig, state: var capella.BeaconState,
flags: UpdateFlags, cache: var StateCache, info: var altair.EpochInfo):
Result[void, cstring] =
let currentEpoch = get_current_epoch(state)
trace "process_epoch",
current_epoch = currentEpoch
info.init(state)
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/phase0/beacon-chain.md#justification-and-finalization
process_justification_and_finalization(state, info.balances, flags)
# state.slot hasn't been incremented yet.
if strictVerification in flags and currentEpoch >= 2:
doAssert state.current_justified_checkpoint.epoch + 2 >= currentEpoch
if strictVerification in flags and currentEpoch >= 3:
# Rule 2/3/4 finalization results in the most pessimal case. The other
# three finalization rules finalize more quickly as long as the any of
# the finalization rules triggered.
doAssert state.finalized_checkpoint.epoch + 3 >= currentEpoch
process_inactivity_updates(cfg, state, info) # [New in Altair]
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/phase0/beacon-chain.md#process_rewards_and_penalties
process_rewards_and_penalties(cfg, state, info)
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/phase0/beacon-chain.md#registry-updates
? process_registry_updates(cfg, state, cache)
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-alpha.0/specs/phase0/beacon-chain.md#slashings
process_slashings(state, info.balances.current_epoch)
process_eth1_data_reset(state)
process_effective_balance_updates(state)
process_slashings_reset(state)
process_randao_mixes_reset(state)
process_historical_roots_update(state)
process_participation_flag_updates(state)
process_sync_committee_updates(state)
process_full_withdrawals(state) # [New in Capella]
process_partial_withdrawals(state) # [New in Capella]
ok()

View File

@ -38,8 +38,6 @@ const
HistoricalRootsUpdateDir = RootDir/"historical_roots_update"
ParticipationFlagDir = RootDir/"participation_flag_updates"
SyncCommitteeDir = RootDir/"sync_committee_updates"
FullWithdrawalsDir = RootDir/"full_withdrawals"
PartialWithdrawalsDir = RootDir/"partial_withdrawals"
RewardsAndPenaltiesDir = RootDir/"rewards_and_penalties"
doAssert (toHashSet(mapIt(toSeq(walkDir(RootDir, relative = false)), it.path)) -
@ -48,8 +46,7 @@ doAssert (toHashSet(mapIt(toSeq(walkDir(RootDir, relative = false)), it.path)) -
JustificationFinalizationDir, InactivityDir, RegistryUpdatesDir,
SlashingsDir, Eth1DataResetDir, EffectiveBalanceUpdatesDir,
SlashingsResetDir, RandaoMixesResetDir, HistoricalRootsUpdateDir,
ParticipationFlagDir, FullWithDrawalsDir,
PartialWithdrawalsDir, RewardsAndPenaltiesDir])
ParticipationFlagDir, RewardsAndPenaltiesDir])
template runSuite(
suiteDir, testName: string, transitionProc: untyped): untyped =
@ -154,15 +151,3 @@ when const_preset == "minimal":
Result[void, cstring].ok()
else:
doAssert not dirExists(SyncCommitteeDir)
# Full withdrawals
# ---------------------------------------------------------------
runSuite(FullWithdrawalsDir, "Full withdrawals"):
process_full_withdrawals(state)
Result[void, cstring].ok()
# Partial withdrawals
# ---------------------------------------------------------------
runSuite(PartialWithdrawalsDir, "Partial withdrawals"):
process_partial_withdrawals(state)
Result[void, cstring].ok()

View File

@ -403,6 +403,10 @@ template fcSuite(suiteName: static[string], testPathElem: static[string]) =
if kind != pcDir or not dirExists(testsPath):
continue
let fork = forkForPathComponent(path).valueOr:
if path.contains("eip4844"):
# TODO can either wait if/when 4844 is incorporated into capella or
# add it as next fork even not as part of 4844
continue
raiseAssert "Unknown test fork: " & testsPath
for kind, path in walkDir(testsPath, relative = true, checkDir = true):
let basePath = testsPath/path/"pyspec_tests"

View File

@ -37,7 +37,7 @@ proc runTest(path: string, fork: BeaconStateFork) =
yaml.load(s, res)
res
state = loadForkedState(path/"state.ssz_snappy", fork)
state = loadForkedState(path/"object.ssz_snappy", fork)
withState(state[]):
var computedProof = newSeq[Eth2Digest](log2trunc(proof.leaf_index))
@ -52,6 +52,8 @@ proc runTest(path: string, fork: BeaconStateFork) =
get_subtree_index(proof.leaf_index),
forkyState.root)
from std/strutils import contains
suite "EF - Light client - Single merkle proof" & preset():
const presetPath = SszTestsDir/const_preset
for kind, path in walkDir(presetPath, relative = true, checkDir = true):
@ -60,7 +62,10 @@ suite "EF - Light client - Single merkle proof" & preset():
continue
let
fork = forkForPathComponent(path).valueOr:
if path.contains("eip4844"):
# not yet supported, might be folded into capella first regardless
continue
raiseAssert "Unknown test fork: " & testsPath
basePath = testsPath/"pyspec_tests"
basePath = testsPath/"BeaconState"
for kind, path in walkDir(basePath, relative = true, checkDir = true):
runTest(basePath/path, fork)

View File

@ -54,11 +54,11 @@ proc loadSteps(path: string): seq[TestStep] =
finalized_slot:
c["finalized_header"]["slot"].getInt().Slot,
finalized_root:
Eth2Digest.fromHex(c["finalized_header"]["root"].getStr()),
Eth2Digest.fromHex(c["finalized_header"]["beacon_root"].getStr()),
optimistic_slot:
c["optimistic_header"]["slot"].getInt().Slot,
optimistic_root:
Eth2Digest.fromHex(c["optimistic_header"]["root"].getStr()))
Eth2Digest.fromHex(c["optimistic_header"]["beacon_root"].getStr()))
if step.hasKey"force_update":
let s = step["force_update"]
@ -116,9 +116,14 @@ proc runTest(path: string) =
store.optimistic_header.slot == step.checks.optimistic_slot
hash_tree_root(store.optimistic_header) == step.checks.optimistic_root
from std/strutils import contains
suite "EF - Light client - Sync" & preset():
const presetPath = SszTestsDir/const_preset
for kind, path in walkDir(presetPath, relative = true, checkDir = true):
if path.contains("eip4844"):
# this is a maybe temporary fork, maybe folded into capella soon
continue
let basePath =
presetPath/path/"light_client"/"sync"/"pyspec_tests"
if kind != pcDir or not dirExists(basePath):

@ -1 +1 @@
Subproject commit 8bea46a757c119f3ea98d99ab779ba8c67ff598c
Subproject commit 9706d8ebb1dbbb2939f100fc189a5c853bbffe06