Skip to content

Instantly share code, notes, and snippets.

@jsign
Created May 31, 2023 15:05
Show Gist options
  • Save jsign/f79f87af09ad3a14f0bfcfc5ba4e8c3e to your computer and use it in GitHub Desktop.
Save jsign/f79f87af09ad3a14f0bfcfc5ba4e8c3e to your computer and use it in GitHub Desktop.
After optimizations
##### Raw polynomials multiproof benchmark #####
For 1 polynomials:
Proving:
Proof serialization duration: 0.10ms
Proof creation duration: 51ms
Duration per step:
Generate challenge r and powers : 0.02ms
Calculate t, g(x) and D : 3.50ms
Calculate h(x) and E : 3.37ms
Calculate (h-g)(x) and E-D : 0.00ms
IPA for (h-g)(x) and E-D on t : 44.37ms
Verification:
Proof deserialization duration: 0.10ms
Total duration: 4ms
Duration per step:
Generate challenge r and powers : 0.00ms
Calculating helper_scalars r^i/(t-z_i) : 0.02ms
g_2(t) = SUM y_i*(r^i/(t-z_i))=SUM y_i*helper_scalars : 0.00ms
Compute E : 0.28ms
Compute E-D and verify IPA : 4.11ms
For 1000 polynomials:
Proving:
Proof serialization duration: 0.10ms
Proof creation duration: 61ms
Duration per step:
Generate challenge r and powers : 1.10ms
Calculate t, g(x) and D : 13.05ms
Calculate h(x) and E : 3.96ms
Calculate (h-g)(x) and E-D : 0.00ms
IPA for (h-g)(x) and E-D on t : 42.97ms
Verification:
Proof deserialization duration: 0.10ms
Total duration: 7ms
Duration per step:
Generate challenge r and powers : 1.18ms
Calculating helper_scalars r^i/(t-z_i) : 0.09ms
g_2(t) = SUM y_i*(r^i/(t-z_i))=SUM y_i*helper_scalars : 0.01ms
Compute E : 2.74ms
Compute E-D and verify IPA : 3.84ms
For 2000 polynomials:
Proving:
Proof serialization duration: 0.10ms
Proof creation duration: 69ms
Duration per step:
Generate challenge r and powers : 2.65ms
Calculate t, g(x) and D : 18.79ms
Calculate h(x) and E : 3.79ms
Calculate (h-g)(x) and E-D : 0.00ms
IPA for (h-g)(x) and E-D on t : 44.48ms
Verification:
Proof deserialization duration: 0.10ms
Total duration: 10ms
Duration per step:
Generate challenge r and powers : 2.10ms
Calculating helper_scalars r^i/(t-z_i) : 0.14ms
g_2(t) = SUM y_i*(r^i/(t-z_i))=SUM y_i*helper_scalars : 0.01ms
Compute E : 4.62ms
Compute E-D and verify IPA : 4.00ms
For 4000 polynomials:
Proving:
Proof serialization duration: 0.11ms
Proof creation duration: 85ms
Duration per step:
Generate challenge r and powers : 7.24ms
Calculate t, g(x) and D : 30.20ms
Calculate h(x) and E : 3.80ms
Calculate (h-g)(x) and E-D : 0.00ms
IPA for (h-g)(x) and E-D on t : 44.27ms
Verification:
Proof deserialization duration: 0.11ms
Total duration: 15ms
Duration per step:
Generate challenge r and powers : 4.25ms
Calculating helper_scalars r^i/(t-z_i) : 0.23ms
g_2(t) = SUM y_i*(r^i/(t-z_i))=SUM y_i*helper_scalars : 0.01ms
Compute E : 8.04ms
Compute E-D and verify IPA : 3.19ms
For 8000 polynomials:
Proving:
Proof serialization duration: 0.10ms
Proof creation duration: 120ms
Duration per step:
Generate challenge r and powers : 20.93ms
Calculate t, g(x) and D : 52.49ms
Calculate h(x) and E : 3.80ms
Calculate (h-g)(x) and E-D : 0.00ms
IPA for (h-g)(x) and E-D on t : 43.59ms
Verification:
Proof deserialization duration: 0.10ms
Total duration: 24ms
Duration per step:
Generate challenge r and powers : 7.70ms
Calculating helper_scalars r^i/(t-z_i) : 0.38ms
g_2(t) = SUM y_i*(r^i/(t-z_i))=SUM y_i*helper_scalars : 0.01ms
Compute E : 13.67ms
Compute E-D and verify IPA : 2.53ms
For 16000 polynomials:
Proving:
Proof serialization duration: 0.11ms
Proof creation duration: 217ms
Duration per step:
Generate challenge r and powers : 71.71ms
Calculate t, g(x) and D : 97.84ms
Calculate h(x) and E : 3.80ms
Calculate (h-g)(x) and E-D : 0.00ms
IPA for (h-g)(x) and E-D on t : 44.24ms
Verification:
Proof deserialization duration: 0.11ms
Total duration: 38ms
Duration per step:
Generate challenge r and powers : 14.28ms
Calculating helper_scalars r^i/(t-z_i) : 0.50ms
g_2(t) = SUM y_i*(r^i/(t-z_i))=SUM y_i*helper_scalars : 0.01ms
Compute E : 20.59ms
Compute E-D and verify IPA : 2.70ms
For 128000 polynomials:
Proving:
Proof serialization duration: 0.10ms
Proof creation duration: 4676ms
Duration per step:
Generate challenge r and powers : 3899.31ms
Calculate t, g(x) and D : 728.57ms
Calculate h(x) and E : 3.82ms
Calculate (h-g)(x) and E-D : 0.00ms
IPA for (h-g)(x) and E-D on t : 44.33ms
Verification:
Proof deserialization duration: 0.10ms
Total duration: 218ms
Duration per step:
Generate challenge r and powers : 93.04ms
Calculating helper_scalars r^i/(t-z_i) : 16.44ms
g_2(t) = SUM y_i*(r^i/(t-z_i))=SUM y_i*helper_scalars : 0.01ms
Compute E : 104.99ms
Compute E-D and verify IPA : 3.53ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment