From b09adcd43880b4e4f0bee7dc2c6931cc9c9ebd30 Mon Sep 17 00:00:00 2001 From: ada Date: Tue, 15 Dec 2020 21:04:50 +0100 Subject: [PATCH] start adding the groth16 constraint circuit and setup method --- lisp/lisp.rs | 4 +++- lisp/run.sh | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100755 lisp/run.sh diff --git a/lisp/lisp.rs b/lisp/lisp.rs index a3736b72c..cd898529d 100644 --- a/lisp/lisp.rs +++ b/lisp/lisp.rs @@ -372,7 +372,7 @@ impl Circuit for MyCircuit { } } -pub fn setup(ast: &MalVal) -> Result { +pub fn setup(ast: &MalVal) -> MalRet { let start = Instant::now(); // Create parameters for our circuit. In a production deployment these would // be generated securely using a multiparty computation. @@ -384,6 +384,8 @@ pub fn setup(ast: &MalVal) -> Result { // Prepare the verification key (for proof verification). let pvk = groth16::prepare_verifying_key(¶ms.vk); + + Ok(MalVal::Str("k".to_string())) /* // Pick a preimage and compute its hash. let quantity = bls12_381::Scalar::from(3); diff --git a/lisp/run.sh b/lisp/run.sh new file mode 100755 index 000000000..f504d0e1b --- /dev/null +++ b/lisp/run.sh @@ -0,0 +1 @@ +cargo run --bin lisp load new-cs.lisp