Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ecc_bools_short_relation.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Planned, auditors: [], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
8
12
13namespace bb {
14
24template <typename FF_> class ECCVMBoolsTranscriptShortRelationImpl {
25 public:
26 using FF = FF_;
27
28 static constexpr std::array<size_t, 13> SUBRELATION_PARTIAL_LENGTHS{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };
29
40 template <typename AllEntities> inline static bool skip(const AllEntities& in)
41 {
42 return (in.transcript_eq + in.transcript_add + in.transcript_mul + in.transcript_reset_accumulator +
43 in.transcript_msm_transition + in.transcript_accumulator_not_empty + in.transcript_z1zero +
44 in.transcript_z2zero + in.transcript_add_x_equal + in.transcript_add_y_equal +
45 in.transcript_base_infinity + in.transcript_msm_infinity + in.transcript_msm_count_zero_at_transition)
46 .is_zero();
47 }
48
49 template <typename ContainerOverSubrelations, typename AllEntities, typename Parameters>
50 static void accumulate(ContainerOverSubrelations& accumulator,
51 const AllEntities& in,
52 const Parameters& params,
53 const FF& scaling_factor);
54};
55
62template <typename FF_> class ECCVMBoolsMsmShortRelationImpl {
63 public:
64 using FF = FF_;
65
66 static constexpr std::array<size_t, 10> SUBRELATION_PARTIAL_LENGTHS{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };
67
73 template <typename AllEntities> inline static bool skip(const AllEntities& in)
74 {
75 return (in.msm_transition + in.precompute_point_transition + in.msm_add + in.msm_double + in.msm_skew +
76 in.precompute_select + in.msm_add1 + in.msm_add2 + in.msm_add3 + in.msm_add4)
77 .is_zero();
78 }
79
80 template <typename ContainerOverSubrelations, typename AllEntities, typename Parameters>
81 static void accumulate(ContainerOverSubrelations& accumulator,
82 const AllEntities& in,
83 const Parameters& params,
84 const FF& scaling_factor);
85};
86
88
90
91} // namespace bb
MSM/precompute-family half of the ECCVM short-monomial booleanity checks.
static bool skip(const AllEntities &in)
Skip the msm/precompute booleanity checks where every column in this group is zero across the edge.
static void accumulate(ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters &params, const FF &scaling_factor)
static constexpr std::array< size_t, 10 > SUBRELATION_PARTIAL_LENGTHS
Transcript-family half of the ECCVM short-monomial booleanity checks.
static bool skip(const AllEntities &in)
Skip the transcript booleanity checks where every transcript boolean column is zero across the edge.
static void accumulate(ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters &params, const FF &scaling_factor)
static constexpr std::array< size_t, 13 > SUBRELATION_PARTIAL_LENGTHS
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
Entry point for Barretenberg command-line interface.
Definition api.hpp:5