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

msgpack: friendly binary serialization format #374

Merged
merged 97 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from 84 commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
f5378ee
Regenerate pedersen lookup tables if they're empty
suyash67 Apr 11, 2023
6b4eaa9
re-init generator tables if they're empty.
suyash67 Apr 11, 2023
e884272
feat(nullifier_tree): make empty nullifier tree leaves hash be 0 (#360)
Maddiaa0 Apr 18, 2023
42b7f17
More generators for aztec3.
suyash67 Apr 19, 2023
16df5ac
update js vk (because we now use UP for merkle hashing)
suyash67 Apr 20, 2023
274c862
Helpers for ECDSA in A3 (#364)
suyash67 Apr 20, 2023
7ed6df4
feat(nullifier_tree): make empty nullifier tree leaves hash be 0 (#360)
Maddiaa0 Apr 18, 2023
27f5f8b
Change pedersen hash c_bind to use `pedersen_hash::lookup`.
suyash67 Apr 21, 2023
2a72649
feat: add msgpack-c submodule
ludamad Apr 18, 2023
1ae2066
Give up on msgpack c_master
ludamad Apr 19, 2023
db7c2bb
Working hacky msgpack test
ludamad Apr 19, 2023
8a3adc8
Interim work
ludamad Apr 19, 2023
b475c3f
Interim work
ludamad Apr 19, 2023
5769a0c
Getting rid of memory hacks
ludamad Apr 19, 2023
22a2c5d
fix: memory leaks
ludamad Apr 19, 2023
e110c27
Start of demoing cbinds
ludamad Apr 19, 2023
0077d20
Align with other methods
ludamad Apr 19, 2023
a81f909
chore: Remove need to return from msgpack method
ludamad Apr 19, 2023
4abc221
Iterate example
ludamad Apr 20, 2023
8f4fb51
fix: Hack around generator issues
ludamad Apr 20, 2023
d4901fb
feat: iterate on msgpack in bb
ludamad Apr 21, 2023
b76b7b2
fix: fork msgpack for greater checks
ludamad Apr 21, 2023
4f685b3
Refactor
ludamad Apr 21, 2023
5662640
cleanup
ludamad Apr 21, 2023
53e0e1b
Update turbo_circuit_constructor.cpp
ludamad Apr 21, 2023
2322e82
chore: continued cleanup
ludamad Apr 21, 2023
70aff20
chore: continued cleanup
ludamad Apr 21, 2023
3a22e06
chore: continued cleanup
ludamad Apr 21, 2023
8b5e224
Refactor
ludamad Apr 21, 2023
0ebf8f5
Refactor
ludamad Apr 21, 2023
47c4a1f
fix: ci
ludamad Apr 21, 2023
3fb25dc
feat(wasm): hacks to make work in a fno-exceptions wasm environment
ludamad Apr 21, 2023
493c678
feat(wasm): bump msgpack-c
ludamad Apr 21, 2023
b35018f
feat(msgpack): first 'complex' object bound
ludamad Apr 22, 2023
a234981
More wasm fixes. Was breaking throw() declaration
ludamad Apr 22, 2023
403992e
Fix field serialization
ludamad Apr 23, 2023
489c492
refactoring
ludamad Apr 25, 2023
69b73c0
Update CMakeLists.txt
ludamad Apr 25, 2023
7e9d3fa
Remove // TODO redundant with msgpack
ludamad Apr 25, 2023
e70396a
Merge remote-tracking branch 'origin/adam/msgpack-aztec3' into adam/m…
ludamad Apr 25, 2023
1d350c9
Refactor to use macro
ludamad Apr 26, 2023
bf1630f
Refactor to use macro
ludamad Apr 26, 2023
f903ab1
fix printing bug
ludamad Apr 28, 2023
0615923
fix: fieldd msgpack endianness fix
ludamad Apr 28, 2023
8d37c48
Merge aztec3 branch
ludamad Apr 28, 2023
c3d90da
fix: remove shared ptr reference
ludamad Apr 28, 2023
9aafc34
doc
ludamad Apr 28, 2023
716ff15
Add static checking for MSGPACK usage
ludamad Apr 29, 2023
bc792d0
Revert log.hpp change
ludamad Apr 29, 2023
73c4b64
Update struct_map_impl.hpp
ludamad May 1, 2023
276a9a5
Revert
ludamad May 1, 2023
91cb331
remote_build fix
ludamad May 1, 2023
50551e6
Keep trying to init submodules
ludamad May 1, 2023
3dbe446
Keep trying to init submodules
ludamad May 1, 2023
9ca6b53
Bump
ludamad May 1, 2023
76ae948
Add missing init_submodules
ludamad May 1, 2023
37122e7
Msgpack test fix
ludamad May 1, 2023
66e22e6
Msgpack test fix
ludamad May 1, 2023
54b655d
Msgpack test fix
ludamad May 1, 2023
432ba96
Msgpack test fix
ludamad May 1, 2023
ea1b6de
Update polynomial_store.test.cpp
ludamad May 1, 2023
1afc7f9
Merge remote-tracking branch 'origin/master' into adam/msgpack-aztec3
ludamad May 7, 2023
129c9aa
Merge remote-tracking branch 'origin/master' into adam/msgpack-aztec3
ludamad May 10, 2023
38fb021
Merge master
ludamad May 10, 2023
de02925
Update msgpack error
ludamad May 10, 2023
0018e93
Better abort distinguishing
ludamad May 10, 2023
4f94d55
fix: join split VK hash
ludamad May 10, 2023
5c569c7
Serialization updates
ludamad May 14, 2023
b32bd48
Fix circuits build
ludamad May 15, 2023
4a4e899
Try to make circuits test work again
ludamad May 15, 2023
5818f3a
Try to make circuits test work again
ludamad May 15, 2023
4ad083e
Try to make circuits test work again
ludamad May 15, 2023
cec5613
fix: initialization warning
ludamad May 15, 2023
930b283
fix: prefer default constructor for field, related cleanup
ludamad May 15, 2023
e9c4d6e
Grand rename
ludamad May 15, 2023
f5c4f4b
chore: remove unused funcs
ludamad May 15, 2023
4cc89e5
Revert fields constructor change for now
ludamad May 15, 2023
264225c
chore: Revert .circleci changes
ludamad May 15, 2023
0e0df3c
chore: Revert foundation removal
ludamad May 15, 2023
e5d8fe5
Revert .gitmodules
ludamad May 15, 2023
88f79c7
Update affine_element.hpp
ludamad May 15, 2023
a50c338
Update element.hpp
ludamad May 15, 2023
cb01cf9
Revert header optimizations
ludamad May 15, 2023
17e61fa
Revert init line
ludamad May 15, 2023
47b4ea9
Update polynomial_store.test.cpp
ludamad May 15, 2023
33aceca
Revert header optimization
ludamad May 16, 2023
cfc5a2d
Merge remote-tracking branch 'origin/adam/msgpack-aztec3' into adam/m…
ludamad May 16, 2023
af1e97e
Update raw_pointer.hpp
ludamad May 16, 2023
e3c8f9d
Update raw_pointer.hpp
ludamad May 16, 2023
712ca1c
Update func_traits.hpp documentation
ludamad May 16, 2023
d5ae7b4
Document msgpack methods in field_impl.hpp
ludamad May 17, 2023
e3d0368
Update msgpack.hpp
ludamad May 17, 2023
6c16964
Update cbind.hpp
ludamad May 17, 2023
4e7f48c
Update msgpack.hpp
ludamad May 17, 2023
4533702
Update msgpack.hpp
ludamad May 17, 2023
3ff51bb
Update schema_impl.hpp
ludamad May 17, 2023
579cc77
Update g1.hpp
ludamad May 17, 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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "cpp/src/msgpack-c"]
path = cpp/src/msgpack-c
url = https://github.com/AztecProtocol/msgpack-c
[submodule "foundation"]
path = foundation
url = git@github.com:AztecProtocol/foundation.git
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
add_compile_options(-fconstexpr-ops-limit=100000000)
endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/msgpack-c/include)

# I feel this should be limited to ecc, however it's currently used in headers that go across libraries,
# and there currently isn't an easy way to inherit the DDISABLE_SHENANIGANS parameter.
Expand All @@ -52,6 +52,7 @@ add_subdirectory(barretenberg/plonk)
add_subdirectory(barretenberg/stdlib)
add_subdirectory(barretenberg/join_split_example)
add_subdirectory(barretenberg/dsl)
add_subdirectory(barretenberg/serialize)
add_subdirectory(barretenberg/solidity_helpers)

if(BENCHMARKS)
Expand Down
15 changes: 1 addition & 14 deletions cpp/src/barretenberg/common/log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,10 @@

namespace {

inline void format_chain(std::ostream&) {}

template <typename T> void format_chain(std::ostream& os, T const& first)
{
os << first;
}

template <typename T, typename... Args> void format_chain(std::ostream& os, T const& first, Args const&... args)
{
os << first;
format_chain(os, args...);
}

template <typename... Args> std::string format(Args... args)
{
std::ostringstream os;
format_chain(os, args...);
((os << args), ...);
ludamad marked this conversation as resolved.
Show resolved Hide resolved
return os.str();
}

Expand Down
4 changes: 3 additions & 1 deletion cpp/src/barretenberg/common/serialize.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* This is the core serialization library.
* This is a non-msgpack flat buffer serialization library.
* It is currently used alongside msgpack, with hope to eventually move to msgpack.
* It enables the reading and writing of big-endian formatted integers and various standard library types
* to and from the following supported types:
* - uint8_t*
Expand Down Expand Up @@ -40,6 +41,7 @@
#ifndef __i386__
__extension__ using uint128_t = unsigned __int128;
#endif

namespace serialize {
// Basic integer read / write, to / from raw buffers.
// Pointers to buffers are advanced by length of type.
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/barretenberg/common/throw_or_abort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inline void throw_or_abort [[noreturn]] (std::string const& err)
#ifndef __wasm__
throw std::runtime_error(err);
#else
info(err);
info("abort: ", err);
std::abort();
#endif
}
}
5 changes: 4 additions & 1 deletion cpp/src/barretenberg/crypto/ecdsa/ecdsa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <array>
#include <string>
#include "barretenberg/ecc/curves/secp256k1/secp256k1.hpp"
#include "barretenberg/serialize/msgpack.hpp"

namespace crypto {
namespace ecdsa {
Expand All @@ -15,6 +16,8 @@ struct signature {
std::array<uint8_t, 32> r;
std::array<uint8_t, 32> s;
uint8_t v;
// for serialization, update with any new fields
MSGPACK_FIELDS(r, s, v);
};

template <typename Hash, typename Fq, typename Fr, typename G1>
Expand Down Expand Up @@ -70,4 +73,4 @@ template <typename B> inline void write(B& buf, key_pair<secp256k1::fr, secp256k
} // namespace ecdsa
} // namespace crypto

#include "./ecdsa_impl.hpp"
#include "./ecdsa_impl.hpp"
7 changes: 7 additions & 0 deletions cpp/src/barretenberg/crypto/ecdsa/ecdsa.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
#include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp"
#include "barretenberg/ecc/curves/secp256r1/secp256r1.hpp"
#include "barretenberg/common/serialize.hpp"
#include "barretenberg/serialize/test_helper.hpp"
#include <gtest/gtest.h>

using namespace barretenberg;

TEST(ecdsa, msgpack)
{
auto [actual, expected] = msgpack_roundtrip(crypto::ecdsa::signature{});
EXPECT_EQ(actual, expected);
}

TEST(ecdsa, verify_signature_grumpkin_sha256)
{
std::string message = "The quick brown dog jumped over the lazy fox.";
Expand Down
1 change: 0 additions & 1 deletion cpp/src/barretenberg/crypto/pedersen_commitment/c_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ WASM_EXPORT void pedersen_plookup_compress_fields(uint8_t const* left, uint8_t c
barretenberg::fr::serialize_to_buffer(r, result);
}


WASM_EXPORT void pedersen__compress(uint8_t const* inputs_buffer, uint8_t* output)
{
std::vector<grumpkin::fq> to_compress;
Expand Down
7 changes: 6 additions & 1 deletion cpp/src/barretenberg/dsl/acir_format/acir_format.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
#include <gtest/gtest.h>
#include <vector>
#include "barretenberg/common/streams.hpp"
#include "barretenberg/serialize/test_helper.hpp"
#include "ecdsa_secp256k1.hpp"

TEST(acir_format, msgpack_logic_constraint)
{
auto [actual, expected] = msgpack_roundtrip(acir_format::LogicConstraint {});
EXPECT_EQ(actual, expected);
}
TEST(acir_format, test_logic_gate_from_noir_circuit)
{
/**
Expand Down
3 changes: 3 additions & 0 deletions cpp/src/barretenberg/dsl/acir_format/logic_constraint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ struct LogicConstraint {
uint32_t is_xor_gate;

friend bool operator==(LogicConstraint const& lhs, LogicConstraint const& rhs) = default;

// for serialization, update with any new fields
MSGPACK_FIELDS(a, b, result, num_bits, is_xor_gate);
};

void create_logic_gate(Composer& composer, uint32_t a, uint32_t b, uint32_t result, size_t num_bits, bool is_xor_gate);
Expand Down
4 changes: 4 additions & 0 deletions cpp/src/barretenberg/dsl/acir_format/sha256_constraint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ struct Sha256Input {
uint32_t num_bits;

friend bool operator==(Sha256Input const& lhs, Sha256Input const& rhs) = default;
// for serialization, update with any new fields
ludamad marked this conversation as resolved.
Show resolved Hide resolved
MSGPACK_FIELDS(witness, num_bits);
};

struct Sha256Constraint {
std::vector<Sha256Input> inputs;
std::vector<uint32_t> result;

friend bool operator==(Sha256Constraint const& lhs, Sha256Constraint const& rhs) = default;
// for serialization, update with any new fields
MSGPACK_FIELDS(inputs, result);
};

// This function does not work (properly) because the stdlib:sha256 function is not working correctly for 512 bits
Expand Down
8 changes: 7 additions & 1 deletion cpp/src/barretenberg/ecc/curves/bn254/fq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,10 @@ class Bn254FqParams {

typedef field<Bn254FqParams> fq;

} // namespace barretenberg
} // namespace barretenberg

// define this as a named alias in msgpack schema generation
inline void msgpack_schema_pack(auto& packer, barretenberg::fq const&)
{
packer.pack_alias("Fq", "bin32");
}
7 changes: 7 additions & 0 deletions cpp/src/barretenberg/ecc/curves/bn254/fq.test.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#include "fq.hpp"
#include "pseudorandom.hpp"
#include "barretenberg/serialize/test_helper.hpp"
#include <gtest/gtest.h>

using namespace barretenberg;

TEST(fq, msgpack)
{
auto [actual, expected] = msgpack_roundtrip(barretenberg::fq{1ull, 2ull, 3ull, 4ull});
EXPECT_EQ(actual, expected);
}

TEST(fq, eq)
{
constexpr fq a{ 0x01, 0x02, 0x03, 0x04 };
Expand Down
8 changes: 7 additions & 1 deletion cpp/src/barretenberg/ecc/curves/bn254/fr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,10 @@ class Bn254FrParams {

typedef field<Bn254FrParams> fr;

} // namespace barretenberg
} // namespace barretenberg

// define this as a named alias in msgpack schema generation
inline void msgpack_schema_pack(auto& packer, barretenberg::fr const&)
{
packer.pack_alias("Fr", "bin32");
}
7 changes: 7 additions & 0 deletions cpp/src/barretenberg/ecc/curves/bn254/fr.test.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#include "fr.hpp"
#include "barretenberg/serialize/test_helper.hpp"
#include <gtest/gtest.h>

using namespace barretenberg;

TEST(fr, msgpack)
{
auto [actual, expected] = msgpack_roundtrip(barretenberg::fr{1ull, 2ull, 3ull, 4ull});
EXPECT_EQ(actual, expected);
}

TEST(fr, eq)
{
fr a{ 0x01, 0x02, 0x03, 0x04 };
Expand Down
9 changes: 8 additions & 1 deletion cpp/src/barretenberg/ecc/curves/bn254/g1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,11 @@ struct Bn254G1Params {
};

typedef group<fq, fr, Bn254G1Params> g1;
} // namespace barretenberg

} // namespace barretenberg

// specialize the name in msgpack schema generation
inline std::string msgpack_schema_name(barretenberg::g1::affine_element const&)
{
return "G1AffineElement";
}
ludamad marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 4 additions & 1 deletion cpp/src/barretenberg/ecc/fields/field.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ template <class Params> struct alignas(32) field {

// BBERG_INLINE sstatic constexpr void butterfly(field& left, field& right) noexcept;

// For serialization
void msgpack_pack(auto& packer) const;
void msgpack_unpack(auto o);

private:
static constexpr uint256_t twice_modulus = modulus + modulus;
static constexpr uint256_t not_modulus = -modulus;
Expand Down Expand Up @@ -543,7 +547,6 @@ template <typename B, typename Params> void read(B& it, field<Params>& value)
read(it, result.data[0]);
value = result.to_montgomery_form();
}

template <typename B, typename Params> void write(B& buf, field<Params> const& value)
{
using serialize::write;
Expand Down
26 changes: 25 additions & 1 deletion cpp/src/barretenberg/ecc/fields/field_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#endif

#include "field_impl_generic.hpp"

namespace barretenberg {

// template <class T> constexpr void field<T>::butterfly(field& left, field& right) noexcept
Expand Down Expand Up @@ -607,4 +606,29 @@ template <class T> constexpr field<T> field<T>::multiplicative_generator() noexc
return target;
}

// For serialization
template <class Params> void field<Params>::msgpack_pack(auto& packer) const
{
auto adjusted = from_montgomery_form();
uint64_t bin_data[4] = {
htonll(adjusted.data[3]), htonll(adjusted.data[2]), htonll(adjusted.data[1]), htonll(adjusted.data[0])
ludamad marked this conversation as resolved.
Show resolved Hide resolved
ludamad marked this conversation as resolved.
Show resolved Hide resolved
};
packer.pack_bin(sizeof(bin_data));
packer.pack_bin_body((const char*)bin_data, sizeof(bin_data));
}

// For deserialization
template <class Params> void field<Params>::msgpack_unpack(auto o)
{
// Trigger msgpack specialization for binary
std::array<uint8_t, sizeof(data)> raw_data = o;
// With the binary data, we have to read it as big endian uint64_t's, then correct them to the host endianness
uint64_t* cast_data = (uint64_t*)&raw_data[0];
uint64_t reversed[] = {ntohll(cast_data[3]), ntohll(cast_data[2]), ntohll(cast_data[1]), ntohll(cast_data[0])};
for (int i = 0; i < 4; i++) {
data[i] = reversed[i];
}
*this = to_montgomery_form();
}

} // namespace barretenberg
3 changes: 3 additions & 0 deletions cpp/src/barretenberg/ecc/groups/affine_element.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <vector>
#include <type_traits>
#include "barretenberg/ecc/curves/bn254/fq2.hpp"
#include "barretenberg/serialize/msgpack.hpp"

namespace barretenberg {
namespace group_elements {
Expand Down Expand Up @@ -176,6 +177,8 @@ template <typename Fq, typename Fr, typename Params> class alignas(64) affine_el
}
Fq x;
Fq y;
// for serialization: update with new fields
MSGPACK_FIELDS(x, y);
};

template <typename B, typename Fq, typename Fr, typename Params> void read(B& it, affine_element<Fq, Fr, Params>& value)
Expand Down
7 changes: 7 additions & 0 deletions cpp/src/barretenberg/ecc/groups/affine_element.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "barretenberg/common/test.hpp"
#include <fstream>
#include "barretenberg/common/serialize.hpp"
#include "barretenberg/serialize/test_helper.hpp"

namespace test_affine_element {
template <typename G1> class test_affine_element : public testing::Test {
Expand Down Expand Up @@ -122,4 +123,10 @@ TEST(affine_element, infinity_ordering_regression)
P.self_set_infinity();
EXPECT_NE(P < Q, Q < P);
}

TEST(affine_element, msgpack)
{
auto [actual, expected] = msgpack_roundtrip(secp256k1::g1::affine_element{ 1, 1 });
EXPECT_EQ(actual, expected);
}
} // namespace test_affine_element
2 changes: 2 additions & 0 deletions cpp/src/barretenberg/ecc/groups/element.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ template <class Fq, class Fr, class Params> class alignas(32) element {
// }
// return { x, y, Fq::one() };
// }
// for serialization: update with new fields
MSGPACK_FIELDS(x, y, z);

static void conditional_negate_affine(const affine_element<Fq, Fr, Params>& in,
affine_element<Fq, Fr, Params>& out,
Expand Down
3 changes: 0 additions & 3 deletions cpp/src/barretenberg/ecc/groups/element_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,6 @@ element<Fq, Fr, T> element<Fq, Fr, T>::random_coordinates_on_curve(numeric::rand
Fq yy;
Fq x;
Fq y;
Fq t0;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

unused

while (!found_one) {
x = Fq::random_element(engine);
yy = x.sqr() * x + T::b;
Expand All @@ -935,8 +934,6 @@ element<Fq, Fr, T> element<Fq, Fr, T>::random_coordinates_on_curve(numeric::rand
auto [found_root, y1] = yy.sqrt();
y = y1;
found_one = found_root;
// t0 = y.sqr();
// found_one = (yy == t0);
}
return { x, y, Fq::one() };
}
Expand Down
9 changes: 9 additions & 0 deletions cpp/src/barretenberg/ecc/serialize.test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <gtest/gtest.h>
#include "barretenberg/serialize/test_helper.hpp"
#include "barretenberg/ecc/fields/field.hpp"

TEST(msgpack_tests, msgpack_field)
{
auto [actual, expected] = msgpack_roundtrip(barretenberg::fr{1ull, 2ull, 3ull, 4ull});
EXPECT_EQ(actual, expected);
}
1 change: 0 additions & 1 deletion cpp/src/barretenberg/honk/sumcheck/sumcheck.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ TEST(Sumcheck, PolynomialNormalization)
std::array<FF, multivariate_n> id_3;
std::array<FF, multivariate_n> lagrange_first;
std::array<FF, multivariate_n> lagrange_last;
std::array<FF, multivariate_n> pow_zeta;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

unused

for (size_t i = 0; i < multivariate_n; i++) {
w_l[i] = FF::random_element();
w_r[i] = FF::random_element();
Expand Down
Loading