Skip to content

starknet_patricia_storage: cache reads with gatherable storage#13631

Open
nimrod-starkware wants to merge 1 commit intonimrod/parallel-reads/gatherable-storagefrom
nimrod/parallel-reads/gatherable-cached-storage
Open

starknet_patricia_storage: cache reads with gatherable storage#13631
nimrod-starkware wants to merge 1 commit intonimrod/parallel-reads/gatherable-storagefrom
nimrod/parallel-reads/gatherable-cached-storage

Conversation

@nimrod-starkware
Copy link
Copy Markdown
Contributor

@nimrod-starkware nimrod-starkware commented Mar 31, 2026

Note

Medium Risk
Changes caching behavior by seeding CachedStorage from concurrently gathered reads, which could impact performance/memory and cache correctness if assumptions about immutability/staleness are violated. Touches concurrency-related task execution plumbing but is scoped to read-path caching.

Overview
CachedStorage now participates in GatherableStorage and backfills its LRU from gathered reads. Running gather() on CachedStorage collects all key/value reads performed by concurrent StorageTasks (via run_tasks_and_collect_reads) and inserts them into the cache for subsequent lookups.

Separately, the default GatherableStorage::gather implementation was adjusted to call run_tasks_and_collect_reads(&*self, ...) and a comment typo was fixed.

Written by Cursor Bugbot for commit 9ab4585. This will update automatically on new commits. Configure here.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Contributor Author

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.
Learn more

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

@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/gatherable-cached-storage branch from fd2835b to 9ab4585 Compare March 31, 2026 15:48
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/gatherable-storage branch from d34f602 to 7ce467f Compare March 31, 2026 15:48
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