mirror of
https://github.com/AtHeartEngineer/halo2.git
synced 2026-01-09 20:48:02 -05:00
Place halo2_proofs::plonk::BatchVerifier behind a (default enabled) crate feature called batch.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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>>,
|
||||
|
||||
Reference in New Issue
Block a user