Skip to content

Commit

Permalink
adding some comments here and there
Browse files Browse the repository at this point in the history
  • Loading branch information
ledwards2225 committed May 23, 2023
1 parent 3615269 commit a92c9c3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cpp/src/barretenberg/honk/flavor/standard.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,17 @@ class Standard {
// The total number of witness entities not including shifts.
static constexpr size_t NUM_WITNESS_ENTITIES = 4;

// define the tuple of Relations that comprise the Sumcheck relation
using Relations = std::tuple<sumcheck::ArithmeticRelation<FF>,
sumcheck::GrandProductComputationRelation<FF>,
sumcheck::GrandProductInitializationRelation<FF>>;

static constexpr size_t MAX_RELATION_LENGTH = get_max_relation_length<Relations>();
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 UnivariateTuple = decltype(create_univariate_tuple<FF, Relations, 0>());
// define utilities to extend univarates from RELATION_LENGTH to MAX_RELATION_LENGTH for each Relation
using BarycentricUtils = decltype(create_barycentric_utils<FF, Relations, MAX_RELATION_LENGTH, 0>());

private:
Expand Down Expand Up @@ -204,7 +207,7 @@ class Standard {
using ProverPolynomials = AllEntities<PolynomialHandle, PolynomialHandle>;

/**
* @brief A container for polynomials produced after the first round of sumcheck.
* @brief A container for storing the partially evaluated multivariates produced by sumcheck.
*/
class PartiallyEvaluatedMultivariates : public AllEntities<Polynomial, PolynomialHandle> {

Expand Down
5 changes: 4 additions & 1 deletion cpp/src/barretenberg/honk/flavor/ultra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class Ultra {
// The total number of witness entities not including shifts.
static constexpr size_t NUM_WITNESS_ENTITIES = 11;

// define the tuple of Relations that comprise the Sumcheck relation
using Relations = std::tuple<sumcheck::UltraArithmeticRelation<FF>,
sumcheck::UltraArithmeticRelationSecondary<FF>,
sumcheck::UltraGrandProductComputationRelation<FF>,
Expand All @@ -63,7 +64,9 @@ class Ultra {
static constexpr size_t MAX_RELATION_LENGTH = get_max_relation_length<Relations>();
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 UnivariateTuple = decltype(create_univariate_tuple<FF, Relations, 0>());
// define utilities to extend univarates from RELATION_LENGTH to MAX_RELATION_LENGTH for each Relation
using BarycentricUtils = decltype(create_barycentric_utils<FF, Relations, MAX_RELATION_LENGTH, 0>());

private:
Expand Down Expand Up @@ -274,7 +277,7 @@ class Ultra {
using ProverPolynomials = AllEntities<PolynomialHandle, PolynomialHandle>;

/**
* @brief A container for polynomials produced after the first round of sumcheck.
* @brief A container for storing the partially evaluated multivariates produced by sumcheck.
*/
class PartiallyEvaluatedMultivariates : public AllEntities<Polynomial, PolynomialHandle> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include <array>
#include <algorithm>
#include "barretenberg/ecc/curves/bn254/fr.hpp"
// #include "barretenberg/ecc/curves/bn254/fr.hpp"
#include "univariate.hpp"

/* IMPROVEMENT(Cody): This could or should be improved in various ways. In no particular order:
Expand All @@ -23,6 +23,10 @@ template <class Fr, size_t domain_size, size_t num_evals> class BarycentricData
public:
static constexpr size_t big_domain_size = std::max(domain_size, num_evals);

/**
* Static constexpr methods for computing arrays of precomputable data used for barycentric extension and evaluation
*/

// build big_domain, currently the set of x_i in {0, 1, ..., t-1}
static constexpr std::array<Fr, big_domain_size> construct_big_domain()
{
Expand Down

0 comments on commit a92c9c3

Please sign in to comment.