Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into lw/storage
Browse files Browse the repository at this point in the history
  • Loading branch information
LeilaWang committed Sep 7, 2023
2 parents 9ab16a1 + 99ee337 commit 1007e37
Show file tree
Hide file tree
Showing 118 changed files with 1,015 additions and 512 deletions.
70 changes: 35 additions & 35 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -725,26 +725,26 @@ jobs:
working_directory: yarn-project/end-to-end

e2e-sandbox-example:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
machine:
image: ubuntu-2004:202010-01
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: cond_spot_run_tests end-to-end e2e_sandbox_example.test.ts docker-compose-e2e-sandbox.yml
command: ./scripts/cond_run_script end-to-end $JOB_NAME ./scripts/run_tests_local e2e_sandbox_example.test.ts ./scripts/docker-compose-e2e-sandbox.yml
working_directory: yarn-project/end-to-end

e2e-multi-transfer-contract:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
machine:
image: ubuntu-2004:202010-01
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: cond_spot_run_tests end-to-end e2e_multi_transfer.test.ts
command: ./scripts/cond_run_script end-to-end $JOB_NAME ./scripts/run_tests_local e2e_multi_transfer.test.ts
working_directory: yarn-project/end-to-end

e2e-block-building:
machine:
Expand Down Expand Up @@ -831,15 +831,15 @@ jobs:
working_directory: yarn-project/end-to-end

e2e-escrow-contract:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
machine:
image: ubuntu-2004:202010-01
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: cond_spot_run_tests end-to-end e2e_escrow_contract.test.ts
command: ./scripts/cond_run_script end-to-end $JOB_NAME ./scripts/run_tests_local e2e_escrow_contract.test.ts
working_directory: yarn-project/end-to-end

e2e-pending-commitments-contract:
machine:
Expand Down Expand Up @@ -926,37 +926,37 @@ jobs:
working_directory: yarn-project/end-to-end

e2e-p2p:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
machine:
image: ubuntu-2004:202010-01
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: cond_spot_run_tests end-to-end e2e_p2p_network.test.ts
command: ./scripts/cond_run_script end-to-end $JOB_NAME ./scripts/run_tests_local e2e_p2p_network.test.ts
working_directory: yarn-project/end-to-end

e2e-browser-sandbox:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
machine:
image: ubuntu-2004:202010-01
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: cond_spot_run_tests end-to-end e2e_aztec_js_browser.test.ts docker-compose-e2e-sandbox.yml
command: ./scripts/cond_run_script end-to-end $JOB_NAME ./scripts/run_tests_local e2e_aztec_js_browser.test.ts ./scripts/docker-compose-e2e-sandbox.yml
working_directory: yarn-project/end-to-end

aztec-rpc-sandbox:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
machine:
image: ubuntu-2004:202010-01
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: cond_spot_run_tests end-to-end aztec_rpc_sandbox.test.ts docker-compose-e2e-sandbox.yml
command: ./scripts/cond_run_script end-to-end $JOB_NAME ./scripts/run_tests_local aztec_rpc_sandbox.test.ts ./scripts/docker-compose-e2e-sandbox.yml
working_directory: yarn-project/end-to-end

guides-writing-an-account-contract:
machine:
Expand All @@ -971,26 +971,26 @@ jobs:
working_directory: yarn-project/end-to-end

guides-dapp-testing:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
machine:
image: ubuntu-2004:202010-01
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: cond_spot_run_tests end-to-end guides/dapp_testing.test.ts docker-compose-e2e-sandbox.yml
command: ./scripts/cond_run_script end-to-end $JOB_NAME ./scripts/run_tests_local guides/dapp_testing.test.ts ./scripts/docker-compose-e2e-sandbox.yml
working_directory: yarn-project/end-to-end

e2e-canary-test:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
machine:
image: ubuntu-2004:202010-01
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: cond_spot_run_test_script ./scripts/run_tests canary-build uniswap_trade_on_l1_from_l2.test.ts canary-build docker-compose-e2e-sandbox.yml
command: ./scripts/cond_run_script canary-build $JOB_NAME ./scripts/run_tests uniswap_trade_on_l1_from_l2.test.ts canary-build ./scripts/docker-compose-e2e-sandbox.yml
working_directory: yarn-project/canary

build-docs:
machine:
Expand Down Expand Up @@ -1191,7 +1191,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: spot_run_test_script ./scripts/run_tests canary uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml
command: spot_run_test_script ./scripts/run_tests canary uniswap_trade_on_l1_from_l2.test.ts canary ./scripts/docker-compose.yml

run-deployment-canary-browser:
docker:
Expand All @@ -1202,7 +1202,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: spot_run_test_script ./scripts/run_tests canary aztec_js_browser.test.ts canary docker-compose.yml
command: spot_run_test_script ./scripts/run_tests canary aztec_js_browser.test.ts canary ./scripts/docker-compose.yml

run-deployment-canary-cli:
docker:
Expand All @@ -1213,7 +1213,7 @@ jobs:
- *setup_env
- run:
name: "Test"
command: spot_run_test_script ./scripts/run_tests canary cli.test.ts canary docker-compose.yml
command: spot_run_test_script ./scripts/run_tests canary cli.test.ts canary ./scripts/docker-compose.yml

# Repeatable config for defining the workflow below.
tag_regex: &tag_regex /^v.*/
Expand Down
4 changes: 2 additions & 2 deletions circuits/cpp/barretenberg/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/AztecProtocol/barretenberg
branch = master
commit = 2882d97f5165239badb328be80568e7d683c0465
parent = 1fd8196f302ee49f540dea54ce5df4c450592d05
commit = ca423221d3fba5a4d60f7239fc21092db12a3c31
parent = 3a9238a99a32259d8d6b85df6335a002c7bab354
method = merge
cmdver = 0.4.6
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{".":"0.5.0","ts":"0.5.0"}
{".":"0.5.1","ts":"0.5.1"}
18 changes: 18 additions & 0 deletions circuits/cpp/barretenberg/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [0.5.1](https://github.com/AztecProtocol/barretenberg/compare/barretenberg-v0.5.0...barretenberg-v0.5.1) (2023-09-05)


### Features

* Add `info` command to bb ([#2010](https://github.com/AztecProtocol/barretenberg/issues/2010)) ([2882d97](https://github.com/AztecProtocol/barretenberg/commit/2882d97f5165239badb328be80568e7d683c0465))
* **ci:** Use content hash in build system, restrict docs build to *.ts or *.cpp ([#1953](https://github.com/AztecProtocol/barretenberg/issues/1953)) ([297a20d](https://github.com/AztecProtocol/barretenberg/commit/297a20d7878a4aabab1cabf2cc5d2d67f9e969c5))


### Bug Fixes

* Adds Mac cross compile flags into barretenberg ([#1954](https://github.com/AztecProtocol/barretenberg/issues/1954)) ([0e17d97](https://github.com/AztecProtocol/barretenberg/commit/0e17d978a0cc6805b72646a8e36fd5267cbd6bcd))
* **bb.js:** (breaking change) bundles bb.js properly so that it works in the browser and in node ([#1855](https://github.com/AztecProtocol/barretenberg/issues/1855)) ([bc93a5f](https://github.com/AztecProtocol/barretenberg/commit/bc93a5f8510d0dc600343e7e613ab84380d3c225))
* **ci:** Incorrect content hash in some build targets ([#1973](https://github.com/AztecProtocol/barretenberg/issues/1973)) ([c6c469a](https://github.com/AztecProtocol/barretenberg/commit/c6c469aa5da7c6973f656ddf8af4fb20c3e8e4f6))
* Compilation on homebrew clang 16.06 ([#1937](https://github.com/AztecProtocol/barretenberg/issues/1937)) ([79c29ee](https://github.com/AztecProtocol/barretenberg/commit/79c29eebbdb78c1e9aa5b4a3da6207fbf93bdd10))
* Master ([#1981](https://github.com/AztecProtocol/barretenberg/issues/1981)) ([59a454e](https://github.com/AztecProtocol/barretenberg/commit/59a454ecf1611424893e1cb093774a23dde39310))
* Unify base64 interface between mac and linux (cherry-picked) ([#1968](https://github.com/AztecProtocol/barretenberg/issues/1968)) ([37ee120](https://github.com/AztecProtocol/barretenberg/commit/37ee1204eba280442b6941eff448d6ff15eb9f04))

## [0.5.0](https://github.com/AztecProtocol/barretenberg/compare/barretenberg-v0.4.6...barretenberg-v0.5.0) (2023-09-01)


Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.5.0 x-release-please-version
v0.5.1 x-release-please-version
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/barretenberg-wasm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ in
stdenv.mkDerivation
{
pname = "barretenberg.wasm";
version = "0.5.0"; # x-release-please-version
version = "0.5.1"; # x-release-please-version

src = ./cpp;

Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/barretenberg.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
},
"cmake.configureArgs": [
"--preset clang15",
"--preset clang16",
"-G Ninja",
"-g"
],
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/barretenberg.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in
buildEnv.mkDerivation
{
pname = "libbarretenberg";
version = "0.5.0"; # x-release-please-version
version = "0.5.1"; # x-release-please-version

src = ./cpp;

Expand Down
19 changes: 10 additions & 9 deletions circuits/cpp/barretenberg/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.24)
project(
Barretenberg
DESCRIPTION "BN254 elliptic curve library, and PLONK SNARK prover"
VERSION 0.5.0 # x-release-please-version
VERSION 0.5.1 # x-release-please-version
LANGUAGES CXX C
)

Expand Down Expand Up @@ -53,7 +53,7 @@ if(FUZZING)
endif()

if(UNDEFINED_BEHAVIOUR_SANITIZER)
set(SANITIZER_OPTIONS ${SANITIZER_OPTIONS} -fsanitize=undefined -fno-sanitize=alignment)
set(SANITIZER_OPTIONS ${SANITIZER_OPTIONS} -fsanitize=undefined -fno-sanitize=alignment)
endif()

add_compile_options(-fsanitize=fuzzer-no-link ${SANITIZER_OPTIONS})
Expand Down Expand Up @@ -81,15 +81,15 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS ON)

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10")
message(WARNING "Clang <10 is not supported")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "14")
message(WARNING "Clang <14 is not supported")
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10")
message(WARNING "GCC <10 is not supported")
endif()
else()
message(WARNING "Unsuported compiler, use Clang >10 or GCC >10")
message(WARNING "Unsuported compiler, use Clang >14 or GCC >10")
endif()

if(COVERAGE)
Expand All @@ -105,13 +105,15 @@ if(COVERAGE)
# Find llvm-profdata
set(PROFDATA_EXECUTABLE_NAME "llvm-profdata-${CLANG_VERSION_MAJOR}")
find_program(PROFDATA_EXECUTABLE ${PROFDATA_EXECUTABLE_NAME})

if(PROFDATA_EXECUTABLE MATCHES "NOTFOUND")
message(FATAL_ERROR "Couldn't find ${PROFDATA_EXECUTABLE_NAME}")
endif()

# Find llvm-cov
set(COV_EXECUTABLE_NAME "llvm-cov-${CLANG_VERSION_MAJOR}")
find_program(COV_EXECUTABLE ${COV_EXECUTABLE_NAME})

if(COV_EXECUTABLE MATCHES "NOTFOUND")
message(FATAL_ERROR "Couldn't find ${COV_EXECUTABLE_NAME}")
endif()
Expand All @@ -121,12 +123,11 @@ if(COVERAGE)

# Add a custom target for creating the report
add_custom_target(create_full_coverage_report
COMMAND "${CMAKE_SOURCE_DIR}/scripts/collect_coverage_information.sh" ${PROFDATA_EXECUTABLE} ${COV_EXECUTABLE}
VERBATIM
COMMAND "${CMAKE_SOURCE_DIR}/scripts/collect_coverage_information.sh" ${PROFDATA_EXECUTABLE} ${COV_EXECUTABLE}
VERBATIM
)
endif()


include(cmake/build.cmake)
include(GNUInstallDirs)
include(cmake/arch.cmake)
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/cpp/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [ "$OS" == "macos" ]; then
PRESET=default
else
if [ "$(which clang++-15)" != "" ]; then
PRESET=clang15
PRESET=clang16
else
PRESET=default
fi
Expand Down
4 changes: 2 additions & 2 deletions circuits/cpp/barretenberg/sol/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ cd ../../sol

echo "Building c++ binaries..."
cd ../cpp
cmake --preset clang15
cmake --build --preset clang15 --target solidity_key_gen solidity_proof_gen
cmake --preset clang16
cmake --build --preset clang16 --target solidity_key_gen solidity_proof_gen
cd ../sol

echo "Generating keys..."
Expand Down
15 changes: 15 additions & 0 deletions circuits/cpp/barretenberg/ts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## [0.5.1](https://github.com/AztecProtocol/barretenberg/compare/barretenberg.js-v0.5.0...barretenberg.js-v0.5.1) (2023-09-05)


### Features

* Add `info` command to bb ([#2010](https://github.com/AztecProtocol/barretenberg/issues/2010)) ([2882d97](https://github.com/AztecProtocol/barretenberg/commit/2882d97f5165239badb328be80568e7d683c0465))
* **ci:** Use content hash in build system, restrict docs build to *.ts or *.cpp ([#1953](https://github.com/AztecProtocol/barretenberg/issues/1953)) ([297a20d](https://github.com/AztecProtocol/barretenberg/commit/297a20d7878a4aabab1cabf2cc5d2d67f9e969c5))


### Bug Fixes

* **bb.js:** (breaking change) bundles bb.js properly so that it works in the browser and in node ([#1855](https://github.com/AztecProtocol/barretenberg/issues/1855)) ([bc93a5f](https://github.com/AztecProtocol/barretenberg/commit/bc93a5f8510d0dc600343e7e613ab84380d3c225))
* **ci:** Incorrect content hash in some build targets ([#1973](https://github.com/AztecProtocol/barretenberg/issues/1973)) ([c6c469a](https://github.com/AztecProtocol/barretenberg/commit/c6c469aa5da7c6973f656ddf8af4fb20c3e8e4f6))
* Master ([#1981](https://github.com/AztecProtocol/barretenberg/issues/1981)) ([59a454e](https://github.com/AztecProtocol/barretenberg/commit/59a454ecf1611424893e1cb093774a23dde39310))

## [0.5.0](https://github.com/AztecProtocol/barretenberg/compare/barretenberg.js-v0.4.6...barretenberg.js-v0.5.0) (2023-09-01)


Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aztec/bb.js",
"version": "0.5.0",
"version": "0.5.1",
"homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/circuits/cpp/barretenberg/ts",
"license": "MIT",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/src/aztec3/circuits/abis/c_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ WASM_EXPORT void abis__hash_vk(uint8_t const* vk_data_buf, uint8_t* output)
* @brief Generates a function tree leaf from its preimage.
* This is a WASM-export that can be called from Typescript.
*
* @details given a `uint8_t const*` buffer representing a function leaf's prieimage,
* @details given a `uint8_t const*` buffer representing a function leaf's preimage,
* construct a FunctionLeafPreimage instance, hash, and return the serialized results
* in the `output` buffer.
*
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/src/aztec3/circuits/kernel/private/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void common_update_end_values(DummyBuilder& builder,

const auto& storage_contract_address = private_call_public_inputs.call_context.storage_contract_address;

// Transient read requests and witnessess are accumulated in public_inputs.end
// Transient read requests and witnesses are accumulated in public_inputs.end
// We silo the read requests (domain separation per contract address)
{
for (size_t i = 0; i < read_requests.size(); ++i) {
Expand Down
4 changes: 2 additions & 2 deletions circuits/cpp/src/aztec3/circuits/rollup/base/.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ TEST_F(base_rollup_tests, native_nullifier_tree_regression)
DummyCircuitBuilder builder = DummyCircuitBuilder("base_rollup_tests__native_nullifier_tree_regression");

// This test runs after some data has already been inserted into the tree
// This test will pre-populate the tree with 6 * KERNEL_NEW_NULLILFIERS_LENGTH values (0 item + 6 *
// KERNEL_NEW_NULLILFIERS_LENGTH -1 more) simulating that a rollup inserting two random values has already
// This test will pre-populate the tree with 6 * KERNEL_NEW_NULLIFIERS_LENGTH values (0 item + 6 *
// KERNEL_NEW_NULLIFIERS_LENGTH -1 more) simulating that a rollup inserting two random values has already
// succeeded. Note that this corresponds to 3 (1 already initialized and 2 new ones) base rollups. This rollup then
// adds two further random values that will end up having their low nullifiers point at each other
std::vector<fr> initial_values(6 * MAX_NEW_NULLIFIERS_PER_TX - 1, 0);
Expand Down
Loading

0 comments on commit 1007e37

Please sign in to comment.