add EF consensus spec test Electra block sanity fixtures (#6250)
* add EF consensus spec test Electra block sanity fixtures * move process_consolidation/process_deposit_receipt before usage
This commit is contained in:
parent
302f645a01
commit
a66876c8e5
|
@ -2537,6 +2537,15 @@ OK: 5/5 Fail: 0/5 Skip: 0/5
|
|||
+ Slashings reset - flush_slashings [Preset: mainnet] OK
|
||||
```
|
||||
OK: 1/1 Fail: 0/1 Skip: 0/1
|
||||
## EF - Electra - Finality [Preset: mainnet]
|
||||
```diff
|
||||
+ [Valid] EF - Electra - Finality - finality_no_updates_at_genesis [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Finality - finality_rule_1 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Finality - finality_rule_2 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Finality - finality_rule_3 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Finality - finality_rule_4 [Preset: mainnet] OK
|
||||
```
|
||||
OK: 5/5 Fail: 0/5 Skip: 0/5
|
||||
## EF - Electra - Operations - Attestation [Preset: mainnet]
|
||||
```diff
|
||||
+ [Invalid] EF - Electra - Operations - Attestation - invalid_after_max_inclusion_slot OK
|
||||
|
@ -2898,6 +2907,26 @@ OK: 24/24 Fail: 0/24 Skip: 0/24
|
|||
+ [Valid] EF - Electra - Operations - Withdrawals - withdrawable_epoch_but_0_effective_bal OK
|
||||
```
|
||||
OK: 50/50 Fail: 0/50 Skip: 0/50
|
||||
## EF - Electra - Random [Preset: mainnet]
|
||||
```diff
|
||||
+ [Valid] EF - Electra - Random - randomized_0 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_1 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_10 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_11 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_12 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_13 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_14 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_15 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_2 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_3 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_4 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_5 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_6 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_7 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_8 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_9 [Preset: mainnet] OK
|
||||
```
|
||||
OK: 16/16 Fail: 0/16 Skip: 0/16
|
||||
## EF - Electra - Rewards [Preset: mainnet]
|
||||
```diff
|
||||
+ EF - Electra - Rewards - all_balances_too_low_for_reward [Preset: mainnet] OK
|
||||
|
@ -2995,6 +3024,86 @@ OK: 34/34 Fail: 0/34 Skip: 0/34
|
|||
+ Testing Withdrawal OK
|
||||
```
|
||||
OK: 55/55 Fail: 0/55 Skip: 0/55
|
||||
## EF - Electra - Sanity - Blocks [Preset: mainnet]
|
||||
```diff
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - deposit_transition__invalid_eth1_deposits_overl OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - deposit_transition__invalid_not_enough_eth1_dep OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - deposit_transition__invalid_too_many_eth1_depos OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_all_zeroed_sig [Preset: mainnet] OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_duplicate_bls_changes_same_block [Prese OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_duplicate_deposit_same_block [Preset: m OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_duplicate_proposer_slashings_same_block OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_duplicate_validator_exit_same_block [Pr OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_exceed_max_blobs_per_block [Preset: mai OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_incorrect_block_sig [Preset: mainnet] OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_incorrect_proposer_index_sig_from_expec OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_incorrect_proposer_index_sig_from_propo OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_incorrect_state_root [Preset: mainnet] OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_is_execution_enabled_false [Preset: mai OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_max_blobs_per_block_two_txs [Preset: ma OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_one_blob_max_plus_one_txs [Preset: main OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_only_increase_deposit_count [Preset: ma OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_parent_from_same_slot [Preset: mainnet] OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_prev_slot_block_transition [Preset: mai OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_same_slot_block_transition [Preset: mai OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_similar_proposer_slashings_same_block [ OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_two_bls_changes_of_different_addresses_ OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_withdrawal_fail_second_block_payload_is OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - slash_and_exit_same_index [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - attestation [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - attester_slashing [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - balance_driven_status_transitions [Preset: main OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - block_transition_randomized_payload [Preset: ma OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - bls_change [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_and_bls_change [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_in_block [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_top_up [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_transition__deposit_and_top_up_same_blo OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_transition__process_eth1_deposits [Pres OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_transition__process_eth1_deposits_up_to OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_transition__process_max_eth1_deposits [ OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_transition__start_index_is_set [Preset: OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - duplicate_attestation_same_block [Preset: mainn OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - empty_block_transition [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - empty_block_transition_no_tx [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - empty_epoch_transition [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - exit_and_bls_change [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - full_random_operations_0 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - full_random_operations_1 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - full_random_operations_2 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - full_random_operations_3 [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - full_withdrawal_in_epoch_transition [Preset: ma OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - high_proposer_index [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - historical_batch [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - inactivity_scores_full_participation_leaking [P OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - inactivity_scores_leaking [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - many_partial_withdrawals_in_epoch_transition [P OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - max_blobs_per_block [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - mix_blob_tx_and_non_blob_tx [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - multiple_different_proposer_slashings_same_bloc OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - multiple_different_validator_exits_same_block [ OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - one_blob [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - one_blob_max_txs [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - one_blob_two_txs [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - partial_withdrawal_in_epoch_transition [Preset: OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - proposer_after_inactive_index [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - proposer_self_slashing [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - proposer_slashing [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - skipped_slots [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - slash_and_exit_diff_index [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - sync_committee_committee__empty [Preset: mainne OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - sync_committee_committee__full [Preset: mainnet OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - sync_committee_committee__half [Preset: mainnet OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - sync_committee_committee_genesis__empty [Preset OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - sync_committee_committee_genesis__full [Preset: OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - sync_committee_committee_genesis__half [Preset: OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - top_up_and_partial_withdrawable_validator [Pres OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - top_up_to_fully_withdrawn_validator [Preset: ma OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - voluntary_exit [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - withdrawal_success_two_blocks [Preset: mainnet] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - zero_blob [Preset: mainnet] OK
|
||||
```
|
||||
OK: 76/76 Fail: 0/76 Skip: 0/76
|
||||
## EF - Electra - Sanity - Slots [Preset: mainnet]
|
||||
```diff
|
||||
+ EF - Electra - Slots - double_empty_epoch [Preset: mainnet] OK
|
||||
|
@ -3534,4 +3643,4 @@ OK: 69/88 Fail: 0/88 Skip: 19/88
|
|||
OK: 3/3 Fail: 0/3 Skip: 0/3
|
||||
|
||||
---TOTAL---
|
||||
OK: 2836/2856 Fail: 0/2856 Skip: 20/2856
|
||||
OK: 2933/2953 Fail: 0/2953 Skip: 20/2953
|
||||
|
|
|
@ -2664,6 +2664,15 @@ OK: 1/1 Fail: 0/1 Skip: 0/1
|
|||
+ Sync committee updates - sync_committees_progress_not_genesis [Preset: minimal] OK
|
||||
```
|
||||
OK: 5/5 Fail: 0/5 Skip: 0/5
|
||||
## EF - Electra - Finality [Preset: minimal]
|
||||
```diff
|
||||
+ [Valid] EF - Electra - Finality - finality_no_updates_at_genesis [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Finality - finality_rule_1 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Finality - finality_rule_2 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Finality - finality_rule_3 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Finality - finality_rule_4 [Preset: minimal] OK
|
||||
```
|
||||
OK: 5/5 Fail: 0/5 Skip: 0/5
|
||||
## EF - Electra - Operations - Attestation [Preset: minimal]
|
||||
```diff
|
||||
+ [Invalid] EF - Electra - Operations - Attestation - invalid_after_max_inclusion_slot OK
|
||||
|
@ -3040,6 +3049,26 @@ OK: 20/20 Fail: 0/20 Skip: 0/20
|
|||
+ [Valid] EF - Electra - Operations - Withdrawals - withdrawable_epoch_but_0_effective_bal OK
|
||||
```
|
||||
OK: 51/51 Fail: 0/51 Skip: 0/51
|
||||
## EF - Electra - Random [Preset: minimal]
|
||||
```diff
|
||||
+ [Valid] EF - Electra - Random - randomized_0 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_1 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_10 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_11 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_12 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_13 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_14 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_15 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_2 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_3 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_4 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_5 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_6 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_7 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_8 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Random - randomized_9 [Preset: minimal] OK
|
||||
```
|
||||
OK: 16/16 Fail: 0/16 Skip: 0/16
|
||||
## EF - Electra - Rewards [Preset: minimal]
|
||||
```diff
|
||||
+ EF - Electra - Rewards - all_balances_too_low_for_reward [Preset: minimal] OK
|
||||
|
@ -3137,6 +3166,93 @@ OK: 34/34 Fail: 0/34 Skip: 0/34
|
|||
+ Testing Withdrawal OK
|
||||
```
|
||||
OK: 55/55 Fail: 0/55 Skip: 0/55
|
||||
## EF - Electra - Sanity - Blocks [Preset: minimal]
|
||||
```diff
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - deposit_transition__invalid_eth1_deposits_overl OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - deposit_transition__invalid_not_enough_eth1_dep OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - deposit_transition__invalid_too_many_eth1_depos OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_all_zeroed_sig [Preset: minimal] OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_duplicate_bls_changes_same_block [Prese OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_duplicate_deposit_same_block [Preset: m OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_duplicate_proposer_slashings_same_block OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_duplicate_validator_exit_same_block [Pr OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_exceed_max_blobs_per_block [Preset: min OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_incorrect_block_sig [Preset: minimal] OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_incorrect_proposer_index_sig_from_expec OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_incorrect_proposer_index_sig_from_propo OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_incorrect_state_root [Preset: minimal] OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_is_execution_enabled_false [Preset: min OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_max_blobs_per_block_two_txs [Preset: mi OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_one_blob_max_plus_one_txs [Preset: mini OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_only_increase_deposit_count [Preset: mi OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_parent_from_same_slot [Preset: minimal] OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_prev_slot_block_transition [Preset: min OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_same_slot_block_transition [Preset: min OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_similar_proposer_slashings_same_block [ OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_two_bls_changes_of_different_addresses_ OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - invalid_withdrawal_fail_second_block_payload_is OK
|
||||
+ [Invalid] EF - Electra - Sanity - Blocks - slash_and_exit_same_index [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - activate_and_partial_withdrawal_max_effective_b OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - activate_and_partial_withdrawal_overdeposit [Pr OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - attestation [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - attester_slashing [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - balance_driven_status_transitions [Preset: mini OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - block_transition_randomized_payload [Preset: mi OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - bls_change [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_and_bls_change [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_in_block [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_top_up [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_transition__deposit_and_top_up_same_blo OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_transition__process_eth1_deposits [Pres OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_transition__process_eth1_deposits_up_to OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_transition__process_max_eth1_deposits [ OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - deposit_transition__start_index_is_set [Preset: OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - duplicate_attestation_same_block [Preset: minim OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - empty_block_transition [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - empty_block_transition_large_validator_set [Pre OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - empty_block_transition_no_tx [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - empty_epoch_transition [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - empty_epoch_transition_large_validator_set [Pre OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - empty_epoch_transition_not_finalizing [Preset: OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - eth1_data_votes_consensus [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - eth1_data_votes_no_consensus [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - exit_and_bls_change [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - full_random_operations_0 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - full_random_operations_1 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - full_random_operations_2 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - full_random_operations_3 [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - full_withdrawal_in_epoch_transition [Preset: mi OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - high_proposer_index [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - historical_batch [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - inactivity_scores_full_participation_leaking [P OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - inactivity_scores_leaking [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - many_partial_withdrawals_in_epoch_transition [P OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - max_blobs_per_block [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - mix_blob_tx_and_non_blob_tx [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - multiple_different_proposer_slashings_same_bloc OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - multiple_different_validator_exits_same_block [ OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - one_blob [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - one_blob_max_txs [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - one_blob_two_txs [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - partial_withdrawal_in_epoch_transition [Preset: OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - proposer_after_inactive_index [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - proposer_self_slashing [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - proposer_slashing [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - skipped_slots [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - slash_and_exit_diff_index [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - sync_committee_committee__empty [Preset: minima OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - sync_committee_committee__full [Preset: minimal OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - sync_committee_committee__half [Preset: minimal OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - sync_committee_committee_genesis__empty [Preset OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - sync_committee_committee_genesis__full [Preset: OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - sync_committee_committee_genesis__half [Preset: OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - top_up_and_partial_withdrawable_validator [Pres OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - top_up_to_fully_withdrawn_validator [Preset: mi OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - voluntary_exit [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - withdrawal_success_two_blocks [Preset: minimal] OK
|
||||
+ [Valid] EF - Electra - Sanity - Blocks - zero_blob [Preset: minimal] OK
|
||||
```
|
||||
OK: 83/83 Fail: 0/83 Skip: 0/83
|
||||
## EF - Electra - Sanity - Slots [Preset: minimal]
|
||||
```diff
|
||||
+ EF - Electra - Slots - double_empty_epoch [Preset: minimal] OK
|
||||
|
@ -3837,4 +3953,4 @@ OK: 185/207 Fail: 0/207 Skip: 22/207
|
|||
OK: 3/3 Fail: 0/3 Skip: 0/3
|
||||
|
||||
---TOTAL---
|
||||
OK: 3108/3131 Fail: 0/3131 Skip: 23/3131
|
||||
OK: 3212/3235 Fail: 0/3235 Skip: 23/3235
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/bellatrix/beacon-chain.md#block-processing
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/capella/beacon-chain.md#block-processing
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/deneb/beacon-chain.md#block-processing
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0/specs/electra/beacon-chain.md#block-processing
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.1/specs/electra/beacon-chain.md#block-processing
|
||||
#
|
||||
# The entry point is `process_block` which is at the bottom of this file.
|
||||
#
|
||||
|
@ -397,6 +397,23 @@ proc process_deposit*(
|
|||
|
||||
apply_deposit(cfg, state, bloom_filter, deposit.data, flags)
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0/specs/electra/beacon-chain.md#new-process_deposit_receipt
|
||||
func process_deposit_receipt*(
|
||||
cfg: RuntimeConfig, state: var electra.BeaconState,
|
||||
bloom_filter: var PubkeyBloomFilter, deposit_receipt: DepositReceipt,
|
||||
flags: UpdateFlags): Result[void, cstring] =
|
||||
# Set deposit receipt start index
|
||||
if state.deposit_receipts_start_index ==
|
||||
UNSET_DEPOSIT_RECEIPTS_START_INDEX:
|
||||
state.deposit_receipts_start_index = deposit_receipt.index
|
||||
|
||||
apply_deposit(
|
||||
cfg, state, bloom_filter, DepositData(
|
||||
pubkey: deposit_receipt.pubkey,
|
||||
withdrawal_credentials: deposit_receipt.withdrawal_credentials,
|
||||
amount: deposit_receipt.amount,
|
||||
signature: deposit_receipt.signature), flags)
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/beacon-chain.md#voluntary-exits
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/deneb/beacon-chain.md#modified-process_voluntary_exit
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0/specs/electra/beacon-chain.md#updated-process_voluntary_exit
|
||||
|
@ -528,6 +545,90 @@ func process_execution_layer_withdrawal_request(
|
|||
ok(? initiate_validator_exit(
|
||||
cfg, state, validator_index, exit_queue_info, cache))
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0/specs/electra/beacon-chain.md#consolidations
|
||||
proc process_consolidation*(
|
||||
cfg: RuntimeConfig, state: var electra.BeaconState,
|
||||
signed_consolidation: SignedConsolidation | TrustedSignedConsolidation,
|
||||
cache: var StateCache): Result[void, cstring] =
|
||||
# If the pending consolidations queue is full, no consolidations are allowed
|
||||
# in the block
|
||||
if not(lenu64(state.pending_consolidations) < PENDING_CONSOLIDATIONS_LIMIT):
|
||||
return err("Consolidation: too many pending consolidations already")
|
||||
|
||||
# If there is too little available consolidation churn limit, no
|
||||
# consolidations are allowed in the block
|
||||
if not (get_consolidation_churn_limit(cfg, state, cache) >
|
||||
static(MIN_ACTIVATION_BALANCE.Gwei)):
|
||||
return err("Consolidation: insufficient available consolidation churn limit")
|
||||
|
||||
let consolidation = signed_consolidation.message
|
||||
|
||||
# Verify that source != target, so a consolidation cannot be used as an exit.
|
||||
if not(consolidation.source_index != consolidation.target_index):
|
||||
return err("Consolidation: a consolidation cannot be used as an exit")
|
||||
|
||||
let
|
||||
source_validator = addr state.validators.mitem(consolidation.source_index)
|
||||
target_validator = state.validators.item(consolidation.target_index)
|
||||
|
||||
# Verify the source and the target are active
|
||||
let current_epoch = get_current_epoch(state)
|
||||
|
||||
if not is_active_validator(source_validator[], current_epoch):
|
||||
return err("Consolidation: source validator not active")
|
||||
if not is_active_validator(target_validator, current_epoch):
|
||||
return err("Consolidation: target validator not active")
|
||||
|
||||
# Verify exits for source and target have not been initiated
|
||||
if not (source_validator[].exit_epoch == FAR_FUTURE_EPOCH):
|
||||
return err("Consolidation: exit for source validator already initiated")
|
||||
if not (target_validator.exit_epoch == FAR_FUTURE_EPOCH):
|
||||
return err("Consolidation: exit for target validator already initiated")
|
||||
|
||||
# Consolidations must specify an epoch when they become valid; they are not
|
||||
# valid before then
|
||||
if not (current_epoch >= consolidation.epoch):
|
||||
return err("Consolidation: consolidation not valid before specified epoch")
|
||||
|
||||
# Verify the source and the target have Execution layer withdrawal credentials
|
||||
if not has_execution_withdrawal_credential(source_validator[]):
|
||||
return err("Consolidation: source doesn't have execution layer withdrawal credentials")
|
||||
if not has_execution_withdrawal_credential(target_validator):
|
||||
return err("Consolidation: target doesn't have execution layer withdrawal credentials")
|
||||
|
||||
# Verify the same withdrawal address
|
||||
if not (source_validator[].withdrawal_credentials.data.toOpenArray(12, 31) ==
|
||||
target_validator.withdrawal_credentials.data.toOpenArray(12, 31)):
|
||||
return err("Consolidation: source and target don't have same withdrawal address")
|
||||
|
||||
debugRaiseAssert "this is per spec, near-verbatim, but Nimbus generally factors this out into spec/signatures.nim. so, create verify_consolidation_signature infra there, call here"
|
||||
# Verify consolidation is signed by the source and the target
|
||||
let
|
||||
domain = compute_domain(
|
||||
DOMAIN_CONSOLIDATION, cfg.GENESIS_FORK_VERSION,
|
||||
genesis_validators_root=state.genesis_validators_root)
|
||||
signing_root = compute_signing_root(consolidation, domain)
|
||||
pubkeys = [source_validator[].pubkey, target_validator.pubkey]
|
||||
|
||||
debugRaiseAssert "as a good example, this trustedsig hack typically/should live in spec/signatures.nim"
|
||||
when not (signed_consolidation.signature is TrustedSig):
|
||||
if not blsFastAggregateVerify(
|
||||
pubkeys, signing_root.data, signed_consolidation.signature):
|
||||
return err("Consolidation: invalid signature")
|
||||
|
||||
# Initiate source validator exit and append pending consolidation
|
||||
source_validator[].exit_epoch = compute_consolidation_epoch_and_update_churn(
|
||||
cfg, state, source_validator[].effective_balance, cache)
|
||||
source_validator[].withdrawable_epoch =
|
||||
source_validator[].exit_epoch + cfg.MIN_VALIDATOR_WITHDRAWABILITY_DELAY
|
||||
debugRaiseAssert "check HashList add return value"
|
||||
discard state.pending_consolidations.add(PendingConsolidation(
|
||||
source_index: consolidation.source_index,
|
||||
target_index: consolidation.target_index
|
||||
))
|
||||
|
||||
ok()
|
||||
|
||||
type
|
||||
# https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.5.0#/Rewards/getBlockRewards
|
||||
BlockRewards* = object
|
||||
|
@ -538,18 +639,27 @@ type
|
|||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#operations
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/capella/beacon-chain.md#modified-process_operations
|
||||
# https://github.com/ethereum/consensus-specs/blob/94a0b6c581f2809aa8aca4ef7ee6fbb63f9d74e9/specs/electra/beacon-chain.md#modified-process_operations
|
||||
proc process_operations(cfg: RuntimeConfig,
|
||||
state: var ForkyBeaconState,
|
||||
body: SomeForkyBeaconBlockBody,
|
||||
base_reward_per_increment: Gwei,
|
||||
flags: UpdateFlags,
|
||||
cache: var StateCache): Result[BlockRewards, cstring] =
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.1/specs/electra/beacon-chain.md#modified-process_operations
|
||||
proc process_operations(
|
||||
cfg: RuntimeConfig, state: var ForkyBeaconState,
|
||||
body: SomeForkyBeaconBlockBody, base_reward_per_increment: Gwei,
|
||||
flags: UpdateFlags, cache: var StateCache): Result[BlockRewards, cstring] =
|
||||
# Verify that outstanding deposits are processed up to the maximum number of
|
||||
# deposits
|
||||
let
|
||||
req_deposits = min(MAX_DEPOSITS,
|
||||
state.eth1_data.deposit_count - state.eth1_deposit_index)
|
||||
when typeof(body).kind >= ConsensusFork.Electra:
|
||||
# Disable former deposit mechanism once all prior deposits are processed
|
||||
let
|
||||
eth1_deposit_index_limit =
|
||||
min(state.eth1_data.deposit_count, state.deposit_receipts_start_index)
|
||||
req_deposits =
|
||||
if state.eth1_deposit_index < eth1_deposit_index_limit:
|
||||
min(
|
||||
MAX_DEPOSITS, eth1_deposit_index_limit - state.eth1_deposit_index)
|
||||
else:
|
||||
0
|
||||
else:
|
||||
let req_deposits = min(
|
||||
MAX_DEPOSITS, state.eth1_data.deposit_count - state.eth1_deposit_index)
|
||||
|
||||
if state.eth1_data.deposit_count < state.eth1_deposit_index or
|
||||
body.deposits.lenu64 != req_deposits:
|
||||
|
@ -572,12 +682,10 @@ proc process_operations(cfg: RuntimeConfig,
|
|||
operations_rewards.proposer_slashings += proposer_slashing_reward
|
||||
exit_queue_info = new_exit_queue_info
|
||||
for op in body.attester_slashings:
|
||||
debugRaiseAssert "add process_attester_slashing for electra"
|
||||
when typeof(body).kind != ConsensusFork.Electra:
|
||||
let (attester_slashing_reward, new_exit_queue_info) =
|
||||
? process_attester_slashing(cfg, state, op, flags, exit_queue_info, cache)
|
||||
operations_rewards.attester_slashings += attester_slashing_reward
|
||||
exit_queue_info = new_exit_queue_info
|
||||
let (attester_slashing_reward, new_exit_queue_info) =
|
||||
? process_attester_slashing(cfg, state, op, flags, exit_queue_info, cache)
|
||||
operations_rewards.attester_slashings += attester_slashing_reward
|
||||
exit_queue_info = new_exit_queue_info
|
||||
for op in body.attestations:
|
||||
operations_rewards.attestations +=
|
||||
? process_attestation(state, op, flags, base_reward_per_increment, cache)
|
||||
|
@ -588,14 +696,22 @@ proc process_operations(cfg: RuntimeConfig,
|
|||
for op in body.voluntary_exits:
|
||||
exit_queue_info = ? process_voluntary_exit(
|
||||
cfg, state, op, flags, exit_queue_info, cache)
|
||||
when typeof(body).kind >= ConsensusFork.Electra:
|
||||
for op in body.execution_payload.withdrawal_requests:
|
||||
exit_queue_info = ? process_execution_layer_withdrawal_request(
|
||||
cfg, state, op, exit_queue_info, cache)
|
||||
when typeof(body).kind >= ConsensusFork.Capella:
|
||||
for op in body.bls_to_execution_changes:
|
||||
? process_bls_to_execution_change(cfg, state, op)
|
||||
|
||||
# [New in Electra:EIP7002:EIP7251]
|
||||
when typeof(body).kind >= ConsensusFork.Electra:
|
||||
for op in body.execution_payload.withdrawal_requests:
|
||||
discard ? process_execution_layer_withdrawal_request(
|
||||
cfg, state, op, default(ExitQueueInfo), cache)
|
||||
for op in body.execution_payload.deposit_receipts:
|
||||
debugRaiseAssert "combine with previous bloom filter construction"
|
||||
let bloom_filter = constructBloomFilter(state.validators.asSeq)
|
||||
? process_deposit_receipt(cfg, state, bloom_filter[], op, {})
|
||||
for op in body.consolidations:
|
||||
? process_consolidation(cfg, state, op, cache)
|
||||
|
||||
ok(operations_rewards)
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/beacon-chain.md#sync-aggregate-processing
|
||||
|
@ -999,105 +1115,6 @@ func process_execution_layer_withdrawal_request*(
|
|||
withdrawable_epoch: withdrawable_epoch,
|
||||
))
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0/specs/electra/beacon-chain.md#consolidations
|
||||
proc process_consolidation*(
|
||||
cfg: RuntimeConfig, state: var electra.BeaconState,
|
||||
signed_consolidation: SignedConsolidation, cache: var StateCache):
|
||||
Result[void, cstring] =
|
||||
# If the pending consolidations queue is full, no consolidations are allowed
|
||||
# in the block
|
||||
if not(lenu64(state.pending_consolidations) < PENDING_CONSOLIDATIONS_LIMIT):
|
||||
return err("Consolidation: too many pending consolidations already")
|
||||
|
||||
# If there is too little available consolidation churn limit, no
|
||||
# consolidations are allowed in the block
|
||||
if not (get_consolidation_churn_limit(cfg, state, cache) >
|
||||
static(MIN_ACTIVATION_BALANCE.Gwei)):
|
||||
return err("Consolidation: insufficient available consolidation churn limit")
|
||||
|
||||
let consolidation = signed_consolidation.message
|
||||
|
||||
# Verify that source != target, so a consolidation cannot be used as an exit.
|
||||
if not(consolidation.source_index != consolidation.target_index):
|
||||
return err("Consolidation: a consolidation cannot be used as an exit")
|
||||
|
||||
let
|
||||
source_validator = addr state.validators.mitem(consolidation.source_index)
|
||||
target_validator = state.validators.item(consolidation.target_index)
|
||||
|
||||
# Verify the source and the target are active
|
||||
let current_epoch = get_current_epoch(state)
|
||||
|
||||
if not is_active_validator(source_validator[], current_epoch):
|
||||
return err("Consolidation: source validator not active")
|
||||
if not is_active_validator(target_validator, current_epoch):
|
||||
return err("Consolidation: target validator not active")
|
||||
|
||||
# Verify exits for source and target have not been initiated
|
||||
if not (source_validator[].exit_epoch == FAR_FUTURE_EPOCH):
|
||||
return err("Consolidation: exit for source validator already initiated")
|
||||
if not (target_validator.exit_epoch == FAR_FUTURE_EPOCH):
|
||||
return err("Consolidation: exit for target validator already initiated")
|
||||
|
||||
# Consolidations must specify an epoch when they become valid; they are not
|
||||
# valid before then
|
||||
if not (current_epoch >= consolidation.epoch):
|
||||
return err("Consolidation: consolidation not valid before specified epoch")
|
||||
|
||||
# Verify the source and the target have Execution layer withdrawal credentials
|
||||
if not has_execution_withdrawal_credential(source_validator[]):
|
||||
return err("Consolidation: source doesn't have execution layer withdrawal credentials")
|
||||
if not has_execution_withdrawal_credential(target_validator):
|
||||
return err("Consolidation: target doesn't have execution layer withdrawal credentials")
|
||||
|
||||
# Verify the same withdrawal address
|
||||
if not (source_validator[].withdrawal_credentials.data.toOpenArray(12, 31) ==
|
||||
target_validator.withdrawal_credentials.data.toOpenArray(12, 31)):
|
||||
return err("Consolidation: source and target don't have same withdrawal address")
|
||||
|
||||
debugRaiseAssert "this is per spec, near-verbatim, but Nimbus generally factors this out into spec/signatures.nim. so, create verify_consolidation_signature infra there, call here"
|
||||
# Verify consolidation is signed by the source and the target
|
||||
let
|
||||
domain = compute_domain(
|
||||
DOMAIN_CONSOLIDATION, cfg.GENESIS_FORK_VERSION,
|
||||
genesis_validators_root=state.genesis_validators_root)
|
||||
signing_root = compute_signing_root(consolidation, domain)
|
||||
pubkeys = [source_validator[].pubkey, target_validator.pubkey]
|
||||
|
||||
if not blsFastAggregateVerify(
|
||||
pubkeys, signing_root.data, signed_consolidation.signature):
|
||||
return err("Consolidation: invalid signature")
|
||||
|
||||
# Initiate source validator exit and append pending consolidation
|
||||
source_validator[].exit_epoch = compute_consolidation_epoch_and_update_churn(
|
||||
cfg, state, source_validator[].effective_balance, cache)
|
||||
source_validator[].withdrawable_epoch =
|
||||
source_validator[].exit_epoch + cfg.MIN_VALIDATOR_WITHDRAWABILITY_DELAY
|
||||
debugRaiseAssert "check HashList add return value"
|
||||
discard state.pending_consolidations.add(PendingConsolidation(
|
||||
source_index: consolidation.source_index,
|
||||
target_index: consolidation.target_index
|
||||
))
|
||||
|
||||
ok()
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0/specs/electra/beacon-chain.md#new-process_deposit_receipt
|
||||
func process_deposit_receipt*(
|
||||
cfg: RuntimeConfig, state: var electra.BeaconState,
|
||||
bloom_filter: var PubkeyBloomFilter, deposit_receipt: DepositReceipt,
|
||||
flags: UpdateFlags): Result[void, cstring] =
|
||||
# Set deposit receipt start index
|
||||
if state.deposit_receipts_start_index ==
|
||||
UNSET_DEPOSIT_RECEIPTS_START_INDEX:
|
||||
state.deposit_receipts_start_index = deposit_receipt.index
|
||||
|
||||
apply_deposit(
|
||||
cfg, state, bloom_filter, DepositData(
|
||||
pubkey: deposit_receipt.pubkey,
|
||||
withdrawal_credentials: deposit_receipt.withdrawal_credentials,
|
||||
amount: deposit_receipt.amount,
|
||||
signature: deposit_receipt.signature), flags)
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/deneb/beacon-chain.md#kzg_commitment_to_versioned_hash
|
||||
func kzg_commitment_to_versioned_hash*(
|
||||
kzg_commitment: KzgCommitment): VersionedHash =
|
||||
|
@ -1270,7 +1287,7 @@ proc process_block*(
|
|||
|
||||
ok(operations_rewards)
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/deneb/beacon-chain.md#block-processing
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.1/specs/electra/beacon-chain.md#block-processing
|
||||
# TODO workaround for https://github.com/nim-lang/Nim/issues/18095
|
||||
type SomeElectraBlock =
|
||||
electra.BeaconBlock | electra.SigVerifiedBeaconBlock | electra.TrustedBeaconBlock
|
||||
|
|
|
@ -1428,7 +1428,7 @@ proc process_epoch*(
|
|||
|
||||
ok()
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/capella/beacon-chain.md#epoch-processing
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.1/specs/electra/beacon-chain.md#epoch-processing
|
||||
proc process_epoch*(
|
||||
cfg: RuntimeConfig, state: var electra.BeaconState,
|
||||
flags: UpdateFlags, cache: var StateCache, info: var altair.EpochInfo):
|
||||
|
@ -1458,13 +1458,15 @@ proc process_epoch*(
|
|||
process_rewards_and_penalties(cfg, state, info)
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#registry-updates
|
||||
? process_registry_updates(cfg, state, cache)
|
||||
? process_registry_updates(cfg, state, cache) # [Modified in Electra:EIP7251]
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/beacon-chain.md#slashings
|
||||
process_slashings(state, info.balances.current_epoch)
|
||||
|
||||
process_eth1_data_reset(state)
|
||||
process_effective_balance_updates(state)
|
||||
process_pending_balance_deposits(cfg, state, cache) # [New in Electra:EIP7251]
|
||||
process_pending_consolidations(cfg, state) # [New in Electra:EIP7251]
|
||||
process_effective_balance_updates(state) # [Modified in Electra:EIP7251]
|
||||
process_slashings_reset(state)
|
||||
process_randao_mixes_reset(state)
|
||||
? process_historical_summaries_update(state) # [Modified in Capella]
|
||||
|
|
|
@ -79,6 +79,14 @@ template runForkBlockTests(consensusFork: static ConsensusFork) =
|
|||
|
||||
suite "EF - " & forkHumanName & " - Sanity - Blocks " & preset():
|
||||
for kind, path in walkDir(SanityBlocksDir, relative = true, checkDir = true):
|
||||
debugRaiseAssert "this should be fixed in alpha.2; remove workaround"
|
||||
if consensusFork == ConsensusFork.Electra and path in [
|
||||
"multiple_consolidations_above_churn", # no pre.ssz
|
||||
"multiple_consolidations_below_churn", # assert block.parent_root == hash_tree_root(state.latest_block_header)
|
||||
"multiple_consolidations_equal_churn", # assert block.parent_root == hash_tree_root(state.latest_block_header)
|
||||
"multiple_consolidations_equal_twice_churn", # assert block.parent_root == hash_tree_root(state.latest_block_header)
|
||||
]:
|
||||
continue
|
||||
consensusFork.runTest(
|
||||
"EF - " & forkHumanName & " - Sanity - Blocks",
|
||||
SanityBlocksDir, suiteName, path)
|
||||
|
@ -96,5 +104,4 @@ template runForkBlockTests(consensusFork: static ConsensusFork) =
|
|||
RandomDir, suiteName, path)
|
||||
|
||||
withAll(ConsensusFork):
|
||||
when consensusFork <= ConsensusFork.Deneb:
|
||||
runForkBlockTests(consensusFork)
|
||||
runForkBlockTests(consensusFork)
|
|
@ -113,6 +113,8 @@ proc getTestStates(consensusFork: ConsensusFork): auto =
|
|||
|
||||
testStates
|
||||
|
||||
debugRaiseAssert "add some electra states, and test electra state/block loading/etc"
|
||||
|
||||
# Each set of states gets used twice, so scope them to module
|
||||
let
|
||||
testStatesPhase0 = getTestStates(ConsensusFork.Phase0)
|
||||
|
@ -888,4 +890,4 @@ suite "FinalizedBlocks" & preset():
|
|||
check: k in [Slot 0, Slot 5]
|
||||
items += 1
|
||||
|
||||
check: items == 2
|
||||
check: items == 2
|
Loading…
Reference in New Issue