1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00

update test description

This commit is contained in:
dark64 2021-07-07 15:58:59 +02:00
parent 6f0821f129
commit 41d30c5d7d
3 changed files with 18 additions and 3 deletions

View file

@ -1,10 +1,15 @@
from "EMBED" import snark_verify_bls12_377 from "EMBED" import snark_verify_bls12_377
// Verifies a proof with 1 public input (0 inputs + 1 output) // Verifies a proof with 1 public input (0 inputs + 1 output)
// Circuit used in this test: // Circuit used in this test (compiled using `bls12_377` curve):
// //
// def main() -> field: // def main() -> field:
// return 1 // return 1
//
// Arguments:
// inputs - public inputs of the circuit
// proof - flattened proof to an array of field elements
// vk - flattened verification key to an array of field elements
def main(private field[1] inputs, private field[8] proof, private field[20] vk) -> bool: def main(private field[1] inputs, private field[8] proof, private field[20] vk) -> bool:
bool result = snark_verify_bls12_377(inputs, proof, vk) bool result = snark_verify_bls12_377(inputs, proof, vk)

View file

@ -1,10 +1,15 @@
from "EMBED" import snark_verify_bls12_377 from "EMBED" import snark_verify_bls12_377
// Verifies a proof with 2 public inputs (1 input + 1 output) // Verifies a proof with 2 public inputs (1 input + 1 output)
// Circuit used in this test: // Circuit used in this test (compiled using `bls12_377` curve):
// //
// def main(field a) -> field: // def main(field a) -> field:
// return a * a // return a * a
//
// Arguments:
// inputs - public inputs of the circuit
// proof - flattened proof to an array of field elements
// vk - flattened verification key to an array of field elements
def main(private field[2] inputs, private field[8] proof, private field[22] vk) -> bool: def main(private field[2] inputs, private field[8] proof, private field[22] vk) -> bool:
bool result = snark_verify_bls12_377(inputs, proof, vk) bool result = snark_verify_bls12_377(inputs, proof, vk)

View file

@ -1,7 +1,7 @@
from "EMBED" import snark_verify_bls12_377 from "EMBED" import snark_verify_bls12_377
// Verifies a proof with 5 public inputs (4 inputs + 1 output) // Verifies a proof with 5 public inputs (4 inputs + 1 output)
// Circuit used in this test: // Circuit used in this test (compiled using `bls12_377` curve):
// //
// def main(field[4] a) -> field: // def main(field[4] a) -> field:
// field out = 0 // field out = 0
@ -9,6 +9,11 @@ from "EMBED" import snark_verify_bls12_377
// out = out + a[i] // out = out + a[i]
// endfor // endfor
// return out // return out
//
// Arguments:
// inputs - public inputs of the circuit
// proof - flattened proof to an array of field elements
// vk - flattened verification key to an array of field elements
def main(private field[5] inputs, private field[8] proof, private field[28] vk) -> bool: def main(private field[5] inputs, private field[8] proof, private field[28] vk) -> bool:
bool result = snark_verify_bls12_377(inputs, proof, vk) bool result = snark_verify_bls12_377(inputs, proof, vk)