Zero-knowledge proofs are powerful, but generating them one at a time doesn't scale. H33's batch ZKP system aggregates multiple proofs into unified verification, dramatically improving throughput while maintaining full cryptographic guarantees.
Batch vs. Sequential
Sequential proof generation processes proofs one at a time. Batch aggregation combines multiple proofs into a single verification operation, sharing computational work across all proofs in the batch.
How Proof Aggregation Works
Instead of verifying 100 separate proofs individually, batch ZKP uses cryptographic techniques to verify them together:
- Proof batching: Multiple proofs are collected into a batch
- Shared computation: Common verification steps are performed once
- Aggregated verification: A single check validates the entire batch
- Individual results: Per-proof pass/fail status is still available
// Sequential verification (slow)
for (const proof of hundredProofs) {
await h33.proof.verify(proof); // Each takes time
}
// Batch verification (fast)
const results = await h33.proof.batchVerify({
proofs: hundredProofs,
aggregation: 'recursive' // Use recursive SNARK composition
});
// Dramatically faster than sequential
Aggregation Strategies
H33 supports multiple aggregation strategies optimized for different use cases:
Parallel verification: Independent proofs verified simultaneously across CPU cores. Best for heterogeneous proof types.
Recursive composition: Proofs combined into a single recursive SNARK. Best for homogeneous proofs where you want a single verification.
Merkle aggregation: Proofs organized into a Merkle tree for efficient partial verification. Best when you may need to verify subsets.
Use Cases
Blockchain rollups: Aggregate thousands of transaction proofs into a single on-chain verification, reducing gas costs by orders of magnitude.
Audit logging: Batch verify a day's worth of authentication proofs in a single operation for compliance review.
Periodic verification: Collect proofs over a time window and verify them together during low-load periods.
Implementation Patterns
// Pattern 1: Time-windowed batching
const batcher = h33.createProofBatcher({
maxBatchSize: 100,
maxWaitMs: 50,
aggregation: 'parallel'
});
// Proofs are automatically batched
app.post('/verify', async (req, res) => {
const result = await batcher.add(req.body.proof);
res.json(result);
});
// Pattern 2: Explicit batch submission
const auditProofs = await collectDayOfProofs();
const batchResult = await h33.proof.batchVerify({
proofs: auditProofs,
aggregation: 'merkle',
returnTree: true // Get Merkle tree for selective re-verification
});
// Pattern 3: Recursive aggregation for on-chain
const recursiveProof = await h33.proof.aggregate({
proofs: transactionProofs,
strategy: 'recursive',
outputFormat: 'solidity' // Ready for on-chain verification
});
Security Considerations
Batch verification maintains full security:
- No false positives: Invalid proofs never pass batch verification
- Isolation: One bad proof doesn't invalidate the batch—individual results are returned
- Deterministic: Same inputs always produce same verification results
- Auditable: Batch verification is fully deterministic and can be replayed
Performance Characteristics
Batch ZKP efficiency improves with batch size up to hardware limits:
- Small batches (10-50): Good efficiency gains from shared setup
- Medium batches (50-200): Optimal efficiency for most applications
- Large batches (200+): Memory becomes the bottleneck; consider splitting
The exact performance depends on proof type, hardware, and aggregation strategy. H33 automatically selects optimal parameters based on your configuration.
Enable Batch ZKP Processing
Aggregate proofs for enterprise-scale throughput. Get started with 1,000 free auths.
Get Free API Key