Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
witness_constant.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], date: YYYY-MM-DD }
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
11
12namespace acir_format {
13template <typename FF> struct WitnessOrConstant {
14
15 uint32_t index;
19 friend bool operator==(WitnessOrConstant const& lhs, WitnessOrConstant const& rhs) = default;
21 {
22 return WitnessOrConstant{
23 .index = index,
24 .value = FF::zero(),
25 .is_constant = false,
26 };
27 }
28};
29
30template <typename Builder, typename FF>
39
40template <typename Builder, typename FF>
41bb::stdlib::cycle_group<Builder> to_grumpkin_point(const WitnessOrConstant<FF>& input_x,
42 const WitnessOrConstant<FF>& input_y,
43 const WitnessOrConstant<FF>& input_infinite,
44 bool has_valid_witness_assignments,
46
47} // namespace acir_format
cycle_group represents a group Element of the proving system's embedded curve i.e....
static field_t from_witness_index(Builder *ctx, uint32_t witness_index)
Definition field.cpp:59
AluTraceBuilder builder
Definition alu.test.cpp:123
stdlib::field_t< Builder > field_ct
bb::stdlib::field_t< Builder > to_field_ct(const WitnessOrConstant< FF > &input, Builder &builder)
bb::stdlib::cycle_group< Builder > to_grumpkin_point(const WitnessOrConstant< FF > &input_x, const WitnessOrConstant< FF > &input_y, const WitnessOrConstant< FF > &input_infinite, bool has_valid_witness_assignments, Builder &builder)
typename Flavor::FF FF
MSGPACK_FIELDS(index, value, is_constant)
static WitnessOrConstant from_index(uint32_t index)
friend bool operator==(WitnessOrConstant const &lhs, WitnessOrConstant const &rhs)=default
static constexpr field zero()