Skip to content

spec: Draft streaming prover approaches#642

Draft
RobinJadoul wants to merge 2 commits into
spec/mainfrom
spec/streaming
Draft

spec: Draft streaming prover approaches#642
RobinJadoul wants to merge 2 commits into
spec/mainfrom
spec/streaming

Conversation

@RobinJadoul
Copy link
Copy Markdown
Collaborator

The goal of this PR is to have a central place to discuss these options, so that we can potentially compare some implementation-based data and decide on which tradeoffs to go for.
The long-term goal is to pick a single approach and work that out properly in its own PR.

@RobinJadoul RobinJadoul self-assigned this Jun 2, 2026
@RobinJadoul RobinJadoul added the spec Updates and improvements to the spec document label Jun 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Codex Code Review

Findings

Low: spec/streaming.typ has an unfinished sentence in the LogUp re-execution bullet: “Again, this can be optimized for memory usage by only keeping”. This leaves the proposed proving flow ambiguous; finish or remove the sentence before merging.

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 typst nor shiroa is installed in this environment.

Comment thread spec/streaming.typ
Comment thread spec/streaming.typ Outdated
Comment thread spec/streaming.typ Outdated
Comment thread spec/streaming.typ

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,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread spec/streaming.typ Outdated
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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug (editorial) + Medium — Soundness gap:

  1. Typo: "initialiation" → "initialization".
  2. 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 is clearly enforced by the global memory LogUp described by the approach

@claude
Copy link
Copy Markdown

claude Bot commented Jun 2, 2026

Review Summary

This is a pure specification document (no code changes). Findings are focused on correctness of the prose and cryptographic protocol descriptions.

Editorial (fix before merging)

  • L17: Duplicate word (suggestion posted inline)
  • L21: Sentence starts lowercase (suggestion posted inline)
  • L36: Incomplete sentence cut off mid-thought; the optimization being described is unfinished
  • L60: Typo 'initialiation' should be 'initialization'

Medium - Cryptographic soundness (address before implementation)

  • L49 (Approach 1 - decoupled Fiat-Shamir): The claim that retirement-batch challenges can be decoupled without a soundness gap needs more precision. Concurrent batches sampling independent challenges while tables from other batches are still being built could allow adaptive influence across batches. Needs either a reference to a known-safe parallelism technique or an explicit argument that inter-batch influence is impossible given the protocol ordering.
  • L60 (Approach 2 - epoch double-initialization): The spec does not state what prevents a malicious prover from claiming the same address as initialized in two different epochs local-to-global tables simultaneously. Should explicitly reference the global LogUp token-balance constraint from the memory argument that enforces at-most-one initialization per address.

No Rust code, unsafe blocks, or cryptographic implementations were changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spec Updates and improvements to the spec document

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant