Skip to content

Verkle IPA - Incomplete test suite - bugs in prover & verifier #396

@mratsim

Description

@mratsim

The test suite for Verkle Tries IPA is incomplete.

We're missing at least:

And all the test vectors implemented here: https://github.com/jsign/verkle-test-vectors

In particular test011 is supposed to to negative testing and verify that multiproofs fail for incorrect inputs: https://github.com/jsign/verkle-test-vectors/blob/735b7d6/crypto/clients/go-ipa/crypto_test.go#L320-L326

	// Walk the [0, 255] range and verify the proof fails for every evaluation point but the correct one.
	for i := 0; i < 256; i++ {
		transcript := common.NewTranscript("multiproof")
		ok, err := multiproof.CheckMultiProof(transcript, config, &proof, []*banderwagon.Element{&commitment}, []*fr.Element{&evalResult}, []uint8{uint8(i)})
		require.NoError(t, err)
		require.True(t, ok == (i == data.TestData.ForgedEvaluationResult.EvaluationPoint))
	}

but we don't do that

for i in 0 ..< EthVerkleDomain:
var tr {.noInit.}: sha256
tr.newTranscriptGen(asBytes"multiproof")
Zs[0] = i
var ok: bool
ok = multiproof.verifyMultiproof(tr, ipaConfig, Cs, Ys, Zs)
if i == MultiProofEvaluationPoint:
doAssert ok == true, "Issue with Multiproof!"

And when checking other evaluation points the test seems to always return true?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions