Skip to content

Commit 9edf04a

Browse files
committed
Merge remote-tracking branch 'origin/next' into lw/checkpoint_circuit
2 parents 29c1da0 + e717545 commit 9edf04a

File tree

63 files changed

+815
-160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+815
-160
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
// Clangd. Note that this setting may be overridden by user settings
175175
// to the default value "clangd".
176176
//
177-
"clangd.path": "clangd-16",
177+
"clangd.path": "clangd-20",
178178
//
179179
// C/C++ (should be disabled)
180180
//

barretenberg/bbup/bb-versions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
2+
"1.0.0-beta.11": "0.87.0",
3+
"1.0.0-beta.10": "0.87.0",
4+
"1.0.0-beta.9": "0.87.0",
5+
"1.0.0-beta.8": "0.87.0",
6+
"1.0.0-beta.7": "0.87.0",
7+
"1.0.0-beta.6": "0.84.0",
8+
"1.0.0-beta.5": "0.84.0",
29
"1.0.0-beta.4": "0.84.0",
310
"1.0.0-beta.3": "0.82.2",
411
"1.0.0-beta.2": "0.82.2",

barretenberg/cpp/format.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ set -e
44
if [ "$1" == "staged" ]; then
55
echo Formatting barretenberg staged files...
66
for FILE in $(git diff-index --diff-filter=d --relative --cached --name-only HEAD | grep -e '\.\(cpp\|hpp\|tcc\)$'); do
7-
clang-format-16 -i $FILE
7+
clang-format-20 -i $FILE
88
sed -i.bak 's/\r$//' $FILE && rm ${FILE}.bak
99
git add $FILE
1010
done
1111
elif [ "$1" == "changed" ]; then
1212
echo Formatting barretenberg changed files...
1313
for FILE in $(git diff-index --diff-filter=d --relative --name-only HEAD | grep -e '\.\(cpp\|hpp\|tcc\)$'); do
14-
clang-format-16 -i $FILE
14+
clang-format-20 -i $FILE
1515
sed -i.bak 's/\r$//' $FILE && rm ${FILE}.bak
1616
done
1717
elif [ "$1" == "check" ]; then
1818
find ./src -iname *.hpp -o -iname *.cpp -o -iname *.tcc | grep -v src/msgpack-c | grep -v bb/deps | \
19-
parallel -N10 clang-format-16 --dry-run --Werror
19+
parallel -N10 clang-format-20 --dry-run --Werror
2020
elif [ -n "$1" ]; then
2121
for FILE in $(git diff-index --relative --name-only $1 | grep -e '\.\(cpp\|hpp\|tcc\)$'); do
22-
clang-format-16 -i $FILE
22+
clang-format-20 -i $FILE
2323
sed -i.bak 's/\r$//' $FILE && rm ${FILE}.bak
2424
done
2525
else
2626
for FILE in $(find ./src -iname *.hpp -o -iname *.cpp -o -iname *.tcc | grep -v src/msgpack-c); do
27-
clang-format-16 -i $FILE
27+
clang-format-20 -i $FILE
2828
sed -i.bak 's/\r$//' $FILE && rm ${FILE}.bak
2929
done
3030
fi

barretenberg/cpp/src/barretenberg/common/fuzzer.hpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,7 @@ uint256_t read_uint256(const uint8_t* data, size_t buffer_size = 32)
123123
*/
124124
template <typename T>
125125
concept SimpleRng = requires(T a) {
126-
{
127-
a.next()
128-
} -> std::convertible_to<uint32_t>;
126+
{ a.next() } -> std::convertible_to<uint32_t>;
129127
};
130128
/**
131129
* @brief Concept for forcing ArgumentSizes to be size_t
@@ -189,9 +187,7 @@ concept ArithmeticFuzzHelperConstraint = requires {
189187
*/
190188
template <typename T>
191189
concept CheckableComposer = requires(T a) {
192-
{
193-
bb::CircuitChecker::check(a)
194-
} -> std::same_as<bool>;
190+
{ bb::CircuitChecker::check(a) } -> std::same_as<bool>;
195191
};
196192

197193
/**
@@ -203,9 +199,7 @@ concept CheckableComposer = requires(T a) {
203199
*/
204200
template <typename T, typename Composer, typename Context>
205201
concept PostProcessingEnabled = requires(Composer composer, Context context) {
206-
{
207-
T::postProcess(&composer, context)
208-
} -> std::same_as<bool>;
202+
{ T::postProcess(&composer, context) } -> std::same_as<bool>;
209203
};
210204

211205
/**

barretenberg/cpp/src/barretenberg/common/named_union.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ namespace bb {
2020
*/
2121
template <typename T>
2222
concept HasMsgpackSchemaName = requires {
23-
{
24-
T::MSGPACK_SCHEMA_NAME
25-
} -> std::convertible_to<std::string_view>;
23+
{ T::MSGPACK_SCHEMA_NAME } -> std::convertible_to<std::string_view>;
2624
};
2725

2826
/**

barretenberg/cpp/src/barretenberg/common/tuplet.hpp

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
#define _TUPLET_TYPES_CMP_WITH(T, U) \
7676
::std::enable_if_t<::tuplet::sfinae::detail::_all_true<::tuplet::sfinae::detail::_has_cmp<T, U>...>(), bool>
7777
#else
78-
#define _TUPLET_TYPES_EQ_WITH(T, U) ::std::enable_if_t<((::tuplet::sfinae::detail::_has_eq<T, U>)&&...), bool>
79-
#define _TUPLET_TYPES_CMP_WITH(T, U) ::std::enable_if_t<((::tuplet::sfinae::detail::_has_cmp<T, U>)&&...), bool>
78+
#define _TUPLET_TYPES_EQ_WITH(T, U) ::std::enable_if_t<((::tuplet::sfinae::detail::_has_eq<T, U>) && ...), bool>
79+
#define _TUPLET_TYPES_CMP_WITH(T, U) ::std::enable_if_t<((::tuplet::sfinae::detail::_has_cmp<T, U>) && ...), bool>
8080
#endif
8181
#endif
8282

@@ -287,45 +287,31 @@ concept assignable_to = requires(U u, T t) { t = u; };
287287

288288
template <class T>
289289
concept ordered = requires(T const& t) {
290-
{
291-
t <=> t
292-
};
290+
{ t <=> t };
293291
};
294292

295293
template <class T, class U>
296294
concept ordered_with = requires(T const& t, U const& u) {
297-
{
298-
t <=> u
299-
};
295+
{ t <=> u };
300296
};
301297
template <class T>
302298
concept equality_comparable = requires(T const& t) {
303-
{
304-
t == t
305-
} -> same_as<bool>;
299+
{ t == t } -> same_as<bool>;
306300
};
307301

308302
template <class T, class U>
309303
concept equality_comparable_with = requires(T const& t, U const& u) {
310-
{
311-
t == u
312-
} -> same_as<bool>;
304+
{ t == u } -> same_as<bool>;
313305
};
314306

315307
template <class T>
316308
concept partial_comparable = equality_comparable<T> && requires(T const& t) {
317-
{
318-
t < t
319-
} -> same_as<bool>;
309+
{ t < t } -> same_as<bool>;
320310
};
321311
template <class T, class U>
322312
concept partial_comparable_with = equality_comparable_with<T, U> && requires(T const& t, U const& u) {
323-
{
324-
t < u
325-
} -> same_as<bool>;
326-
{
327-
t > u
328-
} -> same_as<bool>;
313+
{ t < u } -> same_as<bool>;
314+
{ t > u } -> same_as<bool>;
329315
};
330316

331317
#endif

barretenberg/cpp/src/barretenberg/common/utils.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ template <typename... Ts> size_t hash_as_tuple(const Ts&... ts)
3232
// Define std::hash for any type that has a hash() method.
3333
template <typename T>
3434
concept Hashable = requires(const T& t) {
35-
{
36-
t.hash()
37-
} -> std::same_as<std::size_t>;
35+
{ t.hash() } -> std::same_as<std::size_t>;
3836
};
3937

4038
template <Hashable T> struct std::hash<T> {

barretenberg/cpp/src/barretenberg/crypto/generators/generator_data.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ template <typename Curve> struct GeneratorContext {
137137

138138
GeneratorContext() = default;
139139
GeneratorContext(size_t hash_index)
140-
: offset(hash_index){};
140+
: offset(hash_index) {};
141141
GeneratorContext(size_t _offset, std::string_view _domain_separator)
142142
: offset(_offset)
143143
, domain_separator(_domain_separator)

barretenberg/cpp/src/barretenberg/crypto/merkle_tree/indexed_tree/content_addressed_indexed_tree.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class ContentAddressedIndexedTree : public ContentAddressedAppendOnlyTree<Store,
7171
ContentAddressedIndexedTree(std::unique_ptr<Store> store,
7272
std::shared_ptr<ThreadPool> workers,
7373
const index_t& initial_size)
74-
: ContentAddressedIndexedTree(std::move(store), workers, initial_size, std::vector<LeafValueType>()){};
74+
: ContentAddressedIndexedTree(std::move(store), workers, initial_size, std::vector<LeafValueType>()) {};
7575
ContentAddressedIndexedTree(ContentAddressedIndexedTree const& other) = delete;
7676
ContentAddressedIndexedTree(ContentAddressedIndexedTree&& other) = delete;
7777
~ContentAddressedIndexedTree() = default;

barretenberg/cpp/src/barretenberg/crypto/merkle_tree/node_store/array_store.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ class MockTransaction {
1717
using Ptr = std::unique_ptr<MockTransaction>;
1818
bool get_node(uint32_t, index_t, std::vector<uint8_t>&) const { return false; }
1919

20-
template <typename T> void get_value_by_integer(T&, std::vector<uint8_t>&){};
20+
template <typename T> void get_value_by_integer(T&, std::vector<uint8_t>&) {};
2121

22-
void get_value(std::vector<uint8_t>&, std::vector<uint8_t>&){};
22+
void get_value(std::vector<uint8_t>&, std::vector<uint8_t>&) {};
2323

2424
void put_node(uint32_t, index_t, const std::vector<uint8_t>&) {}
2525

26-
template <typename T> void put_value_by_integer(T&, std::vector<uint8_t>&){};
26+
template <typename T> void put_value_by_integer(T&, std::vector<uint8_t>&) {};
2727

28-
void put_value(std::vector<uint8_t>&, std::vector<uint8_t>&){};
28+
void put_value(std::vector<uint8_t>&, std::vector<uint8_t>&) {};
2929
};
3030

3131
class MockPersistedStore {
@@ -88,8 +88,8 @@ template <typename PersistedStore> class ArrayStore {
8888
root = meta.root;
8989
}
9090

91-
void commit(){};
92-
void rollback(){};
91+
void commit() {};
92+
void rollback() {};
9393

9494
ReadTransactionPtr create_read_transactiono() { return std::make_unique<ReadTransaction>(); }
9595

0 commit comments

Comments
 (0)