Skip to content

Commit

Permalink
use v5.3.0 slashing interchange test vectors (#5640)
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec committed Dec 4, 2023
1 parent 144d453 commit 0e5c44b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions tests/slashing_protection/test_fixtures.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
{.used.}

import
# Standard library
std/os,
# Status lib
stew/[results, byteutils],
stew/results,
chronicles,
# Internal
../../beacon_chain/validators/[slashing_protection, slashing_protection_v2],
Expand All @@ -20,6 +18,9 @@ import
../testutil, ../testdbutil,
../consensus_spec/fixtures_utils

from std/os import changeFileExt, removeFile, walkDir, `/`
from stew/byteutils import toHex

type
TestInterchange = object
name: string
Expand Down Expand Up @@ -55,13 +56,15 @@ type
slot: SlotString
signing_root: Eth2Digest0x
should_succeed: bool
should_succeed_complete: bool

CandidateVote = object
pubkey: PubKey0x
source_epoch: EpochString
target_epoch: EpochString
signing_root: Eth2Digest0x
should_succeed: bool
should_succeed_complete: bool

func toHexLogs(v: CandidateBlock): auto =
(
Expand All @@ -87,7 +90,7 @@ proc sqlite3db_delete(basepath, dbname: string) =
removeFile(basepath / dbname&".sqlite3-wal")
removeFile(basepath / dbname&".sqlite3")

const InterchangeTestsDir = FixturesDir / "tests-slashing-v5.2.1" / "tests" / "generated"
const InterchangeTestsDir = FixturesDir / "tests-slashing-v5.3.0" / "tests" / "generated"
const TestDir = ""
const TestDbPrefix = "test_slashprot_"

Expand Down
2 changes: 1 addition & 1 deletion vendor/nim-eth2-scenarios

0 comments on commit 0e5c44b

Please sign in to comment.