use EF consensus-specs v1.5.0-alpha.4 test vectors (#6482)

This commit is contained in:
tersec 2024-08-09 13:02:04 +00:00 committed by GitHub
parent f5d360dadd
commit 2e40a401b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 58 additions and 18 deletions

View File

@ -2487,9 +2487,12 @@ OK: 12/12 Fail: 0/12 Skip: 0/12
+ Pending consolidations - all_consolidation_cases_together [Preset: mainnet] OK + Pending consolidations - all_consolidation_cases_together [Preset: mainnet] OK
+ Pending consolidations - basic_pending_consolidation [Preset: mainnet] OK + Pending consolidations - basic_pending_consolidation [Preset: mainnet] OK
+ Pending consolidations - consolidation_not_yet_withdrawable_validator [Preset: mainnet] OK + Pending consolidations - consolidation_not_yet_withdrawable_validator [Preset: mainnet] OK
+ Pending consolidations - pending_consolidation_compounding_creds [Preset: mainnet] OK
+ Pending consolidations - pending_consolidation_future_epoch [Preset: mainnet] OK
+ Pending consolidations - pending_consolidation_with_pending_deposit [Preset: mainnet] OK
+ Pending consolidations - skip_consolidation_when_source_slashed [Preset: mainnet] OK + Pending consolidations - skip_consolidation_when_source_slashed [Preset: mainnet] OK
``` ```
OK: 4/4 Fail: 0/4 Skip: 0/4 OK: 7/7 Fail: 0/7 Skip: 0/7
## EF - Electra - Epoch Processing - RANDAO mixes reset [Preset: mainnet] ## EF - Electra - Epoch Processing - RANDAO mixes reset [Preset: mainnet]
```diff ```diff
+ RANDAO mixes reset - updated_randao_mixes [Preset: mainnet] OK + RANDAO mixes reset - updated_randao_mixes [Preset: mainnet] OK
@ -2561,13 +2564,15 @@ OK: 5/5 Fail: 0/5 Skip: 0/5
+ EF - Electra - Fork - electra_fork_random_low_balances [Preset: mainnet] OK + EF - Electra - Fork - electra_fork_random_low_balances [Preset: mainnet] OK
+ EF - Electra - Fork - electra_fork_random_misc_balances [Preset: mainnet] OK + EF - Electra - Fork - electra_fork_random_misc_balances [Preset: mainnet] OK
+ EF - Electra - Fork - fork_base_state [Preset: mainnet] OK + EF - Electra - Fork - fork_base_state [Preset: mainnet] OK
+ EF - Electra - Fork - fork_has_compounding_withdrawal_credential [Preset: mainnet] OK
+ EF - Electra - Fork - fork_many_next_epoch [Preset: mainnet] OK + EF - Electra - Fork - fork_many_next_epoch [Preset: mainnet] OK
+ EF - Electra - Fork - fork_next_epoch [Preset: mainnet] OK + EF - Electra - Fork - fork_next_epoch [Preset: mainnet] OK
+ EF - Electra - Fork - fork_next_epoch_with_block [Preset: mainnet] OK + EF - Electra - Fork - fork_next_epoch_with_block [Preset: mainnet] OK
+ EF - Electra - Fork - fork_pre_activation [Preset: mainnet] OK
+ EF - Electra - Fork - fork_random_low_balances [Preset: mainnet] OK + EF - Electra - Fork - fork_random_low_balances [Preset: mainnet] OK
+ EF - Electra - Fork - fork_random_misc_balances [Preset: mainnet] OK + EF - Electra - Fork - fork_random_misc_balances [Preset: mainnet] OK
``` ```
OK: 12/12 Fail: 0/12 Skip: 0/12 OK: 14/14 Fail: 0/14 Skip: 0/14
## EF - Electra - Operations - Attestation [Preset: mainnet] ## EF - Electra - Operations - Attestation [Preset: mainnet]
```diff ```diff
+ [Invalid] EF - Electra - Operations - Attestation - invalid_after_max_inclusion_slot OK + [Invalid] EF - Electra - Operations - Attestation - invalid_after_max_inclusion_slot OK
@ -3180,8 +3185,12 @@ OK: 4/4 Fail: 0/4 Skip: 0/4
+ Light client - Single merkle proof - mainnet/deneb/light_client/single_merkle_proof/Beacon OK + Light client - Single merkle proof - mainnet/deneb/light_client/single_merkle_proof/Beacon OK
+ Light client - Single merkle proof - mainnet/deneb/light_client/single_merkle_proof/Beacon OK + Light client - Single merkle proof - mainnet/deneb/light_client/single_merkle_proof/Beacon OK
+ Light client - Single merkle proof - mainnet/deneb/light_client/single_merkle_proof/Beacon OK + Light client - Single merkle proof - mainnet/deneb/light_client/single_merkle_proof/Beacon OK
+ Light client - Single merkle proof - mainnet/electra/light_client/single_merkle_proof/Beac OK
+ Light client - Single merkle proof - mainnet/electra/light_client/single_merkle_proof/Beac OK
+ Light client - Single merkle proof - mainnet/electra/light_client/single_merkle_proof/Beac OK
+ Light client - Single merkle proof - mainnet/electra/light_client/single_merkle_proof/Beac OK
``` ```
OK: 14/14 Fail: 0/14 Skip: 0/14 OK: 18/18 Fail: 0/18 Skip: 0/18
## EF - Merkle proof [Preset: mainnet] ## EF - Merkle proof [Preset: mainnet]
```diff ```diff
Merkle proof - Single merkle proof - eip7594 Skip Merkle proof - Single merkle proof - eip7594 Skip
@ -3189,8 +3198,12 @@ OK: 14/14 Fail: 0/14 Skip: 0/14
+ Merkle proof - Single merkle proof - mainnet/deneb/merkle_proof/single_merkle_proof/Beacon OK + Merkle proof - Single merkle proof - mainnet/deneb/merkle_proof/single_merkle_proof/Beacon OK
+ Merkle proof - Single merkle proof - mainnet/deneb/merkle_proof/single_merkle_proof/Beacon OK + Merkle proof - Single merkle proof - mainnet/deneb/merkle_proof/single_merkle_proof/Beacon OK
+ Merkle proof - Single merkle proof - mainnet/deneb/merkle_proof/single_merkle_proof/Beacon OK + Merkle proof - Single merkle proof - mainnet/deneb/merkle_proof/single_merkle_proof/Beacon OK
+ Merkle proof - Single merkle proof - mainnet/electra/merkle_proof/single_merkle_proof/Beac OK
+ Merkle proof - Single merkle proof - mainnet/electra/merkle_proof/single_merkle_proof/Beac OK
+ Merkle proof - Single merkle proof - mainnet/electra/merkle_proof/single_merkle_proof/Beac OK
+ Merkle proof - Single merkle proof - mainnet/electra/merkle_proof/single_merkle_proof/Beac OK
``` ```
OK: 4/5 Fail: 0/5 Skip: 1/5 OK: 8/9 Fail: 0/9 Skip: 1/9
## EF - Phase 0 - Epoch Processing - Effective balance updates [Preset: mainnet] ## EF - Phase 0 - Epoch Processing - Effective balance updates [Preset: mainnet]
```diff ```diff
+ Effective balance updates - effective_balance_hysteresis [Preset: mainnet] OK + Effective balance updates - effective_balance_hysteresis [Preset: mainnet] OK
@ -3693,4 +3706,4 @@ OK: 69/88 Fail: 0/88 Skip: 19/88
OK: 3/3 Fail: 0/3 Skip: 0/3 OK: 3/3 Fail: 0/3 Skip: 0/3
---TOTAL--- ---TOTAL---
OK: 2971/2991 Fail: 0/2991 Skip: 20/2991 OK: 2984/3004 Fail: 0/3004 Skip: 20/3004

View File

@ -2598,9 +2598,12 @@ OK: 12/12 Fail: 0/12 Skip: 0/12
+ Pending consolidations - all_consolidation_cases_together [Preset: minimal] OK + Pending consolidations - all_consolidation_cases_together [Preset: minimal] OK
+ Pending consolidations - basic_pending_consolidation [Preset: minimal] OK + Pending consolidations - basic_pending_consolidation [Preset: minimal] OK
+ Pending consolidations - consolidation_not_yet_withdrawable_validator [Preset: minimal] OK + Pending consolidations - consolidation_not_yet_withdrawable_validator [Preset: minimal] OK
+ Pending consolidations - pending_consolidation_compounding_creds [Preset: minimal] OK
+ Pending consolidations - pending_consolidation_future_epoch [Preset: minimal] OK
+ Pending consolidations - pending_consolidation_with_pending_deposit [Preset: minimal] OK
+ Pending consolidations - skip_consolidation_when_source_slashed [Preset: minimal] OK + Pending consolidations - skip_consolidation_when_source_slashed [Preset: minimal] OK
``` ```
OK: 4/4 Fail: 0/4 Skip: 0/4 OK: 7/7 Fail: 0/7 Skip: 0/7
## EF - Electra - Epoch Processing - RANDAO mixes reset [Preset: minimal] ## EF - Electra - Epoch Processing - RANDAO mixes reset [Preset: minimal]
```diff ```diff
+ RANDAO mixes reset - updated_randao_mixes [Preset: minimal] OK + RANDAO mixes reset - updated_randao_mixes [Preset: minimal] OK
@ -2689,14 +2692,16 @@ OK: 5/5 Fail: 0/5 Skip: 0/5
+ EF - Electra - Fork - electra_fork_random_low_balances [Preset: minimal] OK + EF - Electra - Fork - electra_fork_random_low_balances [Preset: minimal] OK
+ EF - Electra - Fork - electra_fork_random_misc_balances [Preset: minimal] OK + EF - Electra - Fork - electra_fork_random_misc_balances [Preset: minimal] OK
+ EF - Electra - Fork - fork_base_state [Preset: minimal] OK + EF - Electra - Fork - fork_base_state [Preset: minimal] OK
+ EF - Electra - Fork - fork_has_compounding_withdrawal_credential [Preset: minimal] OK
+ EF - Electra - Fork - fork_many_next_epoch [Preset: minimal] OK + EF - Electra - Fork - fork_many_next_epoch [Preset: minimal] OK
+ EF - Electra - Fork - fork_next_epoch [Preset: minimal] OK + EF - Electra - Fork - fork_next_epoch [Preset: minimal] OK
+ EF - Electra - Fork - fork_next_epoch_with_block [Preset: minimal] OK + EF - Electra - Fork - fork_next_epoch_with_block [Preset: minimal] OK
+ EF - Electra - Fork - fork_pre_activation [Preset: minimal] OK
+ EF - Electra - Fork - fork_random_large_validator_set [Preset: minimal] OK + EF - Electra - Fork - fork_random_large_validator_set [Preset: minimal] OK
+ EF - Electra - Fork - fork_random_low_balances [Preset: minimal] OK + EF - Electra - Fork - fork_random_low_balances [Preset: minimal] OK
+ EF - Electra - Fork - fork_random_misc_balances [Preset: minimal] OK + EF - Electra - Fork - fork_random_misc_balances [Preset: minimal] OK
``` ```
OK: 14/14 Fail: 0/14 Skip: 0/14 OK: 16/16 Fail: 0/16 Skip: 0/16
## EF - Electra - Operations - Attestation [Preset: minimal] ## EF - Electra - Operations - Attestation [Preset: minimal]
```diff ```diff
+ [Invalid] EF - Electra - Operations - Attestation - invalid_after_max_inclusion_slot OK + [Invalid] EF - Electra - Operations - Attestation - invalid_after_max_inclusion_slot OK
@ -3345,40 +3350,55 @@ OK: 4/4 Fail: 0/4 Skip: 0/4
+ Light client - Single merkle proof - minimal/deneb/light_client/single_merkle_proof/Beacon OK + Light client - Single merkle proof - minimal/deneb/light_client/single_merkle_proof/Beacon OK
+ Light client - Single merkle proof - minimal/deneb/light_client/single_merkle_proof/Beacon OK + Light client - Single merkle proof - minimal/deneb/light_client/single_merkle_proof/Beacon OK
+ Light client - Single merkle proof - minimal/deneb/light_client/single_merkle_proof/Beacon OK + Light client - Single merkle proof - minimal/deneb/light_client/single_merkle_proof/Beacon OK
+ Light client - Single merkle proof - minimal/electra/light_client/single_merkle_proof/Beac OK
+ Light client - Single merkle proof - minimal/electra/light_client/single_merkle_proof/Beac OK
+ Light client - Single merkle proof - minimal/electra/light_client/single_merkle_proof/Beac OK
+ Light client - Single merkle proof - minimal/electra/light_client/single_merkle_proof/Beac OK
``` ```
OK: 14/14 Fail: 0/14 Skip: 0/14 OK: 18/18 Fail: 0/18 Skip: 0/18
## EF - Light client - Sync [Preset: minimal] ## EF - Light client - Sync [Preset: minimal]
```diff ```diff
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/advance_finality_witho 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/capella_store_with_leg OK + Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/capella_store_with_leg OK
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/deneb_store_with_legac OK + Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/deneb_store_with_legac OK
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/electra_store_with_leg 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/light_client_sync OK
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/supply_sync_committee_ OK + Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/supply_sync_committee_ OK
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/advance_finality_wi OK + Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/advance_finality_wi OK
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/capella_deneb_fork OK + Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/capella_deneb_fork OK
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/capella_electra_for OK
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/capella_fork OK + Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/capella_fork OK
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/capella_store_with_ OK + Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/capella_store_with_ OK
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/deneb_store_with_le OK + Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/deneb_store_with_le OK
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/electra_store_with_ OK
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/light_client_sync OK + Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/light_client_sync OK
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/supply_sync_committ OK + Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/supply_sync_committ OK
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/advance_finality_with OK + Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/advance_finality_with OK
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/deneb_electra_fork OK
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/deneb_fork OK + Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/deneb_fork OK
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/deneb_store_with_lega OK + Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/deneb_store_with_lega OK
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/electra_store_with_le OK
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/light_client_sync OK + Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/light_client_sync OK
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/supply_sync_committee OK + Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/supply_sync_committee OK
+ Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/advance_finality_withou OK + Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/advance_finality_withou OK
+ Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/electra_fork OK
+ Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/electra_store_with_lega OK
+ Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/light_client_sync OK + Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/light_client_sync OK
+ Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/supply_sync_committee_f OK + Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/supply_sync_committee_f OK
+ Light client - Sync - minimal/electra/light_client/sync/pyspec_tests/advance_finality_with OK
+ Light client - Sync - minimal/electra/light_client/sync/pyspec_tests/light_client_sync OK
+ Light client - Sync - minimal/electra/light_client/sync/pyspec_tests/supply_sync_committee OK
``` ```
OK: 20/20 Fail: 0/20 Skip: 0/20 OK: 30/30 Fail: 0/30 Skip: 0/30
## EF - Light client - Update ranking [Preset: minimal] ## EF - Light client - Update ranking [Preset: minimal]
```diff ```diff
+ Light client - Update ranking - minimal/altair/light_client/update_ranking/pyspec_tests/up OK + 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/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/capella/light_client/update_ranking/pyspec_tests/u OK
+ Light client - Update ranking - minimal/deneb/light_client/update_ranking/pyspec_tests/upd OK + Light client - Update ranking - minimal/deneb/light_client/update_ranking/pyspec_tests/upd OK
+ Light client - Update ranking - minimal/electra/light_client/update_ranking/pyspec_tests/u OK
``` ```
OK: 4/4 Fail: 0/4 Skip: 0/4 OK: 5/5 Fail: 0/5 Skip: 0/5
## EF - Merkle proof [Preset: minimal] ## EF - Merkle proof [Preset: minimal]
```diff ```diff
Merkle proof - Single merkle proof - eip7594 Skip Merkle proof - Single merkle proof - eip7594 Skip
@ -3386,8 +3406,12 @@ OK: 4/4 Fail: 0/4 Skip: 0/4
+ Merkle proof - Single merkle proof - minimal/deneb/merkle_proof/single_merkle_proof/Beacon OK + Merkle proof - Single merkle proof - minimal/deneb/merkle_proof/single_merkle_proof/Beacon OK
+ Merkle proof - Single merkle proof - minimal/deneb/merkle_proof/single_merkle_proof/Beacon OK + Merkle proof - Single merkle proof - minimal/deneb/merkle_proof/single_merkle_proof/Beacon OK
+ Merkle proof - Single merkle proof - minimal/deneb/merkle_proof/single_merkle_proof/Beacon OK + Merkle proof - Single merkle proof - minimal/deneb/merkle_proof/single_merkle_proof/Beacon OK
+ Merkle proof - Single merkle proof - minimal/electra/merkle_proof/single_merkle_proof/Beac OK
+ Merkle proof - Single merkle proof - minimal/electra/merkle_proof/single_merkle_proof/Beac OK
+ Merkle proof - Single merkle proof - minimal/electra/merkle_proof/single_merkle_proof/Beac OK
+ Merkle proof - Single merkle proof - minimal/electra/merkle_proof/single_merkle_proof/Beac OK
``` ```
OK: 4/5 Fail: 0/5 Skip: 1/5 OK: 8/9 Fail: 0/9 Skip: 1/9
## EF - Phase 0 - Epoch Processing - Effective balance updates [Preset: minimal] ## EF - Phase 0 - Epoch Processing - Effective balance updates [Preset: minimal]
```diff ```diff
+ Effective balance updates - effective_balance_hysteresis [Preset: minimal] OK + Effective balance updates - effective_balance_hysteresis [Preset: minimal] OK
@ -4019,4 +4043,4 @@ OK: 185/207 Fail: 0/207 Skip: 22/207
OK: 3/3 Fail: 0/3 Skip: 0/3 OK: 3/3 Fail: 0/3 Skip: 0/3
---TOTAL--- ---TOTAL---
OK: 3266/3289 Fail: 0/3289 Skip: 23/3289 OK: 3290/3313 Fail: 0/3313 Skip: 23/3313

View File

@ -74,7 +74,7 @@ export
tables, results, endians2, json_serialization, sszTypes, beacon_time, crypto, tables, results, endians2, json_serialization, sszTypes, beacon_time, crypto,
digest, presets digest, presets
const SPEC_VERSION* = "1.5.0-alpha.3" const SPEC_VERSION* = "1.5.0-alpha.4"
## Spec version we're aiming to be compatible with, right now ## Spec version we're aiming to be compatible with, right now
const const

View File

@ -1234,8 +1234,10 @@ func process_historical_summaries_update*(
func process_pending_balance_deposits*( func process_pending_balance_deposits*(
cfg: RuntimeConfig, state: var electra.BeaconState, cfg: RuntimeConfig, state: var electra.BeaconState,
cache: var StateCache): Result[void, cstring] = cache: var StateCache): Result[void, cstring] =
let available_for_processing = state.deposit_balance_to_consume + let
get_activation_exit_churn_limit(cfg, state, cache) next_epoch = get_current_epoch(state) + 1
available_for_processing = state.deposit_balance_to_consume +
get_activation_exit_churn_limit(cfg, state, cache)
var var
processed_amount = 0.Gwei processed_amount = 0.Gwei
next_deposit_index = 0 next_deposit_index = 0
@ -1250,7 +1252,7 @@ func process_pending_balance_deposits*(
# Validator is exiting, postpone the deposit until after withdrawable epoch # Validator is exiting, postpone the deposit until after withdrawable epoch
if validator.exit_epoch < FAR_FUTURE_EPOCH: if validator.exit_epoch < FAR_FUTURE_EPOCH:
if get_current_epoch(state) <= validator.withdrawable_epoch: if next_epoch <= validator.withdrawable_epoch:
deposits_to_postpone.add(deposit) deposits_to_postpone.add(deposit)
# Deposited balance will never become active. Increase balance but do not # Deposited balance will never become active. Increase balance but do not
# consume churn # consume churn
@ -1290,6 +1292,7 @@ func process_pending_balance_deposits*(
func process_pending_consolidations*( func process_pending_consolidations*(
cfg: RuntimeConfig, state: var electra.BeaconState): cfg: RuntimeConfig, state: var electra.BeaconState):
Result[void, cstring] = Result[void, cstring] =
let next_epoch = get_current_epoch(state) + 1
var next_pending_consolidation = 0 var next_pending_consolidation = 0
for pending_consolidation in state.pending_consolidations: for pending_consolidation in state.pending_consolidations:
let source_validator = let source_validator =
@ -1297,7 +1300,7 @@ func process_pending_consolidations*(
if source_validator.slashed: if source_validator.slashed:
next_pending_consolidation += 1 next_pending_consolidation += 1
continue continue
if source_validator.withdrawable_epoch > get_current_epoch(state): if source_validator.withdrawable_epoch > next_epoch:
break break
let let

@ -1 +1 @@
Subproject commit fc7a45a731736248b96ad5827a8356c0e14d3b8c Subproject commit 70796750ec065b6e99c0f9ae030bad61fb213b4b