-
Notifications
You must be signed in to change notification settings - Fork 65
starknet_committer,starknet_patricia: move db_layout #10986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ariel/add_index_layout_db
Are you sure you want to change the base?
starknet_committer,starknet_patricia: move db_layout #10986
Conversation
62631be to
bb2af59
Compare
43c8509 to
a7f764c
Compare
32b7f4a to
597a809
Compare
2873696 to
a00ee65
Compare
597a809 to
4487c12
Compare
32689fd to
f50d827
Compare
5e94496 to
e9626b7
Compare
f50d827 to
b02ddb1
Compare
e9626b7 to
bf2099e
Compare
b02ddb1 to
559cb65
Compare
bf2099e to
54fbeec
Compare
559cb65 to
e7c745e
Compare
54fbeec to
9c83282
Compare
e7c745e to
9a371c7
Compare
9c83282 to
f501009
Compare
9a371c7 to
4b852b0
Compare
f501009 to
270c26f
Compare
nimrod-starkware
left a comment
There was a problem hiding this 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())
}
}
}4b852b0 to
8628308
Compare
270c26f to
88d6908
Compare
yoavGrs
left a comment
There was a problem hiding this 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)
}
}
yoavGrs
left a comment
There was a problem hiding this 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 takekey_contextas an argument, instead of defining a type for each trie type?
Discussed.
8628308 to
f58109f
Compare
88d6908 to
66bae01
Compare
f58109f to
2d2e70a
Compare
66bae01 to
19ea728
Compare
ArielElp
left a comment
There was a problem hiding this 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 totrie_type_db_prefixor 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
19ea728 to
c6fb9bf
Compare
2d2e70a to
761794e
Compare
c6fb9bf to
63b3ab4
Compare
761794e to
13d764f
Compare

No description provided.