Commit 3218346
committed
fix(tests): three more the main-sync port left, and a precompile test that proved the wrong guest
The full lib suite at 413b3a3 (plain libtest, every test regardless of
failures) found four red. One was mine to expect; three were pre-existing at the
lineage base and invisible to nextest's fail-fast. Three are fixed here. The
fourth is a MEASUREMENT and is left red on purpose — see the end.
⛔ THE PRECOMPILE TEST HAS BEEN PROVING THE WRONG GUEST.
`a_program_using_a_precompile_is_proved_and_verified` loaded `keccak.elf`, which
is `executor/programs/rust/keccak`: a guest whose Cargo.toml depends on
`tiny-keccak` and whose `main` hashes in SOFTWARE, issuing no syscall but
`commit`. It has never touched a precompile. The accelerator guest is
`keccak_precompile`, whose `main` calls `lambda_vm_syscalls::keccak::keccak256`
— the `keccak_permute` ecall — over five padding edge cases.
★ And the doc's claim was false BEFORE #977 too; it was merely unfalsifiable.
KECCAK and KECCAK_RND were always-on then, so they sat in the table set of every
workload whether reached or not, and "which brings KECCAK, KECCAK_RND and
KECCAK_RC in" described MACHINE shape while reading as program behaviour.
`892c7d1bc` (main's `c2ac5d546`, #977) made them counted and turned a latent
falsehood into a visible one — the same shape as SOUNDNESS.md's `T = 24`: a
claim no assertion defended. The census that finally said so carries COMMIT[0]
and no keccak table at all.
Worse, `keccak_precompile.elf` is built by the Makefile's `RUST_PROGRAM_DIRS`
wildcard and the prover proved it NOWHERE — its only reference in the tree is
`executor/tests/rust.rs`, which runs it in the executor. So the suite had no
precompile coverage on the multilinear path at all.
Both halves land rather than one:
- the precompile case now loads `keccak_precompile.elf` and asserts KECCAK,
KECCAK_RND and COMMIT are argued. By PRESENCE, not an ordered census: this
guest has never been proved on this path, so there is no measured set, and
inventing one would repeat the mistake above. Its prove cost is likewise
unmeasured. KECCAK_RC is deliberately not in that list — it is always-on and
covered by the prefix, so matching it would let a run reaching no precompile
satisfy a check named for one, which is exactly how the software guest passed
for as long as it did.
- `a_software_hash_guest_argues_the_widest_table_set` keeps the software guest
and pins its MEASURED 21-table census, because it is the widest set in the
suite: it reaches MEMW, LOAD, STORE, BRANCH and EQ, the five families
`the_whole_instruction_set_is_proved_and_verified` does not despite its name,
plus public output and two PAGE tables including the stack page. A Rust guest
doing ordinary work exercises more of the VM than the asm fixture named for
the instruction set.
`state_depends_on_every_table_count` read 21 against a literal 20. ✓ VERIFIED
cause: #977 moved COMMIT into `TableCounts` — `pub commit: usize` is absent at
`892c7d1bc^1` and present now — so `each_count_mut` grew a field and the literal
did not. The fix is not 21. It is `statement::NUM_TABLE_KINDS`, the same length
`table_count_values` returns as `[u64; NUM_TABLE_KINDS]` and the guest absorbs
as `statement_replay::NUM_TABLE_COUNTS`; a bare literal there says nothing about
WHICH count is missing and is a second copy of a number the crate already holds.
`no_call_site_outside_the_pin_reaches_a_default_alias` flagged
`lfm/algebraic_commit.rs`, and it is a FALSE POSITIVE — but not blessed away as
one. Both matches are in `#[test] the_host_search_finds_a_valid_nonce_under_rpx`
(added by `80d746321`): `GrindingDigest<RpxStarkHash>` and
`GrindingDigest<Blake3StarkHash>`. Neither reaches a DEFAULT; both name their
hash, which is what §6.7 asks for. The second is a cross-hash CONTROL — BLAKE3
work must not satisfy the RPX predicate — and deleting it makes the test a
tautology.
The two halves are treated differently on purpose, because the allowlist's own
doc says it holds hash-AGNOSTIC items:
- `GrindingDigest` joins CONFIG_ALLOWED. Generic over the tag, selects nothing.
- `Blake3StarkHash` does NOT. The file joins BLESSED instead, so the concrete
tag keeps flagging everywhere else — a site naming it on the block path under
an RPX pin is precisely what this gate is for.
The BLESSED entry answers the reachability question the list demands rather than
stopping at "test-only", which that doc calls one scope too wide: the consumers
are `stark::grinding::generate_nonce::<T>` and `is_valid_nonce::<T>`, generic
over the tag passed at the call site, so no global is read; and the value never
leaves the test body, so the paired-default failure the list exists to catch has
no subject here.
⚠ LEFT RED, DELIBERATELY: `the_blake3_tenant_socket_matches_the_record`.
`BLAKE3_TENANT_SOCKET` is `Test` and `BLOCK_HASHER` has been `Rpx` since
`603c1e155` (2026-09-08), while the census it is a ratio against is
`bench_cache/optladder_2026-08-21/TIP/tip-wrappt-24.stdout` — eighteen days
older. The instrument is working: it says the module measures a shape nothing
proves. Moving the constant to `Rpx` is not a fix, because `RECORDED = (28, 3)`
is the *Test* socket's width pair, and that number's own doc says it moves the
headline ratio by a third in the FLATTERING direction if wrong. It needs a
re-recorded CHIP CENSUS under the current pin, which is a run, not an edit.1 parent 413b3a3 commit 3218346
3 files changed
Lines changed: 167 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
| |||
197 | 205 | | |
198 | 206 | | |
199 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
200 | 229 | | |
201 | 230 | | |
202 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
546 | 531 | | |
547 | 532 | | |
548 | 533 | | |
549 | | - | |
| 534 | + | |
| 535 | + | |
550 | 536 | | |
551 | | - | |
| 537 | + | |
552 | 538 | | |
553 | 539 | | |
554 | 540 | | |
555 | 541 | | |
556 | 542 | | |
| 543 | + | |
| 544 | + | |
557 | 545 | | |
558 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
559 | 599 | | |
560 | 600 | | |
561 | 601 | | |
562 | 602 | | |
563 | 603 | | |
564 | 604 | | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
573 | 610 | | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
| 611 | + | |
578 | 612 | | |
579 | 613 | | |
580 | 614 | | |
581 | 615 | | |
582 | 616 | | |
583 | 617 | | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
590 | 669 | | |
591 | 670 | | |
592 | 671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
134 | 149 | | |
135 | 150 | | |
136 | 151 | | |
| |||
139 | 154 | | |
140 | 155 | | |
141 | 156 | | |
142 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
143 | 162 | | |
144 | 163 | | |
145 | 164 | | |
| |||
0 commit comments