pub struct CircuitStat {Show 16 fields
pub n_gates: usize,
pub n_eval_insn: usize,
pub n_and_constraints: usize,
pub n_mul_constraints: usize,
pub distinct_shifted_value_indices: usize,
pub distinct_unshifted_value_indices: usize,
pub value_vec_len: usize,
pub n_const: usize,
pub n_inout: usize,
pub n_witness: usize,
pub n_internal: usize,
pub n_scratch: usize,
pub and_allocated: usize,
pub mul_allocated: usize,
pub public_allocated: usize,
pub private_allocated: usize,
}Expand description
Various stats of a circuit that affect the prover performance.
Fields§
§n_gates: usizeNumber of gates in the circuit.
n_eval_insn: usizeNumber of instructions in the evaluation form of circuit.
Directly proportional to performance of witness filling.
n_and_constraints: usizeNumber of AND constraints in the circuit.
Affects performance of AND reduction.
n_mul_constraints: usizeNumber of MUL constraints in the circuit.
Affects performance of intmul reduction phase.
distinct_shifted_value_indices: usizeNumber of distinct value indices with non-zero shift in the circuit.
Every use of a value with a distinct type and amount is counted here.
Affects performance of shift reduction phase.
distinct_unshifted_value_indices: usizeNumber of distinct value indices with zero shift in the circuit.
Affects performance of shift reduction phase.
value_vec_len: usizeLength of the value vector.
Affects performance of committing.
n_const: usizeNumber of constant values used by the circuit.
n_inout: usizeNumber of public input values in the circuit.
n_witness: usizeNumber of private input values in the circuit.
n_internal: usizeNumber of internal values in the circuit.
Internal values are values produced by gates.
n_scratch: usizeNumber of scratch values in the circuit.
Those values are not committed, those only exist during witness generation.
and_allocated: usizeAllocated size for AND constraints (power of 2)
mul_allocated: usizeAllocated size for MUL constraints (power of 2)
public_allocated: usizeAllocated size for public section (power of 2)
private_allocated: usizeAllocated size for private section.
This is the space available for witness and internal values. Note that unlike
public_allocated and the total committed length, this is NOT necessarily a
power of two. It’s simply the difference between the total committed length
(power of 2) and the public section size (power of 2). For example, if total
is 8192 and public is 128, private is 8064.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CircuitStat
impl RefUnwindSafe for CircuitStat
impl Send for CircuitStat
impl Sync for CircuitStat
impl Unpin for CircuitStat
impl UnsafeUnpin for CircuitStat
impl UnwindSafe for CircuitStat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more