diff --git a/.github/scripts/integration-test-node.sh b/.github/scripts/integration-test-node.sh index b7f00c65620..0d070b8001d 100755 --- a/.github/scripts/integration-test-node.sh +++ b/.github/scripts/integration-test-node.sh @@ -1,5 +1,5 @@ #!/bin/bash set -eu -apt-get install libc++-dev -y +apt-get install libc6 libstdc++6 -y yarn workspace integration-tests test:node diff --git a/.github/workflows/reports.yml b/.github/workflows/reports.yml index d458f8998f0..80f1910e310 100644 --- a/.github/workflows/reports.yml +++ b/.github/workflows/reports.yml @@ -58,7 +58,7 @@ jobs: compare_gates_reports: name: Circuit sizes needs: [build-nargo] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: pull-requests: write diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index 981d97e1bdf..690575076c7 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -394,7 +394,7 @@ jobs: test-integration-node: name: Integration Tests (Node) - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: [build-acvm-js, build-noir-wasm, build-nargo, build-noirc-abi] timeout-minutes: 30 @@ -406,6 +406,7 @@ jobs: run: | ./scripts/install_bb.sh echo "$HOME/.bb/" >> $GITHUB_PATH + sudo apt-get install libc6 libstdc++6 -y - name: Download nargo binary uses: ./.github/actions/download-nargo @@ -489,7 +490,7 @@ jobs: test-examples: name: Example scripts - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: [build-nargo, build-noir-execute] timeout-minutes: 30 @@ -506,6 +507,7 @@ jobs: run: | ./scripts/install_bb.sh echo "$HOME/.bb/" >> $GITHUB_PATH + sudo apt-get install libc6 libstdc++6 -y - name: Download nargo binary uses: ./.github/actions/download-nargo diff --git a/compiler/integration-tests/package.json b/compiler/integration-tests/package.json index 053e9efeed2..6752a2daa6e 100644 --- a/compiler/integration-tests/package.json +++ b/compiler/integration-tests/package.json @@ -13,7 +13,7 @@ "lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0" }, "dependencies": { - "@aztec/bb.js": "0.72.1", + "@aztec/bb.js": "0.77.0", "@noir-lang/noir_js": "workspace:*", "@noir-lang/noir_wasm": "workspace:*", "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", diff --git a/compiler/integration-tests/scripts/codegen-verifiers.sh b/compiler/integration-tests/scripts/codegen-verifiers.sh index de1f71a4cc0..f1fc321d1ff 100755 --- a/compiler/integration-tests/scripts/codegen-verifiers.sh +++ b/compiler/integration-tests/scripts/codegen-verifiers.sh @@ -17,19 +17,19 @@ KEYS=$(mktemp -d) # Codegen verifier contract for 1_mul mul_dir=$repo_root/test_programs/execution_success/1_mul nargo --program-dir $mul_dir compile -$NARGO_BACKEND_PATH write_vk -b $mul_dir/target/1_mul.json -o $KEYS/1_mul -$NARGO_BACKEND_PATH contract -k $KEYS/1_mul -o $contracts_dir/1_mul.sol +$NARGO_BACKEND_PATH OLD_API write_vk -b $mul_dir/target/1_mul.json -o $KEYS/1_mul +$NARGO_BACKEND_PATH OLD_API contract -k $KEYS/1_mul -o $contracts_dir/1_mul.sol # Codegen verifier contract for assert_statement assert_statement_dir=$repo_root/test_programs/execution_success/assert_statement nargo --program-dir $assert_statement_dir compile -$NARGO_BACKEND_PATH write_vk -b $assert_statement_dir/target/assert_statement.json -o $KEYS/assert_statement -$NARGO_BACKEND_PATH contract -k $KEYS/assert_statement -o $contracts_dir/assert_statement.sol +$NARGO_BACKEND_PATH OLD_API write_vk -b $assert_statement_dir/target/assert_statement.json -o $KEYS/assert_statement +$NARGO_BACKEND_PATH OLD_API contract -k $KEYS/assert_statement -o $contracts_dir/assert_statement.sol # Codegen verifier contract for recursion recursion_dir=$repo_root/compiler/integration-tests/circuits/recursion nargo --program-dir $recursion_dir compile -$NARGO_BACKEND_PATH write_vk -b $recursion_dir/target/recursion.json -o $KEYS/recursion -$NARGO_BACKEND_PATH contract -k $KEYS/recursion ./ -o $contracts_dir/recursion.sol +$NARGO_BACKEND_PATH OLD_API write_vk -b $recursion_dir/target/recursion.json -o $KEYS/recursion +$NARGO_BACKEND_PATH OLD_API contract -k $KEYS/recursion -o $contracts_dir/recursion.sol -rm -rf $KEYS \ No newline at end of file +rm -rf $KEYS diff --git a/examples/codegen_verifier/codegen_verifier.sh b/examples/codegen_verifier/codegen_verifier.sh index c792b418311..89df3ced181 100755 --- a/examples/codegen_verifier/codegen_verifier.sh +++ b/examples/codegen_verifier/codegen_verifier.sh @@ -6,18 +6,18 @@ BACKEND=${BACKEND:-bb} nargo compile # TODO: backend should automatically generate vk if necessary. -$BACKEND write_vk -b ./target/hello_world.json -$BACKEND contract -o ./src/contract.sol +$BACKEND OLD_API write_vk -b ./target/hello_world.json +$BACKEND OLD_API contract -o ./src/contract.sol # We now generate a proof and check whether the verifier contract will verify it. nargo execute --pedantic-solving witness PROOF_PATH=./target/proof -$BACKEND prove -b ./target/hello_world.json -w ./target/witness.gz -o $PROOF_PATH +$BACKEND OLD_API prove -b ./target/hello_world.json -w ./target/witness.gz -o $PROOF_PATH # Sanity check that proof is valid. -$BACKEND verify -k ./target/vk -p ./target/proof +$BACKEND OLD_API verify -k ./target/vk -p ./target/proof NUM_PUBLIC_INPUTS=2 PUBLIC_INPUT_BYTES=$((32 * $NUM_PUBLIC_INPUTS)) @@ -25,15 +25,15 @@ HEX_PUBLIC_INPUTS=$(head -c $PUBLIC_INPUT_BYTES $PROOF_PATH | od -An -v -t x1 | HEX_PROOF=$(tail -c +$(($PUBLIC_INPUT_BYTES + 1)) $PROOF_PATH | od -An -v -t x1 | tr -d $' \n') # Split public inputs into strings where each string represents a `bytes32`. -SPLIT_HEX_PUBLIC_INPUTS=$(sed -e 's/.\{64\}/0x&,/g' <<< $HEX_PUBLIC_INPUTS) +SPLIT_HEX_PUBLIC_INPUTS=$(sed -e 's/.\{64\}/0x&,/g' <<<$HEX_PUBLIC_INPUTS) # Spin up an anvil node to deploy the contract to anvil & DEPLOY_INFO=$(forge create UltraVerifier \ - --rpc-url "127.0.0.1:8545" \ - --private-key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" \ - --json) + --rpc-url "127.0.0.1:8545" \ + --private-key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" \ + --json) VERIFIER_ADDRESS=$(echo $DEPLOY_INFO | jq -r '.deployedTo') # Call the verifier contract with our proof. diff --git a/examples/prove_and_verify/prove_and_verify.sh b/examples/prove_and_verify/prove_and_verify.sh index 411f5258caf..92288bc92e0 100755 --- a/examples/prove_and_verify/prove_and_verify.sh +++ b/examples/prove_and_verify/prove_and_verify.sh @@ -7,8 +7,8 @@ nargo execute --pedantic-solving witness # TODO: `bb` should create `proofs` directory if it doesn't exist. mkdir -p proofs -$BACKEND prove -b ./target/hello_world.json -w ./target/witness.gz +$BACKEND OLD_API prove -b ./target/hello_world.json -w ./target/witness.gz # TODO: backend should automatically generate vk if necessary. -$BACKEND write_vk -b ./target/hello_world.json -$BACKEND verify -k ./target/vk -p ./proofs/proof +$BACKEND OLD_API write_vk -b ./target/hello_world.json +$BACKEND OLD_API verify -k ./target/vk -p ./proofs/proof diff --git a/examples/recursion/generate_recursive_proof.sh b/examples/recursion/generate_recursive_proof.sh index 09b01d547b6..e05dd854d69 100755 --- a/examples/recursion/generate_recursive_proof.sh +++ b/examples/recursion/generate_recursive_proof.sh @@ -4,16 +4,16 @@ set -eu BACKEND=${BACKEND:-bb} nargo execute sum_witness --package sum -$BACKEND prove -b ./target/sum.json -w ./target/sum_witness.gz -o ./target/sum_proof --recursive +$BACKEND OLD_API prove -b ./target/sum.json -w ./target/sum_witness.gz -o ./target/sum_proof --recursive # Once we have generated our inner proof, we must use this to generate inputs to `recurse_leaf`` -$BACKEND write_vk -b ./target/sum.json -o ./target/sum_key --recursive -$BACKEND vk_as_fields -k ./target/sum_key -o ./target/sum_vk_as_fields +$BACKEND OLD_API write_vk -b ./target/sum.json -o ./target/sum_key --recursive +$BACKEND OLD_API vk_as_fields -k ./target/sum_key -o ./target/sum_vk_as_fields VK_HASH=$(jq -r '.[0]' ./target/sum_vk_as_fields) VK_AS_FIELDS=$(jq -r '.[1:]' ./target/sum_vk_as_fields) -FULL_PROOF_AS_FIELDS="$($BACKEND proof_as_fields -p ./target/sum_proof -k ./target/sum_key -o -)" +FULL_PROOF_AS_FIELDS="$($BACKEND OLD_API proof_as_fields -p ./target/sum_proof -k ./target/sum_key -o -)" # sum has 3 public inputs PUBLIC_INPUTS=$(echo $FULL_PROOF_AS_FIELDS | jq -r '.[:3]') PROOF_AS_FIELDS=$(echo $FULL_PROOF_AS_FIELDS | jq -r '.[3:]') @@ -28,19 +28,19 @@ echo "public_inputs = $PUBLIC_INPUTS" >> $RECURSE_LEAF_PROVER_TOML # We can now execute and prove `recurse_leaf` nargo execute recurse_leaf_witness --package recurse_leaf -$BACKEND prove -b ./target/recurse_leaf.json -w ./target/recurse_leaf_witness.gz -o ./target/recurse_leaf_proof --recursive +$BACKEND OLD_API prove -b ./target/recurse_leaf.json -w ./target/recurse_leaf_witness.gz -o ./target/recurse_leaf_proof --recursive # Let's do a sanity check that the proof we've generated so far is valid. -$BACKEND write_vk -b ./target/recurse_leaf.json -o ./target/recurse_leaf_key --recursive -$BACKEND verify -p ./target/recurse_leaf_proof -k ./target/recurse_leaf_key +$BACKEND OLD_API write_vk -b ./target/recurse_leaf.json -o ./target/recurse_leaf_key --recursive +$BACKEND OLD_API verify -p ./target/recurse_leaf_proof -k ./target/recurse_leaf_key # Now we generate the final `recurse_node` proof similarly to how we did for `recurse_leaf`. -$BACKEND vk_as_fields -k ./target/recurse_leaf_key -o ./target/recurse_leaf_vk_as_fields +$BACKEND OLD_API vk_as_fields -k ./target/recurse_leaf_key -o ./target/recurse_leaf_vk_as_fields VK_HASH=$(jq -r '.[0]' ./target/recurse_leaf_vk_as_fields) VK_AS_FIELDS=$(jq -r '.[1:]' ./target/recurse_leaf_vk_as_fields) -FULL_PROOF_AS_FIELDS="$($BACKEND proof_as_fields -p ./target/recurse_leaf_proof -k ./target/recurse_leaf_key -o -)" +FULL_PROOF_AS_FIELDS="$($BACKEND OLD_API proof_as_fields -p ./target/recurse_leaf_proof -k ./target/recurse_leaf_key -o -)" # recurse_leaf has 4 public inputs (excluding aggregation object) PUBLIC_INPUTS=$(echo $FULL_PROOF_AS_FIELDS | jq -r '.[:4]') PROOF_AS_FIELDS=$(echo $FULL_PROOF_AS_FIELDS | jq -r '.[4:]') @@ -54,8 +54,8 @@ echo "public_inputs = $PUBLIC_INPUTS" >> $RECURSE_NODE_PROVER_TOML # We can now execute and prove `recurse_node` nargo execute recurse_node_witness --package recurse_node -$BACKEND prove -b ./target/recurse_node.json -w ./target/recurse_node_witness.gz -o ./target/recurse_node_proof +$BACKEND OLD_API prove -b ./target/recurse_node.json -w ./target/recurse_node_witness.gz -o ./target/recurse_node_proof # We finally verify that the generated recursive proof is valid. -$BACKEND write_vk -b ./target/recurse_node.json -o ./target/recurse_node_key -$BACKEND verify -p ./target/recurse_node_proof -k ./target/recurse_node_key +$BACKEND OLD_API write_vk -b ./target/recurse_node.json -o ./target/recurse_node_key +$BACKEND OLD_API verify -p ./target/recurse_node_proof -k ./target/recurse_node_key diff --git a/scripts/install_bb.sh b/scripts/install_bb.sh index 72170af78d8..4579c3a2e67 100755 --- a/scripts/install_bb.sh +++ b/scripts/install_bb.sh @@ -1,11 +1,11 @@ #!/bin/bash -VERSION="0.72.1" +VERSION="0.77.0" BBUP_PATH=~/.bb/bbup if ! [ -f $BBUP_PATH ]; then - curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/master/barretenberg/cpp/installation/install | bash + curl -L https://bbup.aztec.network | bash fi $BBUP_PATH -v $VERSION diff --git a/yarn.lock b/yarn.lock index 568e7e487d1..894a70c49eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -221,9 +221,9 @@ __metadata: languageName: node linkType: hard -"@aztec/bb.js@npm:0.72.1": - version: 0.72.1 - resolution: "@aztec/bb.js@npm:0.72.1" +"@aztec/bb.js@npm:0.77.0": + version: 0.77.0 + resolution: "@aztec/bb.js@npm:0.77.0" dependencies: comlink: ^4.4.1 commander: ^12.1.0 @@ -233,7 +233,7 @@ __metadata: tslib: ^2.4.0 bin: bb.js: dest/node/main.js - checksum: 143f0062a31e262ceff6e454d31e2a2672afd8dcbff0dafb17d5308f8c5312048e5d3503d80e7ad9ff4b17b6c3d36e8ffbff8d2deda2cdb684f19fa64d5a04ab + checksum: d3ffe7c9928f4b98aa3619d1dc0c217a0f1a293045f3fab8d43e25d7dfa397b3ec9770f1e18503798d40bddc8fbd189136c7884574410d4b7e19ee0df1bcb5f6 languageName: node linkType: hard @@ -16609,7 +16609,7 @@ __metadata: version: 0.0.0-use.local resolution: "integration-tests@workspace:compiler/integration-tests" dependencies: - "@aztec/bb.js": 0.72.1 + "@aztec/bb.js": 0.77.0 "@noir-lang/noir_js": "workspace:*" "@noir-lang/noir_wasm": "workspace:*" "@nomicfoundation/hardhat-chai-matchers": ^2.0.0