Skip to content

starknet_committer,apollo_committer: add timers for fetch patricia paths#14189

Open
ArielElp wants to merge 1 commit into
ariel/read_paths_and_commit_blockfrom
ariel/fetch_patricia_paths_timers
Open

starknet_committer,apollo_committer: add timers for fetch patricia paths#14189
ArielElp wants to merge 1 commit into
ariel/read_paths_and_commit_blockfrom
ariel/fetch_patricia_paths_timers

Conversation

@ArielElp
Copy link
Copy Markdown
Contributor

No description provided.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Contributor Author

ArielElp commented May 25, 2026

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.

@ArielElp ArielElp marked this pull request as ready for review May 25, 2026 13:22
@cursor
Copy link
Copy Markdown

cursor Bot commented May 25, 2026

PR Summary

Low Risk
Observability-only changes around existing witness fetch calls; commit semantics and storage writes are unchanged.

Overview
Adds os_input-gated timing for the two Patricia witness collection passes in read_paths_and_commit_block: pre-commit roots, then post-commit roots with serialized forest overlay. End-to-end block timing now starts before the first witness fetch instead of after it.

Extends block measurement types with FetchWitnessesFirstPass / FetchWitnessesSecondPass actions, durations, and a first-pass witness count on BlockModificationsCounts. StarknetForestProofs::len() centralizes witness sizing for logs and timers; commit logging uses that count instead of manually summing trie proof parts. commit.rs uses ..Default::default() when setting modification counts so witness fields stay default outside the OS path. Benchmark CLI tests and an os_input feature re-export are updated accordingly; metrics export for witness timings is left as a TODO on update_metrics.

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

@ArielElp ArielElp requested a review from yoavGrs May 25, 2026 13:22
Comment thread crates/starknet_committer/src/patricia_merkle_tree/types.rs
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 1f931cb to 8f9e24b Compare May 25, 2026 13:32
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch 2 times, most recently from 535b5e5 to 8508cca Compare May 25, 2026 13:35
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 8f9e24b to cddd859 Compare May 25, 2026 13:35
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from 8508cca to d204c67 Compare May 25, 2026 13:45
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from cddd859 to a660497 Compare May 25, 2026 13:45
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from d204c67 to b7d225e Compare May 25, 2026 13:58
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 8bf3a2f to 9f568b4 Compare May 27, 2026 12:20
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch 2 times, most recently from 01eb09a to 574d1ff Compare May 27, 2026 12:25
Copy link
Copy Markdown
Contributor

@yoavGrs yoavGrs left a comment

Choose a reason for hiding this comment

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

@yoavGrs made 1 comment and resolved 1 discussion.
Reviewable status: 3 of 7 files reviewed, 2 unresolved discussions (waiting on ArielElp).


crates/starknet_committer/src/block_committer/measurements_util.rs line 82 at r4 (raw file):

Previously, ArielElp wrote…

to avoid cfg(feature=os_input) on callsite

you mean, in committer_cli?
IMO we should keep it the way it was.

@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 63081dd to ecdd530 Compare May 27, 2026 14:31
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from 574d1ff to 1c55087 Compare May 27, 2026 14:31
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from ecdd530 to d106a77 Compare May 27, 2026 15:31
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from 1c55087 to 40cf274 Compare May 27, 2026 15:31
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from d106a77 to f5ac18f Compare May 27, 2026 15:47
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch 2 times, most recently from b9e782a to 3e34826 Compare May 27, 2026 16:20
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from f5ac18f to 0cb4891 Compare May 27, 2026 16:20
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from 3e34826 to 726768f Compare May 27, 2026 19:33
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch 2 times, most recently from 7b5bd65 to 86d6eb4 Compare May 28, 2026 08:07
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from 726768f to 270d5c4 Compare May 28, 2026 08:07
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 86d6eb4 to 7ae3923 Compare May 28, 2026 08:22
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from 270d5c4 to 23624a1 Compare May 28, 2026 08:22
@ArielElp ArielElp changed the base branch from ariel/read_paths_and_commit_block to graphite-base/14189 May 28, 2026 10:54
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from 23624a1 to 64c906d Compare May 28, 2026 11:50
@ArielElp ArielElp force-pushed the graphite-base/14189 branch from 7ae3923 to 46801a0 Compare May 28, 2026 11:50
Copy link
Copy Markdown
Contributor Author

@ArielElp ArielElp left a comment

Choose a reason for hiding this comment

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

@ArielElp made 1 comment.
Reviewable status: 2 of 7 files reviewed, 1 unresolved discussion (waiting on yoavGrs).


crates/starknet_committer/src/block_committer/measurements_util.rs line 82 at r4 (raw file):

Previously, yoavGrs wrote…

you mean, in committer_cli?
IMO we should keep it the way it was.

Done.

@ArielElp ArielElp changed the base branch from graphite-base/14189 to ariel/read_paths_and_commit_block May 28, 2026 11:51
Copy link
Copy Markdown

@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.

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 64c906d. Configure here.

Comment thread crates/apollo_committer/src/committer.rs
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from 64c906d to c3f46ac Compare May 28, 2026 13:56
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 46801a0 to 88e1093 Compare May 28, 2026 13:56
Copy link
Copy Markdown
Contributor

@yoavGrs yoavGrs left a comment

Choose a reason for hiding this comment

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

@yoavGrs reviewed 5 files and all commit messages, made 2 comments, and resolved 1 discussion.
Reviewable status: 6 of 7 files reviewed, 3 unresolved discussions (waiting on ArielElp).


crates/starknet_committer/src/block_committer/commit.rs line 242 at r7 (raw file):

        classes_trie: n_classes_trie_modifications,
        emptied_storage_leaves,
        ..Default::default()

We don't have the number of witnesses?


crates/starknet_committer_cli/src/utils_test.rs line 20 at r7 (raw file):

const N_EMPTY_LEAVES: usize = 10;
#[cfg(feature = "os_input")]
const N_WITNESSES: usize = 0;

Give an interesting value.

Code quote:

const N_WITNESSES: usize = 0;

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.

3 participants