Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::EccvmRowTracker Class Reference

Class for tracking the number of rows in the ECCVM circuit and the number of muls performed as the op queue is populated. More...

#include <eccvm_row_tracker.hpp>

Public Member Functions

uint32_t get_number_of_muls () const
 
size_t get_num_msm_rows () const
 Get the number of rows in the 'msm' column section, for all msms in the circuit.
 
size_t get_num_rows () const
 Get the number of rows for the current ECCVM circuit.
 
void update_cached_msms (const ECCVMOperation &op)
 Update cached_active_msm_count or update other row counts and reset cached_active_msm_count.
 

Static Public Member Functions

static uint32_t num_eccvm_msm_rows (const size_t msm_size)
 Get the number of rows in the 'msm' column section of the ECCVM associated with a single multiscalar multiplication.
 
static uint32_t get_precompute_table_row_count_for_single_msm (const size_t msm_count)
 Get the precompute table row count for single msm object.
 

Private Types

using Curve = curve::BN254
 

Private Attributes

uint32_t cached_num_muls = 0
 
uint32_t cached_active_msm_count = 0
 
uint32_t num_transcript_rows = 0
 
uint32_t num_precompute_table_rows = 0
 
uint32_t num_msm_rows = 0
 

Detailed Description

Class for tracking the number of rows in the ECCVM circuit and the number of muls performed as the op queue is populated.

This is to avoid expensive O(n) logic to compute the number of rows and muls during witness computation

Definition at line 19 of file eccvm_row_tracker.hpp.

Member Typedef Documentation

◆ Curve

Definition at line 20 of file eccvm_row_tracker.hpp.

Member Function Documentation

◆ get_num_msm_rows()

size_t bb::EccvmRowTracker::get_num_msm_rows ( ) const
inline

Get the number of rows in the 'msm' column section, for all msms in the circuit.

Returns
size_t

Definition at line 60 of file eccvm_row_tracker.hpp.

◆ get_num_rows()

size_t bb::EccvmRowTracker::get_num_rows ( ) const
inline

Get the number of rows for the current ECCVM circuit.

Returns
size_t

Definition at line 74 of file eccvm_row_tracker.hpp.

◆ get_number_of_muls()

uint32_t bb::EccvmRowTracker::get_number_of_muls ( ) const
inline

Definition at line 29 of file eccvm_row_tracker.hpp.

◆ get_precompute_table_row_count_for_single_msm()

static uint32_t bb::EccvmRowTracker::get_precompute_table_row_count_for_single_msm ( const size_t  msm_count)
inlinestatic

Get the precompute table row count for single msm object.

Parameters
msm_count
Returns
uint32_t

Definition at line 120 of file eccvm_row_tracker.hpp.

◆ num_eccvm_msm_rows()

static uint32_t bb::EccvmRowTracker::num_eccvm_msm_rows ( const size_t  msm_size)
inlinestatic

Get the number of rows in the 'msm' column section of the ECCVM associated with a single multiscalar multiplication.

Parameters
msm_size
Returns
uint32_t

Definition at line 38 of file eccvm_row_tracker.hpp.

◆ update_cached_msms()

void bb::EccvmRowTracker::update_cached_msms ( const ECCVMOperation op)
inline

Update cached_active_msm_count or update other row counts and reset cached_active_msm_count.

To the OpQueue, an MSM is a sequence of successive mul opcodes (note that mul might better be called mul_add–its effect on the accumulator is += scalar * point).

Parameters
op

Definition at line 96 of file eccvm_row_tracker.hpp.

Member Data Documentation

◆ cached_active_msm_count

uint32_t bb::EccvmRowTracker::cached_active_msm_count = 0
private

Definition at line 23 of file eccvm_row_tracker.hpp.

◆ cached_num_muls

uint32_t bb::EccvmRowTracker::cached_num_muls = 0
private

Definition at line 22 of file eccvm_row_tracker.hpp.

◆ num_msm_rows

uint32_t bb::EccvmRowTracker::num_msm_rows = 0
private

Definition at line 26 of file eccvm_row_tracker.hpp.

◆ num_precompute_table_rows

uint32_t bb::EccvmRowTracker::num_precompute_table_rows = 0
private

Definition at line 25 of file eccvm_row_tracker.hpp.

◆ num_transcript_rows

uint32_t bb::EccvmRowTracker::num_transcript_rows = 0
private

Definition at line 24 of file eccvm_row_tracker.hpp.


The documentation for this class was generated from the following file: