Skip to content

Commit

Permalink
add small util for SuperNova testing (easy) (#358)
Browse files Browse the repository at this point in the history
* add small util for SuperNova testing

* added another function for secondary

* chore: document added method

---------

Co-authored-by: Wyatt <[email protected]>
Co-authored-by: François Garillot <[email protected]>
  • Loading branch information
3 people authored Mar 14, 2024
1 parent 2fa1f98 commit 6133454
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/supernova/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,22 @@ where
.expect("Failure in retrieving digest")
}

/// Returns the number of constraints and variables of inner circuit based on index
pub fn num_constraints_and_variables(&self, index: usize) -> (usize, usize) {
(
self.circuit_shapes[index].r1cs_shape.num_cons,
self.circuit_shapes[index].r1cs_shape.num_vars,
)
}

/// Returns the number of constraints and variables of the secondary circuit
pub fn num_constraints_and_variables_secondary(&self) -> (usize, usize) {
(
self.circuit_shape_secondary.r1cs_shape.num_cons,
self.circuit_shape_secondary.r1cs_shape.num_vars,
)
}

/// All of the primary circuit digests of this [`PublicParams`]
pub fn circuit_param_digests(&self) -> CircuitDigests<E1> {
let digests = self
Expand Down

1 comment on commit 6133454

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Benchmarks

Table of Contents

Overview

This benchmark report shows the Arecibo GPU benchmarks.
NVIDIA L4
Intel(R) Xeon(R) CPU @ 2.20GHz
32 vCPUs
125 GB RAM
Workflow run: https://github.com/lurk-lab/arecibo/actions/runs/8286036442

Benchmark Results

RecursiveSNARK-NIVC-2

ref=2fa1f98 ref=6133454
Prove-NumCons-6540 44.68 ms (✅ 1.00x) 44.48 ms (✅ 1.00x faster)
Verify-NumCons-6540 34.56 ms (✅ 1.00x) 34.26 ms (✅ 1.01x faster)
Prove-NumCons-1028888 319.72 ms (✅ 1.00x) 320.45 ms (✅ 1.00x slower)
Verify-NumCons-1028888 250.86 ms (✅ 1.00x) 248.84 ms (✅ 1.01x faster)

CompressedSNARK-NIVC-Commitments-2

ref=2fa1f98 ref=6133454
Prove-NumCons-6540 10.54 s (✅ 1.00x) 10.61 s (✅ 1.01x slower)
Verify-NumCons-6540 50.68 ms (✅ 1.00x) 50.97 ms (✅ 1.01x slower)
Prove-NumCons-1028888 53.64 s (✅ 1.00x) 52.84 s (✅ 1.02x faster)
Verify-NumCons-1028888 51.00 ms (✅ 1.00x) 50.87 ms (✅ 1.00x faster)

Made with criterion-table

Please sign in to comment.