Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ec_operations.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Completed, auditors: [Federico], date: 2025-11-03 }
3// external_1: { status: not started, auditors: [], date: YYYY-MM-DD }
4// external_2: { status: not started, auditors: [], date: YYYY-MM-DD }
5// =====================
6
7#pragma once
10#include <cstdint>
11
12namespace acir_format {
13
32struct EcAdd {
39 // Predicate indicating whether the constraint should be disabled:
40 // - true: the constraint is valid
41 // - false: the constraint is disabled, i.e it must not fail and can return whatever.
43 uint32_t result_x;
44 uint32_t result_y;
46
47 // for serialization, update with any new fields
58 friend bool operator==(EcAdd const& lhs, EcAdd const& rhs) = default;
59};
60
61template <typename Builder> void create_ec_add_constraint(Builder& builder, const EcAdd& input);
62} // namespace acir_format
AluTraceBuilder builder
Definition alu.test.cpp:124
void create_ec_add_constraint(Builder &builder, const EcAdd &input)
Create constraints for addition of two points on the Grumpkin curve.
Constraints for addition of two points on the Grumpkin curve.
friend bool operator==(EcAdd const &lhs, EcAdd const &rhs)=default
WitnessOrConstant< bb::fr > input1_y
WitnessOrConstant< bb::fr > input1_infinite
WitnessOrConstant< bb::fr > input2_y
WitnessOrConstant< bb::fr > input2_infinite
WitnessOrConstant< bb::fr > input1_x
WitnessOrConstant< bb::fr > input2_x
WitnessOrConstant< bb::fr > predicate
MSGPACK_FIELDS(input1_x, input1_y, input1_infinite, input2_x, input2_y, input2_infinite, predicate, result_x, result_y, result_infinite)