Skip to content

Fix: Constrain table multiplicities - #1016

Draft
nicole-graus wants to merge 5 commits into
mainfrom
fix/multiplicity-soundness
Draft

nicole-graus wants to merge 5 commits into
mainfrom
fix/multiplicity-soundness

Conversation

@nicole-graus

Copy link
Copy Markdown
Collaborator

Motivation

Several AIR tables leave their multiplicity column μ unconstrained. Since μ lives in the field, it can be set to −1, which flips a row's role on the bus: it starts receiving its range checks instead of sending them. This is exploitable: each bug below is proven end-to-end by a test where the verifier accepts a false statement against an unmodified ELF:

Description

Two fix shapes, by whether the table deduplicates repeated rows:

  • MUL, DVRM, LT, BRANCH: keep dedup and bound μ by sending IS_HALF[μ] with multiplicity μ, forcing μ ∈ [0, 2^16). Rows whose count exceeds 2^16−1 are split (dedup_*_rows), and the BITWISE collector counts the new lookup over the same rows.
  • SHIFT, LOAD: add a boolean constraint μ·(1−μ)=0 (plus zbs·(1−zbs)=0 for SHIFT).

Note: the first bound soundness relies on no other table emitting an out-of-range halfword with +1, the same assumption every range check already makes. mul_mu_carrier_poc.rs documents this explicitly.

@nicole-graus

Copy link
Copy Markdown
Collaborator Author

/bench

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Benchmark — real block (ethrex_mainnet_25368371.bin) (median of 3)

continuations · epoch 2^22 · 8 epochs

Metric main PR Δ
Peak heap 48142 MB 46624 MB -1518 MB (-3.2%) ⚪
Prove time 109.853s 102.464s -7.389s (-6.7%) 🟢

❓ -6.7% — beyond what 3 runs resolve. Use /bench-abba for a paired test of the same block (default 12 pairs, ~72 min, resolves ~1%).

Prove-time spread 1.1% (102.464s / 101.989s / 103.125s)

Commit: 4dd1ee5 · Baseline: cached · Runner: self-hosted bench

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant