|
|
@@ -168,6 +168,7 @@ fn eval(mut ast: MalVal, mut env: Env) -> MalRet {
|
|
|
env_set(&env, l[1].clone(), eval(l[2].clone(), env.clone())?)
|
|
|
}
|
|
|
Sym(ref a0sym) if a0sym == "zk*" => {
|
|
|
+ println!("zk* {:?}", l[1]);
|
|
|
let (a1, a2) = (l[1].clone(), l[2].clone());
|
|
|
match a1 {
|
|
|
List(ref binds, _) | Vector(ref binds, _) => {
|
|
|
@@ -490,8 +491,8 @@ fn eval(mut ast: MalVal, mut env: Env) -> MalRet {
|
|
|
continue 'tco;
|
|
|
}
|
|
|
_ => {
|
|
|
+ println!("{:?}", args);
|
|
|
Ok(vector![el.to_vec()])
|
|
|
-
|
|
|
//error("call non-function")
|
|
|
}
|
|
|
}
|
|
|
@@ -593,7 +594,6 @@ pub fn prove(_ast: MalVal, env: Env) -> MalRet {
|
|
|
let proof = groth16::create_random_proof(circuit, params.as_ref().unwrap(), &mut OsRng)?;
|
|
|
let mut vec_input = vec![];
|
|
|
for (k, val) in allocs_input.iter() {
|
|
|
- println!("{:?}", val);
|
|
|
match val {
|
|
|
MalVal::Str(v) => {
|
|
|
vec_input.push(bls12_381::Scalar::from_string(&v.to_string()));
|
|
|
@@ -605,8 +605,8 @@ pub fn prove(_ast: MalVal, env: Env) -> MalRet {
|
|
|
};
|
|
|
}
|
|
|
let result = groth16::verify_proof(verifying_key.as_ref().unwrap(), &proof, &vec_input);
|
|
|
- println!("{:?}", result);
|
|
|
println!("vec public {:?}", vec_input);
|
|
|
+ println!("result {:?}", result);
|
|
|
|
|
|
Ok(MalVal::Nil)
|
|
|
}
|