Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
7794ccb
reduce compile time
ludamad May 9, 2025
2406832
push experiment
ludamad May 9, 2025
c4ddd3d
fix wasm
ludamad May 9, 2025
8fbed98
Merge remote-tracking branch 'origin/master' into ad/try-reduce-compile
ludamad May 9, 2025
79a9ee9
restore ecc tests
ludamad May 9, 2025
71f9be4
fix compile
ludamad May 9, 2025
7f9a359
tests hopefully not divinding by 0
ludamad May 9, 2025
cc4d3c5
tests hopefully not dividing by 0
ludamad May 9, 2025
b520cab
renaming
ludamad May 12, 2025
43f585c
new files
ludamad May 12, 2025
97a69c5
conflict
ludamad May 12, 2025
bcac04b
Merge remote-tracking branch 'origin/master' into ad/try-reduce-compile
ludamad May 12, 2025
8a859d3
move all constexpr cases to get_precomputed_generators
ludamad May 12, 2025
cdde5c6
compiling again
ludamad May 12, 2025
a44f345
test-driven fixing
ludamad May 12, 2025
8f17b6e
Merge remote-tracking branch 'origin/master' into ad/try-reduce-compile
ludamad May 12, 2025
5ffc1b2
iterate
ludamad May 12, 2025
9fde307
undo launch.json
ludamad May 12, 2025
3a8a62a
try to fix tests
ludamad May 12, 2025
25d7b5c
fix constexpr-ness of generators
ludamad May 12, 2025
659e5f6
test fixes
ludamad May 13, 2025
03b4893
fixes and asserts
ludamad May 14, 2025
5af75bc
Merge remote-tracking branch 'origin/master' into ad/try-reduce-compile
ludamad May 15, 2025
dc8bdc7
Merge branch 'master' into ad/try-reduce-compile
ludamad May 15, 2025
4f475c8
Merge remote-tracking branch 'origin/master' into ad/try-reduce-compile
ludamad May 16, 2025
55b065b
run wasm ecc_tests
ludamad May 16, 2025
bcb9cba
wasm friendliness
ludamad May 16, 2025
2458e66
Tests work now
ludamad May 16, 2025
290359c
Merge branch 'master' into ad/try-reduce-compile
ludamad May 16, 2025
35f5b90
revert
ludamad May 16, 2025
3976e74
static assert redo
ludamad May 16, 2025
cfe3201
cleanup
ludamad May 16, 2025
c32a1b7
Merge branch 'master' into ad/try-reduce-compile
ludamad May 16, 2025
e470cc1
reinstate test
ludamad May 20, 2025
103e037
Merge remote-tracking branch 'origin/ad/try-reduce-compile' into ad/t…
ludamad May 20, 2025
9ed21a8
bench tweaks
ludamad May 20, 2025
158afca
Merge remote-tracking branch 'origin/master' into ad/try-reduce-compile
ludamad May 20, 2025
d24afe6
bench
ludamad May 20, 2025
d082414
translator relation
ludamad May 20, 2025
57d14d2
reinstate test
ludamad May 20, 2025
f17d10c
Update barretenberg/cpp/src/barretenberg/ecc/groups/group.hpp
ludamad May 20, 2025
2fed2a1
Update barretenberg/cpp/src/barretenberg/ecc/groups/precomputed_gener…
ludamad May 20, 2025
64daf72
merge fix
ludamad May 20, 2025
bb23ab2
Merge remote-tracking branch 'origin/master' into ad/try-reduce-compile
ludamad May 20, 2025
ba71877
Merge remote-tracking branch 'origin/ad/try-reduce-compile' into ad/t…
ludamad May 20, 2025
d4503b3
Merge remote-tracking branch 'origin/master' into ad/try-reduce-compile
ludamad May 20, 2025
9195613
undo chaos
ludamad May 20, 2025
61d57ac
Merge branch 'master' into ad/try-reduce-compile
ludamad May 20, 2025
6bea618
split up bigfield impl
ludamad May 21, 2025
84591c9
Delete plonk file
ludamad May 21, 2025
5145ec3
more constexpr
ludamad May 21, 2025
4d419ff
revert dsl change
ludamad May 21, 2025
bf441b2
plonk file
ludamad May 21, 2025
d71aac1
hopeful fix
ludamad May 21, 2025
023f231
missing header
ludamad May 21, 2025
f9b70d1
Merge branch 'master' into ad/try-reduce-compile
ludamad May 21, 2025
5b9083f
flake marker
ludamad May 21, 2025
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
4 changes: 4 additions & 0 deletions .test_patterns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ tests:
error_regex: "Exceeded timeout of 120000"
owners:
- *sean
- regex: "p2p/src/services/reqresp/reqresp.test.ts"
error_regex: "CodeError: writable end state is .writing. not .ready."
owners:
- *sean
- regex: "p2p/src/services/reqresp/reqresp.test.ts"
error_regex: "✕ should stop after max retry attempts"
owners:
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@
"configurePreset": "wasm-threads",
"inheritConfigureEnvironment": true,
"jobs": 0,
"targets": ["barretenberg.wasm", "barretenberg.wasm.gz", "bb_cli_bench"]
"targets": ["barretenberg.wasm", "barretenberg.wasm.gz"]
},
{
"name": "xray",
Expand Down
15 changes: 11 additions & 4 deletions barretenberg/cpp/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ function build_wasm {
function build_wasm_threads {
set -eu
if ! cache_download barretenberg-wasm-threads-$hash.zst; then
build_preset wasm-threads
if [ "$(arch)" == "amd64" ] && [ "$CI" -eq 1 ]; then
# We only want to sanity check that we haven't broken wasm ecc ops in merge queue.
build_preset wasm-threads --target barretenberg.wasm barretenberg.wasm.gz ecc_tests
else
build_preset wasm-threads
fi
cache_upload barretenberg-wasm-threads-$hash.zst build-wasm-threads/bin
fi
}
Expand Down Expand Up @@ -199,7 +204,9 @@ function test_cmds {
echo -e "$prefix barretenberg/cpp/scripts/run_test.sh $bin_name $test"
done || (echo "Failed to list tests in $bin" && exit 1)
done
if [ "$(arch)" == "amd64" ] && [ "$CI" -eq 1 ]; then
if [ "$(arch)" == "amd64" ] && [ "$CI_FULL" -eq 1 ]; then
# We only want to sanity check that we haven't broken wasm ecc in merge queue.
echo "$hash barretenberg/cpp/scripts/wasmtime.sh barretenberg/cpp/build-wasm-threads/bin/ecc_tests"
# If in amd64 CI, iterate asan_tests, creating a gtest invocation for each.
for bin_name in "${!asan_tests[@]}"; do
local filter=${asan_tests[$bin_name]}
Expand Down Expand Up @@ -296,8 +303,8 @@ case "$cmd" in
fi

# Recreation of logic from bench.
../../yarn-project/end-to-end/bootstrap.sh generate_example_app_ivc_inputs
../../barretenberg/cpp/scripts/ci_benchmark_ivc_flows.sh $(pwd)/../../yarn-project/end-to-end/example-app-ivc-inputs-out $(pwd)/bench-out
../../yarn-project/end-to-end/bootstrap.sh build_bench
../../yarn-project/end-to-end/bootstrap.sh bench_cmds | grep barretenberg/cpp/scripts/ci_benchmark_ivc_flows.sh | STRICT_SCHEDULING=1 parallelise
;;
"hash")
echo $hash
Expand Down
1 change: 0 additions & 1 deletion barretenberg/cpp/cmake/module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ function(barretenberg_module MODULE_NAME)
PRIVATE
${TRACY_LIBS}
GTest::gtest
GTest::gtest_main
GTest::gmock_main
${TBB_IMPORTED_TARGETS}
)
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/scripts/ci_benchmark_ivc_flows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function client_ivc_flow {
mkdir -p "$output"
export MEMUSAGE_OUT="$output/peak-memory-mb.txt"

run_bb_cli_bench "$runtime" "$output" "prove -o $output --ivc_inputs_path $flow_folder/ivc-inputs.msgpack --scheme client_ivc"
run_bb_cli_bench "$runtime" "$output" "prove -o $output --ivc_inputs_path $flow_folder/ivc-inputs.msgpack --scheme client_ivc -v"

local end=$(date +%s%N)
local elapsed_ns=$(( end - start ))
Expand Down
5 changes: 2 additions & 3 deletions barretenberg/cpp/scripts/wasmtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
# Helper for passing environment variables to wasm and common config.
# Allows accessing ~/.bb-crs and ./ (more can be added as parameters to this script).
set -eu

export WASMTIME_BACKTRACE_DETAILS=1
exec wasmtime run \
-Wthreads=y \
-Sthreads=y \
--env HARDWARE_CONCURRENCY \
--env WASM_BACKTRACE_DETAILS=1 \
${HARDWARE_CONCURRENCY:+--env HARDWARE_CONCURRENCY} \
--env HOME \
${MAIN_ARGS:+--env MAIN_ARGS} \
--dir=$HOME/.bb-crs \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ BENCHMARK_DEFINE_F(ClientIVCBench, Full)(benchmark::State& state)
ivc.prove();
}
}

/**
* @brief Benchmark the prover work for the full PG-Goblin IVC protocol
* @details Processes "dense" circuits of size 2^17 in a size 2^20 structured trace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Builder generate_trace(size_t target_num_gates)
using G1 = typename Flavor::CycleGroup;
using Fr = typename G1::Fr;

auto generators = G1::derive_generators("test generators", 2);
auto generators = get_precomputed_generators<G1, "test generators", 2>();

typename G1::element a = generators[0];
typename G1::element b = generators[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ bool TranslatorCircuitChecker::check(const Builder& circuit)
//
// We also limit computation on limbs of op, z_1 and z_2, since we know that op has only the lowest
// limb and z_1 and z_2 have only the two lowest limbs
const std::array<Fr, 5> NEGATIVE_MODULUS_LIMBS = Builder::NEGATIVE_MODULUS_LIMBS;
constexpr std::array<Fr, 5> NEGATIVE_MODULUS_LIMBS = Builder::NEGATIVE_MODULUS_LIMBS;
const uint256_t SHIFT_1 = Builder::SHIFT_1;
const uint256_t SHIFT_2 = Builder::SHIFT_2;
const uint256_t SHIFT_3 = Builder::SHIFT_3;
Expand Down Expand Up @@ -470,4 +470,4 @@ bool TranslatorCircuitChecker::check(const Builder& circuit)
}
return true;
};
}; // namespace bb
}; // namespace bb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ TEST(UltraCircuitBuilder, CreateGatesFromPlookupAccumulators)
{
const auto mask = plookup::fixed_base::table::MAX_TABLE_SIZE - 1;

grumpkin::g1::affine_element base_point = plookup::fixed_base::table::LHS_GENERATOR_POINT;
grumpkin::g1::affine_element base_point = plookup::fixed_base::table::lhs_generator_point();
std::vector<uint8_t> input_buf;
write(input_buf, base_point);
const auto offset_generators =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include "barretenberg/common/container.hpp"
#include "barretenberg/ecc/curves/bn254/bn254.hpp"
#include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp"
#include "barretenberg/ecc/groups/group.hpp"
#include "barretenberg/ecc/groups/precomputed_generators_grumpkin_impl.hpp"
#include <array>
#include <map>
#include <optional>
Expand Down Expand Up @@ -53,20 +55,12 @@ template <typename Curve> class generator_data {
static inline constexpr std::string_view DEFAULT_DOMAIN_SEPARATOR = "DEFAULT_DOMAIN_SEPARATOR";
inline constexpr generator_data() = default;

static inline constexpr std::array<AffineElement, DEFAULT_NUM_GENERATORS> make_precomputed_generators()
{
std::array<AffineElement, DEFAULT_NUM_GENERATORS> output;
std::vector<AffineElement> res = Group::derive_generators(DEFAULT_DOMAIN_SEPARATOR, DEFAULT_NUM_GENERATORS, 0);
std::copy(res.begin(), res.end(), output.begin());
return output;
}

/**
* @brief Precompute a small number of generators at compile time. For small pedersen commitments + pedersen hashes,
* this prevents us from having to derive generators at runtime
* @brief We precompute and hard-code a small number of generators. For small pedersen commitments + pedersen
* hashes, this prevents us from having to derive generators at runtime
*/
static inline constexpr std::array<AffineElement, DEFAULT_NUM_GENERATORS> precomputed_generators =
make_precomputed_generators();
static constexpr std::span<const AffineElement> precomputed_generators =
get_precomputed_generators<Group, "DEFAULT_DOMAIN_SEPARATOR", DEFAULT_NUM_GENERATORS, 0>();

[[nodiscard]] inline GeneratorView get(const size_t num_generators,
const size_t generator_offset = 0,
Expand Down Expand Up @@ -149,4 +143,4 @@ template <typename Curve> struct GeneratorContext {
, domain_separator(_domain_separator)
{}
};
} // namespace bb::crypto
} // namespace bb::crypto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace bb::crypto {

TEST(GeneratorContext, DeriveDefaultGenerators)
{
auto default_generators = generator_data<curve::Grumpkin>::make_precomputed_generators();
auto default_generators = generator_data<curve::Grumpkin>::precomputed_generators;
std::vector<grumpkin::g1::affine_element> expected_default_generators;

expected_default_generators.emplace_back(grumpkin::g1::affine_element(
Expand Down Expand Up @@ -42,4 +42,4 @@ TEST(GeneratorContext, DeriveDefaultGenerators)
}
}

} // namespace bb::crypto
} // namespace bb::crypto
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@

#include "../generators/generator_data.hpp"
#include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp"
#include "barretenberg/ecc/groups/precomputed_generators_grumpkin_impl.hpp"
namespace bb::crypto {
/**
* @brief Performs pedersen hashes!
*
* To hash to a size-n list of field elements `x`, we return the X-coordinate of:
* To hash a size-n list of field elements `v`, we return the X-coordinate of:
*
* Hash(x) = n.[h] + Commit(x)
* Hash(v) = n * [h] + Commit(v, g)
*
* Where `g` is a list of generator points defined by `generator_data`
* And `h` is a unique generator whose domain separator is the string `pedersen_hash_length`.
*
* The addition of `n.[h]` into the hash is to prevent length-extension attacks.
* The addition of `n * [h]` into the hash is to prevent length-extension attacks.
* It also ensures that the hash output is never the point at infinity.
*
* It is neccessary that all generator points are linearly independent of one another,
Expand All @@ -34,7 +35,8 @@ template <typename Curve> class pedersen_hash_base {
using Fr = typename Curve::ScalarField;
using Group = typename Curve::Group;
using GeneratorContext = typename crypto::GeneratorContext<Curve>;
inline static constexpr AffineElement length_generator = Group::derive_generators("pedersen_hash_length", 1)[0];
inline static constexpr AffineElement length_generator =
get_precomputed_generators<Group, "pedersen_hash_length", 1>()[0];
static Fq hash(const std::vector<Fq>& inputs, GeneratorContext context = {});
static Fq hash_buffer(const std::vector<uint8_t>& input, GeneratorContext context = {});

Expand Down
4 changes: 2 additions & 2 deletions barretenberg/cpp/src/barretenberg/crypto/schnorr/multisig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ template <typename G1, typename HashRegNon, typename HashSig = Blake2sHasher> cl
static_assert(!std::is_same_v<HashRegNon, HashSig>);

public:
using Fq = typename G1::coordinate_field;
using Fr = typename G1::subgroup_field;
using Fq = typename G1::Fq;
using Fr = typename G1::Fr;
using affine_element = typename G1::affine_element;
using element = typename G1::element;
using key_pair = crypto::schnorr_key_pair<Fr, G1>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ namespace bb::crypto {
* @tparam Hash function used to derive the Fiat-Shamir challenge
*/
template <typename G1, typename Hash> struct SchnorrProofOfPossession {
using Fq = typename G1::coordinate_field;
using Fr = typename G1::subgroup_field;
using Fq = typename G1::Fq;
using Fr = typename G1::Fr;
using affine_element = typename G1::affine_element;
using element = typename G1::element;
using key_pair = crypto::schnorr_key_pair<Fr, G1>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static auto schnorr_generate_challenge(const std::string& message,
const typename G1::affine_element& pubkey,
const typename G1::affine_element& R)
{
using Fq = typename G1::coordinate_field;
using Fq = typename G1::Fq;
// create challenge message pedersen_commitment(R.x, pubkey)
Fq compressed_keys = crypto::pedersen_hash::hash({ R.x, pubkey.x, pubkey.y });
std::vector<uint8_t> e_buffer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ TEST(fq, MulShortIntegers)
constexpr fq b{ 0xb, 0, 0, 0 };
constexpr uint256_t a_original(a);
constexpr uint256_t b_original(b);
constexpr uint256_t prod_expected = (uint512_t(a_original) * uint512_t(b_original) % uint512_t(fq::modulus)).lo;
constexpr fq const_expected = prod_expected;
uint256_t prod_expected = (uint512_t(a_original) * uint512_t(b_original) % uint512_t(fq::modulus)).lo;
fq const_expected = prod_expected;
constexpr fq const_result = a * b;
static_assert(const_result == const_expected);
ASSERT(const_result == const_expected);

fq c;
fq d;
Expand Down Expand Up @@ -541,4 +541,4 @@ TEST(fq, EquivalentRandomness)
uint512_t q(fq::modulus);
constexpr auto pow_2_256 = fq(uint256_t(1) << 128).sqr();
EXPECT_EQ(random_lo + pow_2_256 * random_hi, fq((random_uint512 % q).lo));
}
}
10 changes: 10 additions & 0 deletions barretenberg/cpp/src/barretenberg/ecc/curves/bn254/g1.test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include "g1.hpp"
#include "barretenberg/circuit_checker/circuit_checker.hpp"
#include "barretenberg/ecc/groups/precomputed_generators_bn254_impl.hpp"
#include <gtest/gtest.h>

using namespace bb;
Expand Down Expand Up @@ -418,3 +420,11 @@ TEST(g1, InitializationCheck)
EXPECT_NO_THROW(write<g1::affine_element>({}));
}
#endif

TEST(g1, CheckPrecomputedGenerators)
{
ASSERT_TRUE((bb::check_precomputed_generators<g1, "biggroup table offset generator", 1UL>()));
ASSERT_TRUE((bb::check_precomputed_generators<g1, "biggroup offset generator", 1UL>()));
ASSERT_TRUE((bb::check_precomputed_generators<g1, "ECCVM_OFFSET_GENERATOR", 1UL>()));
ASSERT_TRUE((bb::check_precomputed_generators<g1, "test generators", 2UL>()));
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ class Grumpkin {
// length 3 is sufficient.
static constexpr uint32_t LIBRA_UNIVARIATES_LENGTH = 3;
};
} // namespace bb::curve
} // namespace bb::curve
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "grumpkin.hpp"
#include "barretenberg/ecc/groups/precomputed_generators_grumpkin_impl.hpp"
#include <chrono>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -329,3 +330,9 @@ TEST(grumpkin, BadPoints)
}
EXPECT_TRUE(res);
}

TEST(grumpkin, CheckPrecomputedGenerators)
{
ASSERT_TRUE((bb::check_precomputed_generators<grumpkin::g1, "pedersen_hash_length", 1UL>()));
ASSERT_TRUE((bb::check_precomputed_generators<grumpkin::g1, "DEFAULT_DOMAIN_SEPARATOR", 8UL>()));
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ TEST(secp256k1, TestToMontgomeryForm)
#if defined(__SIZEOF_INT128__) && !defined(__wasm__)
constexpr uint512_t R = uint512_t(0, 1);
#else
constexpr uint512_t R = (uint512_t(1) << (29 * 9)) % uint512_t(test_fq_mod);
const uint512_t R = (uint512_t(1) << (29 * 9)) % uint512_t(test_fq_mod);
#endif
uint512_t aR = uint512_t(a_raw) * R;
uint256_t expected = (aR % uint512_t(test_fq_mod)).lo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "secp256r1.hpp"
#include "barretenberg/ecc/groups/precomputed_generators_secp256r1_impl.hpp"
#include "barretenberg/numeric/random/engine.hpp"
#include <gtest/gtest.h>

Expand Down Expand Up @@ -73,7 +74,7 @@ TEST(secp256r1, TestToMontgomeryForm)
#if defined(__SIZEOF_INT128__) && !defined(__wasm__)
constexpr uint512_t R = uint512_t(0, 1);
#else
constexpr uint512_t R = (uint512_t(1) << (29 * 9)) % uint512_t(test_fq_mod);
const uint512_t R = (uint512_t(1) << (29 * 9)) % uint512_t(test_fq_mod);
#endif
uint512_t aR = uint512_t(a_raw) * R;
uint256_t expected = (aR % uint512_t(test_fq_mod)).lo;
Expand Down Expand Up @@ -450,4 +451,22 @@ TEST(secp256r1, MontgomeryMulBigBug)
secp256r1::fr expected(uint256_t{ 0x57abc6aa0349c084, 0x65b21b232a4cb7a5, 0x5ba781948b0fcd6e, 0xd6e9e0644bda12f7 });
EXPECT_EQ((a_sqr == expected), true);
}
#endif
#endif

TEST(secp256r1, CheckPrecomputedGenerators)
{
ASSERT_TRUE((bb::check_precomputed_generators<secp256r1::g1, "biggroup offset generator", 1UL>()));
ASSERT_TRUE((bb::check_precomputed_generators<secp256r1::g1, "biggroup table offset generator", 1UL>()));
}

// Hacky: wasm does not properly find main() from gmock_main.
// We only want to run wasm tests specifically for ecc ops as our field handling is different.
// We need to make sure the hardcoded generators make sense.
// As this is our narrow focus, we hack this so ecc_tests can run.
#ifdef __wasm__
GTEST_API_ int main(int argc, char** argv)
{
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
namespace bb::group_elements {
template <typename T>
concept SupportsHashToCurve = T::can_hash_to_curve;
template <typename Fq_, typename Fr_, typename Params> class alignas(64) affine_element {
template <typename Fq_, typename Fr_, typename Params_> class alignas(64) affine_element {
public:
using Fq = Fq_;
using Fr = Fr_;
using Params = Params_;

using in_buf = const uint8_t*;
using vec_in_buf = const uint8_t*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ template <class Fq, class Fr, class T>
constexpr affine_element<Fq, Fr, T> affine_element<Fq, Fr, T>::hash_to_curve(const std::vector<uint8_t>& seed,
uint8_t attempt_count) noexcept
requires SupportsHashToCurve<T>

{
std::vector<uint8_t> target_seed(seed);
// expand by 2 bytes to cover incremental hash attempts
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/src/barretenberg/ecc/groups/element.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ template <class Fq, class Fr, class Params> class alignas(32) element {
constexpr element(const element& other) noexcept;
constexpr element(element&& other) noexcept;
constexpr element(const affine_element<Fq, Fr, Params>& other) noexcept;
constexpr ~element() noexcept = default;
~element() noexcept = default;

static constexpr element one() noexcept { return { Params::one_x, Params::one_y, Fq::one() }; };
static constexpr element zero() noexcept
Expand Down
Loading