Skip to content

apollo_storage,apollo_batcher,apollo_reverts: remove state commitment infos from storage - #15068

Open
yoavGrs wants to merge 1 commit into
commitment-infos-3-committer-fallbackfrom
commitment-infos-4-remove-storage
Open

apollo_storage,apollo_batcher,apollo_reverts: remove state commitment infos from storage#15068
yoavGrs wants to merge 1 commit into
commitment-infos-3-committer-fallbackfrom
commitment-infos-4-remove-storage

Conversation

@yoavGrs

@yoavGrs yoavGrs commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

No description provided.

yoavGrs commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@yoavGrs
yoavGrs marked this pull request as ready for review August 27, 2026 14:45
@cursor

cursor Bot commented Aug 27, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes how OS-input commitment data is recovered across restarts (cache/committer only, not storage) and removes a storage table from the revert path; behavior for recent heights should match if the committer warm path works.

Overview
Removes durable storage for per-block OS state commitment infos (CompressedStateCommitmentInfos). The apollo_storage state_commitment_infos module, DB table, mmap file, and revert hook are deleted; apollo_storage no longer depends on starknet_committer.

The batcher still keeps commitment infos in its in-memory LRU (filled by commitment results and optionally warmed from the committer on startup via load_recent_state_commitment_infos). get_state_commitment_infos / has_state_commitment_infos no longer read from storage—they only reflect the cache. When global roots are written, set_global_root_and_block_hash no longer accepts or appends commitment blobs.

Types move to starknet_committer in apollo_batcher (and tests); mocks and commitment manager are updated for the slimmer storage writer API.

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

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Artifacts upload workflows:

@yoavGrs
yoavGrs force-pushed the commitment-infos-4-remove-storage branch from c7f4b7d to 79f86ce Compare August 27, 2026 14:56
@yoavGrs
yoavGrs force-pushed the commitment-infos-3-committer-fallback branch 2 times, most recently from 381d66f to ee9fd48 Compare August 30, 2026 11:15
@yoavGrs
yoavGrs force-pushed the commitment-infos-4-remove-storage branch from 79f86ce to 6eafd67 Compare August 30, 2026 11:15
@yoavGrs
yoavGrs force-pushed the commitment-infos-3-committer-fallback branch from ee9fd48 to b600bcf Compare August 30, 2026 11:20
@yoavGrs
yoavGrs force-pushed the commitment-infos-4-remove-storage branch from 6eafd67 to 4d9c466 Compare August 30, 2026 11:20

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4d9c466. Configure here.

error!("Failed to check state commitment infos existence in storage: {err}");
BatcherError::InternalError
})
Ok(self.commitment_manager.recent_state_commitment_infos_cache.contains(&block_number))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cache miss stalls commitment infos backfill

Medium Severity

get_state_commitment_infos and has_state_commitment_infos now return a cache miss as None/false for any height outside the in-memory LRU, including heights the committer still has. Consensus walks from the cende recorder offset and stops at the first missing height, so a recorder that lags past the cache window receives no infos at all, including heights that are still cached. Blob backfill then cannot catch up.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4d9c466. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It would organize the top 10 elements in the cache in some random order.
Saying block H is in place H-10. We can add up to 10 more elements to the cache before reading H.
So the cache size of 20 solves it.

@yoavGrs yoavGrs left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@yoavGrs made 1 comment.
Reviewable status: 0 of 13 files reviewed, 1 unresolved discussion (waiting on itamar-starkware).

error!("Failed to check state commitment infos existence in storage: {err}");
BatcherError::InternalError
})
Ok(self.commitment_manager.recent_state_commitment_infos_cache.contains(&block_number))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It would organize the top 10 elements in the cache in some random order.
Saying block H is in place H-10. We can add up to 10 more elements to the cache before reading H.
So the cache size of 20 solves it.

@yoavGrs
yoavGrs force-pushed the commitment-infos-4-remove-storage branch from 3ae5f21 to 5f01d2f Compare August 31, 2026 07:12
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