Browse Source

Add InputOutputMismatch error.

main
porcuquine 3 years ago
committed by Srinath Setty
parent
commit
cf5d708202
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      src/errors.rs
  2. +1
    -1
      src/r1cs.rs

+ 2
- 0
src/errors.rs

@ -12,6 +12,8 @@ pub enum NovaError {
InvalidInputLength, InvalidInputLength,
/// returned if the supplied witness is not of the right length /// returned if the supplied witness is not of the right length
InvalidWitnessLength, 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 /// returned if the supplied witness is not a satisfying witness to a given shape and instance
UnSat, UnSat,
/// returned when the supplied compressed commitment cannot be decompressed /// returned when the supplied compressed commitment cannot be decompressed

+ 1
- 1
src/r1cs.rs

@ -399,7 +399,7 @@ impl RelaxedR1CSInstance {
} }
for i in 0..self.Y_last.len() { for i in 0..self.Y_last.len() {
if self.Y_last[i] != U2.X[i] { if self.Y_last[i] != U2.X[i] {
return Err(NovaError::InvalidInputLength);
return Err(NovaError::InputOutputMismatch);
} }
} }
} }

Loading…
Cancel
Save