-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(verifier): Add test for the nim verify function
- Loading branch information
1 parent
dff0530
commit 0872678
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
path="../../vendor/nim-bncurve" | ||
path="../../vendor/nim-confutils" | ||
path="../../vendor/nim-stew" | ||
path="../../vendor/nim-serialization" | ||
path="../../vendor/nim-faststreams" | ||
path="../../vendor/nimcrypto" | ||
path="../../vendor/constantine" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import | ||
std/unittest, | ||
# ../../libs/nim/verify-utils/verify_given_proof_constantine, | ||
../../libs/nim/verify-utils/verify_given_proof | ||
|
||
suite "description for this stuff": | ||
setup: | ||
let pathToKey = "vendor/eth2-light-client-updates/prater/capella-updates-94/vk.json" | ||
let pathToProof = "vendor/eth2-light-client-updates/prater/capella-updates-94/proof_5609044_5609069.json" | ||
let pathToLastUpdate = "vendor/eth2-light-client-updates/prater/capella-updates-94/update_5601823_5609044.json" | ||
let pathToNewUpdate = "vendor/eth2-light-client-updates/prater/capella-updates-94/update_5609044_5609069.json" | ||
let domain = "0x07000000628941ef21d1fe8c7134720add10bb91e3b02c007e0046d2472c6695" | ||
|
||
test "check verifyProof for bncurve": | ||
assert verifyProof(pathToKey, pathToProof, pathToLastUpdate, | ||
pathToNewUpdate, domain) | ||
#Will me added with another PR | ||
# test "check verifyProof for constantine": | ||
# assert verifyProofConstantine(pathToKey, pathToProof, pathToLastUpdate, | ||
# pathToNewUpdate, domain) | ||
|
||
|