Skip to content

Conversation

@ArielElp
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

ArielElp commented Dec 10, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from 89be22e to d6df426 Compare December 10, 2025 11:26
@ArielElp ArielElp force-pushed the ariel/add_index_layout_node_and_subtree branch from 4402c0e to 5a62fc2 Compare December 10, 2025 11:26
@ArielElp ArielElp force-pushed the ariel/add_index_layout_node_and_subtree branch from 5a62fc2 to b3f70f7 Compare December 10, 2025 13:16
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from d6df426 to a6375be Compare December 10, 2025 13:16
@ArielElp ArielElp force-pushed the ariel/add_index_layout_node_and_subtree branch from b3f70f7 to 70f1731 Compare December 10, 2025 14:20
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch 2 times, most recently from 6a65d5a to bc73073 Compare December 10, 2025 15:06
@ArielElp ArielElp force-pushed the ariel/add_index_layout_node_and_subtree branch from 70f1731 to 6c50273 Compare December 10, 2025 15:06
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from bc73073 to cc1ef83 Compare December 10, 2025 15:35
@ArielElp ArielElp force-pushed the ariel/add_index_layout_node_and_subtree branch 2 times, most recently from 9f1b96e to c3c62a4 Compare December 10, 2025 15:41
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from cc1ef83 to 214868d Compare December 10, 2025 15:41
@ArielElp ArielElp force-pushed the ariel/add_index_layout_node_and_subtree branch from c3c62a4 to e664009 Compare December 10, 2025 15:53
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from 214868d to 85a0005 Compare December 10, 2025 15:53
@ArielElp ArielElp force-pushed the ariel/add_index_layout_node_and_subtree branch from e664009 to 909fb4e Compare December 10, 2025 19:58
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from 85a0005 to 244c030 Compare December 10, 2025 19:58
@ArielElp ArielElp force-pushed the ariel/add_index_layout_node_and_subtree branch from 909fb4e to 2c4bcff Compare December 11, 2025 06:51
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from 244c030 to 0dd3e42 Compare December 11, 2025 06:51
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from e31bcb6 to 7f02c8d Compare December 25, 2025 18:34
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from 7f02c8d to ad01f5a Compare December 26, 2025 07:09
@ArielElp ArielElp force-pushed the ariel/add_index_layout_node_and_subtree branch from e6d71c6 to da5f5c2 Compare December 26, 2025 07:09
Copy link
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 11 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ArielElp).


crates/starknet_committer/src/patricia_merkle_tree/tree.rs line 35 at r8 (raw file):

        Self { compare_modified_leaves: should_compare_modified_leaves }
    }
}

to make it clearer to the user, I would suggest this approach.
I don't think the user of this config should control the boolean directly - the user should know what the underlying DB layout is, not how to properly configure this struct

Suggestion:

impl OriginalSkeletonTrieConfig {
    pub fn new_for_facts_db() -> Self {
        Self { compare_modified_leaves: false }
    }

    pub fn new_for_node_index_db() -> Self {
        Self { compare_modified_leaves: true }
    }
}

crates/starknet_committer/src/patricia_merkle_tree/tree.rs line 43 at r8 (raw file):

}

pub(crate) struct OriginalSkeletonTrieDontCompareConfig;

why is this type needed...? seems redundant

Code quote:

OriginalSkeletonTrieDontCompareConfig;

Copy link
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 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware).


crates/starknet_committer/src/patricia_merkle_tree/tree.rs line 35 at r8 (raw file):

Previously, dorimedini-starkware wrote…

to make it clearer to the user, I would suggest this approach.
I don't think the user of this config should control the boolean directly - the user should know what the underlying DB layout is, not how to properly configure this struct

It's not layout related, we use false for contracts trie where we still don't know about all the modified leaves (we don't yet have the new storage roots).


crates/starknet_committer/src/patricia_merkle_tree/tree.rs line 43 at r8 (raw file):

Previously, dorimedini-starkware wrote…

why is this type needed...? seems redundant

it is used in get_leaves in facts db, and up the stack also in create_contracts_trie

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


crates/starknet_committer/src/patricia_merkle_tree/tree.rs line 35 at r8 (raw file):

Previously, ArielElp wrote…

It's not layout related, we use false for contracts trie where we still don't know about all the modified leaves (we don't yet have the new storage roots).

ok, so new_for_contracts_trie and new_for_class_or_storage_trie then?


crates/starknet_committer/src/patricia_merkle_tree/tree.rs line 43 at r8 (raw file):

Previously, ArielElp wrote…

it is used in get_leaves in facts db, and up the stack also in create_contracts_trie

why not use OriginalSkeletonTrieConfig::new_X (where X depends on the context) up the stack?

@ArielElp ArielElp force-pushed the ariel/add_index_layout_node_and_subtree branch from da5f5c2 to d8d9f88 Compare December 28, 2025 09:12
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from ad01f5a to 6f69212 Compare December 28, 2025 09:12
@ArielElp ArielElp force-pushed the ariel/add_index_layout_node_and_subtree branch from d8d9f88 to ca195e9 Compare December 29, 2025 09:28
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from 6f69212 to 9246a81 Compare December 29, 2025 09:28
Copy link
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: all files reviewed, 2 unresolved discussions (waiting on @ArielElp).

@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from 9246a81 to 2c4fb00 Compare December 30, 2025 12:15
Copy link
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.

:lgtm:

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

Copy link
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 2 comments.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ArielElp).


crates/starknet_committer/src/patricia_merkle_tree/tree.rs line 35 at r8 (raw file):

Previously, dorimedini-starkware wrote…

ok, so new_for_contracts_trie and new_for_class_or_storage_trie then?

Done, but the latter is taken a should_warn_on_trivial_modifications_argument

I also ended up needing:

  1. new_for_tests - there is at least one test where the value (compare_modified_leaves) is explicitly tested
  2. default - get_leaves doesn't receive the config with should_warn, it's always false regardless of the trie we're querying

crates/starknet_committer/src/patricia_merkle_tree/tree.rs line 43 at r8 (raw file):

Previously, dorimedini-starkware wrote…

why not use OriginalSkeletonTrieConfig::new_X (where X depends on the context) up the stack?

Done.

@ArielElp ArielElp force-pushed the ariel/add_index_layout_node_and_subtree branch from ca195e9 to dfaaf90 Compare December 30, 2025 12:37
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from 2c4fb00 to 4009808 Compare December 30, 2025 12:37
@ArielElp ArielElp changed the base branch from ariel/add_index_layout_node_and_subtree to graphite-base/10683 December 30, 2025 14:42
@ArielElp ArielElp force-pushed the graphite-base/10683 branch from dfaaf90 to 8f999d9 Compare December 30, 2025 14:42
@ArielElp ArielElp force-pushed the ariel/clean_skeleton_tree_configs branch from 4009808 to 4b27774 Compare December 30, 2025 14:42
@ArielElp ArielElp changed the base branch from graphite-base/10683 to main-v0.14.1-committer December 30, 2025 14:42
@ArielElp ArielElp added this pull request to the merge queue Dec 30, 2025
Merged via the queue into main-v0.14.1-committer with commit 05b0a54 Dec 30, 2025
25 of 45 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants