Skip to content

starknet_committer: read in parallel for supported storages#12169

Closed
nimrod-starkware wants to merge 1 commit intographite-base/12169from
nimrod/parallel-reads/read-in-parallel-for-async-storage
Closed

starknet_committer: read in parallel for supported storages#12169
nimrod-starkware wants to merge 1 commit intographite-base/12169from
nimrod/parallel-reads/read-in-parallel-for-async-storage

Conversation

@nimrod-starkware
Copy link
Contributor

@nimrod-starkware nimrod-starkware commented Feb 1, 2026

Note

Medium Risk
Introduces conditional parallelism in trie reads; while it’s read-only, concurrency can surface latent thread-safety/ordering issues in specific storage implementations and may change performance characteristics.

Overview
create_storage_tries now conditionally builds per-contract storage trie skeletons concurrently when the underlying Storage exposes an async-capable instance via get_async_self(), falling back to the existing sequential path otherwise.

This refactors create_storage_tries_concurrently to accept a Storage reference (dropping the explicit AsyncStorage bound and previous cloning) while keeping the same skeleton-tree construction behavior for each modified contract.

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

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

nimrod-starkware commented Feb 1, 2026

@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/spawn-blocking-reads branch from d0eb009 to f0d1e7b Compare February 1, 2026 10:41
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/read-in-parallel-for-async-storage branch from 2362ae3 to a8bcf52 Compare February 1, 2026 10:41
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/spawn-blocking-reads branch from f0d1e7b to a92bc6a Compare February 1, 2026 11:19
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/read-in-parallel-for-async-storage branch from a8bcf52 to 1d1a202 Compare February 1, 2026 11:19
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/read-in-parallel-for-async-storage branch from 1d1a202 to 8c34bc5 Compare February 2, 2026 08:36
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/spawn-blocking-reads branch from a92bc6a to 115e961 Compare February 2, 2026 08:36
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/spawn-blocking-reads branch from 115e961 to 81de56c Compare February 3, 2026 13:08
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/read-in-parallel-for-async-storage branch 2 times, most recently from 0521001 to 7e803af Compare February 3, 2026 14:59
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/spawn-blocking-reads branch from 81de56c to 1e672eb Compare February 3, 2026 14:59
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/spawn-blocking-reads branch from 1e672eb to 2bc269b Compare February 3, 2026 15:30
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/read-in-parallel-for-async-storage branch from 7e803af to 0240fc1 Compare February 3, 2026 15:30
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/read-in-parallel-for-async-storage branch from 0240fc1 to dc77a13 Compare February 4, 2026 11:51
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/spawn-blocking-reads branch from 2a9b1e6 to e946d20 Compare February 5, 2026 08:27
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/read-in-parallel-for-async-storage branch 2 times, most recently from 8586da9 to c9cbe45 Compare February 9, 2026 14:27
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/spawn-blocking-reads branch from e946d20 to 8437fca Compare February 9, 2026 14:27
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/spawn-blocking-reads branch from 8437fca to 558c573 Compare February 9, 2026 15:13
@nimrod-starkware nimrod-starkware force-pushed the nimrod/parallel-reads/read-in-parallel-for-async-storage branch from c9cbe45 to 4391b31 Compare February 9, 2026 15:13
Copy link

@cursor cursor bot left a comment

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.

config,
storage_tries_sorted_indices,
)
.await
Copy link

Choose a reason for hiding this comment

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

Dead code annotation remains after function becomes used

Low Severity

This change starts calling create_storage_tries_concurrently, but the function definition at lines 481-482 still has #[allow(dead_code)] with a TODO comment saying "Remove the allow(dead_code) once we use this function." Since the function is now used, this annotation and its accompanying TODO comment are now stale and potentially confusing to future developers.

Fix in Cursor Fix in Web

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments