Commit 2803219
authored
fix: corrupt low-order bytes in batch verifier test to avoid non-canonical field encoding (#22333)
## Summary
Fixes CI failure in `merge-train/barretenberg` caused by the interaction
of #22233 (Fr::from_u64 big-endian encoding) and #22311 (strict
non-canonical field validation).
The `corruptProofFields()` test helper was flipping high-order bytes
(indices 0,1) of field elements, creating values exceeding the BN254 Fr
modulus. The strict validation now rejects these at deserialization time
with `non-canonical encoding (value >= modulus)` before they reach the
verifier.
**Fix**: Flip low-order bytes (indices 30,31) instead — still corrupts
the proof but keeps field values canonical.
## Test plan
- [x] `batch_verifier.test.ts` — all 4 tests pass locally (previously 1
failing)
ClaudeBox log: https://claudebox.work/s/e5146dc92fea29dd?run=11 parent 30bcb23 commit 2803219
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments