barretenberg
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
proof_system::ECCOpQueue Class Reference

Used to construct execution trace representations of elliptic curve operations. More...

#include <ecc_op_queue.hpp>

Public Types

using ECCVMOperation = proof_system_eccvm::VMOperation< Curve::Group >
 

Public Member Functions

Point get_accumulator ()
 
void set_size_data ()
 Set the current and previous size of the ultra_ops transcript.
 
size_t get_previous_size () const
 
size_t get_current_size () const
 
void set_commitment_data (std::array< Point, 4 > &commitments)
 
std::vector< std::span< Fr > > get_aggregate_transcript ()
 Get a 'view' of the current ultra ops object.
 
std::vector< std::span< Fr > > get_previous_aggregate_transcript ()
 Get a 'view' of the previous ultra ops object.
 
void populate_with_mock_initital_data ()
 TESTING PURPOSES ONLY: Populate ECC op queue with mock data as stand in for "previous circuit" in tests.
 
void add_accumulate (const Point &to_add)
 Write point addition op to queue and natively perform addition.
 
void mul_accumulate (const Point &to_mul, const Fr &scalar)
 Write multiply and add op to queue and natively perform operation.
 
Point eq ()
 Write equality op using internal accumulator point.
 
void empty_row ()
 Write empty row to queue.
 

Public Attributes

std::vector< ECCVMOperationraw_ops
 
std::array< std::vector< Fr >, 4 > ultra_ops
 
size_t current_ultra_ops_size = 0
 
size_t previous_ultra_ops_size = 0
 
std::array< Point, 4 > ultra_ops_commitments
 
std::array< Point, 4 > previous_ultra_ops_commitments
 

Detailed Description

Used to construct execution trace representations of elliptic curve operations.

Currently the targets in execution traces are: four advice wires in UltraCircuitBuilder and 5 wires in the ECCVM. In each case, the variable values are stored in this class, since the same values will need to be used later by the TranslationVMCircuitBuilder. The circuit builders will store witness indices which are indices in the ultra (resp. eccvm) ops members of this class (rather than in the builder's variables array).

Member Function Documentation

◆ add_accumulate()

void proof_system::ECCOpQueue::add_accumulate ( const Point &  to_add)
inline

Write point addition op to queue and natively perform addition.

Parameters
to_add

◆ empty_row()

void proof_system::ECCOpQueue::empty_row ( )
inline

Write empty row to queue.

◆ eq()

Point proof_system::ECCOpQueue::eq ( )
inline

Write equality op using internal accumulator point.

Returns
current internal accumulator point (prior to reset to 0)

◆ get_aggregate_transcript()

std::vector< std::span< Fr > > proof_system::ECCOpQueue::get_aggregate_transcript ( )
inline

Get a 'view' of the current ultra ops object.

Returns
std::vector<std::span<Fr>>

◆ get_previous_aggregate_transcript()

std::vector< std::span< Fr > > proof_system::ECCOpQueue::get_previous_aggregate_transcript ( )
inline

Get a 'view' of the previous ultra ops object.

Returns
std::vector<std::span<Fr>>

◆ mul_accumulate()

void proof_system::ECCOpQueue::mul_accumulate ( const Point &  to_mul,
const Fr scalar 
)
inline

Write multiply and add op to queue and natively perform operation.

Parameters
to_add

◆ populate_with_mock_initital_data()

void proof_system::ECCOpQueue::populate_with_mock_initital_data ( )
inline

TESTING PURPOSES ONLY: Populate ECC op queue with mock data as stand in for "previous circuit" in tests.

TODO(#723): We currently cannot support Goblin proofs (specifically, transcript aggregation) if there is not existing data in the ECC op queue (since this leads to zero-commitment issues). This method populates the op queue with mock data so that the prover of an arbitrary 'first' circuit can behave as if it were not the prover over the first circuit in the stack. This method should be removed entirely once this is resolved.

Parameters
op_queue

◆ set_size_data()

void proof_system::ECCOpQueue::set_size_data ( )
inline

Set the current and previous size of the ultra_ops transcript.

previous_ultra_ops_size = M_{i-1} is needed by the prover to extract the previous aggregate op queue transcript T_{i-1} from the current one T_i. This method should be called when a circuit is 'finalized'.


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