Skip to content

apollo_storage,apollo_batcher_types,apollo_batcher: add commitment infos height offset query - #14894

Closed
yoavGrs wants to merge 1 commit into
mainfrom
cende-delta-5-batcher-offset-query
Closed

apollo_storage,apollo_batcher_types,apollo_batcher: add commitment infos height offset query#14894
yoavGrs wants to merge 1 commit into
mainfrom
cende-delta-5-batcher-offset-query

Conversation

@yoavGrs

@yoavGrs yoavGrs commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Expose the batcher's state commitment infos height offset (one past the
latest stored height, None when nothing is stored), backed by a storage
cursor over the state_commitment_infos table.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

…fos height offset query

Expose the batcher's state commitment infos height offset (one past the
latest stored height, None when nothing is stored), backed by a storage
cursor over the state_commitment_infos table.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

yoavGrs commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Additive, read-only query behind os_input with unit tests; no changes to commit or revert write paths beyond the new reader.

Overview
Adds a read-only way to learn how far state commitment infos are stored for OS input: the value is one past the latest block with stored infos, or None when the table is empty.

Storage implements get_state_commitment_infos_height_offset by scanning the state_commitment_infos table with a cursor (lower_bound / prev) and returning latest_block_number.unchecked_next(). Tests cover empty storage, multiple appends, and offset moving back after revert.

Batcher exposes the same through BatcherStorageReader, a batcher handler, and the full client RPC path (GetStateCommitmentInfosHeightOffset request/response and get_state_commitment_infos_height_offset on BatcherClient). All of this is gated on the os_input feature, alongside the existing per-block get_state_commitment_infos API.

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

@github-actions

Copy link
Copy Markdown

Artifacts upload workflows:

@yoavGrs yoavGrs closed this Jul 30, 2026
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.

2 participants