Skip to content

apollo_storage: add patricia_proofs table for OS-input witnesses#14382

Open
yoavGrs wants to merge 1 commit into
mainfrom
apollo_storage_patricia_proofs_table
Open

apollo_storage: add patricia_proofs table for OS-input witnesses#14382
yoavGrs wants to merge 1 commit into
mainfrom
apollo_storage_patricia_proofs_table

Conversation

@yoavGrs

@yoavGrs yoavGrs commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Mirrors the accessed_keys storage: a per-block table mapping BlockNumber to
a Patricia witness proofs payload (StarknetForestProofs), stored in an mmap
file. Gated behind the os_input feature. The batcher will use this to persist
the proofs returned by the committer's read_paths_and_commit_block endpoint.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Mirrors the accessed_keys storage: a per-block table mapping BlockNumber to
a Patricia witness proofs payload (StarknetForestProofs), stored in an mmap
file. Gated behind the os_input feature. The batcher will use this to persist
the proofs returned by the committer's read_paths_and_commit_block endpoint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Artifacts upload workflows:

@cursor

cursor Bot commented Jun 8, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Introduces new on-disk tables and mmap files for OS witness data; behavior is feature-gated and mirrors an existing pattern, but incorrect persistence could affect downstream OS/batcher consumers.

Overview
Adds per-block Patricia witness storage (StarknetForestProofs) for Starknet OS inputs, following the same design as accessed_keys: an MDBX table maps BlockNumber → mmap LocationInFile, with JSON + zstd serialization.

Under the os_input feature, wiring includes a new patricia_proofs DB table, patricia_proofs.dat mmap handler, OffsetKind::PatriciaProofs, and MAX_DBS raised to 27. starknet_committer is added as an optional dependency (with os_input feature alignment).

The new patricia_proofs module exposes get_patricia_proofs, append_patricia_proofs, and revert_patricia_proofs on StorageTxn, plus unit tests for round-trip, empty payloads, and revert/no-op behavior.

Reviewed by Cursor Bugbot for commit 17bf2cf. Bugbot is set up for automated code reviews on this repo. Configure here.

@yoavGrs yoavGrs self-assigned this Jun 8, 2026
@yoavGrs yoavGrs requested a review from itamar-starkware June 8, 2026 07:14
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.

3 participants