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 11, 2025

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

Copy link
Contributor

@nimrod-starkware nimrod-starkware left a comment

Choose a reason for hiding this comment

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

@nimrod-starkware reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @ArielElp and @yoavGrs)


crates/starknet_patricia/src/patricia_merkle_tree/traversal.rs line 109 at r1 (raw file):

    /// When should_traverse_unmodified_children is false, this function is used to get the hash
    /// of the unmodified child (in this case NodeData will be HashOutput).
    fn unmodified_child_hash(data: Self::NodeData) -> Option<HashOutput>;

Does that make sense?

Suggestion:

    /// When should_traverse_unmodified_children is false, this function is used to get the hash
    /// of the unmodified child (in this case NodeData will be HashOutput).
    fn unmodified_child_data(data: Self::NodeData) -> Option<Self::NodeData>;

crates/starknet_patricia/src/patricia_merkle_tree/traversal.rs line 109 at r1 (raw file):

    /// When should_traverse_unmodified_children is false, this function is used to get the hash
    /// of the unmodified child (in this case NodeData will be HashOutput).
    fn unmodified_child_hash(data: Self::NodeData) -> Option<HashOutput>;

These two methods are coupled.
WDYT of this:

  1. Delete should_traverse_unmodified_children.
  2. Change the signature to unmodified_child_data(data: Self::NodeData) -> Option<Self::NodeData>.

Where if the return value is Some(...) then it means we should traverse the children, otherwise we should not.
If that works and makes sense please update the doc

Code quote:

    /// Indicates whether unmodified children should be traversed during the construction of the
    /// original skeleton tree.
    fn should_traverse_unmodified_children() -> bool;

    /// When should_traverse_unmodified_children is false, this function is used to get the hash
    /// of the unmodified child (in this case NodeData will be HashOutput).
    fn unmodified_child_hash(data: Self::NodeData) -> Option<HashOutput>;

crates/starknet_patricia/src/patricia_merkle_tree/traversal.rs line 117 at r1 (raw file):

    ) -> DbKeyPrefix;

    fn get_root_suffix(&self) -> Vec<u8>;

please doc

Suggestion:

fn get_root_suffix(&self) -> Vec<u8>;

crates/starknet_patricia/src/patricia_merkle_tree/traversal.rs line 120 at r1 (raw file):

    // Need when deserializing the root node from a raw DbValue.
    fn get_root_context(&self) -> Self::NodeContext;

doc

Suggestion:

    /// Returns [Self::NodeContext] needed to deserialize the root node from a raw [DbValue].
    fn get_root_context(&self) -> Self::NodeContext;

crates/starknet_patricia/src/patricia_merkle_tree/traversal.rs line 120 at r1 (raw file):

    // Need when deserializing the root node from a raw DbValue.
    fn get_root_context(&self) -> Self::NodeContext;

Can this be static?

Suggestion:

fn get_root_context() -> Self::NodeContext;

Copy link
Contributor

@nimrod-starkware nimrod-starkware 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: all files reviewed, 7 unresolved discussions (waiting on @ArielElp and @yoavGrs)


crates/starknet_patricia/src/patricia_merkle_tree/traversal.rs line 33 at r1 (raw file):

    /// Extra data a node can carry (e.g. its hash).
    type NodeData: Copy;
    type NodeContext;

doc plz

Suggestion:

/// ....
type NodeContext;

crates/starknet_committer/src/db/facts_db/types.rs line 20 at r1 (raw file):

}

pub type FactDbFilledNode<L> = FilledNode<L, HashOutput>;

see comment in prev PR, keep this def in delete the others please

Code quote:

pub type FactDbFilledNode<L> = FilledNode<L, HashOutput>;

@ArielElp ArielElp force-pushed the ariel/enrich_subtree_trait branch from 815ce74 to 7284233 Compare December 14, 2025 08:34
@ArielElp ArielElp force-pushed the ariel/facts_filled_node branch from 525d944 to 0ccc605 Compare December 14, 2025 08:34
@ArielElp ArielElp force-pushed the ariel/enrich_subtree_trait branch from 7284233 to f556106 Compare December 14, 2025 10:36
@ArielElp ArielElp force-pushed the ariel/facts_filled_node branch from 0ccc605 to 7cb7c31 Compare December 14, 2025 10:36
@ArielElp ArielElp force-pushed the ariel/enrich_subtree_trait branch from f556106 to 8852e9f Compare December 14, 2025 11:33
@ArielElp ArielElp force-pushed the ariel/facts_filled_node branch from 6ec738c to 7b41917 Compare December 16, 2025 10:02
@ArielElp ArielElp changed the base branch from ariel/facts_filled_node to graphite-base/10751 December 16, 2025 10:11
@ArielElp ArielElp force-pushed the graphite-base/10751 branch from 7b41917 to f542a05 Compare December 16, 2025 10:18
@ArielElp ArielElp force-pushed the ariel/enrich_subtree_trait branch from ff190cd to 7860d6b Compare December 16, 2025 10:18
@ArielElp ArielElp changed the base branch from graphite-base/10751 to ariel/facts_filled_node December 16, 2025 10:19
@graphite-app graphite-app bot changed the base branch from ariel/facts_filled_node to graphite-base/10751 December 16, 2025 11:05
@ArielElp ArielElp force-pushed the ariel/enrich_subtree_trait branch from 7860d6b to d5e2d5f Compare December 16, 2025 11:07
@ArielElp ArielElp force-pushed the graphite-base/10751 branch from f542a05 to a33b741 Compare December 16, 2025 11:07
@ArielElp ArielElp changed the base branch from graphite-base/10751 to ariel/facts_filled_node December 16, 2025 11:07
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 2 of 3 files at r4, 1 of 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ArielElp)


crates/starknet_patricia/src/patricia_merkle_tree/traversal.rs line 32 at r6 (raw file):

    // tree node.
    Traverse,
    // Indicates that the child should be skipped as its unmodified and we have its hash.

not sure about the second its
but it is == it's for sure

Suggestion:

as it's unmodified and we have its hash

@ArielElp ArielElp changed the base branch from ariel/facts_filled_node to graphite-base/10751 December 16, 2025 12:23
@ArielElp ArielElp force-pushed the ariel/enrich_subtree_trait branch from d5e2d5f to 9d631f6 Compare December 16, 2025 12:24
@ArielElp ArielElp force-pushed the graphite-base/10751 branch from a33b741 to a81d4c1 Compare December 16, 2025 12:24
@ArielElp ArielElp changed the base branch from graphite-base/10751 to main-v0.14.1-committer December 16, 2025 12:24
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 of 1 files at r7, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ArielElp)

@ArielElp ArielElp force-pushed the ariel/enrich_subtree_trait branch from 9d631f6 to 320fb63 Compare December 16, 2025 13:06
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 of 1 files at r8, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArielElp)


crates/starknet_patricia/src/patricia_merkle_tree/traversal.rs line 27 at r8 (raw file):

/// An enum that specifies how to treat unmodified children during the construction of the
/// `OriginalSkeletonTree`.

failed the doctest?
why note like this?

Suggestion:

[crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTree].

@ArielElp ArielElp force-pushed the ariel/enrich_subtree_trait branch from 320fb63 to 814ae29 Compare December 16, 2025 13:25
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.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware)


crates/starknet_patricia/src/patricia_merkle_tree/traversal.rs line 27 at r8 (raw file):

Previously, dorimedini-starkware wrote…

failed the doctest?
why note like this?

Yep, it just seemed too long, changed

@ArielElp ArielElp force-pushed the ariel/enrich_subtree_trait branch from 814ae29 to 665c272 Compare December 16, 2025 13:27
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 of 1 files at r9, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ArielElp)

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 of 1 files at r10, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ArielElp)

@ArielElp ArielElp added this pull request to the merge queue Dec 16, 2025
Merged via the queue into main-v0.14.1-committer with commit 598631f Dec 16, 2025
20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2025
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