arnaucube
arnaucube/NovaPublic Self-hosted repository
remove unneeded tracking and checks (#55)

* remove unneeded tracking and checks

* remove unused error type
Srinath Setty srinath@microsoft.com
Fri, 13 May 2022 14:50:42 +0530
commit

fab07689ebdc0ca33eb4890d7c751fc905525861

parent

562fa710278d85dec28eb59d1d0f882b9af9216c

2 files changed, 0 insertions(+), 21 deletions(-)

jump to
M src/errors.rs → src/errors.rs

@@ -12,8 +12,6 @@ /// returned if the supplied input is not of the right length

InvalidInputLength, /// returned if the supplied witness is not of the right length InvalidWitnessLength, - /// returned if the supplied instance input does not match the previous instance output - InputOutputMismatch, /// returned if the supplied witness is not a satisfying witness to a given shape and instance UnSat, /// returned when the supplied compressed commitment cannot be decompressed
M src/r1cs.rs → src/r1cs.rs

@@ -60,8 +60,6 @@ pub(crate) comm_W: Commitment<G>,

pub(crate) comm_E: Commitment<G>, pub(crate) X: Vec<G::Scalar>, pub(crate) u: G::Scalar, - Y_last: Vec<G::Scalar>, // output of the last instance that was folded - counter: usize, // the number of folds thus far } impl<G: Group> R1CSGens<G> {

@@ -470,8 +468,6 @@ comm_W,

comm_E, u: G::Scalar::zero(), X: vec![G::Scalar::zero(); S.num_io], - Y_last: vec![G::Scalar::zero(); S.num_io / 2], - counter: 0, } }

@@ -486,19 +482,6 @@ let (X1, u1, comm_W_1, comm_E_1) =

(&self.X, &self.u, &self.comm_W.clone(), &self.comm_E.clone()); let (X2, comm_W_2) = (&U2.X, &U2.comm_W); - // check if the input of the incoming instance matches the output - // of the incremental computation thus far if counter > 0 - if self.counter > 0 { - if self.Y_last.len() != U2.X.len() / 2 { - return Err(NovaError::InvalidInputLength); - } - for i in 0..self.Y_last.len() { - if self.Y_last[i] != U2.X[i] { - return Err(NovaError::InputOutputMismatch); - } - } - } - // weighted sum of X, comm_W, comm_E, and u let X = X1 .par_iter()

@@ -514,8 +497,6 @@ comm_W,

comm_E, X, u, - Y_last: U2.X[U2.X.len() / 2..].to_owned(), - counter: self.counter + 1, }) } }