feat: implement nova's zk layer (#127)

* feat: zk nova layer

* chore: clippy + trigger CI

* chore: add comment for `new` (generating a zk nova ivc proof)

* chore: adding text reference to `sample`

* chore: use `debug_assert` instead of `cfg(test)`

* improve: pass `poseidon_config` by ref

Co-authored-by: Carlos Pérez <37264926+CPerezz@users.noreply.github.com>

* improve: pass `z_0` by ref

Co-authored-by: Carlos Pérez <37264926+CPerezz@users.noreply.github.com>

* improve: pass `r1cs` and `cf_r1cs` by ref

Co-authored-by: Carlos Pérez <37264926+CPerezz@users.noreply.github.com>

* chore: appropriate docs (2)

* chore: pass by ref modifications

* improve: use single sponge

* fix: remove blinding the cyclefold instance, add verifier checks on the
prover provided cyclefold intance

* fix: assert that the sampled relaxed r1cs is correct

* fix: check length of `u_i.x`

---------

Co-authored-by: Carlos Pérez <37264926+CPerezz@users.noreply.github.com>
This commit is contained in:
Pierre
2024-08-18 00:19:34 +02:00
committed by GitHub
parent 5ec9c2c576
commit c09c52f12c
4 changed files with 537 additions and 9 deletions

View File

@@ -41,6 +41,8 @@ pub enum Error {
SNARKVerificationFail,
#[error("IVC verification failed")]
IVCVerificationFail,
#[error("zkIVC verification failed")]
zkIVCVerificationFail,
#[error("R1CS instance is expected to not be relaxed")]
R1CSUnrelaxedFail,
#[error("Could not find the inner ConstraintSystem")]