diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43e67335d..1224e0b83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,9 @@ jobs: # - name: Run Verifier in EOS test # run: nix develop -c yarn test './tests/eosLightClient/test-verifier-in-EOS.ts' + - name: Run Verify given proof - test using bncurve and constantine + run: nix develop -c nim c -r 'tests/verify_proof/verify_given_proof_test.nim' + SolidityVerifierTests: needs: Tests runs-on: ubuntu-latest diff --git a/tests/verify_proof/nim.cfg b/tests/verify_proof/nim.cfg new file mode 100644 index 000000000..bf61e7f86 --- /dev/null +++ b/tests/verify_proof/nim.cfg @@ -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" diff --git a/tests/verify_proof/verify_given_proof_test.nim b/tests/verify_proof/verify_given_proof_test.nim new file mode 100644 index 000000000..a4fd419e9 --- /dev/null +++ b/tests/verify_proof/verify_given_proof_test.nim @@ -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) + +