Skip to content

apollo_committer_types: add patricia proofs request and response types#13996

Open
ArielElp wants to merge 1 commit into
ariel/add_patricia_paths_storage_traitsfrom
ariel/add_committer_request_types
Open

apollo_committer_types: add patricia proofs request and response types#13996
ArielElp wants to merge 1 commit into
ariel/add_patricia_paths_storage_traitsfrom
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

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/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

Low Risk
Type and serialization additions behind an optional feature; no committer behavior changes in this diff.

Overview
Adds OS-input plumbing so the committer can commit a block and return merged Patricia witness proofs in one typed exchange.

Behind the optional os_input feature on apollo_committer_types, new ReadPathsAndCommitBlockRequest / ReadPathsAndCommitBlockResponse pair a normal CommitBlockRequest with AccessedKeys (trie leaves touched during execution) and return global_root plus StarknetForestProofs. CommitterError gains variants for Patricia path collection failures, accessed-keys digest mismatches, and missing stored witness paths.

In starknet_committer, AccessedKeys is defined under os_input, StarknetForestProofs / ContractsTrieProof are Clone, and StarknetForestProofs gets serde via the existing bincode DbValue encoding so proofs can ride on generic serialize/deserialize boundaries.

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

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, and made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on ArielElp).


crates/apollo_committer_types/src/committer_types.rs line 53 at r3 (raw file):

    pub class_hashes: Vec<ClassHash>,
    pub contract_addresses: Vec<ContractAddress>,
    pub contract_storage_keys: HashMap<ContractAddress, Vec<StarknetStorageKey>>,

Please define a struct for this triple.

Code quote:

    pub class_hashes: Vec<ClassHash>,
    pub contract_addresses: Vec<ContractAddress>,
    pub contract_storage_keys: HashMap<ContractAddress, Vec<StarknetStorageKey>>,

Comment thread crates/apollo_committer_types/src/committer_types.rs Outdated
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from fe9cd70 to 6f5d728 Compare May 20, 2026 11:20
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 partially reviewed 3 files and made 2 comments.
Reviewable status: 3 of 6 files reviewed, 1 unresolved discussion (waiting on yoavGrs).


crates/apollo_committer_types/src/committer_types.rs line 53 at r3 (raw file):

Previously, yoavGrs wrote…

Please define a struct for this triple.

Done, though I prefer plugging it earlier if possible on top of the stack rather than here/below

Comment thread crates/apollo_committer_types/src/committer_types.rs Outdated
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 2 comments, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ArielElp).


crates/apollo_committer_types/src/committer_types.rs line 53 at r3 (raw file):

Previously, ArielElp wrote…

Done, though I prefer plugging it earlier if possible on top of the stack rather than here/below

Ohh, you already did it.
I don't care where you insert this type.


crates/starknet_committer/src/block_committer/input.rs line 79 at r4 (raw file):

/// Trie leaves read during block execution (classes, contracts, and per-contract storage slots).
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
pub struct AccessedKeys {

Right?

Suggestion:

#[cfg(feature = "os_input")]
pub struct AccessedKeys {

@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from 6f5d728 to 4c2b0c8 Compare May 25, 2026 08:57
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from ff8660f to 1cd908c Compare May 25, 2026 08:57
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from 4c2b0c8 to c3937ca Compare May 25, 2026 08:58
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: 4 of 6 files reviewed, 1 unresolved discussion (waiting on yoavGrs).


crates/starknet_committer/src/block_committer/input.rs line 79 at r4 (raw file):

Previously, yoavGrs wrote…

Right?

Done.

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 c3937ca. Configure here.

Comment thread crates/apollo_committer_types/src/committer_types.rs
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, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ArielElp).

Comment thread crates/apollo_committer_types/src/committer_types.rs
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from 1cd908c to adf5b0f Compare May 25, 2026 13:32
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch 2 times, most recently from 3789a7d to 0cc7e15 Compare May 25, 2026 13:45
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from adf5b0f to 7a90b25 Compare May 25, 2026 13:45
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from 0cc7e15 to eb8b441 Compare May 25, 2026 13:58
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch 2 times, most recently from 9645f1b to a453d7a Compare May 25, 2026 14:13
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from eb8b441 to 0a642cf Compare May 25, 2026 14:13
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from a453d7a to a0fc2ee Compare May 26, 2026 10:08
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from 0a642cf to 5f05076 Compare May 26, 2026 10:08
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from a0fc2ee to c02e5f3 Compare May 26, 2026 10:48
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch 2 times, most recently from 8d87f0b to 16a3024 Compare May 26, 2026 11:42
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from c02e5f3 to 43250d7 Compare May 26, 2026 11:42
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from 16a3024 to d0b8e0c Compare May 26, 2026 13:03
@ArielElp ArielElp force-pushed the ariel/add_patricia_paths_storage_traits branch from 1fffffe to 398ddb7 Compare May 26, 2026 13:11
@ArielElp ArielElp force-pushed the ariel/add_committer_request_types branch from d0b8e0c to 00a8555 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