Skip to content

apollo_batcher: route commitment through read_paths_and_commit_block under os_input#14392

Open
yoavGrs wants to merge 1 commit into
apollo_batcher_persist_accessed_keysfrom
apollo_batcher_route_read_paths_and_commit
Open

apollo_batcher: route commitment through read_paths_and_commit_block under os_input#14392
yoavGrs wants to merge 1 commit into
apollo_batcher_persist_accessed_keysfrom
apollo_batcher_route_read_paths_and_commit

Conversation

@yoavGrs

@yoavGrs yoavGrs commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

decision_reached passes the block's persisted accessed keys to the commitment
manager, which then issues ReadPathsAndCommitBlock instead of CommitBlock.
Blocks without accessed keys (synced blocks, catch-up of heights with no
persisted keys) fall back to CommitBlock. The returned Patricia witnesses are
not stored yet.

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

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

…under os_input

decision_reached passes the block's persisted accessed keys to the commitment
manager, which then issues ReadPathsAndCommitBlock instead of CommitBlock.
Blocks without accessed keys (synced blocks, catch-up of heights with no
persisted keys) fall back to CommitBlock. The returned Patricia witnesses are
not stored yet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@yoavGrs yoavGrs force-pushed the apollo_batcher_persist_accessed_keys branch from e5f464f to ef431b3 Compare June 8, 2026 07:13
@yoavGrs yoavGrs force-pushed the apollo_batcher_route_read_paths_and_commit branch from d28b7d4 to b07e452 Compare June 8, 2026 07:13
@yoavGrs yoavGrs marked this pull request as ready for review June 8, 2026 07:14
@cursor

cursor Bot commented Jun 8, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes the state-committer path for locally executed blocks and restart catch-up; wrong routing could skip witnesses or call the wrong RPC, though fallbacks and a dedicated test limit regression risk.

Overview
With os_input, block commitment no longer always uses CommitBlock. The batcher passes optional accessed keys into the commitment manager, which chooses ReadPathsAndCommitBlock (Patricia witness fetch) when keys are present and CommitBlock when they are not.

decision_reached persists accessed keys from local execution and forwards them into the commitment task. Synced blocks pass None because they were not executed locally. Catch-up reloads accessed keys from storage per height and uses the same routing.

Metrics and logging use the actual commit task type. Tests and mocks were updated; a new test asserts catch-up without stored keys never calls read_paths_and_commit_block. Patricia proofs from the committer are not persisted in this PR. ContractsTrieProof is re-exported from storage for test helpers.

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

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