Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
acir_format::EcAdd Struct Reference

Constraints for addition of two points on the Grumpkin curve. More...

#include <ec_operations.hpp>

Public Member Functions

 MSGPACK_FIELDS (input1_x, input1_y, input1_infinite, input2_x, input2_y, input2_infinite, predicate, result_x, result_y, result_infinite)
 

Public Attributes

WitnessOrConstant< bb::frinput1_x
 
WitnessOrConstant< bb::frinput1_y
 
WitnessOrConstant< bb::frinput1_infinite
 
WitnessOrConstant< bb::frinput2_x
 
WitnessOrConstant< bb::frinput2_y
 
WitnessOrConstant< bb::frinput2_infinite
 
WitnessOrConstant< bb::frpredicate
 
uint32_t result_x
 
uint32_t result_y
 
uint32_t result_infinite
 

Friends

bool operator== (EcAdd const &lhs, EcAdd const &rhs)=default
 

Detailed Description

Constraints for addition of two points on the Grumpkin curve.

EcAdd constraints have 10 components:

  • input1_x: x-coordinate of the first input point
  • input1_y: y-coordinate of the first input point
  • input1_infinite: flag indicating if the first input point is the point at infinity
  • input2_x: x-coordinate of the second input point
  • input2_y: y-coordinate of the second input point
  • input2_infinite: flag indicating if the second input point is the point at infinity
  • predicate: flag indicating whether the constraint is active
  • result_x: witness index for the x-coordinate of the resulting point
  • result_y: witness index for the y-coordinate of the resulting point
  • result_infinite: witness index for the flag indicating if the result is the point at infinity

The data related to input1 and input2 can either be given by witnesses or constants. However, x and y coordinates pertaining to the same input must be either all witnesses or all constants.

Definition at line 32 of file ec_operations.hpp.

Member Function Documentation

◆ MSGPACK_FIELDS()

acir_format::EcAdd::MSGPACK_FIELDS ( input1_x  ,
input1_y  ,
input1_infinite  ,
input2_x  ,
input2_y  ,
input2_infinite  ,
predicate  ,
result_x  ,
result_y  ,
result_infinite   
)

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( EcAdd const &  lhs,
EcAdd const &  rhs 
)
friend

Member Data Documentation

◆ input1_infinite

WitnessOrConstant<bb::fr> acir_format::EcAdd::input1_infinite

Definition at line 35 of file ec_operations.hpp.

◆ input1_x

WitnessOrConstant<bb::fr> acir_format::EcAdd::input1_x

Definition at line 33 of file ec_operations.hpp.

◆ input1_y

WitnessOrConstant<bb::fr> acir_format::EcAdd::input1_y

Definition at line 34 of file ec_operations.hpp.

◆ input2_infinite

WitnessOrConstant<bb::fr> acir_format::EcAdd::input2_infinite

Definition at line 38 of file ec_operations.hpp.

◆ input2_x

WitnessOrConstant<bb::fr> acir_format::EcAdd::input2_x

Definition at line 36 of file ec_operations.hpp.

◆ input2_y

WitnessOrConstant<bb::fr> acir_format::EcAdd::input2_y

Definition at line 37 of file ec_operations.hpp.

◆ predicate

WitnessOrConstant<bb::fr> acir_format::EcAdd::predicate

Definition at line 42 of file ec_operations.hpp.

◆ result_infinite

uint32_t acir_format::EcAdd::result_infinite

Definition at line 45 of file ec_operations.hpp.

◆ result_x

uint32_t acir_format::EcAdd::result_x

Definition at line 43 of file ec_operations.hpp.

◆ result_y

uint32_t acir_format::EcAdd::result_y

Definition at line 44 of file ec_operations.hpp.


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