Skip to content

Commit c78066b

Browse files
committed
merge next into merge-train/avm
2 parents ae4a180 + dd027ef commit c78066b

File tree

173 files changed

+13796
-2225
lines changed

Some content is hidden

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

173 files changed

+13796
-2225
lines changed

avm-transpiler/Cargo.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

barretenberg/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ ts/dest
88
cmake-build-debug
99
*_opt.pil
1010
bench-out
11+
12+
# Generated code from msgpack schema (run `yarn generate` in ts/)
13+
rust/barretenberg-rs/src/generated_types.rs
14+
rust/barretenberg-rs/src/api.rs
15+
ts/src/cbind/generated/

barretenberg/bootstrap.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function bootstrap_all {
88
./bbup/bootstrap.sh $@
99
./cpp/bootstrap.sh $@
1010
./ts/bootstrap.sh $@
11+
./rust/bootstrap.sh $@
1112
./acir_tests/bootstrap.sh $@
1213
./docs/bootstrap.sh $@
1314
./sol/bootstrap.sh $@

barretenberg/cpp/cmake/backward-cpp.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if(ENABLE_STACKTRACES)
1313
PREFIX ${BACKWARD_PREFIX}
1414
# We need to go through some hoops to do a shallow clone of a fixed commit (as opposed to a tag).
1515
DOWNLOAD_COMMAND
16-
sh -c "mkdir -p ${BACKWARD_PREFIX}/src/backward && cd ${BACKWARD_PREFIX}/src/backward && git init . 2>/dev/null && (git remote add origin https://github.com/bombela/backward-cpp 2>/dev/null || true) && git fetch --depth 1 origin 51f0700452cf71c57d43c2d028277b24cde32502 2>/dev/null && git checkout FETCH_HEAD 2>/dev/null"
16+
sh -c "mkdir -p ${BACKWARD_PREFIX}/src/backward && cd ${BACKWARD_PREFIX}/src/backward && git init --quiet && (git remote add origin https://github.com/bombela/backward-cpp 2>/dev/null || true) && git fetch --depth 1 origin --quiet 51f0700452cf71c57d43c2d028277b24cde32502 && git reset --quiet --hard FETCH_HEAD"
1717
SOURCE_DIR ${BACKWARD_PREFIX}/src/backward
1818
CONFIGURE_COMMAND ""
1919
BUILD_COMMAND ""

barretenberg/cpp/cmake/lmdb.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ExternalProject_Add(
1111
PREFIX ${LMDB_PREFIX}
1212
# We need to go through some hoops to do a shallow clone of a fixed commit (as opposed to a tag).
1313
DOWNLOAD_COMMAND
14-
sh -c "mkdir -p ${LMDB_PREFIX}/src/lmdb_repo && cd ${LMDB_PREFIX}/src/lmdb_repo && git init . 2>/dev/null && (git remote add origin https://github.com/LMDB/lmdb.git 2>/dev/null || true) && git fetch --depth 1 origin ddd0a773e2f44d38e4e31ec9ed81af81f4e4ccbb 2>/dev/null && git checkout FETCH_HEAD 2>/dev/null"
14+
sh -c "mkdir -p ${LMDB_PREFIX}/src/lmdb_repo && cd ${LMDB_PREFIX}/src/lmdb_repo && git init --quiet && (git remote add origin https://github.com/LMDB/lmdb.git 2>/dev/null || true) && git fetch --depth 1 origin --quiet ddd0a773e2f44d38e4e31ec9ed81af81f4e4ccbb && git reset --quiet --hard FETCH_HEAD"
1515
SOURCE_DIR ${LMDB_PREFIX}/src/lmdb_repo
1616
BUILD_IN_SOURCE YES
1717
CONFIGURE_COMMAND "" # No configure step

barretenberg/cpp/cmake/msgpack.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ExternalProject_Add(
99
PREFIX ${MSGPACK_PREFIX}
1010
# We need to go through some hoops to do a shallow clone of a fixed commit (as opposed to a tag).
1111
DOWNLOAD_COMMAND
12-
sh -c "mkdir -p ${MSGPACK_PREFIX}/src/msgpack-c && cd ${MSGPACK_PREFIX}/src/msgpack-c && git init . 2>/dev/null && (git remote add origin https://github.com/AztecProtocol/msgpack-c.git 2>/dev/null || true) && git fetch --depth 1 origin 5ee9a1c8c325658b29867829677c7eb79c433a98 2>/dev/null && git checkout FETCH_HEAD 2>/dev/null"
12+
sh -c "mkdir -p ${MSGPACK_PREFIX}/src/msgpack-c && cd ${MSGPACK_PREFIX}/src/msgpack-c && git init --quiet && (git remote add origin https://github.com/AztecProtocol/msgpack-c.git 2>/dev/null || true) && git fetch --depth 1 origin --quiet 5ee9a1c8c325658b29867829677c7eb79c433a98 && git reset --quiet --hard FETCH_HEAD"
1313
SOURCE_DIR ${MSGPACK_PREFIX}/src/msgpack-c
1414
CONFIGURE_COMMAND "" # No configure step
1515
BUILD_COMMAND "" # No build step

barretenberg/cpp/cmake/nlohmann_json.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(NLOHMANN_JSON_SOURCE_DIR "${CMAKE_BINARY_DIR}/_deps/nlohmann_json-src")
33
set(NLOHMANN_JSON_COMMIT_HASH "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03")
44

55
execute_process(
6-
COMMAND sh -c "mkdir -p ${NLOHMANN_JSON_SOURCE_DIR} && cd ${NLOHMANN_JSON_SOURCE_DIR} && git init . 2>/dev/null && (git remote add origin https://github.com/nlohmann/json.git 2>/dev/null || true) && git fetch --depth 1 origin ${NLOHMANN_JSON_COMMIT_HASH} 2>/dev/null && git checkout FETCH_HEAD 2>/dev/null"
6+
COMMAND sh -c "mkdir -p ${NLOHMANN_JSON_SOURCE_DIR} && cd ${NLOHMANN_JSON_SOURCE_DIR} && git init --quiet && (git remote add origin https://github.com/nlohmann/json.git 2>/dev/null || true) && git fetch --depth 1 origin --quiet ${NLOHMANN_JSON_COMMIT_HASH} && git reset --quiet --hard FETCH_HEAD"
77
RESULT_VARIABLE result
88
)
99
if(result)

barretenberg/cpp/cmake/tracy.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(TRACY_SOURCE_DIR "${CMAKE_BINARY_DIR}/_deps/tracy-src")
33
set(TRACY_COMMIT_HASH "5d542dc09f3d9378d005092a4ad446bd405f819a")
44

55
execute_process(
6-
COMMAND sh -c "mkdir -p ${TRACY_SOURCE_DIR} && cd ${TRACY_SOURCE_DIR} && git init . 2>/dev/null && (git remote add origin https://github.com/wolfpld/tracy.git 2>/dev/null || true) && git fetch --depth 1 origin ${TRACY_COMMIT_HASH} 2>/dev/null && git checkout FETCH_HEAD 2>/dev/null"
6+
COMMAND sh -c "mkdir -p ${TRACY_SOURCE_DIR} && cd ${TRACY_SOURCE_DIR} && git init --quiet && (git remote add origin https://github.com/wolfpld/tracy.git 2>/dev/null || true) && git fetch --depth 1 origin --quiet ${TRACY_COMMIT_HASH} && git reset --quiet --hard FETCH_HEAD"
77
RESULT_VARIABLE result
88
)
99
if(result)

barretenberg/cpp/src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ if(WASM)
214214
barretenberg-debug.wasm
215215
${BARRETENBERG_TARGET_OBJECTS}
216216
$<TARGET_OBJECTS:wasi_objects>
217-
$<TARGET_OBJECTS:vm2_stub_objects>
217+
# This is an object library, so doesn't need _objects.
218+
$<TARGET_OBJECTS:vm2_stub>
218219
)
219220

220221
target_link_options(

barretenberg/cpp/src/barretenberg/api/api_chonk.cpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ namespace bb {
2121
namespace { // anonymous namespace
2222

2323
/**
24-
* @brief Compute and write to file a MegaHonk VK for a circuit to be accumulated in the IVC
24+
* @brief Compute and write to file a MegaHonk VK for a circuit to be accumulated by Chonk.
2525
* @note This method differes from write_vk_honk<MegaFlavor> in that it handles kernel circuits which require special
2626
* treatment (i.e. construction of mock IVC state to correctly complete the kernel logic).
27+
2728
*
28-
* @param bytecode_path
29-
* @param witness_path
29+
* @param bytecode ACIR bytecode of the circuit
30+
* @param output_path Directory to write the VK (or "-" for stdout)
3031
*/
3132
void write_standalone_vk(std::vector<uint8_t> bytecode, const std::filesystem::path& output_path)
3233
{
@@ -41,9 +42,19 @@ void write_standalone_vk(std::vector<uint8_t> bytecode, const std::filesystem::p
4142
write_file(output_path / "vk", response.bytes);
4243
}
4344
}
45+
46+
/**
47+
* @brief Compute and write the Chonk verification key.
48+
*
49+
* @details Computes the VK for the hiding kernel circuit. The bytecode parameter should be
50+
* the last circuit in the IVC chain (e.g., private-tail in Aztec), as this determines
51+
* the public inputs structure of the hiding kernel.
52+
*
53+
* @param bytecode ACIR bytecode of the final circuit in the IVC chain
54+
* @param output_dir Directory to write the VK (or "-" for stdout)
55+
*/
4456
void write_chonk_vk(std::vector<uint8_t> bytecode, const std::filesystem::path& output_dir)
4557
{
46-
// compute the hiding kernel's vk
4758
info("Chonk: computing IVC vk for hiding kernel circuit");
4859
auto response = bbapi::ChonkComputeIvcVk{ .circuit{ .bytecode = std::move(bytecode) } }.execute();
4960
const bool output_to_stdout = output_dir == "-";

0 commit comments

Comments
 (0)