Skip to content

Commit 6bbb062

Browse files
Updates to Claude.md
1 parent 4a9e1cf commit 6bbb062

File tree

1 file changed

+42
-3
lines changed

1 file changed

+42
-3
lines changed

barretenberg/cpp/CLAUDE.md

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,55 @@ The remote benchmark script:
133133

134134
## Verification Keys
135135

136-
To check whether vks have changed first build barretenberg native code:
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.
137142
138143
```bash
139144
cd barretenberg/cpp
140145
./bootstrap.sh build_native
141146
```
142-
and then run:
147+
148+
Run the VK check script from barretenberg/cpp/scripts:
149+
143150
```bash
144151
cd barretenberg/cpp/scripts
145152
./test_chonk_standalone_vks_havent_changed.sh
146153
```
147154
148-
If the vks have changed, you can update them using the script `./test_chonk_standalone_vks_havent_changed.sh --update_inputs`. You can verify the validity of the inputs using the command `./test_chonk_standalone_vks_havent_changed.sh --prove_and_verify`. If one of the proof test fails, the inputs for which proving has failed are saved to `yarn-project/end-to-end/xample-app-ivc-inputs-out` under a folder with name equal to the flow for which the proof test failed.
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)