From f8642572ed66265db14b9752e2c6b8deff45e8a1 Mon Sep 17 00:00:00 2001 From: ada Date: Thu, 11 Feb 2021 22:14:21 +0100 Subject: [PATCH] added todo --- lisp/lisp.rs | 5 ++++- lisp/types.rs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/lisp.rs b/lisp/lisp.rs index 9aca0b228..18978f082 100644 --- a/lisp/lisp.rs +++ b/lisp/lisp.rs @@ -544,7 +544,10 @@ pub fn prove(_ast: MalVal, env: Env) -> MalRet { let enforce_allocs = get_enforce_allocs(&env); let allocs_const = get_allocations(&env, "AllocationsConst"); + // todo some refactor to improve this let params = Some({ +// todo check if we do need to pass everything like this, its important to +// remember that this function runs after the evaluation, we have all allocs in memory now with all enfores let circuit = LispCircuit { params: allocs_const.as_ref().clone(), allocs: allocs.as_ref().clone(), @@ -563,7 +566,7 @@ pub fn prove(_ast: MalVal, env: Env) -> MalRet { }; let proof = groth16::create_random_proof(circuit, params.as_ref().unwrap(), &mut OsRng)?; - +// todo save the proof and keys on a file let mut vec_input = vec![]; for (k, val) in allocs_input.iter() { if let MalVal::ZKScalar(v) = val { diff --git a/lisp/types.rs b/lisp/types.rs index a2005402c..2753cdb83 100644 --- a/lisp/types.rs +++ b/lisp/types.rs @@ -37,6 +37,7 @@ pub struct LispCircuit { pub params: FnvHashMap, pub allocs: FnvHashMap, pub alloc_inputs: FnvHashMap, +// todo change this for a ordered data structure so enforce pub constraints: Vec, }