Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
blake3_constraint.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
8
#include "
barretenberg/dsl/acir_format/witness_constant.hpp
"
9
#include "
barretenberg/serialize/msgpack.hpp
"
10
#include <array>
11
#include <cstdint>
12
#include <vector>
13
14
namespace
acir_format
{
15
16
struct
Blake3Input
{
17
WitnessOrConstant<bb::fr>
blackbox_input
;
18
uint32_t
num_bits
;
19
20
// For serialization, update with any new fields
21
MSGPACK_FIELDS
(
blackbox_input
,
num_bits
);
22
friend
bool
operator==
(
Blake3Input
const
& lhs,
Blake3Input
const
& rhs) =
default
;
23
};
24
25
struct
Blake3Constraint
{
26
std::vector<Blake3Input>
inputs
;
27
std::array<uint32_t, 32>
result
;
28
29
// For serialization, update with any new fields
30
MSGPACK_FIELDS
(
inputs
,
result
);
31
friend
bool
operator==
(
Blake3Constraint
const
& lhs,
Blake3Constraint
const
& rhs) =
default
;
32
};
33
34
template
<
typename
Builder>
void
create_blake3_constraints
(
Builder
&
builder
,
const
Blake3Constraint
& constraint);
35
36
}
// namespace acir_format
bb::UltraCircuitBuilder_
Definition
ultra_circuit_builder.hpp:42
builder
AluTraceBuilder builder
Definition
alu.test.cpp:123
msgpack.hpp
acir_format
Definition
acir_format.cpp:34
acir_format::create_blake3_constraints
void create_blake3_constraints(Builder &builder, const Blake3Constraint &constraint)
Definition
blake3_constraint.cpp:15
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
acir_format::Blake3Constraint
Definition
blake3_constraint.hpp:25
acir_format::Blake3Constraint::MSGPACK_FIELDS
MSGPACK_FIELDS(inputs, result)
acir_format::Blake3Constraint::result
std::array< uint32_t, 32 > result
Definition
blake3_constraint.hpp:27
acir_format::Blake3Constraint::operator==
friend bool operator==(Blake3Constraint const &lhs, Blake3Constraint const &rhs)=default
acir_format::Blake3Constraint::inputs
std::vector< Blake3Input > inputs
Definition
blake3_constraint.hpp:26
acir_format::Blake3Input
Definition
blake3_constraint.hpp:16
acir_format::Blake3Input::num_bits
uint32_t num_bits
Definition
blake3_constraint.hpp:18
acir_format::Blake3Input::MSGPACK_FIELDS
MSGPACK_FIELDS(blackbox_input, num_bits)
acir_format::Blake3Input::blackbox_input
WitnessOrConstant< bb::fr > blackbox_input
Definition
blake3_constraint.hpp:17
acir_format::Blake3Input::operator==
friend bool operator==(Blake3Input const &lhs, Blake3Input const &rhs)=default
acir_format::WitnessOrConstant
Definition
witness_constant.hpp:13
witness_constant.hpp
src
barretenberg
dsl
acir_format
blake3_constraint.hpp
Generated by
1.9.8