Skip to content

apollo_committer_types: add patricia proofs request and response types#13996

Merged
ArielElp merged 1 commit into
mainfrom
ariel/add_committer_request_types
May 28, 2026
Merged

apollo_committer_types: add patricia proofs request and response types#13996
ArielElp merged 1 commit into
mainfrom
ariel/add_committer_request_types

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

@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from 8f39705 to 67c3d07 Compare May 7, 2026 12:40
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch 2 times, most recently from 1653f27 to b645f94 Compare May 14, 2026 08:43
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch 2 times, most recently from abf2f2d to bc12ddd Compare May 18, 2026 13:52
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from 5d76fac to 99bf786 Compare May 18, 2026 13:52
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from bc12ddd to 9e42fdf Compare May 19, 2026 06:55
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from 99bf786 to 642dad1 Compare May 19, 2026 06:55
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from 9e42fdf to 9ab840a Compare May 19, 2026 07:08
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from 642dad1 to 13b4b25 Compare May 19, 2026 07:08
@ArielElp ArielElp marked this pull request as ready for review May 19, 2026 07:08
@cursor
Copy link
Copy Markdown

cursor Bot commented May 19, 2026

PR Summary

Medium Risk
Touches committer error surfaces and serializes Patricia witness blobs for OS input; behavior is feature-gated but affects how block commit data is represented and validated.

Overview
Adds an os_input feature to apollo_committer_types so commit flows can request a block commit together with Patricia trie witnesses for OS input.

Under that feature, new ReadPathsAndCommitBlockRequest / ReadPathsAndCommitBlockResponse types wrap the existing commit payload plus AccessedKeys and return global_root with StarknetForestProofs. CommitterError gains OS-input-specific cases for Patricia path collection failures, accessed-keys digest mismatches, and missing stored proofs.

In starknet_committer, StarknetForestProofs (and related proof structs) are Clone, and serde is wired through the existing zstd-compressed bincode DbValue encoding so these witnesses can cross API boundaries. CI for the OS-input workflow now tracks apollo_committer_types / starknet_committer and runs cargo test for both with os_input.

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

@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch 2 times, most recently from 714765a to 7efff01 Compare May 27, 2026 12:00
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from 9dc7ed9 to 2b512c8 Compare May 27, 2026 12:00
Copy link
Copy Markdown
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 2 files and all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on ArielElp).

@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from 2b512c8 to 88b3f9b Compare May 27, 2026 12:20
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch 2 times, most recently from 0c04230 to 9269fa0 Compare May 27, 2026 12:24
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from 88b3f9b to 32233ea Compare May 27, 2026 12:24
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from 9269fa0 to c6695e5 Compare May 27, 2026 14:31
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from 32233ea to c1d1d19 Compare May 27, 2026 14:31
Copy link
Copy Markdown
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

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


crates/starknet_committer/src/block_committer/input.rs line 84 at r6 (raw file):

Previously, yoavGrs wrote…

Yes, in the blockifier, with the same name

@ArielElp please reuse

@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from c1d1d19 to ed0c4b1 Compare May 27, 2026 15:31
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from c6695e5 to 96591a7 Compare May 27, 2026 15:31
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from ed0c4b1 to d1e67a9 Compare May 27, 2026 15:47
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch 2 times, most recently from 55863a3 to 65c50ec Compare May 27, 2026 16:20
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from d1e67a9 to 41940fc Compare May 27, 2026 16:20
Copy link
Copy Markdown
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 2 files and all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on ArielElp).

@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from 41940fc to b170d8b Compare May 27, 2026 19:33
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from 65c50ec to 74268e4 Compare May 27, 2026 19:33
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 5 comments.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on dorimedini-starkware).


crates/apollo_committer_types/src/committer_types.rs at r6 (raw file):

Previously, dorimedini-starkware wrote…

borderline - these additions can stay here, or, can move to a new gated module... your call, but if this module will end up adding more gated stuff I would just create a new module in advance

There are no more additions on the top of the stack so I'm keeping it.


crates/starknet_committer/src/block_committer/input.rs line 84 at r6 (raw file):

Previously, dorimedini-starkware wrote…

@ArielElp please reuse

Done


crates/starknet_committer/src/patricia_merkle_tree/starknet_forest_proofs_serde.rs line 137 at r6 (raw file):

Previously, dorimedini-starkware wrote…

don't use inline please

Done.


crates/starknet_committer/src/patricia_merkle_tree/starknet_forest_proofs_serde.rs line 139 at r6 (raw file):

Previously, dorimedini-starkware wrote…

not sure it's useful for you, but FYI: you can use #[serde(remote = "Self")] to be able to define these custom serde impls AND derive the serde traits at the same time

Gotcha, but as you said, either this or the above bincode doesn't correspond to the derived implementation.


crates/starknet_committer/src/patricia_merkle_tree/types.rs at r6 (raw file):

Previously, dorimedini-starkware wrote…

ouch x2
are these clones really necessary? the objects can be huge..

It doesn't seem to be used anywhere in the stack. More of an apparent convention that every component's request/response type derives from clone (the new ReadPathsAndCommitBlockRequest will be a variant of CommitterRequest that currently derives from Clone, to satisfy it, I need clone on these structs). That said, nothing seems to clone CommitterRequest, so we may change that, maybe higher up?

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

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.
Reviewable status: 2 of 7 files reviewed, 6 unresolved discussions (waiting on ArielElp and dorimedini-starkware).


crates/starknet_committer/src/patricia_merkle_tree/types.rs at r6 (raw file):

Previously, ArielElp wrote…

It doesn't seem to be used anywhere in the stack. More of an apparent convention that every component's request/response type derives from clone (the new ReadPathsAndCommitBlockRequest will be a variant of CommitterRequest that currently derives from Clone, to satisfy it, I need clone on these structs). That said, nothing seems to clone CommitterRequest, so we may change that, maybe higher up?

You need it for the infra, to pass the requests/responses across the channels.

Copy link
Copy Markdown
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

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

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: 6 of 8 files reviewed, 1 unresolved discussion (waiting on dorimedini-starkware and yoavGrs).


crates/apollo_committer_types/Cargo.toml line 10 at r6 (raw file):

Previously, dorimedini-starkware wrote…

now that this is here, please add this crate to Yoav's workflow testing this feature

Done, I think.

Copy link
Copy Markdown
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

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: :shipit: complete! all files reviewed, all discussions resolved (waiting on ArielElp).

Copy link
Copy Markdown
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 2 files and all commit messages.
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