spec: Move to the epoch system#642
Conversation
Codex Code ReviewFindings Low: spec/streaming.typ has an unfinished sentence in the No security vulnerabilities, VM behavior bugs, or significant performance issues found in the PR diff. The changes are documentation-only. I could not run a Typst/Shiroa build because neither |
|
|
||
| To distribute this workload across worker nodes or multiple GPUs, it is possible to "send off" | ||
| each batch of tables being retired to the next available worker. | ||
| With some care, it is likely possible to decouple the Fiat-Shamir challenges of multiple retirement batches, |
There was a problem hiding this comment.
Medium — Cryptographic soundness concern: Decoupling Fiat-Shamir challenges across retirement batches is non-trivial. If batches can derive challenges before all prior commitments from other concurrent batches are fixed, an adversary might be able to adaptively choose table contents in a later batch based on a challenge sampled by an earlier one, breaking the soundness reduction.
Before this claim is carried into implementation it should either:
- Reference a known-safe technique (e.g. parallel composition with independent random oracles, a random beacon, etc.), or
- Precisely define what "decouple" means here and argue why cross-batch influence is impossible given the ordering constraints.
There was a problem hiding this comment.
The underlying idea is that the randomizer for a batch depends on the batch itself, so any offset elsewhere will be randomized with a different challenge
| all table-to-table interactions can be proven within a single epoch. | ||
|
|
||
| To deal with cross-epoch memory, we introduce a "local-to-global" table per epoch that, in essence, | ||
| is an epoch-local memory initialiation and finalization mechanism. |
There was a problem hiding this comment.
Bug (editorial) + Medium — Soundness gap:
- Typo: "initialiation" → "initialization".
- The spec does not state what prevents the same address from appearing in more than one epoch's initialization segment simultaneously. If a malicious prover can claim a memory cell is "initialized" (with an arbitrary value) in two different epochs' local-to-global tables, it could forge values. The spec should explicitly state the constraint that enforces each address has at most one initialization across all epochs, and reference how this ties into the global LogUp token balance in
memory.typ.
There was a problem hiding this comment.
2 is clearly enforced by the global memory LogUp described by the approach
Review SummaryThis is a pure specification document (no code changes). Findings are focused on correctness of the prose and cryptographic protocol descriptions. Editorial (fix before merging)
Medium - Cryptographic soundness (address before implementation)
No Rust code, unsafe blocks, or cryptographic implementations were changed. |
Co-authored-by: Erik <159244975+erik-3milabs@users.noreply.github.com>
4d68669 to
e8e1791
Compare
|
/ai-review |
AI ReviewPR #642 · 24 changed files FindingsNo non-rejected structured findings were reported. Reviewer Lanes
Native Codex and Claude reviews run separately and post their own comments. They are not included in this structured provenance report. Raw lane outputs, candidates, final issues, and model metrics are uploaded as workflow artifacts. |
Codex Code ReviewFindings
I did not run builds or tests, per the review constraints. |
| label = "Timestamp" | ||
| subtypes = ["DWordWL"] | ||
| subtypes = ["Word"] | ||
| desc = "A preprocessed column holding timestamps as `DWordWL`. Row `i` of the column contains the value $2^2 dot (i + 1)$. Used in the CPU chip (@cpu), see there for more details about the magic number." |
There was a problem hiding this comment.
Stale description: subtypes is now Word, but the desc still says "holding timestamps as DWordWL". Update the text to Word so it matches the type (this PR moves all timestamps to single-limb Word).
Spec review — epoch systemReviewed the diff (Typst + TOML chip definitions). This is a well-structured formalization of the epoch-based proving system. The move to single-limb A few consistency issues, none blocking: Medium
Low
Nit / question
Note: I could not build the Typst (blocked/no network), so the new |
cdesaintguilhem
left a comment
There was a problem hiding this comment.
The big changes look good to me. I notice the text still mentions 3 for the domain separator value for commitment values whereas other parts use 2. Also, I spotted a typo.
Co-authored-by: Cyprien de Saint Guilhem <c.desaintguilhem@gmail.com> Co-authored-by: Robin Jadoul <robin.jadoul@gmail.com>
After initial discussion, the choice was made for epoch-based proving, so this PR now formalizes this.
Additionally, it deals with the integration of COMMIT into this new paradigm by use of memory domain separation.
Since epochs are short, we can also reduce the surface area everywhere by only using
Wordvariables for timestamps. This leaves open potential optimizations in MEMW where now only single-limb values need to be compared.