Merge pull request #343 from zcash/add-proof-to-batch

Expose `Proof::add_to_batch` in public API
This commit is contained in:
str4d 2022-09-15 20:18:34 +01:00 committed by GitHub
commit 4231aa28b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -7,6 +7,7 @@ and this project adheres to Rust's notion of
## [Unreleased]
### Added
- `orchard::Proof::add_to_batch`
- `orchard::address::Address::diversifier`
- `orchard::keys::Diversifier::from_bytes`
- `orchard::note`:

View File

@ -866,11 +866,13 @@ impl Proof {
plonk::verify_proof(&vk.params, &vk.vk, strategy, &instances, &mut transcript)
}
pub(crate) fn add_to_batch(
&self,
batch: &mut BatchVerifier<vesta::Affine>,
instances: Vec<Instance>,
) {
/// Adds this proof to the given batch for verification with the given instances.
///
/// Use this API if you want more control over how proof batches are processed. If you
/// just want to batch-validate Orchard bundles, use [`bundle::BatchValidator`].
///
/// [`bundle::BatchValidator`]: crate::bundle::BatchValidator
pub fn add_to_batch(&self, batch: &mut BatchVerifier<vesta::Affine>, instances: Vec<Instance>) {
let instances = instances
.iter()
.map(|i| {