Skip to content

Commit 31dbc8f

Browse files
authored
Merge branch 'next' into nikita/block-txs-request
2 parents 96f608d + 8ea8713 commit 31dbc8f

File tree

2,088 files changed

+358205
-13131
lines changed

Some content is hidden

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

2,088 files changed

+358205
-13131
lines changed

.github/workflows/ci3.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ jobs:
136136
ref: ${{ github.event.pull_request.head.sha || github.sha }}
137137

138138
- name: Run Network Scenarios
139+
timeout-minutes: 350
139140
env:
140141
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
141142
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

.github/workflows/nightly-docs-release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,15 @@ jobs:
139139
chmod +x /tmp/bb-bin/bb
140140
echo "BB_PATH=/tmp/bb-bin" >> $GITHUB_ENV
141141
142+
- name: Build noir packages
143+
run: |
144+
# Initialize noir submodule (required for yarn-project portal dependencies)
145+
git submodule update --init --recursive noir/noir-repo
146+
# Build noir JS packages (creates noir/packages/ directory needed by yarn-project)
147+
cd noir
148+
./bootstrap.sh install_deps
149+
./bootstrap.sh build_packages
150+
142151
- name: Build aztec CLI
143152
working-directory: ./yarn-project
144153
run: |

.github/workflows/release-please.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,15 @@ jobs:
187187
./bootstrap.sh build_native
188188
echo "BB_PATH=$(pwd)/build/bin" >> $GITHUB_ENV
189189
190+
- name: Build noir packages
191+
run: |
192+
# Initialize noir submodule (required for yarn-project portal dependencies)
193+
git submodule update --init --recursive noir/noir-repo
194+
# Build noir JS packages (creates noir/packages/ directory needed by yarn-project)
195+
cd noir
196+
./bootstrap.sh install_deps
197+
./bootstrap.sh build_packages
198+
190199
- name: Build aztec CLI
191200
working-directory: ./yarn-project
192201
run: |

.github/workflows/test-network-scenarios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ concurrency:
3232
jobs:
3333
deploy-and-test:
3434
runs-on: ubuntu-latest
35-
timeout-minutes: 360
3635
steps:
3736
- name: Checkout
3837
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
3938

4039
- name: Run Network Scenarios
40+
timeout-minutes: 350
4141
env:
4242
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
4343
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

.vscode/launch.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"name": "Debug chonk transaction",
3737
"type": "lldb",
3838
"request": "launch",
39-
"program": "${workspaceFolder}/barretenberg/cpp/build-debug-fast-no-avm/bin/bb",
39+
"program": "${workspaceFolder}/barretenberg/cpp/build-debug/bin/bb",
4040
"args": ["prove", "--scheme", "chonk", "--output_path", ".", "--ivc_inputs_path", "ivc-inputs.msgpack", "--print_bench"],
4141
"cwd": "${workspaceFolder}/yarn-project/end-to-end/example-app-ivc-inputs-out/ecdsar1+transfer_0_recursions+sponsored_fpc",
4242
"initCommands": [
@@ -48,7 +48,7 @@
4848
"name": "Debug acir test",
4949
"type": "lldb",
5050
"request": "launch",
51-
"program": "${workspaceFolder}/barretenberg/cpp/build-debug-fast-no-avm/bin/bb",
51+
"program": "${workspaceFolder}/barretenberg/cpp/build-debug-fast/bin/bb",
5252
"args": ["prove", "--scheme", "ultra_honk", "--output_path", ".", "-b", "./target/program.json", "--write_vk"],
5353
// Can replace with any directory containing target/program.json and target/witness.gz
5454
"cwd": "${workspaceFolder}/barretenberg/acir_tests/acir_tests/embedded_curve_ops",
@@ -60,7 +60,7 @@
6060
"name": "Debug test_graph_for_arithmetic_gates",
6161
"type": "lldb",
6262
"request": "launch",
63-
"program": "${workspaceFolder}/barretenberg/cpp/build-debug-no-avm/bin/boomerang_value_detection_tests",
63+
"program": "${workspaceFolder}/barretenberg/cpp/build-debug/bin/boomerang_value_detection_tests",
6464
"args": ["--gtest_filter=BoomerangGoblinRecursiveVerifierTests.graph_description_basic"],
6565
"initCommands": [
6666
"command script import ${workspaceFolder}/barretenberg/cpp/scripts/lldb_format.py"
@@ -70,9 +70,9 @@
7070
"name": "Debug BB API Test",
7171
"type": "lldb",
7272
"request": "launch",
73-
"program": "${workspaceFolder}/barretenberg/cpp/build-debug-no-avm/bin/api_tests",
73+
"program": "${workspaceFolder}/barretenberg/cpp/build-debug/bin/api_tests",
7474
"args": ["--gtest_filter=ChonkAPITests.ProveAndVerifyFileBasedFlow"],
75-
"cwd": "${workspaceFolder}/barretenberg/cpp/build-debug-no-avm",
75+
"cwd": "${workspaceFolder}/barretenberg/cpp/build-debug",
7676
"initCommands": [
7777
"command script import ${workspaceFolder}/barretenberg/cpp/scripts/lldb_format.py"
7878
],
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
^barretenberg/acir_tests/bootstrap.sh
12
^barretenberg/acir_tests/scripts/run_test.sh
23
^barretenberg/acir_tests/internal_test_programs/.*/.*\.(nr|toml)$

barretenberg/acir_tests/bootstrap.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ function build {
113113
rm -rf acir_tests/{regression_5045,regression_7744}
114114
# The following test fails because it uses CallData/ReturnData with UltraBuilder, which is not supported
115115
rm -rf acir_tests/{regression_7612,regression_7143,databus_composite_calldata,databus_two_calldata_simple,databus_two_calldata,databus}
116+
# Mark tests that are expected to fail with a failing_ prefix.
117+
# bb_prove.sh will expect these to fail and error if they suddenly pass.
118+
for t in ecdsa_secp256k1_invalid_inputs; do
119+
mv acir_tests/$t acir_tests/failing_$t
120+
sed -i "s/^name = \"$t\"/name = \"failing_$t\"/" acir_tests/failing_$t/Nargo.toml
121+
done
116122
# Merge the internal test programs with the acir tests.
117123
cp -R ./internal_test_programs/* acir_tests
118124

barretenberg/acir_tests/scripts/bb_prove.sh

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ source $(git rev-parse --show-toplevel)/ci3/source
33

44
export HARDWARE_CONCURRENCY=8
55

6-
cd ../acir_tests/$1
6+
test_name=$1
7+
cd ../acir_tests/$test_name
78

89
bb=$(../../../cpp/scripts/find-bb)
910

@@ -14,14 +15,28 @@ flags="-v --scheme ultra_honk $*"
1415
mkdir -p output-$$
1516
trap "rm -rf output-$$" EXIT
1617

17-
# Generate VK
18-
$bb write_vk $flags -b target/program.json -o output-$$
18+
# Tests prefixed with failing_ are expected to fail.
19+
if [[ $test_name == failing_* ]]; then
20+
if $bb write_vk $flags -b target/program.json -o output-$$ && \
21+
$bb prove $flags -b target/program.json -k output-$$/vk -o output-$$ && \
22+
$bb verify $flags \
23+
-k output-$$/vk \
24+
-p output-$$/proof \
25+
-i output-$$/public_inputs; then
26+
echo "ERROR: Expected test '$test_name' to fail, but it passed!"
27+
exit 1
28+
fi
29+
else
30+
# Generate VK
31+
$bb write_vk $flags -b target/program.json -o output-$$
32+
33+
# Prove
34+
$bb prove $flags -b target/program.json -k output-$$/vk -o output-$$
35+
36+
# Verify
37+
$bb verify $flags \
38+
-k output-$$/vk \
39+
-p output-$$/proof \
40+
-i output-$$/public_inputs
41+
fi
1942

20-
# Prove
21-
$bb prove $flags -b target/program.json -k output-$$/vk -o output-$$
22-
23-
# Verify
24-
$bb verify $flags \
25-
-k output-$$/vk \
26-
-p output-$$/proof \
27-
-i output-$$/public_inputs

barretenberg/cpp/CLAUDE.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,58 @@ The remote benchmark script:
130130
- Automatically builds the target if needed
131131
- Returns performance metrics and timing data
132132
- Should be used instead of local benchmarks for performance validation
133+
134+
## Verification Keys
135+
136+
**IMPORTANT**: When making barretenberg changes that could affect verification keys, you must verify that VKs haven't changed unexpectedly, or
137+
update them if the changes are intentional.
138+
139+
### Checking if VKs have changed
140+
141+
Prerequisites: Build barretenberg native code first.
142+
143+
```bash
144+
cd barretenberg/cpp
145+
./bootstrap.sh build_native
146+
```
147+
148+
Run the VK check script from barretenberg/cpp/scripts:
149+
150+
```bash
151+
cd barretenberg/cpp/scripts
152+
./test_chonk_standalone_vks_havent_changed.sh
153+
```
154+
155+
Expected result: Script exits successfully if VKs are unchanged, or shows that VKs have changed.
156+
157+
### Updating VKs (when changes are intentional)
158+
159+
**IMPORTANT**: Never update the VKs without asking permission first. When asking for permission, explain why you think the VK update is to be expected.
160+
161+
If VKs have changed and this is expected due to your modifications, update the stored VKs:
162+
163+
```bash
164+
cd barretenberg/cpp/scripts
165+
./test_chonk_standalone_vks_havent_changed.sh --update_inputs
166+
```
167+
168+
### Verifying VK validity (proving the updated inputs)
169+
170+
**IMPORTANT**: There is no need to verify the validity of the inputs after having updated them. The flag `update_inputs` verifies the new inputs.
171+
172+
To verify the validity of the inputs pinned by the script `./test_chonk_standalone_vks_havent_changed.sh`, run:
173+
174+
```bash
175+
cd barretenberg/cpp/scripts
176+
./test_chonk_standalone_vks_havent_changed.sh --prove_and_verify
177+
```
178+
179+
Note: If a proof test fails for a specific flow, the inputs are saved to:
180+
`yarn-project/end-to-end/example-app-ivc-inputs-out/<flow_name>`
181+
182+
Typical workflow
183+
184+
1. Make barretenberg changes
185+
2. Build native code: `cd barretenberg/cpp && ./bootstrap.sh build_native`
186+
3. Check VKs: `cd scripts && ./test_chonk_standalone_vks_havent_changed.sh`
187+
4. If VKs changed intentionally: `./test_chonk_standalone_vks_havent_changed.sh --update_inputs`

0 commit comments

Comments
 (0)