Skip to content

starknet_committer: add utility that returns sorted leaf indices#13992

Open
ArielElp wants to merge 1 commit into
ariel/abstract_fetch_all_patricia_pathsfrom
ariel/get_leaf_indicies_utility
Open

starknet_committer: add utility that returns sorted leaf indices#13992
ArielElp wants to merge 1 commit into
ariel/abstract_fetch_all_patricia_pathsfrom
ariel/get_leaf_indicies_utility

Conversation

@ArielElp
Copy link
Copy Markdown
Contributor

@ArielElp ArielElp commented May 7, 2026

No description provided.

Copy link
Copy Markdown
Contributor Author

ArielElp commented May 7, 2026

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@ArielElp ArielElp force-pushed the ariel/get_leaf_indicies_utility branch from b0885bd to b925279 Compare May 14, 2026 08:43
@ArielElp ArielElp requested a review from yoavGrs May 14, 2026 09:16
@ArielElp ArielElp marked this pull request as ready for review May 14, 2026 09:16
@cursor
Copy link
Copy Markdown

cursor Bot commented May 14, 2026

PR Summary

Low Risk
Low risk refactor that centralizes leaf-index construction/sorting for Patricia witness collection; main risk is subtle ordering/lifetime mistakes affecting which trie paths are fetched.

Overview
Adds LeavesRequest plus get_leaf_indices()/LeavesRequest::get_sorted() to build the class/contract/storage leaf-index buffers and return SortedLeafIndices views for Patricia witness collection.

Refactors fetch_previous_and_new_patricia_paths to reuse this utility for both previous and new root-hash traversals, and re-exports SortedLeafIndices from tree.rs (with minor import cleanup).

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

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.

2 participants