Skip to content

docs(shadow-prove): clarify version is read for logging only in calc_batch_pi#957

Merged
chengwenxi merged 1 commit into
feat/multi_batchfrom
docs/prover-shadow-version-comment
May 18, 2026
Merged

docs(shadow-prove): clarify version is read for logging only in calc_batch_pi#957
chengwenxi merged 1 commit into
feat/multi_batchfrom
docs/prover-shadow-version-comment

Conversation

@chengwenxi
Copy link
Copy Markdown
Collaborator

Summary

  • shadow_rollup::calc_batch_pi extracts version from the batch header but never branches on it, which looks inconsistent with the V2/non-V2 split in lib.rs and could be mistaken for a missing dispatch.
  • The public-input formula is in fact uniform across versions: offset 57 holds the blob input field (versioned hash for V0/V1, aggregated hash for V2) and the on-chain verifier uses the same layout. Version-dependent routing happens earlier via the batch_version request parameter.
  • Add a comment so maintainers don't need to reverse-engineer this from the header layout.
  • Addresses audit finding INFO-2 from the 2026-05-15 multi-blob audit (PR feat: multi blob #935).

Test plan

  • cargo check -p shadow-proving
  • Comment-only change; no behavior modified.

…batch_pi

`calc_batch_pi` extracts `version` from the batch header but never
branches on it, which looks inconsistent with the V2/non-V2 split in
`lib.rs` and could be mistaken for a missing dispatch. The public-input
formula is in fact uniform across versions: offset 57 holds the blob
input field (versioned hash for V0/V1, aggregated hash for V2) and the
on-chain verifier uses the same layout, while version-dependent routing
happens earlier via the `batch_version` request parameter. Add a
comment so maintainers don't need to reverse-engineer this from the
header layout.
@chengwenxi chengwenxi requested a review from a team as a code owner May 18, 2026 08:24
@chengwenxi chengwenxi requested review from tomatoishealthy and removed request for a team May 18, 2026 08:24
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 18, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5369a5e1-b7b6-43db-8949-fc4ca7b4ceba

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/prover-shadow-version-comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@chengwenxi chengwenxi merged commit ab5c916 into feat/multi_batch May 18, 2026
3 checks passed
@chengwenxi chengwenxi deleted the docs/prover-shadow-version-comment branch May 18, 2026 08:31
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