Skip to content

Commit

Permalink
use v1.4.0-beta.4 consensus spec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec committed Nov 4, 2023
1 parent 29fe958 commit 77831a4
Show file tree
Hide file tree
Showing 17 changed files with 145 additions and 89 deletions.
18 changes: 14 additions & 4 deletions ConsensusSpecPreset-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -2258,7 +2258,6 @@ OK: 34/34 Fail: 0/34 Skip: 0/34
+ Testing SignedBLSToExecutionChange OK
+ Testing SignedBeaconBlock OK
+ Testing SignedBeaconBlockHeader OK
+ Testing SignedBlobSidecar OK
+ Testing SignedContributionAndProof OK
+ Testing SignedVoluntaryExit OK
+ Testing SigningData OK
Expand All @@ -2271,7 +2270,7 @@ OK: 34/34 Fail: 0/34 Skip: 0/34
+ Testing VoluntaryExit OK
+ Testing Withdrawal OK
```
OK: 49/49 Fail: 0/49 Skip: 0/49
OK: 48/48 Fail: 0/48 Skip: 0/48
## EF - Deneb - Sanity - Blocks [Preset: mainnet]
```diff
+ [Invalid] EF - Deneb - Sanity - Blocks - invalid_all_zeroed_sig [Preset: mainnet] OK
Expand Down Expand Up @@ -2825,6 +2824,8 @@ OK: 40/40 Fail: 0/40 Skip: 0/40
+ ForkChoice - mainnet/altair/fork_choice/get_head/pyspec_tests/proposer_boost_correct_head OK
+ ForkChoice - mainnet/altair/fork_choice/get_head/pyspec_tests/shorter_chain_but_heavier_we OK
+ ForkChoice - mainnet/altair/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attesta OK
+ ForkChoice - mainnet/altair/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_root OK
+ ForkChoice - mainnet/altair/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_roo OK
+ ForkChoice - mainnet/altair/fork_choice/on_block/pyspec_tests/basic OK
+ ForkChoice - mainnet/altair/fork_choice/on_block/pyspec_tests/on_block_bad_parent_root OK
ForkChoice - mainnet/altair/fork_choice/on_block/pyspec_tests/on_block_future_block Skip
Expand All @@ -2842,6 +2843,8 @@ OK: 40/40 Fail: 0/40 Skip: 0/40
+ ForkChoice - mainnet/bellatrix/fork_choice/get_head/pyspec_tests/proposer_boost_correct_he OK
+ ForkChoice - mainnet/bellatrix/fork_choice/get_head/pyspec_tests/shorter_chain_but_heavier OK
+ ForkChoice - mainnet/bellatrix/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_atte OK
+ ForkChoice - mainnet/bellatrix/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_ro OK
+ ForkChoice - mainnet/bellatrix/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_ OK
+ ForkChoice - mainnet/bellatrix/fork_choice/on_block/pyspec_tests/basic OK
+ ForkChoice - mainnet/bellatrix/fork_choice/on_block/pyspec_tests/on_block_bad_parent_root OK
ForkChoice - mainnet/bellatrix/fork_choice/on_block/pyspec_tests/on_block_future_block Skip
Expand All @@ -2852,6 +2855,7 @@ OK: 40/40 Fail: 0/40 Skip: 0/40
ForkChoice - mainnet/bellatrix/fork_choice/on_merge_block/pyspec_tests/block_lookup_failed Skip
ForkChoice - mainnet/bellatrix/fork_choice/on_merge_block/pyspec_tests/too_early_for_merge Skip
ForkChoice - mainnet/bellatrix/fork_choice/on_merge_block/pyspec_tests/too_late_for_merge Skip
+ ForkChoice - mainnet/bellatrix/fork_choice/should_override_forkchoice_update/pyspec_tests/ OK
+ ForkChoice - mainnet/capella/fork_choice/ex_ante/pyspec_tests/ex_ante_attestations_is_grea OK
+ ForkChoice - mainnet/capella/fork_choice/ex_ante/pyspec_tests/ex_ante_sandwich_with_boost_ OK
+ ForkChoice - mainnet/capella/fork_choice/ex_ante/pyspec_tests/ex_ante_sandwich_with_honest OK
Expand All @@ -2863,12 +2867,15 @@ OK: 40/40 Fail: 0/40 Skip: 0/40
+ ForkChoice - mainnet/capella/fork_choice/get_head/pyspec_tests/proposer_boost_correct_head OK
+ ForkChoice - mainnet/capella/fork_choice/get_head/pyspec_tests/shorter_chain_but_heavier_w OK
+ ForkChoice - mainnet/capella/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attest OK
+ ForkChoice - mainnet/capella/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_root OK
+ ForkChoice - mainnet/capella/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_ro OK
+ ForkChoice - mainnet/capella/fork_choice/on_block/pyspec_tests/basic OK
+ ForkChoice - mainnet/capella/fork_choice/on_block/pyspec_tests/on_block_bad_parent_root OK
ForkChoice - mainnet/capella/fork_choice/on_block/pyspec_tests/on_block_future_block Skip
+ ForkChoice - mainnet/capella/fork_choice/on_block/pyspec_tests/proposer_boost OK
+ ForkChoice - mainnet/capella/fork_choice/on_block/pyspec_tests/proposer_boost_is_first_blo OK
+ ForkChoice - mainnet/capella/fork_choice/on_block/pyspec_tests/proposer_boost_root_same_sl OK
+ ForkChoice - mainnet/capella/fork_choice/should_override_forkchoice_update/pyspec_tests/sh OK
+ ForkChoice - mainnet/deneb/fork_choice/ex_ante/pyspec_tests/ex_ante_attestations_is_greate OK
+ ForkChoice - mainnet/deneb/fork_choice/ex_ante/pyspec_tests/ex_ante_sandwich_with_boost_no OK
+ ForkChoice - mainnet/deneb/fork_choice/ex_ante/pyspec_tests/ex_ante_sandwich_with_honest_a OK
Expand All @@ -2880,6 +2887,8 @@ OK: 40/40 Fail: 0/40 Skip: 0/40
+ ForkChoice - mainnet/deneb/fork_choice/get_head/pyspec_tests/proposer_boost_correct_head OK
+ ForkChoice - mainnet/deneb/fork_choice/get_head/pyspec_tests/shorter_chain_but_heavier_wei OK
+ ForkChoice - mainnet/deneb/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attestat OK
+ ForkChoice - mainnet/deneb/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_root OK
+ ForkChoice - mainnet/deneb/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_root OK
+ ForkChoice - mainnet/deneb/fork_choice/on_block/pyspec_tests/basic OK
+ ForkChoice - mainnet/deneb/fork_choice/on_block/pyspec_tests/invalid_data_unavailable OK
+ ForkChoice - mainnet/deneb/fork_choice/on_block/pyspec_tests/invalid_incorrect_proof OK
Expand All @@ -2891,8 +2900,9 @@ OK: 40/40 Fail: 0/40 Skip: 0/40
+ ForkChoice - mainnet/deneb/fork_choice/on_block/pyspec_tests/proposer_boost_is_first_block OK
+ ForkChoice - mainnet/deneb/fork_choice/on_block/pyspec_tests/proposer_boost_root_same_slot OK
+ ForkChoice - mainnet/deneb/fork_choice/on_block/pyspec_tests/simple_blob_data OK
+ ForkChoice - mainnet/deneb/fork_choice/should_override_forkchoice_update/pyspec_tests/shou OK
```
OK: 69/77 Fail: 0/77 Skip: 8/77
OK: 80/88 Fail: 0/88 Skip: 8/88
## Sync
```diff
+ Sync - mainnet/bellatrix/sync/optimistic/pyspec_tests/from_syncing_to_invalid OK
Expand All @@ -2902,4 +2912,4 @@ OK: 69/77 Fail: 0/77 Skip: 8/77
OK: 3/3 Fail: 0/3 Skip: 0/3

---TOTAL---
OK: 2336/2344 Fail: 0/2344 Skip: 8/2344
OK: 2346/2354 Fail: 0/2354 Skip: 8/2354
21 changes: 17 additions & 4 deletions ConsensusSpecPreset-minimal.md
Original file line number Diff line number Diff line change
Expand Up @@ -2355,7 +2355,6 @@ OK: 34/34 Fail: 0/34 Skip: 0/34
+ Testing SignedBLSToExecutionChange OK
+ Testing SignedBeaconBlock OK
+ Testing SignedBeaconBlockHeader OK
+ Testing SignedBlobSidecar OK
+ Testing SignedContributionAndProof OK
+ Testing SignedVoluntaryExit OK
+ Testing SigningData OK
Expand All @@ -2368,7 +2367,7 @@ OK: 34/34 Fail: 0/34 Skip: 0/34
+ Testing VoluntaryExit OK
+ Testing Withdrawal OK
```
OK: 49/49 Fail: 0/49 Skip: 0/49
OK: 48/48 Fail: 0/48 Skip: 0/48
## EF - Deneb - Sanity - Blocks [Preset: minimal]
```diff
+ [Invalid] EF - Deneb - Sanity - Blocks - invalid_all_zeroed_sig [Preset: minimal] OK
Expand Down Expand Up @@ -2977,6 +2976,8 @@ OK: 45/45 Fail: 0/45 Skip: 0/45
+ ForkChoice - minimal/altair/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attesta OK
+ ForkChoice - minimal/altair/fork_choice/get_head/pyspec_tests/voting_source_beyond_two_epo OK
+ ForkChoice - minimal/altair/fork_choice/get_head/pyspec_tests/voting_source_within_two_epo OK
+ ForkChoice - minimal/altair/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_root OK
+ ForkChoice - minimal/altair/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_roo OK
+ ForkChoice - minimal/altair/fork_choice/on_block/pyspec_tests/basic OK
+ ForkChoice - minimal/altair/fork_choice/on_block/pyspec_tests/incompatible_justification_u OK
+ ForkChoice - minimal/altair/fork_choice/on_block/pyspec_tests/incompatible_justification_u OK
Expand Down Expand Up @@ -3023,6 +3024,8 @@ OK: 45/45 Fail: 0/45 Skip: 0/45
+ ForkChoice - minimal/bellatrix/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_atte OK
+ ForkChoice - minimal/bellatrix/fork_choice/get_head/pyspec_tests/voting_source_beyond_two_ OK
+ ForkChoice - minimal/bellatrix/fork_choice/get_head/pyspec_tests/voting_source_within_two_ OK
+ ForkChoice - minimal/bellatrix/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_ro OK
+ ForkChoice - minimal/bellatrix/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_ OK
+ ForkChoice - minimal/bellatrix/fork_choice/on_block/pyspec_tests/basic OK
+ ForkChoice - minimal/bellatrix/fork_choice/on_block/pyspec_tests/incompatible_justificatio OK
+ ForkChoice - minimal/bellatrix/fork_choice/on_block/pyspec_tests/incompatible_justificatio OK
Expand Down Expand Up @@ -3058,6 +3061,8 @@ OK: 45/45 Fail: 0/45 Skip: 0/45
+ ForkChoice - minimal/bellatrix/fork_choice/reorg/pyspec_tests/simple_attempted_reorg_delay OK
+ ForkChoice - minimal/bellatrix/fork_choice/reorg/pyspec_tests/simple_attempted_reorg_delay OK
+ ForkChoice - minimal/bellatrix/fork_choice/reorg/pyspec_tests/simple_attempted_reorg_witho OK
+ ForkChoice - minimal/bellatrix/fork_choice/should_override_forkchoice_update/pyspec_tests/ OK
+ ForkChoice - minimal/bellatrix/fork_choice/should_override_forkchoice_update/pyspec_tests/ OK
+ ForkChoice - minimal/bellatrix/fork_choice/withholding/pyspec_tests/withholding_attack OK
+ ForkChoice - minimal/bellatrix/fork_choice/withholding/pyspec_tests/withholding_attack_unv OK
+ ForkChoice - minimal/capella/fork_choice/ex_ante/pyspec_tests/ex_ante_sandwich_with_honest OK
Expand All @@ -3073,6 +3078,8 @@ OK: 45/45 Fail: 0/45 Skip: 0/45
+ ForkChoice - minimal/capella/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attest OK
+ ForkChoice - minimal/capella/fork_choice/get_head/pyspec_tests/voting_source_beyond_two_ep OK
+ ForkChoice - minimal/capella/fork_choice/get_head/pyspec_tests/voting_source_within_two_ep OK
+ ForkChoice - minimal/capella/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_root OK
+ ForkChoice - minimal/capella/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_ro OK
+ ForkChoice - minimal/capella/fork_choice/on_block/pyspec_tests/basic OK
+ ForkChoice - minimal/capella/fork_choice/on_block/pyspec_tests/incompatible_justification_ OK
+ ForkChoice - minimal/capella/fork_choice/on_block/pyspec_tests/incompatible_justification_ OK
Expand Down Expand Up @@ -3104,6 +3111,8 @@ OK: 45/45 Fail: 0/45 Skip: 0/45
+ ForkChoice - minimal/capella/fork_choice/reorg/pyspec_tests/simple_attempted_reorg_delayed OK
+ ForkChoice - minimal/capella/fork_choice/reorg/pyspec_tests/simple_attempted_reorg_delayed OK
+ ForkChoice - minimal/capella/fork_choice/reorg/pyspec_tests/simple_attempted_reorg_without OK
+ ForkChoice - minimal/capella/fork_choice/should_override_forkchoice_update/pyspec_tests/sh OK
+ ForkChoice - minimal/capella/fork_choice/should_override_forkchoice_update/pyspec_tests/sh OK
+ ForkChoice - minimal/capella/fork_choice/withholding/pyspec_tests/withholding_attack OK
+ ForkChoice - minimal/capella/fork_choice/withholding/pyspec_tests/withholding_attack_unvia OK
+ ForkChoice - minimal/deneb/fork_choice/ex_ante/pyspec_tests/ex_ante_sandwich_with_honest_a OK
Expand All @@ -3119,6 +3128,8 @@ OK: 45/45 Fail: 0/45 Skip: 0/45
+ ForkChoice - minimal/deneb/fork_choice/get_head/pyspec_tests/split_tie_breaker_no_attestat OK
+ ForkChoice - minimal/deneb/fork_choice/get_head/pyspec_tests/voting_source_beyond_two_epoc OK
+ ForkChoice - minimal/deneb/fork_choice/get_head/pyspec_tests/voting_source_within_two_epoc OK
+ ForkChoice - minimal/deneb/fork_choice/get_proposer_head/pyspec_tests/basic_is_head_root OK
+ ForkChoice - minimal/deneb/fork_choice/get_proposer_head/pyspec_tests/basic_is_parent_root OK
+ ForkChoice - minimal/deneb/fork_choice/on_block/pyspec_tests/basic OK
+ ForkChoice - minimal/deneb/fork_choice/on_block/pyspec_tests/incompatible_justification_up OK
+ ForkChoice - minimal/deneb/fork_choice/on_block/pyspec_tests/incompatible_justification_up OK
Expand Down Expand Up @@ -3155,10 +3166,12 @@ OK: 45/45 Fail: 0/45 Skip: 0/45
+ ForkChoice - minimal/deneb/fork_choice/reorg/pyspec_tests/simple_attempted_reorg_delayed_j OK
+ ForkChoice - minimal/deneb/fork_choice/reorg/pyspec_tests/simple_attempted_reorg_delayed_j OK
+ ForkChoice - minimal/deneb/fork_choice/reorg/pyspec_tests/simple_attempted_reorg_without_e OK
+ ForkChoice - minimal/deneb/fork_choice/should_override_forkchoice_update/pyspec_tests/shou OK
+ ForkChoice - minimal/deneb/fork_choice/should_override_forkchoice_update/pyspec_tests/shou OK
+ ForkChoice - minimal/deneb/fork_choice/withholding/pyspec_tests/withholding_attack OK
+ ForkChoice - minimal/deneb/fork_choice/withholding/pyspec_tests/withholding_attack_unviabl OK
```
OK: 185/193 Fail: 0/193 Skip: 8/193
OK: 199/207 Fail: 0/207 Skip: 8/207
## Sync
```diff
+ Sync - minimal/bellatrix/sync/optimistic/pyspec_tests/from_syncing_to_invalid OK
Expand All @@ -3168,4 +3181,4 @@ OK: 185/193 Fail: 0/193 Skip: 8/193
OK: 3/3 Fail: 0/3 Skip: 0/3

---TOTAL---
OK: 2578/2586 Fail: 0/2586 Skip: 8/2586
OK: 2591/2599 Fail: 0/2599 Skip: 8/2599
3 changes: 2 additions & 1 deletion beacon_chain/beacon_chain_db.nim
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,8 @@ proc putBlock*(
proc putBlobSidecar*(
db: BeaconChainDB,
value: BlobSidecar) =
db.blobs.putSZSSZ(blobkey(value.block_root, value.index), value)
db.blobs.putSZSSZ(blobkey(
value.signed_block_header.message.body_root, value.index), value)

proc delBlobSidecar*(
db: BeaconChainDB,
Expand Down
8 changes: 5 additions & 3 deletions beacon_chain/consensus_object_pools/blob_quarantine.nim
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ func put*(quarantine: var BlobQuarantine, blobSidecar: ref BlobSidecar) =
oldest_blob_key = k
break
quarantine.blobs.del oldest_blob_key
discard quarantine.blobs.hasKeyOrPut((blobSidecar.block_root,
blobSidecar.index), blobSidecar)
discard quarantine.blobs.hasKeyOrPut((
blobSidecar.signed_block_header.message.body_root,
blobSidecar.index), blobSidecar)

func blobIndices*(quarantine: BlobQuarantine, digest: Eth2Digest):
seq[BlobIndex] =
Expand All @@ -49,7 +50,8 @@ func blobIndices*(quarantine: BlobQuarantine, digest: Eth2Digest):
r

func hasBlob*(quarantine: BlobQuarantine, blobSidecar: BlobSidecar): bool =
quarantine.blobs.hasKey((blobSidecar.block_root, blobSidecar.index))
quarantine.blobs.hasKey((
blobSidecar.signed_block_header.message.body_root, blobSidecar.index))

func popBlobs*(quarantine: var BlobQuarantine, digest: Eth2Digest):
seq[ref BlobSidecar] =
Expand Down
7 changes: 4 additions & 3 deletions beacon_chain/gossip_processing/eth2_processor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ proc processSignedBlobSidecar*(
wallSlot

# Potential under/overflows are fine; would just create odd metrics and logs
let delay = wallTime - signedBlobSidecar.message.slot.start_beacon_time
let delay = wallTime - start_beacon_time(
signedBlobSidecar.message.signed_block_header.message.slot)

if self.blobQuarantine[].hasBlob(signedBlobSidecar.message):
debug "Blob received, already in quarantine", delay
Expand All @@ -309,15 +310,15 @@ proc processSignedBlobSidecar*(
var skippedBlocks = false

if (let o = self.quarantine[].popBlobless(
signedBlobSidecar.message.block_root); o.isSome):
signedBlobSidecar.message.signed_block_header.message.body_root); o.isSome):
let blobless = o.unsafeGet()

if self.blobQuarantine[].hasBlobs(blobless):
self.blockProcessor[].enqueueBlock(
MsgSource.gossip,
ForkedSignedBeaconBlock.init(blobless),
Opt.some(self.blobQuarantine[].popBlobs(
signedBlobSidecar.message.block_root))
signedBlobSidecar.message.signed_block_header.message.body_root))
)
else:
discard self.quarantine[].addBlobless(self.dag.finalizedHead.slot,
Expand Down
Loading

0 comments on commit 77831a4

Please sign in to comment.