Rename Error::IncompatibleParams to Error::InvalidInstances

This was leftover from when proofs were structured in memory.
This commit is contained in:
Jack Grigg 2021-05-18 19:29:10 +01:00
parent de1a468691
commit b091757668
5 changed files with 9 additions and 6 deletions

View File

@ -6,6 +6,10 @@ and this project adheres to Rust's notion of
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Changed
- `halo2::plonk::Error` has been overhauled:
- `Error::IncompatibleParams` is now `Error::InvalidInstances`.
### Removed
- `halo2::arithmetic::BatchInvert` (use `ff::BatchInvert` instead).

View File

@ -528,7 +528,7 @@ impl<F: FieldExt> MockProver<F> {
}
if instance.len() != cs.num_instance_columns {
return Err(Error::IncompatibleParams);
return Err(Error::InvalidInstances);
}
let instance = instance

View File

@ -5,9 +5,8 @@ pub enum Error {
/// This is an error that can occur during synthesis of the circuit, for
/// example, when the witness is not present.
SynthesisError,
/// The structured reference string or the parameters are not compatible
/// with the circuit being synthesized.
IncompatibleParams,
/// The provided instances do not match the circuit parameters.
InvalidInstances,
/// The constraint system is not satisfied.
ConstraintSystemFailure,
/// Out of bounds index passed to a backend

View File

@ -43,7 +43,7 @@ pub fn create_proof<
) -> Result<(), Error> {
for instance in instances.iter() {
if instance.len() != pk.vk.cs.num_instance_columns {
return Err(Error::IncompatibleParams);
return Err(Error::InvalidInstances);
}
}

View File

@ -24,7 +24,7 @@ pub fn verify_proof<'params, C: CurveAffine, E: EncodedChallenge<C>, T: Transcri
// Check that instances matches the expected number of instance columns
for instances in instances.iter() {
if instances.len() != vk.cs.num_instance_columns {
return Err(Error::IncompatibleParams);
return Err(Error::InvalidInstances);
}
}