barretenberg
Loading...
Searching...
No Matches
ecc_transcript_relation.hpp
1#pragma once
2
3#include "barretenberg/ecc/curves/bn254/g1.hpp"
4#include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp"
5#include "barretenberg/relations/relation_types.hpp"
6
7namespace proof_system::honk::sumcheck {
8
29template <typename FF_> class ECCVMTranscriptRelationImpl {
30 public:
31 using FF = FF_;
32
33 static constexpr std::array<size_t, 35> SUBRELATION_PARTIAL_LENGTHS{
34 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
35 };
36
37 template <typename ContainerOverSubrelations, typename AllEntities, typename Parameters>
38 static void accumulate(ContainerOverSubrelations& accumulator,
39 const AllEntities& in,
40 const Parameters& /* unused */,
41 const FF& scaling_factor);
42
43 // TODO(@zac-williamson #2609 find more generic way of doing this)
44 static constexpr FF get_curve_b()
45 {
46 if constexpr (FF::modulus == barretenberg::fq::modulus) {
47 return barretenberg::g1::curve_b;
48 } else if constexpr (FF::modulus == grumpkin::fq::modulus) {
49 return grumpkin::g1::curve_b;
50 } else {
51 return 0;
52 }
53 }
54};
55
57
58} // namespace proof_system::honk::sumcheck
The templates defined herein facilitate sharing the relation arithmetic between the prover and the ve...
Definition: relation_types.hpp:121
ECCVMTranscriptRelationImpl evaluates the correctness of the ECCVM transcript columns.
Definition: ecc_transcript_relation.hpp:29
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.cpp:34