Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ecc_transcript_relation.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
9
#include "
barretenberg/ecc/curves/bn254/g1.hpp
"
10
#include "
barretenberg/ecc/curves/grumpkin/grumpkin.hpp
"
11
#include "
barretenberg/relations/relation_types.hpp
"
12
13
namespace
bb
{
14
35
template
<
typename
FF_>
class
ECCVMTranscriptRelationImpl
{
36
public
:
37
using
FF
= FF_;
38
39
static
constexpr
std::array<size_t, 25>
SUBRELATION_PARTIAL_LENGTHS
{
40
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
41
};
42
43
template
<
typename
ContainerOverSubrelations,
typename
AllEntities,
typename
Parameters>
44
static
void
accumulate
(ContainerOverSubrelations& accumulator,
45
const
AllEntities& in,
46
const
Parameters&
/* unused */
,
47
const
FF
& scaling_factor);
48
49
// TODO(@zac-williamson #2609 find more generic way of doing this)
50
static
constexpr
FF
get_curve_b
()
51
{
52
if
constexpr
(
FF::modulus
==
bb::fq::modulus
) {
53
return
bb::g1::curve_b
;
54
}
else
if
constexpr
(
FF::modulus
==
grumpkin::fq::modulus
) {
55
return
grumpkin::g1::curve_b
;
56
}
else
{
57
return
0;
58
}
59
}
60
};
61
62
template
<
typename
FF>
using
ECCVMTranscriptRelation
=
Relation<ECCVMTranscriptRelationImpl<FF>
>;
63
64
}
// namespace bb
bb::ECCVMTranscriptRelationImpl
ECCVMTranscriptRelationImpl evaluates the correctness of the ECCVM transcript columns.
Definition
ecc_transcript_relation.hpp:35
bb::ECCVMTranscriptRelationImpl::FF
FF_ FF
Definition
ecc_transcript_relation.hpp:37
bb::ECCVMTranscriptRelationImpl::get_curve_b
static constexpr FF get_curve_b()
Definition
ecc_transcript_relation.hpp:50
bb::ECCVMTranscriptRelationImpl::accumulate
static void accumulate(ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters &, const FF &scaling_factor)
ECCVMTranscriptRelationImpl evaluates the correctness of the ECCVM transcript columns.
Definition
ecc_transcript_relation_impl.hpp:40
bb::ECCVMTranscriptRelationImpl::SUBRELATION_PARTIAL_LENGTHS
static constexpr std::array< size_t, 25 > SUBRELATION_PARTIAL_LENGTHS
Definition
ecc_transcript_relation.hpp:39
bb::Relation
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
Definition
relation_types.hpp:153
bb::group::curve_b
static constexpr Fq curve_b
Definition
group.hpp:51
grumpkin.hpp
g1.hpp
bb
Entry point for Barretenberg command-line interface.
Definition
acir_format_getters.cpp:6
bb::FF
typename Flavor::FF FF
Definition
protogalaxy.bench.cpp:16
relation_types.hpp
bb::field< Bn254FrParams >::modulus
static constexpr uint256_t modulus
Definition
field_declarations.hpp:197
src
barretenberg
relations
ecc_vm
ecc_transcript_relation.hpp
Generated by
1.9.8