Skip to content

Commit 2e40a40

Browse files
authored
use EF consensus-specs v1.5.0-alpha.4 test vectors (#6482)
1 parent f5d360d commit 2e40a40

File tree

5 files changed

+58
-18
lines changed

5 files changed

+58
-18
lines changed

ConsensusSpecPreset-mainnet.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2487,9 +2487,12 @@ OK: 12/12 Fail: 0/12 Skip: 0/12
24872487
+ Pending consolidations - all_consolidation_cases_together [Preset: mainnet] OK
24882488
+ Pending consolidations - basic_pending_consolidation [Preset: mainnet] OK
24892489
+ Pending consolidations - consolidation_not_yet_withdrawable_validator [Preset: mainnet] OK
2490+
+ Pending consolidations - pending_consolidation_compounding_creds [Preset: mainnet] OK
2491+
+ Pending consolidations - pending_consolidation_future_epoch [Preset: mainnet] OK
2492+
+ Pending consolidations - pending_consolidation_with_pending_deposit [Preset: mainnet] OK
24902493
+ Pending consolidations - skip_consolidation_when_source_slashed [Preset: mainnet] OK
24912494
```
2492-
OK: 4/4 Fail: 0/4 Skip: 0/4
2495+
OK: 7/7 Fail: 0/7 Skip: 0/7
24932496
## EF - Electra - Epoch Processing - RANDAO mixes reset [Preset: mainnet]
24942497
```diff
24952498
+ RANDAO mixes reset - updated_randao_mixes [Preset: mainnet] OK
@@ -2561,13 +2564,15 @@ OK: 5/5 Fail: 0/5 Skip: 0/5
25612564
+ EF - Electra - Fork - electra_fork_random_low_balances [Preset: mainnet] OK
25622565
+ EF - Electra - Fork - electra_fork_random_misc_balances [Preset: mainnet] OK
25632566
+ EF - Electra - Fork - fork_base_state [Preset: mainnet] OK
2567+
+ EF - Electra - Fork - fork_has_compounding_withdrawal_credential [Preset: mainnet] OK
25642568
+ EF - Electra - Fork - fork_many_next_epoch [Preset: mainnet] OK
25652569
+ EF - Electra - Fork - fork_next_epoch [Preset: mainnet] OK
25662570
+ EF - Electra - Fork - fork_next_epoch_with_block [Preset: mainnet] OK
2571+
+ EF - Electra - Fork - fork_pre_activation [Preset: mainnet] OK
25672572
+ EF - Electra - Fork - fork_random_low_balances [Preset: mainnet] OK
25682573
+ EF - Electra - Fork - fork_random_misc_balances [Preset: mainnet] OK
25692574
```
2570-
OK: 12/12 Fail: 0/12 Skip: 0/12
2575+
OK: 14/14 Fail: 0/14 Skip: 0/14
25712576
## EF - Electra - Operations - Attestation [Preset: mainnet]
25722577
```diff
25732578
+ [Invalid] EF - Electra - Operations - Attestation - invalid_after_max_inclusion_slot OK
@@ -3180,17 +3185,25 @@ OK: 4/4 Fail: 0/4 Skip: 0/4
31803185
+ Light client - Single merkle proof - mainnet/deneb/light_client/single_merkle_proof/Beacon OK
31813186
+ Light client - Single merkle proof - mainnet/deneb/light_client/single_merkle_proof/Beacon OK
31823187
+ Light client - Single merkle proof - mainnet/deneb/light_client/single_merkle_proof/Beacon OK
3188+
+ Light client - Single merkle proof - mainnet/electra/light_client/single_merkle_proof/Beac OK
3189+
+ Light client - Single merkle proof - mainnet/electra/light_client/single_merkle_proof/Beac OK
3190+
+ Light client - Single merkle proof - mainnet/electra/light_client/single_merkle_proof/Beac OK
3191+
+ Light client - Single merkle proof - mainnet/electra/light_client/single_merkle_proof/Beac OK
31833192
```
3184-
OK: 14/14 Fail: 0/14 Skip: 0/14
3193+
OK: 18/18 Fail: 0/18 Skip: 0/18
31853194
## EF - Merkle proof [Preset: mainnet]
31863195
```diff
31873196
Merkle proof - Single merkle proof - eip7594 Skip
31883197
+ Merkle proof - Single merkle proof - mainnet/deneb/merkle_proof/single_merkle_proof/Beacon OK
31893198
+ Merkle proof - Single merkle proof - mainnet/deneb/merkle_proof/single_merkle_proof/Beacon OK
31903199
+ Merkle proof - Single merkle proof - mainnet/deneb/merkle_proof/single_merkle_proof/Beacon OK
31913200
+ Merkle proof - Single merkle proof - mainnet/deneb/merkle_proof/single_merkle_proof/Beacon OK
3201+
+ Merkle proof - Single merkle proof - mainnet/electra/merkle_proof/single_merkle_proof/Beac OK
3202+
+ Merkle proof - Single merkle proof - mainnet/electra/merkle_proof/single_merkle_proof/Beac OK
3203+
+ Merkle proof - Single merkle proof - mainnet/electra/merkle_proof/single_merkle_proof/Beac OK
3204+
+ Merkle proof - Single merkle proof - mainnet/electra/merkle_proof/single_merkle_proof/Beac OK
31923205
```
3193-
OK: 4/5 Fail: 0/5 Skip: 1/5
3206+
OK: 8/9 Fail: 0/9 Skip: 1/9
31943207
## EF - Phase 0 - Epoch Processing - Effective balance updates [Preset: mainnet]
31953208
```diff
31963209
+ Effective balance updates - effective_balance_hysteresis [Preset: mainnet] OK
@@ -3693,4 +3706,4 @@ OK: 69/88 Fail: 0/88 Skip: 19/88
36933706
OK: 3/3 Fail: 0/3 Skip: 0/3
36943707

36953708
---TOTAL---
3696-
OK: 2971/2991 Fail: 0/2991 Skip: 20/2991
3709+
OK: 2984/3004 Fail: 0/3004 Skip: 20/3004

ConsensusSpecPreset-minimal.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2598,9 +2598,12 @@ OK: 12/12 Fail: 0/12 Skip: 0/12
25982598
+ Pending consolidations - all_consolidation_cases_together [Preset: minimal] OK
25992599
+ Pending consolidations - basic_pending_consolidation [Preset: minimal] OK
26002600
+ Pending consolidations - consolidation_not_yet_withdrawable_validator [Preset: minimal] OK
2601+
+ Pending consolidations - pending_consolidation_compounding_creds [Preset: minimal] OK
2602+
+ Pending consolidations - pending_consolidation_future_epoch [Preset: minimal] OK
2603+
+ Pending consolidations - pending_consolidation_with_pending_deposit [Preset: minimal] OK
26012604
+ Pending consolidations - skip_consolidation_when_source_slashed [Preset: minimal] OK
26022605
```
2603-
OK: 4/4 Fail: 0/4 Skip: 0/4
2606+
OK: 7/7 Fail: 0/7 Skip: 0/7
26042607
## EF - Electra - Epoch Processing - RANDAO mixes reset [Preset: minimal]
26052608
```diff
26062609
+ RANDAO mixes reset - updated_randao_mixes [Preset: minimal] OK
@@ -2689,14 +2692,16 @@ OK: 5/5 Fail: 0/5 Skip: 0/5
26892692
+ EF - Electra - Fork - electra_fork_random_low_balances [Preset: minimal] OK
26902693
+ EF - Electra - Fork - electra_fork_random_misc_balances [Preset: minimal] OK
26912694
+ EF - Electra - Fork - fork_base_state [Preset: minimal] OK
2695+
+ EF - Electra - Fork - fork_has_compounding_withdrawal_credential [Preset: minimal] OK
26922696
+ EF - Electra - Fork - fork_many_next_epoch [Preset: minimal] OK
26932697
+ EF - Electra - Fork - fork_next_epoch [Preset: minimal] OK
26942698
+ EF - Electra - Fork - fork_next_epoch_with_block [Preset: minimal] OK
2699+
+ EF - Electra - Fork - fork_pre_activation [Preset: minimal] OK
26952700
+ EF - Electra - Fork - fork_random_large_validator_set [Preset: minimal] OK
26962701
+ EF - Electra - Fork - fork_random_low_balances [Preset: minimal] OK
26972702
+ EF - Electra - Fork - fork_random_misc_balances [Preset: minimal] OK
26982703
```
2699-
OK: 14/14 Fail: 0/14 Skip: 0/14
2704+
OK: 16/16 Fail: 0/16 Skip: 0/16
27002705
## EF - Electra - Operations - Attestation [Preset: minimal]
27012706
```diff
27022707
+ [Invalid] EF - Electra - Operations - Attestation - invalid_after_max_inclusion_slot OK
@@ -3345,49 +3350,68 @@ OK: 4/4 Fail: 0/4 Skip: 0/4
33453350
+ Light client - Single merkle proof - minimal/deneb/light_client/single_merkle_proof/Beacon OK
33463351
+ Light client - Single merkle proof - minimal/deneb/light_client/single_merkle_proof/Beacon OK
33473352
+ Light client - Single merkle proof - minimal/deneb/light_client/single_merkle_proof/Beacon OK
3353+
+ Light client - Single merkle proof - minimal/electra/light_client/single_merkle_proof/Beac OK
3354+
+ Light client - Single merkle proof - minimal/electra/light_client/single_merkle_proof/Beac OK
3355+
+ Light client - Single merkle proof - minimal/electra/light_client/single_merkle_proof/Beac OK
3356+
+ Light client - Single merkle proof - minimal/electra/light_client/single_merkle_proof/Beac OK
33483357
```
3349-
OK: 14/14 Fail: 0/14 Skip: 0/14
3358+
OK: 18/18 Fail: 0/18 Skip: 0/18
33503359
## EF - Light client - Sync [Preset: minimal]
33513360
```diff
33523361
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/advance_finality_witho OK
33533362
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/capella_store_with_leg OK
33543363
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/deneb_store_with_legac OK
3364+
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/electra_store_with_leg OK
33553365
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/light_client_sync OK
33563366
+ Light client - Sync - minimal/altair/light_client/sync/pyspec_tests/supply_sync_committee_ OK
33573367
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/advance_finality_wi OK
33583368
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/capella_deneb_fork OK
3369+
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/capella_electra_for OK
33593370
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/capella_fork OK
33603371
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/capella_store_with_ OK
33613372
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/deneb_store_with_le OK
3373+
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/electra_store_with_ OK
33623374
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/light_client_sync OK
33633375
+ Light client - Sync - minimal/bellatrix/light_client/sync/pyspec_tests/supply_sync_committ OK
33643376
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/advance_finality_with OK
3377+
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/deneb_electra_fork OK
33653378
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/deneb_fork OK
33663379
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/deneb_store_with_lega OK
3380+
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/electra_store_with_le OK
33673381
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/light_client_sync OK
33683382
+ Light client - Sync - minimal/capella/light_client/sync/pyspec_tests/supply_sync_committee OK
33693383
+ Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/advance_finality_withou OK
3384+
+ Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/electra_fork OK
3385+
+ Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/electra_store_with_lega OK
33703386
+ Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/light_client_sync OK
33713387
+ Light client - Sync - minimal/deneb/light_client/sync/pyspec_tests/supply_sync_committee_f OK
3388+
+ Light client - Sync - minimal/electra/light_client/sync/pyspec_tests/advance_finality_with OK
3389+
+ Light client - Sync - minimal/electra/light_client/sync/pyspec_tests/light_client_sync OK
3390+
+ Light client - Sync - minimal/electra/light_client/sync/pyspec_tests/supply_sync_committee OK
33723391
```
3373-
OK: 20/20 Fail: 0/20 Skip: 0/20
3392+
OK: 30/30 Fail: 0/30 Skip: 0/30
33743393
## EF - Light client - Update ranking [Preset: minimal]
33753394
```diff
33763395
+ Light client - Update ranking - minimal/altair/light_client/update_ranking/pyspec_tests/up OK
33773396
+ Light client - Update ranking - minimal/bellatrix/light_client/update_ranking/pyspec_tests OK
33783397
+ Light client - Update ranking - minimal/capella/light_client/update_ranking/pyspec_tests/u OK
33793398
+ Light client - Update ranking - minimal/deneb/light_client/update_ranking/pyspec_tests/upd OK
3399+
+ Light client - Update ranking - minimal/electra/light_client/update_ranking/pyspec_tests/u OK
33803400
```
3381-
OK: 4/4 Fail: 0/4 Skip: 0/4
3401+
OK: 5/5 Fail: 0/5 Skip: 0/5
33823402
## EF - Merkle proof [Preset: minimal]
33833403
```diff
33843404
Merkle proof - Single merkle proof - eip7594 Skip
33853405
+ Merkle proof - Single merkle proof - minimal/deneb/merkle_proof/single_merkle_proof/Beacon OK
33863406
+ Merkle proof - Single merkle proof - minimal/deneb/merkle_proof/single_merkle_proof/Beacon OK
33873407
+ Merkle proof - Single merkle proof - minimal/deneb/merkle_proof/single_merkle_proof/Beacon OK
33883408
+ Merkle proof - Single merkle proof - minimal/deneb/merkle_proof/single_merkle_proof/Beacon OK
3409+
+ Merkle proof - Single merkle proof - minimal/electra/merkle_proof/single_merkle_proof/Beac OK
3410+
+ Merkle proof - Single merkle proof - minimal/electra/merkle_proof/single_merkle_proof/Beac OK
3411+
+ Merkle proof - Single merkle proof - minimal/electra/merkle_proof/single_merkle_proof/Beac OK
3412+
+ Merkle proof - Single merkle proof - minimal/electra/merkle_proof/single_merkle_proof/Beac OK
33893413
```
3390-
OK: 4/5 Fail: 0/5 Skip: 1/5
3414+
OK: 8/9 Fail: 0/9 Skip: 1/9
33913415
## EF - Phase 0 - Epoch Processing - Effective balance updates [Preset: minimal]
33923416
```diff
33933417
+ Effective balance updates - effective_balance_hysteresis [Preset: minimal] OK
@@ -4019,4 +4043,4 @@ OK: 185/207 Fail: 0/207 Skip: 22/207
40194043
OK: 3/3 Fail: 0/3 Skip: 0/3
40204044

40214045
---TOTAL---
4022-
OK: 3266/3289 Fail: 0/3289 Skip: 23/3289
4046+
OK: 3290/3313 Fail: 0/3313 Skip: 23/3313

beacon_chain/spec/datatypes/base.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export
7474
tables, results, endians2, json_serialization, sszTypes, beacon_time, crypto,
7575
digest, presets
7676

77-
const SPEC_VERSION* = "1.5.0-alpha.3"
77+
const SPEC_VERSION* = "1.5.0-alpha.4"
7878
## Spec version we're aiming to be compatible with, right now
7979

8080
const

beacon_chain/spec/state_transition_epoch.nim

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,8 +1234,10 @@ func process_historical_summaries_update*(
12341234
func process_pending_balance_deposits*(
12351235
cfg: RuntimeConfig, state: var electra.BeaconState,
12361236
cache: var StateCache): Result[void, cstring] =
1237-
let available_for_processing = state.deposit_balance_to_consume +
1238-
get_activation_exit_churn_limit(cfg, state, cache)
1237+
let
1238+
next_epoch = get_current_epoch(state) + 1
1239+
available_for_processing = state.deposit_balance_to_consume +
1240+
get_activation_exit_churn_limit(cfg, state, cache)
12391241
var
12401242
processed_amount = 0.Gwei
12411243
next_deposit_index = 0
@@ -1250,7 +1252,7 @@ func process_pending_balance_deposits*(
12501252

12511253
# Validator is exiting, postpone the deposit until after withdrawable epoch
12521254
if validator.exit_epoch < FAR_FUTURE_EPOCH:
1253-
if get_current_epoch(state) <= validator.withdrawable_epoch:
1255+
if next_epoch <= validator.withdrawable_epoch:
12541256
deposits_to_postpone.add(deposit)
12551257
# Deposited balance will never become active. Increase balance but do not
12561258
# consume churn
@@ -1290,14 +1292,15 @@ func process_pending_balance_deposits*(
12901292
func process_pending_consolidations*(
12911293
cfg: RuntimeConfig, state: var electra.BeaconState):
12921294
Result[void, cstring] =
1295+
let next_epoch = get_current_epoch(state) + 1
12931296
var next_pending_consolidation = 0
12941297
for pending_consolidation in state.pending_consolidations:
12951298
let source_validator =
12961299
state.validators.item(pending_consolidation.source_index)
12971300
if source_validator.slashed:
12981301
next_pending_consolidation += 1
12991302
continue
1300-
if source_validator.withdrawable_epoch > get_current_epoch(state):
1303+
if source_validator.withdrawable_epoch > next_epoch:
13011304
break
13021305

13031306
let

vendor/nim-eth2-scenarios

0 commit comments

Comments
 (0)