Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed IPA consistency test, rm addressSanitizer message #412

Merged
merged 1 commit into from
Jun 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions tests/t_ethereum_verkle_ipa_primitives.nim
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,6 @@ suite "Transcript Tests":
# TODO: missing serialization proof tests

suite "IPA proof tests":
# TODO fix test
# it passes under:
# nim c -r --debugger:native --cc:clang --hints:off --warnings:off --outdir:build --passC:-fsanitize=address --passL:-fsanitize=address tests/t_ethereum_verkle_ipa_primitives.nim
# but not without the sanitizer, the verifier fails
# nim c -r --debugger:native --cc:clang --hints:off --warnings:off --outdir:build tests/t_ethereum_verkle_ipa_primitives.nim
echo "Warning! - Skipping verification tests, they succeed under AddressSanitizer but fail without."

test "Verify IPA Proof inside the domain by @Ignacio":
proc testIPAProofInDomain()=
Expand Down Expand Up @@ -504,6 +498,21 @@ suite "IPA proof tests":
opening_challenge)

doAssert eval_at_challenge.toHex(littleEndian) == "0x4a353e70b03c89f161de002e8713beec0d740a5e20722fd5bd68b30540a33208", "Issue with computing commitment"

var prover_challenge {.noInit.}: Fr[Banderwagon]
prover_transcript.squeezeChallenge("state", prover_challenge)
doAssert prover_challenge.toHex(littleEndian) == "0x0a81881cbfd7d7197a54ebd67ed6a68b5867f3c783706675b34ece43e85e7306", "Issue with squeezing prover challenge"

# Verifier's side
var verifier_transcript: sha256
verifier_transcript.initTranscript("test")

let verif = CRS.ipa_verify(
domain, verifier_transcript,
commitment, opening_challenge,
eval_at_challenge, proof
)
doAssert verif, "Issue in checking IPA proof!"

testIPAProofConsistency()

Expand Down
Loading