Skip to content

Commit

Permalink
Fix compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
codygunton committed Jan 17, 2023
1 parent 286c188 commit b0f7570
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions cpp/src/aztec/honk/proof_system/prover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ template <typename settings> void Prover<settings>::execute_relation_check_round

sumcheck.execute_prover();

// TODO(Cody): Execute as a loop over polynomial manifest?
transcript.add_element("w_1", multivariates.folded_polynomials[1][0].to_buffer());
transcript.add_element("w_2", multivariates.folded_polynomials[1][0].to_buffer());
transcript.add_element("w_3", multivariates.folded_polynomials[2][0].to_buffer());
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/aztec/honk/proof_system/verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include <polynomials/polynomial_arithmetic.hpp>
#include <math.h>

#pragma GCC diagnostic ignored "-Wunused-variable"

using namespace barretenberg;
using namespace honk::sumcheck;

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/aztec/honk/sumcheck/polynomials/multivariates.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ template <class FF_, size_t num_polys> class Multivariates {
}

explicit Multivariates(transcript::StandardTranscript transcript)
: multivariate_n(transcript.get_field_element("circuit_size"))
: multivariate_n(static_cast<size_t>(transcript.get_field_element("circuit_size").data[0]))
, multivariate_d(numeric::get_msb(multivariate_n))
{}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TYPED_TEST(MultivariatesTests, Constructor)
MULTIVARIATES_TESTS_TYPE_ALIASES

const size_t num_polys(4);
const size_t multivariate_d(2);
// const size_t multivariate_d(2);
// const size_t multivariate_n(1 << multivariate_d);

std::array<FF, 3> f0 = { 0, 0, 1 };
Expand Down
7 changes: 4 additions & 3 deletions cpp/src/aztec/honk/sumcheck/sumcheck.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ TEST(Sumcheck, Prover)
{
const size_t num_polys(proving_system::StandardArithmetization::NUM_POLYNOMIALS);
const size_t multivariate_d(1);
const size_t multivariate_n(1 << multivariate_d);
const size_t max_relation_length = 4;
// const size_t multivariate_n(1 << multivariate_d);

// const size_t max_relation_length = 4;
constexpr size_t fr_size = 32;

using Multivariates = ::Multivariates<FF, num_polys>;
Expand Down Expand Up @@ -102,7 +103,7 @@ TEST(Sumcheck, Verifier)
{
const size_t num_polys(proving_system::StandardArithmetization::NUM_POLYNOMIALS);
const size_t multivariate_d(1);
const size_t multivariate_n(1 << multivariate_d);
// const size_t multivariate_n(1 << multivariate_d);
const size_t max_relation_length = 5;

using Multivariates = ::Multivariates<FF, num_polys>;
Expand Down
1 change: 0 additions & 1 deletion cpp/src/aztec/honk/sumcheck/sumcheck_round.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ template <class FF, size_t num_multivariates, template <class> class... Relation
accumulate_relation_univariates<>();
}

FF running_challenge(1);
auto result = batch_over_relations<Univariate<FF, MAX_RELATION_LENGTH>>(univariate_accumulators,
relation_separator_challenge);

Expand Down
10 changes: 5 additions & 5 deletions cpp/src/aztec/honk/sumcheck/sumcheck_round.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace test_sumcheck_round {
TEST(SumcheckRound, ComputeUnivariateProver)
{
const size_t num_polys(proving_system::StandardArithmetization::NUM_POLYNOMIALS);
const size_t multivariate_d(1);
// const size_t multivariate_d(1);
const size_t max_relation_length = 5;

using FF = barretenberg::fr;
Expand Down Expand Up @@ -73,9 +73,9 @@ TEST(SumcheckRound, ComputeUnivariateProver)
TEST(SumcheckRound, ComputeUnivariateVerifier)
{
const size_t num_polys(proving_system::StandardArithmetization::NUM_POLYNOMIALS);
const size_t multivariate_d(1);
const size_t multivariate_n(1 << multivariate_d);
const size_t max_relation_length = 5;
// const size_t multivariate_d(1);
// const size_t multivariate_n(1 << multivariate_d);
// const size_t max_rezlation_length = 5;

using FF = barretenberg::fr;
using Multivariates = ::Multivariates<FF, num_polys>;
Expand Down Expand Up @@ -104,7 +104,7 @@ TEST(SumcheckRound, ComputeUnivariateVerifier)
std::vector<FF> purported_evaluations = { w_l, w_r, w_o, z_perm, z_perm_shift, q_m, q_l, q_r, q_o,
q_c, sigma_1, sigma_2, sigma_3, id_1, id_2, id_3, lagrange_1 };

size_t round_size = 1;
// size_t round_size = 1;
auto relations = std::tuple(
ArithmeticRelation<FF>(), GrandProductComputationRelation<FF>(), GrandProductInitializationRelation<FF>());
auto round = SumcheckRound<FF,
Expand Down

0 comments on commit b0f7570

Please sign in to comment.