apollo_batcher: cache recent state commitment infos in memory - #15066
apollo_batcher: cache recent state commitment infos in memory#15066yoavGrs wants to merge 1 commit into
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryLow Risk Overview Commitment manager: Populates the cache when commitment results are written to storage; removes the entry for a block when a revert completes. Batcher API: Tests cover cache hits after Reviewed by Cursor Bugbot for commit 04d3215. Bugbot is set up for automated code reviews on this repo. Configure here. |
098f1f3 to
8aad038
Compare
itamar-starkware
left a comment
There was a problem hiding this comment.
@itamar-starkware made 1 comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on yoavGrs).
203fedc to
c888025
Compare
8aad038 to
b2dccee
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 b2dccee. Configure here.
| // Add commitment infos to cache. | ||
| if let Some(state_commitment_infos) = state_commitment_infos.clone() { | ||
| self.recent_state_commitment_infos_cache.put(height, state_commitment_infos); | ||
| } |
There was a problem hiding this comment.
Stale cache after block revert
Medium Severity
wait_for_revert_result pops the reverted height from recent_state_commitment_infos_cache, but write_commitment_results_to_storage then caches any still-pending commit for that same height. get_state_commitment_infos and has_state_commitment_infos then return that entry after storage has already dropped it.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit b2dccee. Configure here.
b2dccee to
04d3215
Compare
c888025 to
6cc7166
Compare
yoavGrs
left a comment
There was a problem hiding this comment.
@yoavGrs made 1 comment.
Reviewable status: 0 of 5 files reviewed, 2 unresolved discussions (waiting on itamar-starkware).



No description provided.