Place halo2_proofs::plonk::BatchVerifier behind a (default enabled) crate feature called batch.

This commit is contained in:
Sean Bowe
2022-06-23 12:51:47 -06:00
parent 912003138f
commit deef0e1416
4 changed files with 8 additions and 2 deletions

View File

@@ -43,7 +43,8 @@ All APIs that represented witnessed values as `Option<V>` now represent them as
- `RegionLayouter::assign_advice_from_instance`
- `halo2_proofs::plonk::BatchVerifier` has been rewritten. It is no longer a
verification strategy to be used with `verify_proof`, but instead manages the
entire batch verification process.
entire batch verification process. The `batch` crate feature (enabled by
default) must be enabled to use the batch verifier.
## [0.1.0] - 2022-05-10
### Added

View File

@@ -68,9 +68,11 @@ rand_core = { version = "0.6", default-features = false, features = ["getrandom"
getrandom = { version = "0.2", features = ["js"] }
[features]
default = ["batch"]
dev-graph = ["plotters", "tabbycat"]
gadget-traces = ["backtrace"]
sanity-checks = []
batch = ["rand_core/getrandom"]
[lib]
bench = false

View File

@@ -14,7 +14,9 @@ use crate::poly::{
};
use crate::transcript::{read_n_points, read_n_scalars, EncodedChallenge, TranscriptRead};
#[cfg(feature = "batch")]
mod batch;
#[cfg(feature = "batch")]
pub use batch::BatchVerifier;
/// Trait representing a strategy for verifying Halo 2 proofs.

View File

@@ -47,7 +47,8 @@ struct BatchItem<C: CurveAffine> {
proof: Vec<u8>,
}
/// A verifier that checks multiple proofs in a batch.
/// A verifier that checks multiple proofs in a batch. **This requires the
/// `batch` crate feature to be enabled.**
#[derive(Debug, Default)]
pub struct BatchVerifier<C: CurveAffine> {
items: Vec<BatchItem<C>>,