-
-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
Description
The test suite for Verkle Tries IPA is incomplete.
We're missing at least:
- Transcript test: https://github.com/crate-crypto/verkle-trie-ref/blob/2332ab8/ipa/ipa_test.py#L38-L50
- Multiproof: https://github.com/crate-crypto/verkle-trie-ref/blob/2332ab8/multiproof/multiproof_test.py
- CRS: https://github.com/crate-crypto/go-ipa/blob/b1e8a79/ipa/ipa_test.go#L253-L264
- Multiproof: https://github.com/crate-crypto/go-ipa/blob/b1e8a79/multiproof_test.go#L63-L132
- Multiproof: https://github.com/crate-crypto/rust-verkle/blob/442174e/ipa-multipoint/src/multiproof.rs#L435-L509
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
constantine/tests/t_ethereum_verkle_ipa_primitives.nim
Lines 702 to 710 in 9fe5e49
| 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?
Reactions are currently unavailable