Skip to content

Commit 7ce4065

Browse files
authored
Merge branch 'next' into gd/acir-serialization-changes
2 parents b226f36 + 7e0b229 commit 7ce4065

File tree

191 files changed

+7015
-2219
lines changed

Some content is hidden

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

191 files changed

+7015
-2219
lines changed

.test_patterns.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,19 @@ tests:
4545
error_regex: "field_t::range_constraint"
4646
owners:
4747
- *luke
48-
- regex: "barretenberg/acir_tests/scripts/run_test_browser.sh"
48+
- regex: "barretenberg/acir_tests/scripts/browser_prove.sh"
4949
error_regex: "Failed to fetch"
5050
owners:
5151
- *adam
52-
- regex: "barretenberg/acir_tests/scripts/run_test_browser.sh"
53-
error_regex: "Failed to fetch"
54-
owners:
55-
- *adam
56-
- regex: "barretenberg/acir_tests/scripts/run_test_browser.sh"
52+
- regex: "barretenberg/acir_tests/scripts/browser_prove.sh"
5753
error_regex: "RuntimeError: Out of bounds memory access"
5854
owners:
5955
- *adam
60-
- regex: "barretenberg/acir_tests/scripts/run_test_browser.sh"
56+
- regex: "barretenberg/acir_tests/scripts/browser_prove.sh"
6157
error_regex: "call_indirect to a null table entry"
6258
owners:
6359
- *adam
64-
- regex: "barretenberg/acir_tests/scripts/run_test_browser.sh"
60+
- regex: "barretenberg/acir_tests/scripts/browser_prove.sh"
6561
error_regex: "Input is not large enough"
6662
owners:
6763
- *adam

barretenberg/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ If you are in a scenario where you have a failing call to check_circuit and wish
326326

327327
Usage instructions:
328328

329-
- On ubuntu (or our mainframe accounts) use `sudo apt-get install libdw-dev libelf-dev libbackward-cpp-dev` to support trace printing
329+
- On ubuntu (or our mainframe accounts) use `sudo apt-get install libdw-dev libelf-dev` to support trace printing
330330
- Use `cmake --preset debug-fast-circuit-check-traces` and `cmake --build --preset debug-fast-circuit-check-traces` to enable the backward-cpp dependency through the CHECK_CIRCUIT_STACKTRACES CMake variable.
331331
- Run any case where you have a failing check_circuit call, you will now have a stack trace illuminating where this constraint was added in code.
332332

barretenberg/cpp/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ option(ENABLE_ASAN "Address sanitizer for debugging tricky memory corruption" OF
3030
option(ENABLE_HEAVY_TESTS "Enable heavy tests when collecting coverage" OFF)
3131
# Note: Must do 'sudo apt-get install libdw-dev' or equivalent
3232
option(CHECK_CIRCUIT_STACKTRACES "Enable (slow) stack traces for check circuit" OFF)
33+
option(ENABLE_STACKTRACES "Enable stack traces on assertion" OFF)
3334
option(ENABLE_TRACY "Enable low-medium overhead profiling for memory and performance with tracy" OFF)
3435
option(ENABLE_PIC "Builds with position independent code" OFF)
3536
option(SYNTAX_ONLY "only check syntax (-fsyntax-only)" OFF)
@@ -44,7 +45,9 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "a
4445
endif()
4546

4647
if(CHECK_CIRCUIT_STACKTRACES)
47-
add_compile_options(-DCHECK_CIRCUIT_STACKTRACES)
48+
add_compile_options(-DCHECK_CIRCUIT_STACKTRACES -DSTACKTRACES)
49+
elseif(ENABLE_STACKTRACES)
50+
add_compile_options(-DSTACKTRACES)
4851
endif()
4952

5053
if(ENABLE_TRACY OR ENABLE_TRACY_TIME_INSTRUMENTED)

barretenberg/cpp/CMakePresets.json

Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,15 @@
119119
"inherits": "clang20",
120120
"binaryDir": "build-debug",
121121
"environment": {
122-
"CMAKE_BUILD_TYPE": "Debug",
123122
"CFLAGS": "-gdwarf-4",
124123
"CXXFLAGS": "-gdwarf-4",
125124
"LDFLAGS": "-gdwarf-4"
126125
},
127126
"cacheVariables": {
127+
"CMAKE_BUILD_TYPE": "Debug",
128128
"ENABLE_ASAN": "OFF",
129-
"DISABLE_ASM": "ON"
129+
"DISABLE_ASM": "ON",
130+
"ENABLE_STACKTRACES": "ON"
130131
}
131132
},
132133
{
@@ -163,12 +164,12 @@
163164
"binaryDir": "build-tracy-time-sampled",
164165
"inherits": "clang20",
165166
"environment": {
166-
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
167167
"CFLAGS": "-g -fno-omit-frame-pointer",
168168
"CXXFLAGS": "-g -fno-omit-frame-pointer",
169169
"LDFLAGS": "-g -fno-omit-frame-pointer -rdynamic"
170170
},
171171
"cacheVariables": {
172+
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
172173
"ENABLE_TRACY": "ON"
173174
}
174175
},
@@ -190,10 +191,12 @@
190191
"inherits": "debug",
191192
"binaryDir": "build-debug-fast",
192193
"environment": {
193-
"CMAKE_BUILD_TYPE": "Debug",
194194
"CFLAGS": "-O2 -gdwarf",
195195
"CXXFLAGS": "-O2 -gdwarf-4",
196196
"LDFLAGS": "-O2 -gdwarf-4"
197+
},
198+
"cacheVariables": {
199+
"ENABLE_STACKTRACES": "ON"
197200
}
198201
},
199202
{
@@ -207,13 +210,25 @@
207210
}
208211
},
209212
{
210-
"name": "debug-no-avm",
213+
"name": "debug-fast-no-avm",
211214
"displayName": "Optimized debug build with Clang-20 (no AVM)",
212215
"description": "Build with globally installed Clang-20 in debug mode excluding the Aztec VM",
216+
"inherits": "debug-fast",
217+
"binaryDir": "build-debug-fast-no-avm",
218+
"cacheVariables": {
219+
"DISABLE_AZTEC_VM": "ON",
220+
"ENABLE_STACKTRACES": "ON"
221+
}
222+
},
223+
{
224+
"name": "debug-no-avm",
225+
"displayName": "Debug build with Clang-20 (no AVM)",
226+
"description": "Build with globally installed Clang-20 in debug mode excluding the Aztec VM",
213227
"inherits": "debug",
214228
"binaryDir": "build-debug-no-avm",
215229
"cacheVariables": {
216-
"DISABLE_AZTEC_VM": "ON"
230+
"DISABLE_AZTEC_VM": "ON",
231+
"ENABLE_STACKTRACES": "ON"
217232
}
218233
},
219234
{
@@ -235,7 +250,8 @@
235250
"cacheVariables": {
236251
"ENABLE_ASAN": "ON",
237252
"DISABLE_AZTEC_VM": "ON",
238-
"DISABLE_ASM": "ON"
253+
"DISABLE_ASM": "ON",
254+
"ENABLE_STACKTRACES": "OFF"
239255
}
240256
},
241257
{
@@ -244,12 +260,10 @@
244260
"description": "Build with address sanitizer on clang20 with debugging information",
245261
"inherits": "debug",
246262
"binaryDir": "build-asan",
247-
"environment": {
248-
"CMAKE_BUILD_TYPE": "Debug"
249-
},
250263
"cacheVariables": {
251264
"ENABLE_ASAN": "ON",
252-
"DISABLE_ASM": "ON"
265+
"DISABLE_ASM": "ON",
266+
"ENABLE_STACKTRACES": "OFF"
253267
}
254268
},
255269
{
@@ -279,9 +293,7 @@
279293
"binaryDir": "build-fuzzing",
280294
"cacheVariables": {
281295
"FUZZING": "ON",
282-
"DISABLE_AZTEC_VM": "ON"
283-
},
284-
"environment": {
296+
"DISABLE_AZTEC_VM": "ON",
285297
"CMAKE_BUILD_TYPE": "RelWithAssert"
286298
}
287299
},
@@ -294,9 +306,7 @@
294306
"cacheVariables": {
295307
"FUZZING": "ON",
296308
"DISABLE_AZTEC_VM": "ON",
297-
"DISABLE_ASM": "ON"
298-
},
299-
"environment": {
309+
"DISABLE_ASM": "ON",
300310
"CMAKE_BUILD_TYPE": "RelWithAssert"
301311
}
302312
},
@@ -311,9 +321,7 @@
311321
"FUZZING_SHOW_INFORMATION": "ON",
312322
"DISABLE_AZTEC_VM": "ON",
313323
"ENABLE_ASAN": "ON",
314-
"DISABLE_ASM": "ON"
315-
},
316-
"environment": {
324+
"DISABLE_ASM": "ON",
317325
"CMAKE_BUILD_TYPE": "RelWithAssert"
318326
}
319327
},
@@ -326,11 +334,11 @@
326334
"cacheVariables": {
327335
"FUZZING": "ON",
328336
"DISABLE_ASM": "ON",
329-
"DISABLE_AZTEC_VM": "ON"
337+
"DISABLE_AZTEC_VM": "ON",
338+
"CMAKE_BUILD_TYPE": "RelWithAssert"
330339
},
331340
"environment": {
332-
"CXXFLAGS": "-fprofile-instr-generate -fcoverage-mapping",
333-
"CMAKE_BUILD_TYPE": "RelWithAssert"
341+
"CXXFLAGS": "-fprofile-instr-generate -fcoverage-mapping"
334342
}
335343
},
336344
{
@@ -446,10 +454,8 @@
446454
"description": "Build for pthread enabled WASM",
447455
"inherits": "wasm",
448456
"binaryDir": "build-wasm-threads",
449-
"environment": {
450-
"CMAKE_BUILD_TYPE": "Release"
451-
},
452457
"cacheVariables": {
458+
"CMAKE_BUILD_TYPE": "Release",
453459
"MULTITHREADING": "ON"
454460
}
455461
},
@@ -459,10 +465,8 @@
459465
"binaryDir": "build-wasm-threads-dbg",
460466
"description": "Build with wasi-sdk to create debug wasm",
461467
"inherits": "wasm",
462-
"environment": {
463-
"CMAKE_BUILD_TYPE": "Debug"
464-
},
465468
"cacheVariables": {
469+
"CMAKE_BUILD_TYPE": "Debug",
466470
"MULTITHREADING": "ON"
467471
}
468472
},
@@ -517,6 +521,11 @@
517521
"inherits": "default",
518522
"configurePreset": "clang20-no-avm"
519523
},
524+
{
525+
"name": "debug-fast-no-avm",
526+
"inherits": "default",
527+
"configurePreset": "debug-fast-no-avm"
528+
},
520529
{
521530
"name": "debug-no-avm",
522531
"inherits": "default",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(CHECK_CIRCUIT_STACKTRACES)
1+
if(CHECK_CIRCUIT_STACKTRACES OR ENABLE_STACKTRACES)
22
include(FetchContent)
33

44
# Also requires one of: libbfd (gnu binutils), libdwarf, libdw (elfutils)
@@ -8,4 +8,4 @@ if(CHECK_CIRCUIT_STACKTRACES)
88
SYSTEM # optional, the Backward include directory will be treated as system directory
99
)
1010
FetchContent_MakeAvailable(backward)
11-
endif()
11+
endif()

barretenberg/cpp/cmake/module.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function(barretenberg_module MODULE_NAME)
5757
${TBB_IMPORTED_TARGETS}
5858
)
5959

60-
if(CHECK_CIRCUIT_STACKTRACES)
60+
if(CHECK_CIRCUIT_STACKTRACES OR ENABLE_STACKTRACES)
6161
target_link_libraries(
6262
${MODULE_NAME}_objects
6363
PUBLIC
@@ -108,7 +108,7 @@ function(barretenberg_module MODULE_NAME)
108108
)
109109
list(APPEND exe_targets ${MODULE_NAME}_tests)
110110

111-
if(CHECK_CIRCUIT_STACKTRACES)
111+
if(CHECK_CIRCUIT_STACKTRACES OR ENABLE_STACKTRACES)
112112
target_link_libraries(
113113
${MODULE_NAME}_test_objects
114114
PUBLIC
@@ -236,7 +236,7 @@ function(barretenberg_module MODULE_NAME)
236236
${TRACY_LIBS}
237237
${TBB_IMPORTED_TARGETS}
238238
)
239-
if(CHECK_CIRCUIT_STACKTRACES)
239+
if(CHECK_CIRCUIT_STACKTRACES OR ENABLE_STACKTRACES)
240240
target_link_libraries(
241241
${BENCHMARK_NAME}_bench_objects
242242
PUBLIC

0 commit comments

Comments
 (0)