use EF consensus spec v1.5.0-alpha.2 test vectors (#6272)
This commit is contained in:
parent
1b30dcc165
commit
963e0bb92b
|
@ -2673,19 +2673,6 @@ OK: 14/14 Fail: 0/14 Skip: 0/14
|
|||
+ [Valid] EF - Electra - Operations - Block Header - basic_block_header OK
|
||||
```
|
||||
OK: 6/6 Fail: 0/6 Skip: 0/6
|
||||
## EF - Electra - Operations - Consolidation [Preset: mainnet]
|
||||
```diff
|
||||
+ [Invalid] EF - Electra - Operations - Consolidation - invalid_before_specified_epoch OK
|
||||
+ [Invalid] EF - Electra - Operations - Consolidation - invalid_different_credentials OK
|
||||
+ [Invalid] EF - Electra - Operations - Consolidation - invalid_exited_source OK
|
||||
+ [Invalid] EF - Electra - Operations - Consolidation - invalid_exited_target OK
|
||||
+ [Invalid] EF - Electra - Operations - Consolidation - invalid_inactive_source OK
|
||||
+ [Invalid] EF - Electra - Operations - Consolidation - invalid_inactive_target OK
|
||||
+ [Invalid] EF - Electra - Operations - Consolidation - invalid_no_execution_withdrawal_cred OK
|
||||
+ [Invalid] EF - Electra - Operations - Consolidation - invalid_not_enough_consolidation_chu OK
|
||||
+ [Invalid] EF - Electra - Operations - Consolidation - invalid_source_equals_target OK
|
||||
```
|
||||
OK: 9/9 Fail: 0/9 Skip: 0/9
|
||||
## EF - Electra - Operations - Deposit [Preset: mainnet]
|
||||
```diff
|
||||
+ [Invalid] EF - Electra - Operations - Deposit - invalid_bad_merkle_proof OK
|
||||
|
@ -3688,4 +3675,4 @@ OK: 69/88 Fail: 0/88 Skip: 19/88
|
|||
OK: 3/3 Fail: 0/3 Skip: 0/3
|
||||
|
||||
---TOTAL---
|
||||
OK: 2970/2990 Fail: 0/2990 Skip: 20/2990
|
||||
OK: 2961/2981 Fail: 0/2981 Skip: 20/2981
|
||||
|
|
|
@ -74,7 +74,7 @@ export
|
|||
tables, results, endians2, json_serialization, sszTypes, beacon_time, crypto,
|
||||
digest, presets
|
||||
|
||||
const SPEC_VERSION* = "1.5.0-alpha.1"
|
||||
const SPEC_VERSION* = "1.5.0-alpha.2"
|
||||
## Spec version we're aiming to be compatible with, right now
|
||||
|
||||
const
|
||||
|
|
|
@ -45,13 +45,17 @@ const
|
|||
|
||||
baseDescription = "EF - Electra - Operations - "
|
||||
|
||||
doAssert toHashSet(mapIt(toSeq(walkDir(OpDir, relative = false)), it.path)) ==
|
||||
toHashSet([
|
||||
OpAttestationsDir, OpAttSlashingDir, OpBlockHeaderDir,
|
||||
OpBlsToExecutionChangeDir, OpConsolidationDir, OpDepositReceiptDir,
|
||||
OpDepositsDir, OpExecutionLayerWithdrawalRequestDir,
|
||||
OpExecutionPayloadDir, OpProposerSlashingDir, OpSyncAggregateDir,
|
||||
OpVoluntaryExitDir, OpWithdrawalsDir])
|
||||
|
||||
var testDirs = toHashSet([
|
||||
OpAttestationsDir, OpAttSlashingDir, OpBlockHeaderDir,
|
||||
OpBlsToExecutionChangeDir, OpDepositReceiptDir, OpDepositsDir,
|
||||
OpExecutionLayerWithdrawalRequestDir, OpExecutionPayloadDir,
|
||||
OpProposerSlashingDir, OpSyncAggregateDir, OpVoluntaryExitDir,
|
||||
OpWithdrawalsDir])
|
||||
when const_preset == "minimal":
|
||||
testDirs.incl OpConsolidationDir
|
||||
doAssert toHashSet(
|
||||
mapIt(toSeq(walkDir(OpDir, relative = false)), it.path)) == testDirs
|
||||
|
||||
proc runTest[T, U](
|
||||
testSuiteDir, suiteName, opName, applyFile: string,
|
||||
|
@ -146,23 +150,24 @@ suite baseDescription & "BLS to execution change " & preset():
|
|||
OpBlsToExecutionChangeDir, suiteName, "BLS to execution change", "address_change",
|
||||
applyBlsToExecutionChange, path)
|
||||
|
||||
suite baseDescription & "Consolidation " & preset():
|
||||
proc applyConsolidation(
|
||||
preState: var electra.BeaconState,
|
||||
signed_consolidation: SignedConsolidation):
|
||||
Result[void, cstring] =
|
||||
var cache: StateCache
|
||||
process_consolidation(
|
||||
defaultRuntimeConfig, preState, signed_consolidation, cache)
|
||||
when const_preset == "minimal":
|
||||
suite baseDescription & "Consolidation " & preset():
|
||||
proc applyConsolidation(
|
||||
preState: var electra.BeaconState,
|
||||
signed_consolidation: SignedConsolidation):
|
||||
Result[void, cstring] =
|
||||
var cache: StateCache
|
||||
process_consolidation(
|
||||
defaultRuntimeConfig, preState, signed_consolidation, cache)
|
||||
|
||||
for path in walkTests(OpConsolidationDir):
|
||||
if path in [
|
||||
"invalid_exceed_pending_consolidations_limit", # apparently invalid prestate SSZ
|
||||
]:
|
||||
continue
|
||||
runTest[SignedConsolidation, typeof applyConsolidation](
|
||||
OpConsolidationDir, suiteName, "Consolidation", "consolidation",
|
||||
applyConsolidation, path)
|
||||
for path in walkTests(OpConsolidationDir):
|
||||
if path in [
|
||||
"invalid_exceed_pending_consolidations_limit", # apparently invalid prestate SSZ
|
||||
]:
|
||||
continue
|
||||
runTest[SignedConsolidation, typeof applyConsolidation](
|
||||
OpConsolidationDir, suiteName, "Consolidation", "consolidation",
|
||||
applyConsolidation, path)
|
||||
|
||||
from ".."/".."/".."/beacon_chain/bloomfilter import constructBloomFilter
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 67f8fa8506e3b97b5e68a9c60e38157507aeec61
|
||||
Subproject commit 54675b5f1fd8156a508e75991693df57a281642e
|
Loading…
Reference in New Issue