Skip to content

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

Merged
ArielElp merged 1 commit into
mainfrom
ariel/fetch_patricia_paths_timers
Jun 2, 2026
Merged

starknet_committer,apollo_committer: add timers for fetch patricia paths#14189
ArielElp merged 1 commit into
mainfrom
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

ArielElp commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

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

cursor Bot commented May 25, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Observability-only changes behind os_input; no commit logic, storage, or witness content changes.

Overview
Under the os_input feature, block commit instrumentation now times pre-commit and post-commit Patricia witness collection separately and records how many witness entries came from the first pass.

The read_paths_and_commit_block tip flow starts end-to-end measurements before the first witness fetch, stops timers around each fetch_patricia_witnesses call (using get_nodes_count() on merged proofs), and extends debug logs with pre/post fetch durations in ms and total witness entry count. StarknetForestProofs::get_nodes_count() replaces duplicated inline counting for logging.

Reviewed by Cursor Bugbot for commit 2f2eaad. 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 changed the base branch from ariel/read_paths_and_commit_block to graphite-base/14189 June 1, 2026 08:31
@ArielElp ArielElp force-pushed the graphite-base/14189 branch from 48a282a to 0c257d7 Compare June 1, 2026 08:41
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from 701d19d to 0556455 Compare June 1, 2026 08:41
@ArielElp ArielElp changed the base branch from graphite-base/14189 to ariel/read_paths_and_commit_block June 1, 2026 08:41

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

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

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

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


crates/starknet_committer/src/block_committer/measurements_util.rs line 134 at r9 (raw file):

Previously, yoavGrs wrote…

With the feature flag

Done.

@yoavGrs yoavGrs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@yoavGrs reviewed 3 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ArielElp and dorimedini-starkware).


crates/starknet_committer/src/patricia_merkle_tree/types.rs line 72 at r13 (raw file):

        self.classes_trie_proof.len()
            + self.contracts_trie_proof.nodes.len()
            + self.contracts_trie_proof.leaves.len()

You did both modifications. Does clippy complain if you rename it back to len?

Code quote:

    pub fn get_nodes_count(&self) -> usize {
        self.classes_trie_proof.len()
            + self.contracts_trie_proof.nodes.len()
            + self.contracts_trie_proof.leaves.len()

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 4 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on ArielElp).


crates/apollo_committer/src/committer.rs line 623 at r13 (raw file):

                     {deleted_nodes_count} nodes",
                    witness_count = patricia_proofs.get_nodes_count(),
                    deleted_nodes_count = deleted_nodes.len(),

what about the proof_after count?

Code quote:

                    witness_count = patricia_proofs.get_nodes_count(),
                    deleted_nodes_count = deleted_nodes.len(),

crates/starknet_committer/src/block_committer/measurements_util.rs line 168 at r13 (raw file):

            #[cfg(feature = "os_input")]
            Action::FetchWitnessesSecondPass => {
                self.durations.fetch_witnesses_second_pass = duration_in_seconds;

why aren't you counting the second pass...? overlap?

Code quote:

self.durations.fetch_witnesses_second_pass = duration_in_seconds;

crates/starknet_committer_cli/Cargo.toml at r13 (raw file):
is starknet_committer_cli covered in Yoav's workflow?

@ArielElp ArielElp changed the base branch from ariel/read_paths_and_commit_block to graphite-base/14189 June 2, 2026 11:57
@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from 0556455 to 9737736 Compare June 2, 2026 11:57
@ArielElp ArielElp force-pushed the graphite-base/14189 branch from 0c257d7 to 6e625f1 Compare June 2, 2026 11:57
@ArielElp ArielElp changed the base branch from graphite-base/14189 to main June 2, 2026 11:57
Comment thread crates/starknet_committer/src/block_committer/measurements_util.rs

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

@ArielElp made 3 comments.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on dorimedini-starkware and yoavGrs).


crates/apollo_committer/src/committer.rs line 623 at r13 (raw file):

Previously, dorimedini-starkware wrote…

what about the proof_after count?

Mostly to not have to account for overlap, partly because we know this step is less significant, and measure time in any case to make sure it's not problematic.


crates/starknet_committer/src/block_committer/measurements_util.rs line 168 at r13 (raw file):

Previously, dorimedini-starkware wrote…

why aren't you counting the second pass...? overlap?

See above.


crates/starknet_committer/src/patricia_merkle_tree/types.rs line 72 at r13 (raw file):

Previously, yoavGrs wrote…

You did both modifications. Does clippy complain if you rename it back to len?

Yes, if there's len it wants is_empty, but the new name is probably better.

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@dorimedini-starkware resolved 2 discussions.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on ArielElp and yoavGrs).

@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from 9737736 to 271b64b Compare June 2, 2026 12:08

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

@ArielElp made 1 comment.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on dorimedini-starkware and yoavGrs).


crates/starknet_committer_cli/Cargo.toml at r13 (raw file):

Previously, dorimedini-starkware wrote…

is starknet_committer_cli covered in Yoav's workflow?

It is not, but also not needed, this is a remainder after some cleanup in earlier versions, removed.

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 1 file and all commit messages, and resolved 1 discussion.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on ArielElp and yoavGrs).

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

:lgtm:

@dorimedini-starkware made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on ArielElp and yoavGrs).

@ArielElp ArielElp force-pushed the ariel/fetch_patricia_paths_timers branch from 271b64b to 2f2eaad Compare June 2, 2026 12:43

@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 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

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 2f2eaad. Configure here.

Comment thread crates/apollo_committer/src/committer.rs
Comment thread crates/starknet_committer/src/block_committer/measurements_util.rs

@dorimedini-starkware dorimedini-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 1 file and all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on ArielElp and yoavGrs).

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

@ArielElp resolved 4 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on ArielElp).

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.

4 participants