Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add small util for SuperNova testing (easy) #358

Merged
merged 3 commits into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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