Skip to content

Conversation

@swasilyev
Copy link
Collaborator

ATM twice faster for the batch of 10

Start: Verify
··End: Verify ..................................................................16.983ms
Start: Verify Batch KZG
··End: Verify Batch KZG ........................................................8.437ms

@swasilyev swasilyev requested review from davxy and drskalman January 21, 2026 23:43
@swasilyev swasilyev marked this pull request as draft January 21, 2026 23:43
@swasilyev
Copy link
Collaborator Author

For N = 100

Start: Verify
··End: Verify ..................................................................175.106ms
Start: Verify Batch KZG
··End: Verify Batch KZG ........................................................22.411ms

@swasilyev
Copy link
Collaborator Author

swasilyev commented Jan 22, 2026

TODO:

  1. bench batch_size = 1
  2. optimizations:
  • merge muls by instance columns
  • merge muls by nus with the linearization poly muls
  1. fix final randomness
  2. add instance to FS
  3. support different instance columns (rings)
  4. support different iops
  5. support different domains
  6. apply optimizations to the abstract pcs case
  7. optimize single verification for kzg
  8. some comments

@swasilyev
Copy link
Collaborator Author

Single proof (batch_size=1) verification is now also faster (due to the broken abstraction bounds)

Start: Verify
··End: Verify ..................................................................1.725ms
Start: Verify Batch KZG
··End: Verify Batch KZG ........................................................1.376ms

@gui1117
Copy link

gui1117 commented Jan 22, 2026

so this is a for a single ring isn't it? it doesn't batch for different rings. Could batching for multiple rings also be improved (I mean in general, not necessarily in this PR).

could we also benchmark for 1000 and 10000 just to see the limit of improvement?

@swasilyev
Copy link
Collaborator Author

so this is a for a single ring isn't it? it doesn't batch for different rings. Could batching for multiple rings also be improved (I mean in general, not necessarily in this PR).

This is todo item #5.

could we also benchmark for 1000 and 10000 just to see the limit of improvement?

Kinda. I'll need to generate 1k different proofs (from scratch, as plonk doesn't support proof randomization) for that, that takes some time.

pub fn new(kzg_vk: KzgVerifierKey<E>) -> Self {
//TODO: capacity
Self {
acc_points: vec![kzg_vk.g1],
Copy link
Collaborator

@davxy davxy Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires g1 to be public

@davxy
Copy link
Collaborator

davxy commented Jan 28, 2026

Needs some changes to KZG in fflonk (private fields and a couple of missing Clone bounds)

@davxy
Copy link
Collaborator

davxy commented Jan 28, 2026

NOTE: I accidentally pushed here, but I have reverted to your changes. That is why you see a force push.

@davxy
Copy link
Collaborator

davxy commented Jan 28, 2026

@swasilyev BatchVerifier struct : #66

ark-vrf integration draft: davxy/ark-vrf#67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants