Repository navigation
WHIR no-epoch (prove-and-retire) prover: block 25368371 — work in progress - #1014
Draft
MauroToscano wants to merge 1720 commits into
Draft
MauroToscano wants to merge 1720 commits into
MauroToscano wants to merge 1720 commits into
Conversation
|
Benchmark Results for modified programs 🚀
|
|
Benchmark Results for unmodified programs 🚀
|
MauroToscano
force-pushed
the
noepoch/whir
branch
from
October 1, 2026 14:57
e9107c6 to
97ba486
Compare
MauroToscano
added a commit
that referenced
this pull request
Oct 2, 2026
… leaves The builder kept every walked window until finish, so at the run's end all of its op lists were resident, about 300 B per cycle (0.28 GiB per M cycles: 8.6 GiB on block 25368371 and about 100 GiB on a median mainnet block). WindowedTraceBuilder::drop_streamed_ops keeps only the ops not yet in a handed-out chunk for each of the 8 streamed tables (Tail: the windows' lists moved in whole and freed once used up). As a chunk leaves, the builder takes what the table phase would have read from its ops. It counts BITWISE's lookups from LT, SHIFT, STORE, MEMW_A and MEMW_R, plus DECODE's lookups and the last ECALL from CPU. It derives and keeps the phase-3 LT ops of MEMW and MEMW_A, unless stream_memw_lt already put them in the windows' LT lists. The other walk lists are appended window by window instead of being concatenated at finish. The in-walk BITWISE lookups are counted and dropped. finish runs the table phase over the tails (StreamSkip::tails), padding the dropped CPU chunks and placing the kept LT ops where phase 3 would have derived them. The tables are the same. The new tests compare every table with the whole-run build, and with stream_memw_lt every table with the builder that keeps its windows, plus LT's multiplicities. Both go through push and the split, at window lengths 1 to the whole run, and with chunks small enough that all 8 tables drop. The same comparison runs with KECCAK_RND streamed. Another test checks that after each window each table holds less than a chunk of ops. Removing any one accounting step (LT, MEMW_R or DECODE counts, the CPU padding, either LT prefix) fails the first test. Off by default. Cherry-picked from mem/m1 74e1df1 onto #1014, with the streamed finish's build marks kept.
MauroToscano
added a commit
that referenced
this pull request
Oct 3, 2026
MauroToscano
added a commit
that referenced
this pull request
Oct 3, 2026
…es are laid out #1014 now lays the streamed chunks out on three workers (0498480), and phase A waits on the groups the rest closes, which close only once the whole rest is laid out. With b1's waves the AIR order's prefix is laid out first, so pack_rest_as_laid_out (the rest's sink, groups identical by test) is now on in production: each wave's tables go to the packer as the wave ends, and a group closes once its own tables are laid out. Laid out all at once, the first table in AIR order was ready only with the last, which is why packing as laid out read +0.21 s before (FAST 422). The real-block tests' BLOCK_WHIR_PACK_REST=0|1 now overrides the production choice instead of replacing it with off. Readouts for the finish's place in phase A: each group's commit start (from@, beside done@), and every rest table's layout end and group in AIR order (BLOCK REST TABLES).
MauroToscano
added a commit
that referenced
this pull request
Oct 3, 2026
MauroToscano
added a commit
that referenced
this pull request
Oct 3, 2026
MauroToscano
added a commit
that referenced
this pull request
Oct 3, 2026
MauroToscano
added a commit
that referenced
this pull request
Oct 3, 2026
MauroToscano
added a commit
that referenced
this pull request
Oct 3, 2026
…s its tables, the block memory log) into nw2/r2ii No conflicts. multilinear_block.rs: the memory log's phase-B marks and the group observer sit side by side at the end of each group (the observer first, then the group's columns are released and the mark taken). block_whir.rs and the W3 harness: the new BlockOptions fields and the memory log's plumbing next to the group observer's.
MauroToscano
added a commit
that referenced
this pull request
Oct 3, 2026
… proof to an observer; the block tree's first leaf executes during phase B) into m4b/b2 No conflict. R2-ii's two full BlockOptions literals in lfm/whir_block_tests.rs already carry b2's pack_finished: true, so its hand-over tests run with the finish's tables packed, as production does.
MauroToscano
added a commit
that referenced
this pull request
Oct 3, 2026
…14fea1 crypto/stark/src/narrow.rs and crypto/stark/src/spill.rs are #1013's files, byte-identical to mem/stark-f1 @ e5214fea1 (i-mem3's F1: the page-backed Bytes, the streaming Digester, the fused writer, over the S1/S2 store). #1013 is their one source of truth: #1014 never edits them, re-imports any change from there, and they merge as one when both PRs reach main. Wiring only: the two modules in lib.rs (dead code allowed there, since some parts serve #1013's prover alone), math's page-bytes feature, and libc unconditional as the store needs it (it was behind disk-spill). #1013's prover glue (TraceTable::spill_main) and its spill tests are not imported; #1014's adapter and tests follow.
MauroToscano
added a commit
that referenced
this pull request
Oct 3, 2026
… reserve LAMBDA_VM_BLOCK_SPILL now reads as #1013's (prover/src/block.rs SpillPolicy … spill_decision @ edddc68): auto (and unset) | off | always | <GiB> resident budget. auto spills a committed table once the host's bytes (the larger of VmHWM and the cgroup's memory.current), the reserve and the table would pass the target (LAMBDA_VM_BLOCK_SPILL_TARGET_GIB, else the cgroup's memory.max less 10 GiB, else MemTotal less 10 GiB). Phase A decides per table and never past the writers' queue; groups 0 and 1 count but never spill. The reserve is #1014's own, inferred from the median block (BIG 565): the finish's p5 transient (25.5 GiB) and the tree's leaf programs alive through phase B (16.3 GiB), about 1.25 GiB per total G cells or 1.65 per G cells committed so far, plus 6 GiB for phase B's bump and the read-back window. BlockSpill carries the policy's choice (SpillWanted) and the kept bytes and committed cells it reads. A block that fits spills nothing; the store opens for every policy but off. Tests: the knob and the decision (unit), a budget the block fits in spills nothing and one of zero spills (block).
MauroToscano
added a commit
that referenced
this pull request
Oct 3, 2026
…@ 278e6a8 The rule #1014 copies from #1013 read only cgroup v2's memory.max and memory.current. On a v1 host (FAST) the target fell through to MemTotal less 10 GiB, and the host's charge was not read at all. #1013 fixed both in 278e6a8; this re-copies spill_target_bytes, spill_target_from, cgroup_memory and host_bytes_now from that sha, with its two tests (the cgroup files from fake trees, and the target rule), cited as before. The only changes from #1013's text are the citations and the tests' temporary directory, which gets a name of its own so the two copies of the test never share one if they ever run in one process.
MauroToscano
added a commit
that referenced
this pull request
Oct 3, 2026
…cf253d2) The host measure #1014 copies from #1013 took max(VmHWM, the cgroup's charge), and the charge counts page cache. FAST charged 40.58 GB at 17:28Z with 15.18 GB of it inactive file pages, which would have made auto spill the last groups of a 1x block that fits. This re-copies #1013's measure from its landed head 035aef5 (commit cf253d2): HostReading reads VmHWM, the charge and memory.stat's inactive file pages (v2 inactive_file, v1 total_inactive_file, by their exact key), and the host's bytes are max(VmHWM, charge - inactive_file). CgroupValue lets cgroup_memory read a whole-file number or one memory.stat key. The BLOCK SPILL line ends with the largest reading auto decided on, as #1013's does. With #1013's two tests; the text differs only in citations and the test's temporary directory. The rest of #1013's train (lazy queue budgets, the allocator purge) is not copied: #1014 has no queue budgets.
MauroToscano
added a commit
that referenced
this pull request
Oct 4, 2026
MauroToscano
added a commit
that referenced
this pull request
Oct 4, 2026
MauroToscano
added a commit
that referenced
this pull request
Oct 4, 2026
The spill code (stark, multilinear, block_whir) and the streamed top (executor, proof, the W3 tree) touch disjoint code; the one shared file, whir_block_tests.rs, merges without conflict (the spill side adds BlockSpillPolicy::Off to two test fixtures).
MauroToscano
added a commit
that referenced
this pull request
Oct 5, 2026
MauroToscano
added a commit
that referenced
this pull request
Oct 5, 2026
MauroToscano
added a commit
that referenced
this pull request
Oct 5, 2026
…114; min proven bits unchanged at 130.393) The default flip of LAMBDA_VM_ZF_WHIR_GRIND_BITS: the port of #1010's 5364aa2 and its pin follow-up 2687e48. PRODUCTION_WHIR_GRIND_BITS is 18; LEGACY_WHIR_GRIND_BITS = 20 keeps the legacy format and is the opt-out (LAMBDA_VM_ZF_WHIR_GRIND_BITS=20). It reaches #1014's WHIR proofs: the block's group chains and prepared openings, verify_block_whir, and the W3 leaves' in-guest verifier. The W3 tree's own STARK LFM proofs do not read it. The binding WHIR phase is unchanged (the unground fold at 27 variables, 130.393 bits); the query phases move 130.926 -> 130.907. Measured behind the knob on c55dec4: ULTRA 019 1x phase B -0.344 s (t -12.9), whole -0.270 s, recursion -0.010 s; BIG 628 median whole -3.42 s, both arms verified. The opt-out reproduces the previous 1x proof byte for byte (top digest 0da6fea9 under fixed hash keys and deterministic grind); the new default's is b9b4826d. The W-leg sizing pins follow the process's grind bits, as 2687e48 did on #1010.
MauroToscano
added a commit
that referenced
this pull request
Oct 6, 2026
…all, commit pairs off the pool) ULTRA 096 (median 25475471, #1014 + cap 256, one binary, 3 + 3 runs plus 2 + 2 single-lever arms) read LEVER EFFECTIVE on every pre-registered row: phase-A end -6.66 s with every run of the pair below every run without it, whole block -6.86 s (154.67 -> 147.81 s), finish 15.8 -> 9.3 s at most, KECCAK_RND's span 12.0 -> 5.4 s at most, the largest phase-A commit 2.93 -> 0.68 s, the card's wait for the rest 6.65 -> 1.77 s, max RSS -0.97 GiB. The wave alone gave -5.92 s whole, the commit pairs alone -0.47 s. At 1x (ULTRA 095) the pair is neutral (whole -0.016 s, t -0.4) and the top digest is unchanged. Both become the defaults; the knobs stay as opt-outs: LAMBDA_VM_KR_PACKED_WAVE=4 builds the chunks four at a time again, and LAMBDA_VM_BLOCK_COMMIT_OFF_POOL=0 puts the commit pairs back on the global pool. The proof bytes are the same either way.
MauroToscano
added a commit
that referenced
this pull request
Oct 6, 2026
…W_WINDOW=1) A #1014 block leaf's LFM_BALU is 70,692 rows a full group, so a 4-group leaf holds 282,768 rows and pads to 2^19. 34,200 of a group's rows are the lean fold's point x0^-1 = prod g^(-2^i b_i): one Select and one Mul a bit through edsl::pow_bits. pow_bits_windowed drops the identity multiply (the first factor read is the accumulator) and reads each of the first two bit pairs through a 4-way Select mux over the constants {1, f0, f1, f0 f1}. A fold then pays three fewer Muls and two more Selects at four or more index bits, two and one below. A full group goes -6,498 LFM_BALU and +4,104 LFM_SELECT, so a 4-group leaf's LFM_BALU drops to 256,776 (under 2^18) while its LFM_SELECT stays under 2^19 at 480,168. The value is the same and so is the Select semantics. The knob is read at program emission like LAMBDA_VM_WHIR_FOLD_CLASSIC and defaults off, so today's programs and ids are unchanged. pow_bits itself is untouched, so the STARK paths keep their programs. The lean fold's row and constant closed forms follow the setting.
MauroToscano
added a commit
that referenced
this pull request
Oct 10, 2026
…E_DOWNLOAD (default off) The port to #1014 of #1013's 6d25865: the same changed lines in device.rs, lde.rs, stark's gpu_lde.rs and the new device test, applied to functions that were identical on both PRs. On a precomputed-tree cache miss the preprocessed commit downloads the full node buffer into a zeroed pageable Vec<u8> and stark copies it once more into Vec<[u8; 32]>. #1014's median recursion pulls about 14.7 GB this way at 2.75 GB/s (I-PROF4 B.5.1). LAMBDA_VM_TREE_DOWNLOAD=staged sends it through a staging pair straight into the node vector and queues the multiplicity tree behind the last chunk; the device peak stays one tree and the nodes are the same bytes.
MauroToscano
added a commit
that referenced
this pull request
Oct 10, 2026
The port to #1014 of #1013's 814a4b6. LAMBDA_VM_TREE_DOWNLOAD unset (or any unknown value) now selects the staged download; `legacy` or `pageable` keeps the old pageable copy as an opt-out. The nodes are the same bytes on both paths. A unit test pins the default. On #1013, legacy vs staged on the median 25475471, one binary per job: recursion -2.94 s (t -15.9, ULTRA 094) and -6.26 s (t -27.6, RYZEN 002), with the base digest and the top program id unchanged (ULTRA 093, 100). #1014's own gate is I-COPIES §10.
A chunk held as records points into window-sized lists that neighbouring chunks can share. When its records are let go, each list this chunk is the last holder of (Arc::get_mut) has the whole pages inside its allocation handed back with madvise(MADV_DONTNEED) right before the free; a list another chunk still holds is left alone. Linux only, and only for values with nothing to drop. A refusal is counted and logged once, never a panic. CPU, MEMW_R and the row families' records use it.
release_group no longer drops a records table's records on the driver thread. Under a spill they go to one background thread that hands their pages back to the OS and frees them, so phase B waits on neither. The thread is joined before phase B returns (and on drop), and what each group's records came to lands in its stamps (records_pages, records_return_secs). The release unit test covers the thread, its join and the per-group stamps.
…rop test The release line adds the pages handed back to the OS: bytes, buffers, shared, refused, and the seconds on their thread. The records drop test checks that, with nothing dropped before phase B, some list is handed back by its last holder and none is refused.
…fault In a build with the card's kernels, an unset LAMBDA_VM_BLOCK_CARD_FILL now has the card fill the streamed CPU and MEMW_R chunks from their records, beside KECCAK_RND, as the measured configuration did (keccak_rnd,cpu,memw_r: large block about 2.7 s faster and about 7.6 GiB lower at its peak, the same proof bytes). The row families stay behind their own words. The word keccak_rnd alone rolls back to KECCAK_RND's fill only. A build without the card is unchanged: nothing is filled from records there. The knob test pins the unset default to exactly those three words with a card and to nothing without, and the rollback word to KECCAK_RND alone.
With a card build's default now filling CPU and MEMW_R chunks from their records, the live-regeneration block tests that do not ask for records would hold those chunks as records and drop them as such. The helper they share keeps both families on the host unless a test asks otherwise, as it already does for KECCAK_RND, so each test proves the configuration it was written for in either build. The records tests set theirs explicitly.
The pool count of the deduplicating tables' per-row lookups (LT, BRANCH, BYTEWISE) counts each chunk's distinct operations in one hash map reserved for them. A block's LT chunk holds about a million distinct operations, so its map is some 60 MiB, far beyond any cache, and each insert waits on memory: on a large block the count is the finish's longest step. LAMBDA_VM_BLOCK_P4_ROWS=parts counts each chunk by parts instead. A first pass notes each operation's part, read from bits of its hash that a map neither indexes its buckets by nor keeps in its control bytes; a second copies each operation into its part; each part is then counted with one small map, cleared between parts, which stays in a core's cache. Every operation of one value lands in one part, so the counts are the one map's. pool (the default) keeps one map a chunk. The BLOCK P4 ROWS line says how the chunks were counted, the count's wall seconds and, beside it, how long phase 4's other collectors took. The multiplicities and the tables are the same.
The card's backend (its context, its modules and its staging pools) is set up at the card's first use, which in a block's prove is the first group's upload: the group waits for it after it is laid out. With LAMBDA_VM_BLOCK_CARD_EARLY=1 the streamed prove starts the setup on a thread of its own as it starts, beside the executor and the first windows. Unset, empty or 0 (the default) keeps the setup at the first use. math_cuda::device::set_up_backend sets the backend up without counting as a device entry, and the backend now initialises one caller at a time, so the first group waits for a setup already under way instead of building a second context beside it. The proof is the same.
The finish's phase 4 counts the BITWISE lookups of about twenty sources (LT's per-op lookups, MUL, DVRM, BRANCH, SHIFT, BYTEWISE, EQ, STORE, MEMW_A, KECCAK, ECDAS, COPY, the small lists, the padding, IS_WH, PAGE, and the walk's tails) into at most eight buckets, each with its own 80 MiB histogram, beside the pool count of the per-row lookups. The phase ends when the slower of the two does. The BLOCK P4 ROWS line now also says how many buckets ran, the longest and shortest bucket's wall, and each source's seconds summed over the buckets, so a block's log shows which source the phase waits on. The multiplicities and the tables are the same.
…its histograms Phase 4's two largest BITWISE sources build each slice's list of lookups before folding it into a bucket's histogram: LT's eight a op (a 32 MiB list for each slice of 2^20 ops, some 3.6 G lookups on a large block) and KECCAK's five thousand a permutation (a list grown by doubling for each slice of 2^11). On a block the collectors are bound by memory traffic, not threads: more buckets made them slower. The lookups of each source now come from one generator, for_each_lt_lookup and for_each_keccak_lookup, on COPY's pattern: the lists the finish built (collect_bitwise_from_lt_ops, collect_bitwise_from_keccak) push what it emits, and the new count_bitwise_from_lt_ops and count_bitwise_from_keccak bump the histogram they are handed with no list in between. LAMBDA_VM_BLOCK_P4_LOOKUPS=direct counts that way; unset, empty or lists keeps the lists. Tests hold the generators against the earlier lists, kept word for word as the reference, at the finish's slice sizes. The multiplicities and the tables are the same.
… histograms by default LAMBDA_VM_BLOCK_P4_LOOKUPS unset or empty now counts LT's per-op lookups and KECCAK's straight into phase 4's histograms, with no list of each slice's lookups in between. lists, the earlier way, is the rollback. The multiplicities, the tables and the proof are the same.
A test holds the finish's phase-4 defaults: the per-row lookups counted on the pool with one map a chunk, LT's and KECCAK's lookups counted straight into the histograms, and the card set up at its first use.
…each `auto` arms once the host's bytes (the larger of the process's peak and its cgroup's working set) pass its target, MemTotal less 10 GiB, and the walk's end hands off, which arms live regeneration, once the process's peak passes 85 % of that target. Two cases meant to never arm read the real host: the records drop test's `auto` run with no disk, and the live regeneration test's `auto` run under a budget the block fits in. On a GitHub runner the records case armed at 0.0 s, dropped its 10 records chunks as records, and phase B let go of none, so the release check read 0 against 11008 bytes. Both cases now take a target of u64::MAX, so neither the per-table decision nor the walk's-end hand-off can arm on any host, and the records case first checks its own premise: nothing dropped, and the dropped line says it never armed.
…each Both read the host at the walk's end: a store's parked tables are handed off once the process's peak passes 85 % of the host's target (MemTotal less 10 GiB). The budget test's "a budget it fits in spills nothing" and the hand-off test's "parked and never handed off" hold only on a host whose target is above the test's peak; on a small one (a runner with 7 GiB has a target of 0) every parked table is handed off and both read slots > 0. Both now take a target of u64::MAX, so the budget alone decides what goes, and the hand-off runs only where the test asks for it.
The ethrex guest now builds its eight ethrex crates from yetanotherco/ethrex, branch lambda-vm/jumpmap: the pinned commit 797df554 plus two commits. The first keeps the JUMPDEST analysis as a bitmap, so a JUMP or JUMPI tests one bit instead of binary-searching the list of offsets; the second moves the tracer's branch of the jump out of line. A jump destination is valid exactly when it was before; the fork's commits carry tests that compare the new check with the old one on edge cases, random code and every bytecode of 25 mainnet blocks. On mainnet block 25475471 the guest executes 9.79 M fewer instructions (-4.1 %). The pins stay on lambdaclass/ethrex at 797df554: the commits leave ProgramInput as it is, so the fixture writer and the native reference keep reading the same layout, and the native reference now also checks the forked guest against unpatched ethrex. All eight crates are patched together, because patching only the two that changed leaves two copies of ethrex-crypto in the graph. scripts/set_ethrex_rev.sh learns about the patch: --show counts only the lambdaclass pins and fails unless the fork's recorded base is the pin, and a re-pin to another commit refuses until the fork is rebased onto it. Ethrex main has kept jump destinations as a bitmap since 3ca8bc23 (#7095), so the patch can go when the pin moves past that commit.
The default benchmark block (mainnet 25368371) executes 20,399,452 instructions with the jump-destination bitmap (laptop count), against 21,217,647 with the ethrex crates unpatched at this head; the table and the history line said 23,935,913, the count before main's guest-side changes were merged.
The ethrex guest's [patch] now points at yetanotherco/ethrex branch lambda-vm/jumpmap-plus (4a6d9270): the jump-destination bitmap's two commits plus ethrex main's #7119, picked without its changelog entry. #7119 lets MLOAD and MSTORE round the memory size once and write the stack top without a second bounds check, and lets the memory accessors skip RefCell's runtime borrow flag; each check it drops is one an earlier check already made, and the memory and stack code it changes is the same at the pinned 797df554 as at its upstream parent. On mainnet block 25475471 the guest now executes 10.82 M fewer instructions than with unpatched ethrex (-5.06 %), 1.03 M of them from #7119; on 25368371, the benchmark block, 20,296,269 (the converter README's count). The public output and every accelerated call except the copy accelerator's count are the same on all 22 executing blocks, and #7119 itself moves no call.
A block format field, leaf_query, chooses how the recursion leaf checks each WHIR chain's queries. V1 (the default) is today's leaf, unchanged. Under Lean, a chain's tail rounds -- round 1 on, a suffix whose current trees lie wholly in their 4-ary caps and have fewer leaves than the queries (rounds 5 and 6 at blowup 2) -- are checked at every leaf once instead of at each query: each leaf's block is hashed against its cap node, folded at its constant position and compared with the successor tail round's block at that slot, or the final value. Every sampled position is one of these, so the leaf accepts only what the host's checks at the sampled positions accept, and an honest proof passes at every position. The query draws stay in the transcript, their bits unused. The arena writes a tail tree's blocks once in leaf order. The host keeps no query position, so each opened block is placed by its leaf hash among the cap's nodes; a leaf no opening hits makes the writer return an error. The arena stays a function of the proof. On the median mix at blowup 2 every group spends 1,356 socket rows, 4,512 hinted words and 1,374 selects fewer, and its base and extension ALU and lanes fewer too; the leaf's front is unchanged. The opening permutation model counts the tail rounds, and the query-row model has a tail branch. The knob is LAMBDA_VM_WHIR_LEAF_QUERY (v1 or lean), read by the production format on both sides; the harness prints W3 LEAF QUERY. Tests: the tail rule picks a capped suffix and only under Lean; lean chains execute on host-accepted proofs and spend their closed form of socket rows, fewer than V1's; a tail block one lane off and the final value one off are refused; a compare at the neighbouring slot refuses an honest proof; a proof missing a tail leaf makes the writer err; equal tail blocks are each placed; the knob's words.
The arena takes every block of a tail tree from the proof's own openings of it: the round before's successor openings and the round's own, 2Q uniform positions. "Fewer leaves than queries" left that coverage to chance: at 6 queries over 4 leaves an honest proof misses a leaf about one time in eight, and its arena cannot be laid out. A tail round now needs Q >= 24 L, which bounds the miss by L * e^-48 (below 2^-63 for every tree of at most 64 leaves). The production chains keep their tails at blowup 2 (229 queries: trees of 2, 4 and 8 leaves). The test chains move to 96..192 queries so their tails stay; a chain one query short of a tree's bound drops that round.
Under the lean query a round-0 base block arrives four values a word, the last word zero-filled, instead of one (v, 0, 0, 0) word a value. The leaf hash takes the words as its rate words (leaf_hash_words: the same width tag and twelve-felt schedule, so the same digest), and the fold reads the felts each word's Unpack writes. The base-lift pin moves from Pack to Unpack, which sends each lane as a base token from the hashed word's own columns. Lanes past the last value are hashed as given, so anything but the zero fill misses the root. Per group on the median mix at blowup 2, on top of the tail rounds: hinted words -32,976 more (-37,488 in all), no permutation and no lane row added. The default (V1) arena and programs are unchanged. Tests: the word leaf hash equals the host's linear hash at lengths on and off a word and a block, and a nonzero lane past the last value gives another digest; the lean arena lays each block out as the proof's values; a value one off in any lane of a block's first or last word, at the first or last query, has no execution, on single chains and on grouped round-0 trees.
Instr::HintOn reads arena word `index` when its bit cell holds 0 and `alt` when it holds 1. It compiles to the same LFM_HINT row as a Hint: the row carries the output address and multiplicity only, and a hinted value is free witness, so which word the executor reads changes no constraint. The bit is a schedule dependency and never a read: schedule_reads_into adds it for the level schedule, the streamed executor's group needs and the validator's order check, while reads_into (whose recount sets every multiplicity) leaves it out. The validator also holds both indices to the arena. Existing programs are unchanged: no emitter makes a HintOn yet. Tests: a HintOn reads its alternative on a set bit under both schedules and its bit's multiplicity counts no read; a non-boolean bit, a bit written after the hint and an alternative past the arena are refused; a bit drawn from a permutation schedules the hint after it, and a streamed execution landing the hint's arena first waits for the bit's group (dropping the bit from the schedule reds both).
Under the lean query the openings' paths stay in the arena, in the proof's child order, until their walk. The walk hints each 4-ary level's three siblings with HintOn on the level's b1 bit, so the executor reads them in hint order ((s0, s1, s2) on a clear bit, (s2, s0, s1) on a set one), and places them with walk4's three Selects instead of the child-order walk's five. The arena is byte for byte the same; only the leaf program changes. Every placement is still a Select on an index bit, so the node hashed is the one the index names whatever the hints. Per group on the median mix at blowup 2: selects -27,022 more (-28,396 in all with the tail rounds), as modelled; no permutation added. The default (V1) programs are unchanged. Tests: rotated hints walk a child-order path to Merkle4's root at every leaf of trees of depth 0..5 with three Selects a level, and the rotation swapped misses it; a lean chain spends two Selects fewer a walked level and its closed-form socket rows; a path word one off in a lean arena has no execution.
verify_block_tree_at and verify_whir_block_tree_proof_at take the leaves' query check (LeafQuery) as a typed choice beside the group opening, blowup, leaf order and leaf scale, and the scan of the public verifiers requires it. The block commands take --leaf-query v1|lean (default v1) on prove-block and verify-block alike and refuse the harness's LAMBDA_VM_WHIR_LEAF_QUERY, as they refuse the leaf scale's knob. The proof file carries none of it. Box-tier tests: every lean leaf of a small block executes, per polynomial and with grouped round-0 trees, with fewer Selects than V1's, and a round-0 sibling or value tampered is refused; a tree proved under one query check is refused by a verifier under the other, both ways, and each verifies under its own; phase B's streamed arenas equal the proof's under the lean check too.
…s by iterator Clippy's cloned_ref_to_slice_refs and needless_range_loop, under make lint.
Every tail round's blocks replaced by blocks of the final value fold to the final value at every position, so each tail fold compare holds; the cap compare is what refuses them. A test-only fault turns that compare off, and the forgery then executes, so the check is load-bearing: the tampered-lane test alone could not show it (a lane off also breaks the fold).
The lean leaf draws every query position V1 draws (as many BitDec rows: the tail rounds' draws stay in the transcript, their bits unused), and the round before the first tail round still opens the tail tree at each sampled position: its successor opening one off at the first or the last query, which the host refuses, has no execution.
With the tail cap compare off by a test fault, the hinted tail blocks are bound to nothing but their folds: one value of the last tail round's first block one off folds away from the final value and has no execution, while the honest arena under the same fault executes. A mutant dropping the fold compare turns it red: the compare is what makes the leaf's acceptance imply the host's sampled fold checks. Also formats the named-format test's tuple, widened for the query check when this stack took the leaf options.
The verifiers' cross-check over the lean and V1 query checks builds its small block at blowup 4 (at_blowup_4): at blowup 2 the test format's V1 groups pass a single leaf's room and the rule's partition refuses. The phase-B arena test's lean arm stays at blowup 2, the shipped rate; its doc records the lean leaf's margin on the format's widest groups.
The leaves' query check is a format choice, so its leaf programs should not drift unnoticed. On the median mix at blowup 2, pin the leaf count and the digest of the first and the last leaf program (every instruction and the arena schema, as Debug prints them) under the per-query check and under the lean check, each named explicitly. A later change of which check is the default must leave both pins as they are.
A block's recursion leaves now take the lean query check unless told otherwise: round 0's values arrive four to a hinted word, paths are walked on hints the executor rotates, and a chain's tail rounds that lie wholly in their caps are checked at every leaf once instead of at each query. Measured on whole blocks against the per-query check at the same head, one binary, three mirrored runs a size: recursion -0.74 s on the median block and -0.97 s on the large one, whole block -0.96 s and -1.31 s, the large block's peak resident memory -1.33 GiB, both verifiers accepting every run. The block statement is unchanged; the tree's top moves, since the leaf programs change. The per-query check stays selectable by name everywhere the lean one is: LAMBDA_VM_WHIR_LEAF_QUERY=v1 for the process format, and --leaf-query v1 on prove-block and verify-block. As before, the choice is the verifier's constant and the proof does not carry it. Chains outside a block leaf keep the per-query check. Tests: the knob and the CLI flag read lean when unset; a new test holds the type's default, the unset knob and the production format to lean, and the median mix's pinned leaf programs (the previous commit) are unchanged under each named check, with the default's first leaf equal to the lean pin.
Every block leaf absorbs the ELF's digest and its pages, and the built poc_rodata_commit.elf differs by the assembler that made it (the Linux build is not the macOS one), so the leaf program pins only held on the machine that recorded them. The test now reads a checked-in copy of the ELF, so the pins are the same bytes on every machine; the pinned values do not change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One WHIR (multilinear) proof per block, with no epochs (the prove-and-retire / VADCOP shape). This is a second prover next to #1010's epoch-based one. #1010 stays the reference and this branch does not touch it. The branch starts from #1010's head
f3d359998; compare againstf3d359998to see only this work.What it is
prover::block_whir::prove_block_whir/verify_block_whir. The whole block is oneMultiProof:(z, α, β)are drawn once.S_post ‖ g: upload again, argue (LogUp-GKR), re-encode with the NTT alone, open. The dropped tree levels are rebuilt from the queried cosets and checked against the kept nodes.WindowedTraceBuilder(noepoch/windowed-builder, also used by STARK no-epoch (prove-and-retire) prover: block 25368371 — work in progress #1013). Every full chunk of CPU, MEMW_R, MEMW_A, MEMW, LOAD, LT, SHIFT and STORE is laid out and committed as soon as it exists.⚠ Format changes (all approved by Mauro, 10-02 (§7 on 10-05), but §6, the port of #1013's S0a; for the cryptography team's end review; ledger rows W-0…W-6, W-8, W-9 in CRYPTO-REVIEW.md)
The block is one WHIR proof (
BlockWhirProof, oneMultiProof) over all of the block's tables.z, α, β.S_post ‖ g).Every parameter below is a verifier-side constant. None is read from the proof.
BLOCK_GROUP_POLYSBLOCK_MAX_GROUPSBLOCK_MAX_TABLE_VARSBLOCK_MAX_KECCAK_RNDBLOCK_KECCAK_RND_MAX_VARSBLOCK_MAX_ECDASBLOCK_ECDAS_MAX_VARSBLOCK_MAX_KECCAKBLOCK_KECCAK_MAX_VARSBLOCK_MAX_ECSMBLOCK_ECSM_MAX_VARSArgueFormat::BATCHEDPRODUCTION_WHIR_GRIND_BITSLEAF_PERMS_CAP,BLOCK_FAN_IN1. The group partition is in the statement
What. The streamed prover packs tables into groups in the order their chunks complete. It writes the partition (per group, its tables' indices) into the statement. The transcript absorbs it before any root.
Verifier. The verifier checks:
It then rebuilds every group's stack layout itself.
Security. Proven bits are unchanged.
BLOCK_MAX_TABLE_VARS(change 3), so no partition can make a chain taller than 2^27.Proof bytes vary from run to run. Arrival order depends on thread timing, and the hash-ordered tables' row order (LT, EQ, BYTEWISE, BRANCH, MUL, DVRM) follows a hash state that is random per process. Mauro, 10-02: "the proof not having the same bytes it's fine, they never had the same bytes anyways".
LAMBDA_VM_FIXED_TRACE_HASH=1(fixed hash keys) andLAMBDA_VM_DETERMINISTIC_GRIND=1. Under both, two processes prove the same bytes (FAST 423).2. Prepared openings, one stack per group (approved by Mauro, 10-02: "it's a standard technique, go ahead")
In short. This is #1010's existing prepared DECODE opening, carried into the block format. It is extended to the dense genesis pages and stacked per group.
What. The recursion guest cannot evaluate DECODE's five 2^20 preprocessed columns, nor the dense genesis pages (millions of rows), on its own. So each group's prepared tables (DECODE and the dense genesis pages chosen by
genesis_stack_plan) have their leading preprocessed columns stacked into one commitment.verify_block_whir, andverify_block_tree's plan. The prover's own roots only shortcut the prover's side.z.Negatives, on a guest with two dense genesis pages. Each is refused by the host verifier and by the recursion leaf, and admitted when the openings are skipped (the mutation):
Wrongly committed stacks are refused at the roots block: two pages swapped, a page holding another page's columns, another program's DECODE.
Cost. One stack per group costs +0.14 s of base (FAST 419; one commitment per table cost +0.49 s) and saves 0.57 s of recursion, by taking 90 k permutations out of the leaves.
BlockFormat::prepared = falseturns the openings off, for measurement only.3. ECDAS split; table heights capped
What.
split_ecdas).(round, op).Why. At a median block, one ECDAS table (2^19) argues on a 12 GiB tree. At p90 (2^20) it stacks into five polynomials on a 24 GiB tree.
Gates. FAST 534 and 535: the negatives, 3 mutations caught.
4. Recursion leaf: the leaf cap (G3) and the inverse share (W1)
LEAF_PERMS_CAP. With no fixed leaf count, it adds leaves while the heaviest leaf is over the cap. The block's own partition is unchanged.p · ediv(1, q), which has no satisfying assignment for q = 0 whatever p is. The formerediv(p, q)left the share free at p = q = 0 (≈ 2^-160 under GKR soundness).LFM_WHIR_SHARE_INVERSE=0keeps the former form.5. Batched argue, on by default since d9d0ac5 (
BlockFormat::argue = ArgueFormat::BATCHED; Mauro, 10-02: "batch the constraints")What. Each group's tables are argued together on the group's fork:
Verifier side. The verifier derives the bins from the statement's shapes and its own cap; the variant is never read from the proof. The proof carries one
BatchedArgueper group inBlockWhirProof.argues, andproof.tablesis empty under this format. The recursion leaves verify the same format (lane i-batch2, N-4).Security at the block's measured inputs (D-BATCH §3.2's formulas; re-checked at FAST 424's inputs: |T| ≤ 60 tables a group, ≤ 51 trees a bin, ≤ 2^28.87 input cells, bus messages ≤ 204 elements, N_C ≤ 413, D_max 4, n ≤ 21; L = 300):
Every term is above the WHIR phase, so the proof minimum is unchanged: 128.946 under the campaign accounting (130.393 for the WHIR fold under the calculator of record).
Measured.
The knob.
ArgueFormat::PerTable(one argument per table, the format before) stays measurable, withBLOCK_WHIR_ARGUE=per-tablein the real-block tests. At the per-table format, the MultiProof, the prepared openings and the partition are digest-equal to the head before the batched merge (BIG 393).6. KECCAK and ECSM split; their heights capped (the port of #1013's S0a; landed at 3cfffe2; approved by the lead under Mauro's any-block target, Mauro to confirm)
What.
split_keccak,split_ecsm), as ECDAS is at 2^17.Why. A keccak-heavy block at the gas limit makes about 2^21 permutation calls. One KECCAK table that tall stacks into eight polynomials of 2^27, against a group budget of three. At its cap each table fits one polynomial.
Bytes. Every block measured so far has KECCAK ≤ 2^17 rows and ECSM ≤ 2^11, so it builds the same tables and the same proof (FAST 830: digest 07d1bd43… unchanged on block 25368371).
Gates. FAST 830: KECCAK and ECSM forced into 4 tables each on block 25368371 prove and verify, base and tree; the count and height negatives; mutation C caught.
7. WHIR grinding 20 → 18 bits, queries 112 → 114 (landed at cbfa7d7; approved by Mauro, 10-05)
What.
Each WHIR chain grinds 18 bits instead of 20 before each round's queries, and opens 114 queries instead of 112 to buy the two bits back. At every block height (15 to 27 variables) Q =
num_queries(2, rounds, 128, 18).One site,
multilinear_prove::chain_config_under. Every side of the block reaches it throughBlockFormat::chain_config:verify_block_whir;The statement absorbs Q and the grind bits.
Scope: the block's WHIR proofs only. The recursion tree's own leaf, node and top proofs are STARK proofs (FRI) and keep their own grind.
It ports WHIR recursion on GPU (RPX) with ZisK-style proof formats: block 25368371 in 32.62 s #1010's grind 18 (landed there at 2687e48). Opt-out:
LAMBDA_VM_ZF_WHIR_GRIND_BITS=20, which reproduces the previous proofs byte for byte.Security. The calculator of record: Johnson bound, η = 1/300, the fold proof of work unground.
Measured behind the knob, on c55dec4, one binary per box:
Bytes. The proof bytes change. Under the fixed trace hash and deterministic grind, the 1× top proof's digest is b9b4826d… at the default and 0da6fea9… under
=20. Both trees are accepted (ULTRA 015, at this head).Known limit. The leaf cap (279,000 permutations) sits above 2^18 LFM_HASH rows, and 18 bits moves every leaf about 1.7 % closer to that doubling.
Gates.
zf_format::; the chain refusals and the legacy-bytes KAT; the pins the flip moved; the host block refusal.One-binary A/B: the block tree vs #1010's epoch tree (FAST 416, noepoch/whir @ 454dad6)
Eight arms E B B E E B B E on the same binary (md5 checked after every arm):
Base, block 25368371 on FAST (each run against #1010's epoch base on the same binary)
Recursion (W3): proved and verified on block 25368371 (FAST 413)
lfm::whir_block::WhirBlockPlan) runs the host verifier's own statement checks, derives every shape from the AIR and every prepared root from the program, and never reads a proof. It prices each group in permutations and partitions the groups over the leaves (heaviest first, onto the least-loaded leaf).block_node, shared byte for byte with STARK no-epoch (prove-and-retire) prover: block 25368371 — work in progress #1013). They check the id, the state and the output equal across children, add the shares, and the top asserts zero.verify_block_tree(elf, statement, top)derives the top program and checks the top proof against it. Every preset is pinned inside: the base's options, the block format, the tree's options, the leaf rule and the fan-in.Every proof was verified by the harness off the clock. The base is unchanged by the emission running beside phase B (20.98 s vs 21.18 s in the arms without the change).
Next:
Base levers after the A/B (FAST 417–422, each S/P on one binary)
Memory (D-MEMORY, with i-mem / i-mem2)
drop_streamed_ops)layout_ahead, D-EXEC)Narrow trace storage (M4, lane i-m4)
Prover-only; the proof bytes are the same. The proof digest equals the head's before M4 (07d1bd43…) under the fixed trace hash + deterministic grind (FAST 820).
BlockOptions::narrow, productionNarrowing::CARD).Max RSS, wide → narrow (BIG 560; the traces themselves shrink about 4×, e.g. 24.89 → 6.20 GiB at 1×):
Before M4, #1014 ran out of memory at 3.03× (i-m4); the narrow line puts the 120.7 GiB edge near 5.5–6×.
Phase A uploads the next group beside the commit (3′, lane i-noepoch-w2)
Prover-only; the proof bytes are the same (digest 07d1bd43… at the default, FAST 832; the commits, their order and their bytes are unchanged).
BlockOptions::upload_ahead, on by default;BLOCK_WHIR_UPLOAD_AHEAD=0is the control).Streamed chunks laid out on three threads (E3 on by default, lane i-noepoch-w2)
Prover-only; the proof bytes are the same (digest 07d1bd43… at the default, FAST 838 and 835; the groups, their order and the packing are unchanged).
layout_workers0 → 3 inBlockOptions::production(59e9890). The streamed chunks are laid out on three threads, with at most K + 1 = 3 of them unpacked at a time (layout_ahead, E3), instead of on the builder's one layout thread.BLOCK_WHIR_LAYOUT_WORKERS=0(the inline layout, 01da99f's) is the control.Phase B's kept-top paths re-hashed in parallel (lever 1, lane i-noepoch-w2)
Prover-only; the proof bytes are the same (digest 07d1bd43… at the default, FAST 840 at 733557a — 82f9046 adds only the knob; the paths, their order and the refusal are unchanged).
BLOCK_WHIR_REHASH_SERIAL=1restores the serial re-hash (a measurement knob).BLOCK OPEN SPLIT(withLAMBDA_VM_BASE_SPLIT=1), phase B's openings by host stage and the kept-top gather and re-hash seconds.The tree's leaves execute while their artifacts are built (R2-i, lane i-noepoch-w2)
Prover-only; the proofs are the same (the top proof's digest equal with and without it, 0da6fea9…, under the fixed trace hash + deterministic grind, FAST 841).
prove_tree_pipelined, the way a prover would run it; there is no production tree driver yet). Its level 0 built all three leaves' artifacts first (three serial card holds, 0.24 s at 1×) and only then let the leaves execute and fill their traces (0.46 s until the first was ready) while the card sat idle (nsys timeline, FAST 839). Execution and fill do not read the artifacts; only the prove does.lfm_proveis now cut into its host half (lfm_execute_and_fill) and its card half (LfmFilled::prove, which asserts the artifacts' hasher is the one the traces were filled for), in the same order; the harness builds the artifacts on a thread of their own and each leaf executes and fills beside them, waiting for its artifacts only to prove.W3_EXEC_BESIDE_ARTIFACTS=0is the control (the order before).A second whole-block field. The W3 readout prints, on the clock between the base and the tree, the block report, a second block frame for the LT heights and the group tables: 0.13–0.14 s at 1× that a prover would not spend. "Whole block" keeps its meaning (every number above includes them); from d169edd on,
W3 RECURSIONalso prints "whole excl. harness readouts" beside it (at d169edd, FAST 841 + 842 pooled: whole 18.54 s, whole excl. harness readouts 18.40 s).The rest laid out in waves; KECCAK_RND built as its tables (W, lane i-m4b)
Prover-only; the proof bytes are the same (digest 07d1bd43… under the fixed trace hash + deterministic grind: FAST 854 at 0bcc1fc, and FAST 855's W arm on this head's code).
BlockOptions::rest_layout_bytes). The tables, their order and the groups are the same (test).split_keccak_rndthen copied into its 2^16-row tables. At 4.13× that copy was a second peak of the same height. The finish now builds the 2^16-row tables directly (BlockOptions::finish_keccak_rnd_chunks), the same tables as the split's (test), and hands none out during the windows, which would change the groups.BLOCK_WHIR_REST_LAYOUT=allandBLOCK_WHIR_KR_FINISH_CHUNKS=0restore the old behaviour.pack_rest_as_laid_out) was re-measured with the waves: no gain (+0.01 s), so it stays off.LAMBDA_VM_BLOCK_MEMLOG=1(off by default). It prints the host memory term by term every half second and at each phase mark, with the line at jemalloc's active peak and each arena's bytes (those two in the lib tests, which install jemalloc).BLOCK REST TABLES(each rest table's layout end and group) and each group's commit start (from@).The tree's first finished leaf executes during phase B (R2-ii, lane i-noepoch-w2)
Prover-only; the proofs are the same (base digest 07d1bd43… and the top proof's digest equal with and without it, 0da6fea9… — FAST 841's — under the fixed trace hash + deterministic grind: FAST 845, and FAST 847 again on fac261f, the merge with W).
block_prove_on_forks_observed; the old entry point passes a no-op, and the proof is the same with any observer). A leaf's arena is built from its groups' words alone (group_arena_words+leaf_arena;block_leaf_arenais built from them). The W3 harness turns the groups into words as they arrive; the first leaf whose groups are all opened while another group is still to come (leaf 0 = groups 1, 5, 6 at 1×, done after group 6) executes and fills its traces on a thread of its own, about 1.5 s before the base ends, and the tree picks it up. Off the clock its arena is checked against the finished proof's.W3_LEAF_DURING_PHASE_B=0is the control.The finish's tables packed as they are built (b2, lane i-m4b)
Prover-only; the proof bytes are the same (digest 07d1bd43… under the fixed trace hash + deterministic grind at both arms: FAST 855 at 0cebe16, and FAST 857 again on 365e3ab, the merge with R2-ii).
BlockOptions::pack_finished). KECCAK_RND is packed in waves of four 2^16-row tables. Phase A takes those tables as narrow columns and uploads them as they are, so the card packs only the groups' other tables. Nothing packed is transposed.BLOCK REST PACKEDcounts the rest: 187 of 191 tables at 4.13×).BLOCK_WHIR_PACK_FINISHED=0restores W.Measurement posture: the card's pool now retains freed memory (baseline shift)
Not a prover change; the proofs are the same (the top proof's digest 0da6fea9… under both postures, fixed trace hash + deterministic grind, FAST 848; 351a773 adds only a test readout).
LAMBDA_VM_MEMPOOL_RELEASE_MB=0. The card's stream-ordered memory pool then hands its freed blocks back to the driver at each synchronize, so a VRAM sampler's total − free reads the live working set. The code default is to retain every freed block (DEFAULT_MEMPOOL_RELEASE_THRESHOLD_BYTES = u64::MAXin math-cuda), and that is what a prover runs.cuStreamSynchronizeandcuMemAllocAsyncwhile the card was idle was ≈ 0.25 s in phase A, 0.42 s in phase B (0.26 s of it in the encode: one 18–33 ms gap per group) and 0.34 s in the tree.W3 DEVICEline).The prover refuses a partition over the group maximum (lane i-m4b)
Prover-only; the proof bytes are the same (digest 07d1bd43…, FAST 858). The prover now refuses a block over
BlockFormat::max_groupsas its groups close, with the verifier's ownInvalidTableCountserror, instead of proving a block the verifier refuses. The median block (90 groups against the cap of 64) spent its whole ≈ 190 s base on such a proof (BIG 564). A test covers both prover paths, with a mutation for each check.The tree's nodes built beside it, each level proving as its nodes arrive (A, lane i-noepoch-w2)
Prover-only (the W3 harness); the proofs are the same (the top proof's digest 0da6fea9… — FAST 841's — with and without it, under the fixed trace hash + deterministic grind: FAST 889, and FAST 891 again after the permit fix below).
prove_tree_pipelined) built every node program and its artifacts on one thread, level after level, and level 0 joined that thread before any node proved, so level 1 waited for the whole tree's builds. At the median block, 32 s of serial node builds after the leaves' artifacts held level 0 open 10.7 s past its last leaf proof, and the card sat idle 11.4 s before level 1 (BIG 565 / 568's card trace). At 2.66× the wait was 1.5–2.1 s (FAST 888).W3_EMIT_THREADSthreads (default 4, the builder's own: on the global pool a prover's join can steal an emission and leave the card idle, STARK no-epoch (prove-and-retire) prover: block 25368371 — work in progress #1013's FAST 454), and the builder's thread builds each one's artifacts as it arrives. Each node proves once its children are proved and its slot is filled. A builder that stops fails every empty slot.W3_NODE_PIPE=0is the control.Published<T>serves as the slot; there is no per-group early emission (W3 builds every leaf's artifacts up front, so a level's programs are emitted together); and there is no host-only thread marking (WHIR no-epoch (prove-and-retire) prover: block 25368371 — work in progress #1014 has none).build_levels, an emit on the pool and a finish on the builder's thread). A toy tree at the median's shape puts the serial builder's programs in their slots whatever order a pool finishes them in, and finishes every node off the rayon workers (test; finishing on a worker, or publishing in arrival order, fails it). A failed build fails every slot above it without a hang (test).WhirBlockPlan::programsbuilds as rayon jobs.W3_NODE_TIMES=1(off by default). It prints, per program, when it was built, taken and proved; its prove's split (execute, fill, the prove net of the card wait, the wait); and each node level's start against the level below. The stamps are taken either way and cost a handful ofInstantreads.prove_tree_pipelinedis its de-facto driver. With the slots it now has a driver's shape: leaves from phase B, nodes from slots, levels as their nodes and children arrive. Moving it out of the test harness is a landing item for STARK no-epoch (prove-and-retire) prover: block 25368371 — work in progress #1013 and WHIR no-epoch (prove-and-retire) prover: block 25368371 — work in progress #1014 both.Each node proved as soon as its own children are (C, lane i-noepoch-w2)
Prover-only (the W3 harness); the proofs are the same (the 1× top proof's digest with and without it, under the fixed trace hash + deterministic grind, both trees accepted: 0da6fea9…, BIG 614 — the digest FAST 841 / 889 / 891 printed).
siblingsworkers proves every program of the tree, leaves and nodes, taking them in topological order (the leaves, then each node level) and publishing each proof into a slot of its own. A node waits only for its own children's slots, so it executes, fills and proves while the rest of the level below still proves.W3_DATAFLOW=0is the control: each node waits for its whole level below (tested never to start early).W3 LEVELwall now runs from the level below's last proof to its own.The held tables spill to disk, by default only when memory is short (lane i-m4b)
Prover-only; the proof bytes are the same: one shape and one proof digest (07d1bd43…) across the base and all four policies, under the fixed trace hash + deterministic grind (BIG 616). The 1× top proof's digest (0da6fea9…) and the tree verify at the landed merge (ULTRA 006).
crypto/stark/src/spill.rs) is imported byte-identical; it digests each slot and writes it with O_DIRECT on a writer thread, off the committer's path. A table moves only when the writer's queue has room at that moment, so the committer never waits.SpillFailed). After a group's opening its packed columns are let go.LAMBDA_VM_BLOCK_SPILL=auto(the default) |off|always|<GiB>(a resident budget).autospills a table when the host's bytes plus a reserve plus the table would pass the target.LAMBDA_VM_BLOCK_SPILL_TARGET_GIB, else min(the cgroup's limit, v2 or v1;MemTotal) − 10 GiB.BLOCK SPILLprints the policy, the slots and bytes, the writer's split, the read-back, and the largest host readingautodecided on.always(BIG 566, single runs): 22.74 GiB spilled, max RSS 52.53 → 40.12 GiB, whole block +1.15 s, drivers waited 0 s.auto(BIG 567): by default nothing spills (target 110.7 GiB). Under a 35 GiB target it spills 21.21 GiB, max RSS 41.04 GiB, +2.91 s.autospilled 26.98 GiB from group 44 of 90, and the tree verified.auto, O =off, S =always, T =autoat a 47.5 GiB target):autorun spilled 0 in both jobs, at 110.7 GiB and under the 47.5 GiB target (FAST's limit, kept as a real test on BIG's 128 GiB; the host read 25.3–26.8 GiB across those runs);alwaysandautoat 0 spilled within noise.autospilled 0 (host at most 27.65 GiB).Phase 4 counts the BITWISE lookups in slices (#1013's c369843, lane i-m4b)
Prover-only; the bytes are the same:
What changes:
LAMBDA_VM_P4_SLICED=0keeps the whole-source collectors. The knob is WHIR no-epoch (prove-and-retire) prover: block 25368371 — work in progress #1014's only, for the A/B.Measured: the median, BIG 619. One binary on the cap-128 exploration head, N P P N,
autospill on. N runs the whole-source path, P the slices.auto)autospills only once memory is short.The top executes each child's share as that child is proved, while a child is still unproved (B and B′, lane i-noepoch-w2)
Prover-only (the W3 harness and the LFM executor); the proofs are the same. The 1× top digest is 0da6fea9… with the streamed top on and off, under the fixed trace hash + deterministic grind, and both trees are accepted (BIG 617; ULTRA 008 and 009; ULTRA 011 at c55dec4 itself).
executor::StreamedExecutionruns an execution as its arena groups land: each instruction runs in the wave in which the last group it reads lands (each instruction's group set comes from one forward pass), in the level schedule's order, into the slot the schedule gives it. So the witness isexecute's, word for word.finishchecks that every instruction ran once. Dropping the group propagation (ReadBeforeWrite) or re-running instructions across waves (DoubleWrite) fails them.W3_STREAM_TOP, on by default), so only the last child's share and the fill remain after the last child.W3 TOP EXECUTEprints which. A test covers a program ready before the last child (streamed), after it (whole), and a failed child (whole, which then reports the failure). Inverting the predicate fails the test.A node executes from its program; only its prove waits for its artifacts (b′, lane i-noepoch-w2)
Prover-only (the W3 harness); the proofs are the same: the 1× top digest is 0da6fea9… with
W3_EXEC_EARLYon and off, under the fixed trace hash + deterministic grind, and both trees are accepted (ULTRA 012; ULTRA 013 at 806c211 itself).node_flow). The traces are filled under the block hasher, which the node artifacts are built for. The top's streaming choice (B′) is taken when the top can execute.W3_EXEC_EARLY=0is the control.LfmProveError::HasherMismatch, naming both) instead of failing a release assert, and the streamed execution's finish returns an error instead of asserting its public words' capacity. Each has a test and a mutation.