refactor(prover): align byte range-checks with ARE_BYTES spec#600
Conversation
Codex Code ReviewNo issues found in the PR diff. I checked the Verification note: I attempted |
Review: refactor(prover): align byte range-checks with ARE_BYTES specOverall: Clean, well-scoped refactor. The rename is consistent across all files, the pairing logic is semantically correct, and the count assertions check out arithmetically (440→220 per round for keccak_rnd, 8→4 per call for keccak addr). No security or correctness issues found. Low: Two stale counts in summary commentsIn
The section-header comments and test assertion comments in the same function already use the correct updated counts (20 and 200), so this is just a minor inconsistency. Everything else looks correct
|
Addresses review feedback on PR #600: the two comments in `collect_bitwise_from_keccak` were renamed IS_BYTE -> ARE_BYTES but kept the pre-pairing counts. After pairing adjacent bytes into ARE_BYTES interactions the per-round counts halve: - theta: ARE_BYTES on Cxz_left is 20 pairs, not 40. - rho: ARE_BYTES is 200 pairs, not 400. These now match the `are_bytes = 24 * 220 + 4` test assertion (220/round = 20 theta + 200 rho). Comment-only; no behavior change.
Description:
Spec #532 splits the old IS_BYTE lookup into the IS_BYTE template and the ARE_BYTES[X, Y] paired interaction. Two changes:
Rename IS_BYTE → ARE_BYTES across the prover (BusId, multiplicity column, BitwiseOperationType, doc comments, tests).
Fix KECCAK and KECCAK_RND, which were sending single-element values on the (now 2-element) ARE_BYTES bus LogUp fingerprints couldn't balance. Pair the sends:
Trace builder emits matching paired ops; bus/op count assertions updated.