Recursion implementation (#65)

* recursion attempt

* address clippy

* initialize the running instance and witness of the primary correctly

* add asserts for debugging

* fix a bug in AllocatedPoint

* add debug statements

* fix an issue with how we inputize hashes; remove debug statements

* rename

* cleanup

* speedup tests

* require step_circuit implementors to provide a way to execute step computation
This commit is contained in:
Srinath Setty
2022-05-17 18:29:29 +05:30
committed by GitHub
parent 4311ad1c1b
commit 1fd4eee2b6
7 changed files with 154 additions and 30 deletions

View File

@@ -38,7 +38,7 @@ where
Ok(coords.map_or(Fp::zero(), |c| c.0))
})?;
let y = AllocatedNum::alloc(cs.namespace(|| "y"), || {
Ok(coords.map_or(Fp::zero(), |c| c.0))
Ok(coords.map_or(Fp::zero(), |c| c.1))
})?;
let is_infinity = AllocatedNum::alloc(cs.namespace(|| "is_infinity"), || {
Ok(if coords.map_or(true, |c| c.2) {