This repository was archived by the owner on Sep 12, 2026. It is now read-only.
Commit c53a22e
Send ring-switch s_hat_v on the stream, drop RingSwitchProof
The ring-switch message was the last plain scalar riding a struct:
`RingSwitchProof` wrapped 64 E values that `observe_ext_slice` bound and
the verifier read back out of `BatchOpeningProof`. `add_scalars` and
`next_scalars` do both jobs in one call, so the struct is deleted and
`BatchOpeningProof` is now just the WHIR Merkle data.
`omit_replayed_ab` goes with it. It existed because the prover put AB's
s_hat_v in the struct and then removed it after checking it matched
lincheck's z_partial. On the stream a prebound claim simply sends
nothing, so there is nothing to take back.
The verifier's shape validation collapses too: reading exactly 64 words
is the width check, and a short stream is the new `VerifyError::
Truncated` instead of a length test on attacker-supplied data.
The guest reads the 64 words with the same `fs_next` walk it uses for
z_partial, so read and bind stay one act and the separate obs loop and
the `rs_shatv` hint buffer both disappear.
The sponge sequence is unchanged: the same 64 values are bound at the
same point, so every challenge is identical. Only the stream grew by 64
words and the struct shrank by the same, and `flock_stream_end` still
marks where flock's reduction ends.
testall, clippyall, docall and ruff clean. recursion_2to1{,_mixed},
recursion_generic_many and recursion_soundness_binds pass with the
edited guest; the python verifier's pinning test passes. Guest cycles
727,750 and proof size 223.8 KiB, both unchanged.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 86a75ba commit c53a22e
9 files changed
Lines changed: 153 additions & 259 deletions
File tree
- crates
- flock/tests
- lean_vm/src
- cpu
- pcs/src
- rec_aggregation
- guests
- src
- python-verifier
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
| 98 | + | |
101 | 99 | | |
102 | 100 | | |
103 | 101 | | |
| |||
160 | 158 | | |
161 | 159 | | |
162 | 160 | | |
163 | | - | |
164 | | - | |
165 | | - | |
| 161 | + | |
166 | 162 | | |
167 | 163 | | |
168 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
404 | | - | |
405 | | - | |
| 403 | + | |
406 | 404 | | |
407 | 405 | | |
408 | 406 | | |
409 | 407 | | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | 408 | | |
427 | 409 | | |
428 | 410 | | |
| |||
585 | 567 | | |
586 | 568 | | |
587 | 569 | | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
| 570 | + | |
602 | 571 | | |
603 | 572 | | |
604 | 573 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
| 620 | + | |
629 | 621 | | |
630 | 622 | | |
631 | 623 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
484 | 474 | | |
485 | 475 | | |
486 | 476 | | |
| |||
687 | 677 | | |
688 | 678 | | |
689 | 679 | | |
690 | | - | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
691 | 687 | | |
692 | 688 | | |
693 | 689 | | |
| |||
840 | 836 | | |
841 | 837 | | |
842 | 838 | | |
843 | | - | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
844 | 846 | | |
845 | 847 | | |
846 | 848 | | |
| |||
0 commit comments