Skip to content

Commit

Permalink
chore(aztec-noir)!: rename noir-aztec to aztec-noir (#2071)
Browse files Browse the repository at this point in the history
Addresses a little nit of mine. In all branding and docs we are
referring to the aztec noir library as `Aztec.nr`.

It was previously named `noir-aztec` which is inconsistent 

This pr:
- renames the folder from `noir-aztec` to `aztec-noir`
- Updates the path anywhere it was mentioned

---------

Co-authored-by: Cheethas <[email protected]>
  • Loading branch information
Maddiaa0 and Maddiaa0 authored Sep 11, 2023
1 parent 6fee803 commit e1e14d2
Show file tree
Hide file tree
Showing 112 changed files with 106 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@ auto& engine = numeric::random::get_debug_engine();
}

using FF = barretenberg::fr;
using barretenberg::Univariate;
using barretenberg::BarycentricData;

using barretenberg::Univariate;

namespace proof_system::benchmark {

void extend_2_to_6(State& state) noexcept
{
auto univariate = Univariate<FF, 2>::get_random();
BarycentricData<FF, 2, 6> barycentric_2_to_6;
for (auto _ : state)
{
for (auto _ : state) {
DoNotOptimize(barycentric_2_to_6.extend(univariate));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

#include "barretenberg/honk/composer/standard_composer.hpp"
#include "barretenberg/honk/proof_system/prover.hpp"
#include "barretenberg/proof_system/relations/permutation_relation.hpp"
#include "barretenberg/proof_system/relations/relation_parameters.hpp"
#include "barretenberg/honk/sumcheck/sumcheck_round.hpp"
#include "barretenberg/honk/utils/grand_product_delta.hpp"
#include "barretenberg/numeric/uint256/uint256.hpp"
#include "barretenberg/polynomials/polynomial.hpp"
#include "barretenberg/proof_system/circuit_builder/standard_circuit_builder.hpp"
#include "barretenberg/proof_system/relations/permutation_relation.hpp"
#include "barretenberg/proof_system/relations/relation_parameters.hpp"

using namespace proof_system::honk;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#include "barretenberg/honk/composer/ultra_composer.hpp"
#include "barretenberg/honk/proof_system/prover.hpp"
#include "barretenberg/honk/proof_system/ultra_prover.hpp"
#include "barretenberg/proof_system/relations/permutation_relation.hpp"
#include "barretenberg/proof_system/relations/relation_parameters.hpp"
#include "barretenberg/honk/sumcheck/sumcheck_round.hpp"
#include "barretenberg/honk/utils/grand_product_delta.hpp"
#include "barretenberg/numeric/uint256/uint256.hpp"
#include "barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp"
#include "barretenberg/proof_system/plookup_tables/types.hpp"
#include "barretenberg/proof_system/relations/permutation_relation.hpp"
#include "barretenberg/proof_system/relations/relation_parameters.hpp"

using namespace proof_system::honk;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#pragma once
#include "barretenberg/honk/pcs/kzg/kzg.hpp"
#include "barretenberg/honk/transcript/transcript.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"
#include "barretenberg/proof_system/relations/ecc_op_queue_relation.hpp"
#include "barretenberg/proof_system/relations/elliptic_relation.hpp"
#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/ultra_arithmetic_relation.hpp"
#include "barretenberg/honk/transcript/transcript.hpp"
#include "barretenberg/polynomials/univariate.hpp"
#include "barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp"
#include "barretenberg/proof_system/flavor/flavor.hpp"

namespace proof_system::honk::flavor {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#pragma once
#include "barretenberg/ecc/curves/bn254/g1.hpp"
#include "barretenberg/honk/pcs/kzg/kzg.hpp"
#include "barretenberg/proof_system/relations/arithmetic_relation.hpp"
#include "barretenberg/proof_system/relations/permutation_relation.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/standard_circuit_builder.hpp"
#include "barretenberg/proof_system/flavor/flavor.hpp"
#include "barretenberg/proof_system/relations/arithmetic_relation.hpp"
#include "barretenberg/proof_system/relations/permutation_relation.hpp"
#include "barretenberg/srs/factories/crs_factory.hpp"

namespace proof_system::honk::flavor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
#include "barretenberg/polynomials/barycentric.hpp"
#include "barretenberg/polynomials/univariate.hpp"

#include "barretenberg/proof_system/relations/arithmetic_relation.hpp"
#include "barretenberg/proof_system/relations/permutation_relation.hpp"
#include "barretenberg/honk/transcript/transcript.hpp"
#include "barretenberg/polynomials/evaluation_domain.hpp"
#include "barretenberg/polynomials/polynomial.hpp"
#include "barretenberg/proof_system/circuit_builder/standard_circuit_builder.hpp"
#include "barretenberg/proof_system/flavor/flavor.hpp"
#include "barretenberg/proof_system/relations/arithmetic_relation.hpp"
#include "barretenberg/proof_system/relations/permutation_relation.hpp"
#include <array>
#include <concepts>
#include <span>
Expand Down Expand Up @@ -226,8 +226,8 @@ class StandardGrumpkin {
* @todo TODO(#390): Simplify this by moving MAX_RELATION_LENGTH?
*/
template <size_t MAX_RELATION_LENGTH>
using ExtendedEdges =
AllEntities<barretenberg::Univariate<FF, MAX_RELATION_LENGTH>, barretenberg::Univariate<FF, MAX_RELATION_LENGTH>>;
using ExtendedEdges = AllEntities<barretenberg::Univariate<FF, MAX_RELATION_LENGTH>,
barretenberg::Univariate<FF, MAX_RELATION_LENGTH>>;

/**
* @brief A container for the polynomials evaluations produced during sumcheck, which are purported to be the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
#include "barretenberg/polynomials/barycentric.hpp"
#include "barretenberg/polynomials/univariate.hpp"

#include "barretenberg/honk/transcript/transcript.hpp"
#include "barretenberg/polynomials/evaluation_domain.hpp"
#include "barretenberg/polynomials/polynomial.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"
#include "barretenberg/proof_system/relations/elliptic_relation.hpp"
#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/ultra_arithmetic_relation.hpp"
#include "barretenberg/honk/transcript/transcript.hpp"
#include "barretenberg/polynomials/evaluation_domain.hpp"
#include "barretenberg/polynomials/polynomial.hpp"
#include "barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp"
#include "barretenberg/proof_system/flavor/flavor.hpp"

namespace proof_system::honk::flavor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
#include "barretenberg/polynomials/barycentric.hpp"
#include "barretenberg/polynomials/univariate.hpp"

#include "barretenberg/honk/transcript/transcript.hpp"
#include "barretenberg/polynomials/evaluation_domain.hpp"
#include "barretenberg/polynomials/polynomial.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"
#include "barretenberg/proof_system/relations/elliptic_relation.hpp"
#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/ultra_arithmetic_relation.hpp"
#include "barretenberg/honk/transcript/transcript.hpp"
#include "barretenberg/polynomials/evaluation_domain.hpp"
#include "barretenberg/polynomials/polynomial.hpp"
#include "barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp"
#include "barretenberg/proof_system/flavor/flavor.hpp"
#include <array>
#include <concepts>
#include <span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
#include "barretenberg/polynomials/barycentric.hpp"
#include "barretenberg/polynomials/univariate.hpp"

#include "barretenberg/honk/transcript/transcript.hpp"
#include "barretenberg/polynomials/evaluation_domain.hpp"
#include "barretenberg/polynomials/polynomial.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"
#include "barretenberg/proof_system/relations/elliptic_relation.hpp"
#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/ultra_arithmetic_relation.hpp"
#include "barretenberg/honk/transcript/transcript.hpp"
#include "barretenberg/polynomials/evaluation_domain.hpp"
#include "barretenberg/polynomials/polynomial.hpp"
#include "barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp"
#include "barretenberg/proof_system/flavor/flavor.hpp"
#include "barretenberg/srs/factories/crs_factory.hpp"
#include <array>
#include <concepts>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once
#include "barretenberg/common/constexpr_utils.hpp"
#include "barretenberg/honk/sumcheck/sumcheck.hpp"
#include "barretenberg/plonk/proof_system/proving_key/proving_key.hpp"
#include "barretenberg/polynomials/polynomial.hpp"
#include "barretenberg/common/constexpr_utils.hpp"
#include <typeinfo>

namespace proof_system::honk::grand_product_library {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

#include "prover_library.hpp"
#include "barretenberg/ecc/curves/bn254/bn254.hpp"
#include "barretenberg/honk/flavor/standard.hpp"
#include "barretenberg/honk/flavor/ultra.hpp"
#include "barretenberg/honk/proof_system/grand_product_library.hpp"
#include "barretenberg/polynomials/polynomial.hpp"
#include "prover.hpp"
#include "prover_library.hpp"

#include "barretenberg/srs/factories/file_crs_factory.hpp"
#include <array>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#include "barretenberg/honk/pcs/gemini/gemini.hpp"
#include "barretenberg/honk/pcs/shplonk/shplonk.hpp"
#include "barretenberg/honk/proof_system/work_queue.hpp"
#include "barretenberg/proof_system/relations/relation_parameters.hpp"
#include "barretenberg/honk/sumcheck/sumcheck_output.hpp"
#include "barretenberg/honk/transcript/transcript.hpp"
#include "barretenberg/plonk/proof_system/types/proof.hpp"
#include "barretenberg/proof_system/relations/relation_parameters.hpp"

namespace proof_system::honk {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@ TEST_F(RelationCorrectnessTests, StandardRelationCorrectness)
grand_product_library::compute_grand_products<honk::flavor::Standard>(prover.key, prover_polynomials, params);

// Construct the round for applying sumcheck relations and results for storing computed results
auto relations =
std::tuple(proof_system::ArithmeticRelation<FF>(), proof_system::PermutationRelation<FF>());
auto relations = std::tuple(proof_system::ArithmeticRelation<FF>(), proof_system::PermutationRelation<FF>());

// Check that each relation is satisfied across each row of the prover polynomials
check_relation<Flavor>(std::get<0>(relations), circuit_size, prover_polynomials, params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#include "barretenberg/common/serialize.hpp"
#include "barretenberg/common/throw_or_abort.hpp"
#include "barretenberg/honk/proof_system/prover.hpp"
#include "barretenberg/proof_system/relations/relation_parameters.hpp"
#include "barretenberg/honk/sumcheck/sumcheck_output.hpp"
#include "barretenberg/honk/transcript/transcript.hpp"
#include "barretenberg/honk/utils/grand_product_delta.hpp"
#include "barretenberg/polynomials/univariate.hpp"
#include "barretenberg/proof_system/relations/relation_parameters.hpp"
#include "sumcheck_round.hpp"

namespace proof_system::honk::sumcheck {
Expand Down Expand Up @@ -70,8 +70,9 @@ template <typename Flavor> class SumcheckProver {
*
* @details
*/
SumcheckOutput<Flavor> prove(auto full_polynomials,
const proof_system::RelationParameters<FF>& relation_parameters) // pass by value, not by reference
SumcheckOutput<Flavor> prove(
auto full_polynomials,
const proof_system::RelationParameters<FF>& relation_parameters) // pass by value, not by reference
{
auto [alpha, zeta] = transcript.get_challenges("Sumcheck:alpha", "Sumcheck:zeta");

Expand Down Expand Up @@ -172,7 +173,8 @@ template <typename Flavor> class SumcheckVerifier {
* @param relation_parameters
* @param transcript
*/
std::optional<SumcheckOutput<Flavor>> verify(const proof_system::RelationParameters<FF>& relation_parameters, auto& transcript)
std::optional<SumcheckOutput<Flavor>> verify(const proof_system::RelationParameters<FF>& relation_parameters,
auto& transcript)
{
bool verified(true);

Expand All @@ -192,8 +194,9 @@ template <typename Flavor> class SumcheckVerifier {
for (size_t round_idx = 0; round_idx < multivariate_d; round_idx++) {
// Obtain the round univariate from the transcript
std::string round_univariate_label = "Sumcheck:univariate_" + std::to_string(round_idx);
auto round_univariate = transcript.template receive_from_prover<
barretenberg::Univariate<FF, MAX_RANDOM_RELATION_LENGTH>>(round_univariate_label);
auto round_univariate =
transcript.template receive_from_prover<barretenberg::Univariate<FF, MAX_RANDOM_RELATION_LENGTH>>(
round_univariate_label);

bool checked = round.check_sum(round_univariate);
verified = verified && checked;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "sumcheck.hpp"
#include "barretenberg/ecc/curves/bn254/fr.hpp"
#include "barretenberg/honk/composer/standard_composer.hpp"
#include "barretenberg/honk/composer/ultra_composer.hpp"
Expand All @@ -11,6 +10,7 @@
#include "barretenberg/proof_system/relations/lookup_relation.hpp"
#include "barretenberg/proof_system/relations/permutation_relation.hpp"
#include "barretenberg/proof_system/relations/ultra_arithmetic_relation.hpp"
#include "sumcheck.hpp"
#include <gtest/gtest.h>

using namespace proof_system::honk;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,11 @@ template <typename Flavor> class SumcheckProverRound {
* values. Most likely this will end up being S_l(0), ... , S_l(t-1) where t is around 12. At the end, reset all
* univariate accumulators to be zero.
*/
barretenberg::Univariate<FF, MAX_RANDOM_RELATION_LENGTH> compute_univariate(auto& polynomials,
const proof_system::RelationParameters<FF>& relation_parameters,
const barretenberg::PowUnivariate<FF>& pow_univariate,
const FF alpha)
barretenberg::Univariate<FF, MAX_RANDOM_RELATION_LENGTH> compute_univariate(
auto& polynomials,
const proof_system::RelationParameters<FF>& relation_parameters,
const barretenberg::PowUnivariate<FF>& pow_univariate,
const FF alpha)
{
// Precompute the vector of required powers of zeta
// TODO(luke): Parallelize this
Expand Down Expand Up @@ -440,12 +441,12 @@ template <typename Flavor> class SumcheckVerifierRound {
* @param round_challenge u_l
* @return FF sigma_{l+1} = S^l(u_l)
*/
FF compute_next_target_sum(barretenberg::Univariate<FF, MAX_RANDOM_RELATION_LENGTH>& univariate, FF& round_challenge)
FF compute_next_target_sum(barretenberg::Univariate<FF, MAX_RANDOM_RELATION_LENGTH>& univariate,
FF& round_challenge)
{
// IMPROVEMENT(Cody): Use barycentric static method, maybe implement evaluation as member
// function on Univariate.
auto barycentric =
barretenberg::BarycentricData<FF, MAX_RANDOM_RELATION_LENGTH, MAX_RANDOM_RELATION_LENGTH>();
auto barycentric = barretenberg::BarycentricData<FF, MAX_RANDOM_RELATION_LENGTH, MAX_RANDOM_RELATION_LENGTH>();
// Evaluate T^{l}(u_{l})
target_total_sum = barycentric.evaluate(univariate, round_challenge);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ using namespace proof_system::honk;
using namespace proof_system::honk::sumcheck;
using namespace proof_system;

using barretenberg::Univariate;
using barretenberg::PowUnivariate;
using barretenberg::BarycentricData;
using barretenberg::PowUnivariate;
using barretenberg::Univariate;

using Flavor = flavor::Standard;
using FF = typename Flavor::FF;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include "barretenberg/honk/composer/standard_composer.hpp"
#include "barretenberg/honk/composer/ultra_composer.hpp"
#include "barretenberg/honk/flavor/standard.hpp"
#include "barretenberg/polynomials/univariate.hpp"
#include "barretenberg/numeric/bitop/get_msb.hpp"
#include "barretenberg/polynomials/univariate.hpp"
#include "barretenberg/proof_system/flavor/flavor.hpp"
#include "transcript.hpp"
#include <gtest/gtest.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "barycentric.hpp"
#include "barretenberg/ecc/curves/bn254/fr.hpp"
#include "barycentric.hpp"
#include <gtest/gtest.h>

namespace barretenberg::test_barycentric {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "pow.hpp"
#include "barretenberg/ecc/curves/bn254/fr.hpp"
#include "pow.hpp"
#include <gtest/gtest.h>

namespace barretenberg::test_pow {
Expand All @@ -18,14 +18,14 @@ TEST(SumcheckPow, FullPowConsistency)
u_i = FF::random_element();
pow_univariate.partially_evaluate(u_i);
}

FF zeta_power = zeta;
FF expected_eval = 1;
for (auto& u_i : variables) {
expected_eval *= FF(1) - u_i + u_i * zeta_power;
zeta_power *= zeta_power;
}

EXPECT_EQ(pow_univariate.partial_evaluation_constant, expected_eval);
}
} // namespace barretenberg::test_pow
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@

#pragma once
#include "barretenberg/polynomials/barycentric.hpp"
#include "barretenberg/polynomials/univariate.hpp"
#include "barretenberg/polynomials/evaluation_domain.hpp"
#include "barretenberg/polynomials/univariate.hpp"
#include "barretenberg/proof_system/types/circuit_type.hpp"
#include <array>
#include <concepts>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace proof_system {
template <typename FF_> class AuxiliaryRelationImpl {
public:
using FF = FF_;

// 1 + polynomial degree of this relation
static constexpr size_t RELATION_LENGTH = 6;

Expand Down
Loading

0 comments on commit e1e14d2

Please sign in to comment.