Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Protogalaxy folding of challenges #2935

Merged
merged 39 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
a1c95c5
Uniformize relations in prep for refactor.
codygunton Oct 19, 2023
bee3ca2
Move translator relations to subfolder
codygunton Oct 19, 2023
6e77bce
Stalled experiment
codygunton Oct 20, 2023
98aec2a
Add tmp proxy to sumcheck prover prove
codygunton Oct 20, 2023
d3bde61
Change compute_combiner interface
codygunton Oct 20, 2023
b6df92e
Quick and dirty. IOU test
codygunton Oct 21, 2023
12b25b0
WORKTODO tweaks
codygunton Oct 21, 2023
ffaf07b
Fix?
codygunton Oct 21, 2023
ddeaba3
Move ParameterView gettinger
codygunton Oct 21, 2023
bd8e812
Compute full degrees where needed
codygunton Oct 23, 2023
ee83443
Compile with full degrees; IOU tests
codygunton Oct 24, 2023
f087936
Update two tests.
codygunton Oct 24, 2023
7092593
Update final test.
codygunton Oct 24, 2023
093255f
Rename MAX_RELATION_LENGTH
codygunton Oct 24, 2023
83de942
Stop detecting submodules!
codygunton Oct 24, 2023
dc77501
Rename FULL to TOTAL
codygunton Oct 24, 2023
0dac01d
RANDOM to BATCHED
codygunton Oct 24, 2023
dacacf9
Cleanup Pass
codygunton Oct 24, 2023
2bbac89
More smaller cleanup
codygunton Oct 24, 2023
4c207ee
Use instance interface.
codygunton Oct 24, 2023
03e31e7
Merge remote-tracking branch 'origin/master' into cg/pg-fold-challenges
codygunton Oct 24, 2023
f3caefa
Add comments
codygunton Oct 24, 2023
a5c985c
Test parameters_to_univariates
codygunton Oct 24, 2023
567346d
Merge remote-tracking branch 'origin/master' into cg/pg-fold-challenges
codygunton Oct 25, 2023
24c8c75
Merge remote-tracking branch 'origin/master' into cg/pg-fold-challenges
codygunton Oct 25, 2023
3fe5d56
Merge remote-tracking branch 'origin/master' into cg/pg-fold-challenges
codygunton Oct 25, 2023
c0a6114
Partial response to review.
codygunton Oct 26, 2023
cd644d0
More response
codygunton Oct 26, 2023
248d4e0
Double dereferencing improvement.
codygunton Oct 26, 2023
5e9c3b5
Clean up `fold_parameters`
codygunton Oct 26, 2023
1ffdb98
Last bit of cleanup.
codygunton Oct 26, 2023
22a6ee3
fix comments
maramihali Oct 27, 2023
a327957
Merge branch 'master' into cg/pg-fold-challenges
maramihali Oct 27, 2023
d0deb59
another comment fix
maramihali Oct 27, 2023
869b830
Fix bad naming.
codygunton Oct 27, 2023
7f33f9f
Merge remote-tracking branch 'origin/master' into cg/pg-fold-challenges
codygunton Oct 27, 2023
b9bd1b4
Add a comment.
codygunton Oct 27, 2023
e4097c3
Remove bad ref to sumcheck
codygunton Oct 27, 2023
02f1913
Merge remote-tracking branch 'origin/master' into cg/pg-fold-challenges
codygunton Oct 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions barretenberg/barretenberg.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
// Clangd. Note that this setting may be overridden by user settings
// to the default value "clangd".
//
"clangd.path": "clangd-15",
"clangd.path": "clangd-16",
// We should disable automatic inclusion of headers unless we decide to follow "WhyIWYU".
"clangd.arguments": [
"-header-insertion=never"
Expand Down Expand Up @@ -156,6 +156,7 @@
"-g"
],
"cmake.useCMakePresets": "auto",
"editor.inlayHints.enabled": "offUnlessPressed"
"editor.inlayHints.enabled": "offUnlessPressed",
"git.detectSubmodules": false
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "barretenberg/proof_system/relations/gen_perm_sort_relation.hpp"
#include "barretenberg/proof_system/relations/lookup_relation.hpp"
#include "barretenberg/proof_system/relations/permutation_relation.hpp"
#include "barretenberg/proof_system/relations/relation_parameters.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this include necessary here, i see it's also in other bench files that actually use relation parameters

Copy link
Contributor Author

@codygunton codygunton Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file does use them on Line 26.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad

#include "barretenberg/proof_system/relations/ultra_arithmetic_relation.hpp"
#include <benchmark/benchmark.h>

Expand Down
15 changes: 8 additions & 7 deletions barretenberg/cpp/src/barretenberg/honk/flavor/ecc_vm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "barretenberg/proof_system/relations/ecc_vm/ecc_set_relation.hpp"
#include "barretenberg/proof_system/relations/ecc_vm/ecc_transcript_relation.hpp"
#include "barretenberg/proof_system/relations/ecc_vm/ecc_wnaf_relation.hpp"
#include "barretenberg/proof_system/relations/relation_parameters.hpp"
#include "barretenberg/proof_system/relations/relation_types.hpp"
#include <array>
#include <concepts>
Expand Down Expand Up @@ -65,19 +66,19 @@ template <typename CycleGroup_T, typename Curve_T, typename PCS_T> class ECCVMBa
sumcheck::ECCVMLookupRelation<FF>>;

using LookupRelation = sumcheck::ECCVMLookupRelation<FF>;
static constexpr size_t MAX_RELATION_LENGTH = get_max_relation_length<Relations>();
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();

// MAX_RANDOM_RELATION_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta` random
// polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation length = 3
static constexpr size_t MAX_RANDOM_RELATION_LENGTH = MAX_RELATION_LENGTH + 1;
// BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please explain what partial means here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, to be matching with the line above i'd use BATCHED_PARTIAL_RELATION_LENGTH

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it's the "partial length of the batched relation" we're computing here, not the "batching of the partial relation length", so I think what I wrote is more meaningful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid duplicating the same comments in every flavor file, I'll write descriptions of "total" versus "partial" in the comments that define the functions. That should be good enough, right? I think anybody who's curious would look there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that makes sense, also did not realise the nuance until now, self note to take ordering into consideration in a name

// random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation
// length = 3
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1;
static constexpr size_t NUM_RELATIONS = std::tuple_size<Relations>::value;

// Instantiate the BarycentricData needed to extend each Relation Univariate
// static_assert(instantiate_barycentric_utils<FF, MAX_RANDOM_RELATION_LENGTH>());

// define the containers for storing the contributions from each relation in Sumcheck
using SumcheckTupleOfTuplesOfUnivariates = decltype(create_sumcheck_tuple_of_tuples_of_univariates<Relations>());
using TupleOfArraysOfValues = decltype(create_sumcheck_tuple_of_arrays_of_values<Relations>());
using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values<Relations>());

private:
/**
Expand Down Expand Up @@ -721,7 +722,7 @@ template <typename CycleGroup_T, typename Curve_T, typename PCS_T> class ECCVMBa
/**
* @brief A container for univariates produced during the hot loop in sumcheck.
*/
using ExtendedEdges = ProverUnivariates<MAX_RELATION_LENGTH>;
using ExtendedEdges = ProverUnivariates<MAX_PARTIAL_RELATION_LENGTH>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i find the usage of partial in the context of sumcheck a bit strange because in that case the partial degree is actually the total degree :-?


/**
* @brief A container for the prover polynomials handles; only stores spans.
Expand Down
27 changes: 15 additions & 12 deletions barretenberg/cpp/src/barretenberg/honk/flavor/goblin_translator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#include "barretenberg/proof_system/arithmetization/arithmetization.hpp"
#include "barretenberg/proof_system/circuit_builder/goblin_translator_circuit_builder.hpp"
#include "barretenberg/proof_system/flavor/flavor.hpp"
#include "barretenberg/proof_system/relations/decomposition_relation.hpp"
#include "barretenberg/proof_system/relations/extra_relations.hpp"
#include "barretenberg/proof_system/relations/gen_perm_sort_relation.hpp"
#include "barretenberg/proof_system/relations/non_native_field_relation.hpp"
#include "barretenberg/proof_system/relations/permutation_relation.hpp"
#include "barretenberg/proof_system/relations/translator_vm/translator_decomposition_relation.hpp"
#include "barretenberg/proof_system/relations/translator_vm/translator_extra_relations.hpp"
#include "barretenberg/proof_system/relations/translator_vm/translator_gen_perm_sort_relation.hpp"
#include "barretenberg/proof_system/relations/translator_vm/translator_non_native_field_relation.hpp"
#include "barretenberg/proof_system/relations/translator_vm/translator_permutation_relation.hpp"
#include <array>
#include <concepts>
#include <span>
Expand Down Expand Up @@ -316,16 +316,19 @@ template <size_t mini_circuit_size> class GoblinTranslator_ {
GoblinTranslatorDecompositionRelation<FF>,
GoblinTranslatorNonNativeFieldRelation<FF>>;

static constexpr size_t MAX_RELATION_LENGTH = get_max_relation_length<Relations>();
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();
static constexpr size_t MAX_TOTAL_RELATION_LENGTH = compute_max_total_relation_length<Relations>();

// MAX_RANDOM_RELATION_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta` random
// polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation length = 3
static constexpr size_t MAX_RANDOM_RELATION_LENGTH = MAX_RELATION_LENGTH + 1;
static constexpr size_t NUM_RELATIONS = std::tuple_size<Relations>::value;
// BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta`
// random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation
// length = 3
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1;
static constexpr size_t BATCHED_RELATION_TOTAL_LENGTH = MAX_TOTAL_RELATION_LENGTH + 1;
static constexpr size_t NUM_RELATIONS = std::tuple_size_v<Relations>;

// define the containers for storing the contributions from each relation in Sumcheck
using SumcheckTupleOfTuplesOfUnivariates = decltype(create_sumcheck_tuple_of_tuples_of_univariates<Relations>());
using TupleOfArraysOfValues = decltype(create_sumcheck_tuple_of_arrays_of_values<Relations>());
using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values<Relations>());

private:
template <typename DataType, typename HandleType>
Expand Down Expand Up @@ -1503,7 +1506,7 @@ template <size_t mini_circuit_size> class GoblinTranslator_ {
/**
* @brief A container for univariates produced during the hot loop in sumcheck.
*/
using ExtendedEdges = ProverUnivariates<MAX_RELATION_LENGTH>;
using ExtendedEdges = ProverUnivariates<MAX_PARTIAL_RELATION_LENGTH>;

/**
* @brief A container for commitment labels.
Expand Down
17 changes: 10 additions & 7 deletions barretenberg/cpp/src/barretenberg/honk/flavor/goblin_ultra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,21 @@ class GoblinUltra {
proof_system::AuxiliaryRelation<FF>,
proof_system::EccOpQueueRelation<FF>>;

static constexpr size_t MAX_RELATION_LENGTH = get_max_relation_length<Relations>();
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();
static constexpr size_t MAX_TOTAL_RELATION_LENGTH = compute_max_total_relation_length<Relations>();

// MAX_RANDOM_RELATION_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta` random
// polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation length = 3
static constexpr size_t MAX_RANDOM_RELATION_LENGTH = MAX_RELATION_LENGTH + 1;
static constexpr size_t NUM_RELATIONS = std::tuple_size<Relations>::value;
// BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta`
// random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation
// length = 3
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1;
static constexpr size_t BATCHED_RELATION_TOTAL_LENGTH = MAX_TOTAL_RELATION_LENGTH + 1;
static constexpr size_t NUM_RELATIONS = std::tuple_size_v<Relations>;

template <size_t NUM_INSTANCES>
using ProtogalaxyTupleOfTuplesOfUnivariates =
decltype(create_protogalaxy_tuple_of_tuples_of_univariates<Relations, NUM_INSTANCES>());
using SumcheckTupleOfTuplesOfUnivariates = decltype(create_sumcheck_tuple_of_tuples_of_univariates<Relations>());
using TupleOfArraysOfValues = decltype(create_sumcheck_tuple_of_arrays_of_values<Relations>());
using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values<Relations>());

// Whether or not the first row of the execution trace is reserved for 0s to enable shifts
static constexpr bool has_zero_row = true;
Expand Down Expand Up @@ -330,7 +333,7 @@ class GoblinUltra {
/**
* @brief A container for univariates produced during the hot loop in sumcheck.
*/
using ExtendedEdges = ProverUnivariates<MAX_RELATION_LENGTH>;
using ExtendedEdges = ProverUnivariates<MAX_PARTIAL_RELATION_LENGTH>;

/**
* @brief A field element for each entity of the flavor. These entities represent the prover polynomials evaluated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,17 @@ template <typename BuilderType> class GoblinUltraRecursive_ {
proof_system::AuxiliaryRelation<FF>,
proof_system::EccOpQueueRelation<FF>>;

static constexpr size_t MAX_RELATION_LENGTH = get_max_relation_length<Relations>();
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();

// MAX_RANDOM_RELATION_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta` random
// polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation length = 3
static constexpr size_t MAX_RANDOM_RELATION_LENGTH = MAX_RELATION_LENGTH + 1;
// BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta`
// random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation
// length = 3
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1;
static constexpr size_t NUM_RELATIONS = std::tuple_size<Relations>::value;

// define the container for storing the univariate contribution from each relation in Sumcheck
using SumcheckTupleOfTuplesOfUnivariates = decltype(create_sumcheck_tuple_of_tuples_of_univariates<Relations>());
using TupleOfArraysOfValues = decltype(create_sumcheck_tuple_of_arrays_of_values<Relations>());
using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values<Relations>());

private:
template <typename DataType, typename HandleType>
Expand Down
24 changes: 14 additions & 10 deletions barretenberg/cpp/src/barretenberg/honk/flavor/ultra.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#pragma once
#include "barretenberg/ecc/curves/bn254/g1.hpp"
#include "barretenberg/honk/pcs/kzg/kzg.hpp"
#include "barretenberg/polynomials/barycentric.hpp"
#include "barretenberg/polynomials/univariate.hpp"

#include "barretenberg/honk/transcript/transcript.hpp"
#include "barretenberg/polynomials/barycentric.hpp"
#include "barretenberg/polynomials/evaluation_domain.hpp"
#include "barretenberg/polynomials/polynomial.hpp"
#include "barretenberg/polynomials/univariate.hpp"
#include "barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp"
#include "barretenberg/proof_system/flavor/flavor.hpp"
#include "barretenberg/proof_system/relations/auxiliary_relation.hpp"
Expand Down Expand Up @@ -53,18 +52,23 @@ class Ultra {
proof_system::EllipticRelation<FF>,
proof_system::AuxiliaryRelation<FF>>;

static constexpr size_t MAX_RELATION_LENGTH = get_max_relation_length<Relations>();
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();
static constexpr size_t MAX_TOTAL_RELATION_LENGTH = compute_max_total_relation_length<Relations>();
static_assert(MAX_PARTIAL_RELATION_LENGTH == 6);
static_assert(MAX_TOTAL_RELATION_LENGTH == 12);

// MAX_RANDOM_RELATION_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta` random
// polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation length = 3
static constexpr size_t MAX_RANDOM_RELATION_LENGTH = MAX_RELATION_LENGTH + 1;
static constexpr size_t NUM_RELATIONS = std::tuple_size<Relations>::value;
// BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta`
// random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation
// length = 3
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1;
static constexpr size_t BATCHED_RELATION_TOTAL_LENGTH = MAX_TOTAL_RELATION_LENGTH + 1;
static constexpr size_t NUM_RELATIONS = std::tuple_size_v<Relations>;

template <size_t NUM_INSTANCES>
using ProtogalaxyTupleOfTuplesOfUnivariates =
decltype(create_protogalaxy_tuple_of_tuples_of_univariates<Relations, NUM_INSTANCES>());
using SumcheckTupleOfTuplesOfUnivariates = decltype(create_sumcheck_tuple_of_tuples_of_univariates<Relations>());
using TupleOfArraysOfValues = decltype(create_sumcheck_tuple_of_arrays_of_values<Relations>());
using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values<Relations>());

// Whether or not the first row of the execution trace is reserved for 0s to enable shifts
static constexpr bool has_zero_row = true;
Expand Down Expand Up @@ -327,7 +331,7 @@ class Ultra {
/**
* @brief A container for univariates produced during the hot loop in sumcheck.
*/
using ExtendedEdges = ProverUnivariates<MAX_RELATION_LENGTH>;
using ExtendedEdges = ProverUnivariates<MAX_PARTIAL_RELATION_LENGTH>;

/**
* @brief A container for commitment labels.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,17 @@ template <typename BuilderType> class UltraRecursive_ {
proof_system::EllipticRelation<FF>,
proof_system::AuxiliaryRelation<FF>>;

static constexpr size_t MAX_RELATION_LENGTH = get_max_relation_length<Relations>();
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();

// MAX_RANDOM_RELATION_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta` random
// polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation length = 3
static constexpr size_t MAX_RANDOM_RELATION_LENGTH = MAX_RELATION_LENGTH + 1;
// BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta`
// random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation
// length = 3
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1;
static constexpr size_t NUM_RELATIONS = std::tuple_size<Relations>::value;

// define the container for storing the univariate contribution from each relation in Sumcheck
using SumcheckTupleOfTuplesOfUnivariates = decltype(create_sumcheck_tuple_of_tuples_of_univariates<Relations>());
using TupleOfArraysOfValues = decltype(create_sumcheck_tuple_of_arrays_of_values<Relations>());
using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values<Relations>());

private:
template <typename DataType, typename HandleType>
Expand Down
10 changes: 8 additions & 2 deletions barretenberg/cpp/src/barretenberg/honk/instance/instances.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@
namespace proof_system::honk {

template <typename Flavor_, size_t NUM_> struct ProverInstances_ {
public:
using Flavor = Flavor_;
using FF = typename Flavor::FF;
static constexpr size_t NUM = NUM_;
using Instance = ProverInstance_<Flavor>;

using ArrayType = std::array<std::shared_ptr<Instance>, NUM_>;
// The extended length here is the length of a composition of polynomials.
static constexpr size_t EXTENDED_LENGTH = (Flavor::MAX_TOTAL_RELATION_LENGTH - 1) * (NUM - 1) + 1;
using RelationParameters = proof_system::RelationParameters<Univariate<FF, EXTENDED_LENGTH>>;

public:
static constexpr size_t NUM = NUM_;
ArrayType _data;
RelationParameters relation_parameters;

std::shared_ptr<Instance> const& operator[](size_t idx) const { return _data[idx]; }
typename ArrayType::iterator begin() { return _data.begin(); };
typename ArrayType::iterator end() { return _data.end(); };
Expand Down
Loading