Skip to content

starknet_committer: underlying logic of the new read witnesses and commit endpoint#14001

Open
ArielElp wants to merge 1 commit into
ariel/commit_metadatafrom
ariel/read_paths_and_commit_block
Open

starknet_committer: underlying logic of the new read witnesses and commit endpoint#14001
ArielElp wants to merge 1 commit into
ariel/commit_metadatafrom
ariel/read_paths_and_commit_block

Conversation

@ArielElp
Copy link
Copy Markdown
Contributor

@ArielElp ArielElp commented May 7, 2026

No description provided.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Contributor Author

ArielElp commented May 7, 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 force-pushed the ariel/commit_metadata branch from 97f4dda to c42c4a2 Compare May 7, 2026 12:40
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch 2 times, most recently from a48fffb to bd02493 Compare May 14, 2026 08:43
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from bd02493 to a600115 Compare May 18, 2026 11:56
@ArielElp ArielElp force-pushed the ariel/commit_metadata branch from 2892fbe to 573c4db Compare May 18, 2026 11:56
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from a600115 to 65906b7 Compare May 18, 2026 13:52
@ArielElp ArielElp force-pushed the ariel/commit_metadata branch from 573c4db to 0ef9967 Compare May 18, 2026 13:52
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 65906b7 to 4de5b94 Compare May 19, 2026 06:55
@ArielElp ArielElp force-pushed the ariel/commit_metadata branch 2 times, most recently from 2f5189a to d248e3b Compare May 19, 2026 07:08
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 4de5b94 to 58e714d Compare May 19, 2026 07:08
@ArielElp ArielElp marked this pull request as ready for review May 19, 2026 07:08
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 3281671 to 1f931cb Compare May 25, 2026 13:21
@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/commit_metadata branch from e216816 to 5c08172 Compare May 25, 2026 13:32
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 7 comments.
Reviewable status: 1 of 5 files reviewed, 7 unresolved discussions (waiting on yoavGrs).


crates/apollo_committer/src/committer.rs line 503 at r4 (raw file):

Previously, yoavGrs wrote…

I found this a bit hard to read.
Could you flatten the function out and use some named variables?

Done


crates/apollo_committer/src/committer.rs line 508 at r4 (raw file):

Previously, yoavGrs wrote…

Top-down Ordering

Done.


crates/apollo_committer/src/committer.rs line 521 at r4 (raw file):

Previously, yoavGrs wrote…

It makes sense that LeavesRequest will be part of the request type.

Maybe it's a bad name, I can rename in a different PR. LeavesRequest is essentially a conversion between concrete leaves to NodeIndex, so I don't think it should be part of the request.


crates/apollo_committer/src/committer.rs line 555 at r4 (raw file):

Previously, yoavGrs wrote…

Add some comments about the main stages in the process.

Done.


crates/apollo_committer/src/committer.rs line 571 at r4 (raw file):

Previously, yoavGrs wrote…

The main goal at this stage is measurements, so you also need to cover the witness-related parts.

done in next PR


crates/apollo_committer/src/committer.rs line 597 at r4 (raw file):

Previously, yoavGrs wrote…

It is better not to create a mutable object unnecessarily.

Changed the original variable to mut.


crates/apollo_committer/src/committer.rs line 602 at r4 (raw file):

Previously, yoavGrs wrote…

It may help us.

done in next PR

@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/commit_metadata branch from 5c08172 to b685c0d 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
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 a660497. Configure here.

Comment thread crates/apollo_committer/src/committer.rs Outdated
@ArielElp ArielElp force-pushed the ariel/commit_metadata branch from b685c0d to 036d0c6 Compare May 25, 2026 13:58
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from a660497 to 00bf9c8 Compare May 25, 2026 13:58
@ArielElp ArielElp force-pushed the ariel/commit_metadata branch from 036d0c6 to 530912e Compare May 25, 2026 14:13
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 00bf9c8 to 9d6106e Compare May 25, 2026 14:13
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 3 files and all commit messages, made 1 comment, and resolved 7 discussions.
Reviewable status: 4 of 5 files reviewed, 2 unresolved discussions (waiting on ArielElp).


crates/apollo_committer/src/committer.rs line 626 at r6 (raw file):

                })
            })
            .transpose()

This is my suggestion - break it with a let in the middle.

Suggestion:

        let digest_raw = self.forest_storage
            .read_metadata(ForestMetadataType::AccessedKeysDigest(DbBlockNumber(block_number)))
            .await
            .map_err(|error| self.map_internal_error(error))?;
        digest_raw.0.as_slice().try_into().map_err(|_| CommitterError::Internal {
                    height: block_number,
                    message: format!(
                        "Invalid OS witnesses digest length {} (expected 32)",
                        digest_raw.0.len()
                    ),
                })
            })
            .transpose()

@ArielElp ArielElp force-pushed the ariel/commit_metadata branch from 530912e to 334fb68 Compare May 26, 2026 10:08
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 9d6106e to 38ad4df Compare May 26, 2026 10:08
@ArielElp ArielElp force-pushed the ariel/commit_metadata branch from 334fb68 to b9d7c24 Compare May 26, 2026 10:48
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 38ad4df to 0ef2f36 Compare May 26, 2026 10:48
@ArielElp ArielElp force-pushed the ariel/commit_metadata branch from b9d7c24 to a11c9cd Compare May 26, 2026 11:42
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 0ef2f36 to 574e6b3 Compare May 26, 2026 11:42
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 and resolved 1 discussion.
Reviewable status: 2 of 5 files reviewed, all discussions resolved (waiting on yoavGrs).


crates/apollo_committer/src/committer.rs line 626 at r6 (raw file):

Previously, yoavGrs wrote…

This is my suggestion - break it with a let in the middle.

Done

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 2 files and all commit messages.
Reviewable status: 4 of 5 files reviewed, all discussions resolved.

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 dismissed @yoavGrs from a discussion.
Reviewable status: 4 of 5 files reviewed, all discussions resolved (waiting on yoavGrs).

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 partially reviewed 4 files and all commit messages.
Reviewable status: 4 of 5 files reviewed, all discussions resolved.

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.

Reviewable status: 4 of 5 files reviewed, all discussions resolved.

@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from 574e6b3 to f54eccf Compare May 26, 2026 13:03
@ArielElp ArielElp force-pushed the ariel/commit_metadata branch from a11c9cd to e18eb18 Compare May 26, 2026 13:03
@ArielElp ArielElp force-pushed the ariel/commit_metadata branch from e18eb18 to 625c60d Compare May 26, 2026 13:11
@ArielElp ArielElp force-pushed the ariel/read_paths_and_commit_block branch from f54eccf to 491609e Compare May 26, 2026 13:11
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