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

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/move_layout_to_patricia_storage branch from 62631be to bb2af59 Compare December 23, 2025 13:00
@ArielElp ArielElp force-pushed the ariel/add_index_layout_db branch 2 times, most recently from 43c8509 to a7f764c Compare December 23, 2025 15:36
@ArielElp ArielElp force-pushed the ariel/move_layout_to_patricia_storage branch 2 times, most recently from 32b7f4a to 597a809 Compare December 24, 2025 08:50
@ArielElp ArielElp force-pushed the ariel/add_index_layout_db branch 2 times, most recently from 2873696 to a00ee65 Compare December 24, 2025 11:41
@ArielElp ArielElp force-pushed the ariel/move_layout_to_patricia_storage branch from 597a809 to 4487c12 Compare December 24, 2025 11:41
@ArielElp ArielElp force-pushed the ariel/move_layout_to_patricia_storage branch from 32689fd to f50d827 Compare January 1, 2026 09:34
@ArielElp ArielElp force-pushed the ariel/add_index_layout_db branch from 5e94496 to e9626b7 Compare January 1, 2026 09:34
@ArielElp ArielElp force-pushed the ariel/move_layout_to_patricia_storage branch from f50d827 to b02ddb1 Compare January 1, 2026 12:04
@ArielElp ArielElp force-pushed the ariel/add_index_layout_db branch from e9626b7 to bf2099e Compare January 1, 2026 12:04
@ArielElp ArielElp force-pushed the ariel/move_layout_to_patricia_storage branch from b02ddb1 to 559cb65 Compare January 1, 2026 13:00
@ArielElp ArielElp force-pushed the ariel/add_index_layout_db branch from bf2099e to 54fbeec Compare January 1, 2026 13:00
@ArielElp ArielElp force-pushed the ariel/move_layout_to_patricia_storage branch from 559cb65 to e7c745e Compare January 1, 2026 15:29
@ArielElp ArielElp force-pushed the ariel/add_index_layout_db branch from 54fbeec to 9c83282 Compare January 1, 2026 15:29
@ArielElp ArielElp force-pushed the ariel/move_layout_to_patricia_storage branch from e7c745e to 9a371c7 Compare January 1, 2026 15:33
@ArielElp ArielElp force-pushed the ariel/add_index_layout_db branch from 9c83282 to f501009 Compare January 1, 2026 15:33
@ArielElp ArielElp force-pushed the ariel/move_layout_to_patricia_storage branch from 9a371c7 to 4b852b0 Compare January 4, 2026 11:27
@ArielElp ArielElp force-pushed the ariel/add_index_layout_db branch from f501009 to 270c26f Compare January 4, 2026 11:27
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 partially reviewed 7 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArielElp and @yoavGrs).


crates/starknet_committer/src/db/index_db/leaves.rs line 58 at r1 (raw file):

        }
    }
}

Why it's no longer a method?
If this is intentional, please rename to trie_type_db_prefix or something more specific

Code quote:

fn db_prefix(trie_type: &TrieType) -> DbKeyPrefix {
    match trie_type {
        TrieType::ContractsTrie => DbKeyPrefix::new((&CONTRACTS_TREE_PREFIX[..]).into()),
        TrieType::ClassesTrie => DbKeyPrefix::new((&CLASSES_TREE_PREFIX[..]).into()),
        TrieType::StorageTrie(contract_address) => {
            let prefix = contract_address.to_bytes_be().to_vec();
            DbKeyPrefix::new(prefix.into())
        }
    }
}

@ArielElp ArielElp force-pushed the ariel/move_layout_to_patricia_storage branch from 4b852b0 to 8628308 Compare January 4, 2026 19:12
@ArielElp ArielElp force-pushed the ariel/add_index_layout_db branch from 270c26f to 88d6908 Compare January 4, 2026 19:12
Copy link
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 partially reviewed 7 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ArielElp).


crates/starknet_committer/src/db/index_db/leaves.rs line 68 at r2 (raw file):

                    db_prefix(key_context)
                }
            }

Not related to this PR.
Why do you take key_context as an argument, instead of defining a type for each trie type?

Code quote:

            impl HasStaticPrefix for $ty {
                type KeyContext = TrieType;
                fn get_static_prefix(key_context: &Self::KeyContext) -> DbKeyPrefix {
                    db_prefix(key_context)
                }
            }

Copy link
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 and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArielElp).


crates/starknet_committer/src/db/index_db/leaves.rs line 68 at r2 (raw file):

Previously, yoavGrs wrote…

Not related to this PR.
Why do you take key_context as an argument, instead of defining a type for each trie type?

Discussed.

@ArielElp ArielElp force-pushed the ariel/move_layout_to_patricia_storage branch from 8628308 to f58109f Compare January 8, 2026 14:15
@ArielElp ArielElp force-pushed the ariel/add_index_layout_db branch from 88d6908 to 66bae01 Compare January 8, 2026 14:15
@ArielElp ArielElp force-pushed the ariel/move_layout_to_patricia_storage branch from f58109f to 2d2e70a Compare January 8, 2026 15:03
@ArielElp ArielElp force-pushed the ariel/add_index_layout_db branch from 66bae01 to 19ea728 Compare January 8, 2026 15:03
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 1 comment.
Reviewable status: 4 of 7 files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware and @yoavGrs).


crates/starknet_committer/src/db/index_db/leaves.rs line 58 at r1 (raw file):

Previously, nimrod-starkware wrote…

Why it's no longer a method?
If this is intentional, please rename to trie_type_db_prefix or something more specific

I moved TrieType to starknet_patricia (it's used in the Layout trait). I don't want to move this impl there since it's specific to index layout, hence this is no longer a method.

Renamed

@ArielElp ArielElp force-pushed the ariel/add_index_layout_db branch from 19ea728 to c6fb9bf Compare January 8, 2026 16:32
@ArielElp ArielElp force-pushed the ariel/move_layout_to_patricia_storage branch from 2d2e70a to 761794e Compare January 8, 2026 16:32
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.

5 participants