-
Notifications
You must be signed in to change notification settings - Fork 65
starknet_committer_cli: add option for key size #9852
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
starknet_committer_cli: add option for key size #9852
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
e445ff3 to
7ccd12c
Compare
db97ed3 to
d9a8059
Compare
7ccd12c to
58e0cf2
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 reviewed 2 of 3 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @rotem-starkware)
crates/starknet_patricia_storage/src/short_key_storage.rs line 48 at r2 (raw file):
size => panic!("Invalid key size {size}."), } }
Please mention that the given sizes need to be in [16, 32]
Code quote:
/// Wrap an existing storage implementation in a boxed short key storage implementation.
/// If no size is given, boxes and returns the original storage.
/// Panics if the size is not within the allowed range.
pub fn wrap_storage_or_panic<S: Storage + 'static>(
size: Option<u8>,
storage: S,
) -> Box<dyn Storage> {
let Some(size) = size else {
return Box::new(storage);
};
match size {
$( $sizes => Box::new($names::new(storage)), )+
size => panic!("Invalid key size {size}."),
}
}58e0cf2 to
514bd18
Compare
dorimedini-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.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware and @rotem-starkware)
crates/starknet_patricia_storage/src/short_key_storage.rs line 48 at r2 (raw file):
Previously, nimrod-starkware wrote…
Please mention that the given sizes need to be in [16, 32]
I prefer to keep a single point of truth... if I change the 16..=32 range in the short_key module I will not remember to change the panic message (and if someone else adds new byte ranges, even worse)
dorimedini-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.
Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @nimrod-starkware and @rotem-starkware)
crates/starknet_committer_cli/src/bin/benchmark_run/Dockerfile line 35 at r4 (raw file):
"--n-diffs", "4000", \ "--storage-type", "cached-mdbx", \ "--key-size", "16", \
should we use this default? or keep it None?
Code quote:
"--key-size", "16", \3b43ea2 to
964dec5
Compare
514bd18 to
677fbb0
Compare
dorimedini-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.
Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @nimrod-starkware and @rotem-starkware)
crates/starknet_patricia_storage/src/short_key_storage.rs line 48 at r2 (raw file):
Previously, dorimedini-starkware wrote…
I prefer to keep a single point of truth... if I change the 16..=32 range in the short_key module I will not remember to change the panic message (and if someone else adds new byte ranges, even worse)
the next PR should address your concerns
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 reviewed 3 of 3 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @rotem-starkware)
crates/starknet_committer_cli/src/bin/benchmark_run/Dockerfile line 35 at r4 (raw file):
Previously, dorimedini-starkware wrote…
should we use this default? or keep it None?
I think the default should be None, @rotem-starkware wdyt?
677fbb0 to
25e7965
Compare
dorimedini-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.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware and @rotem-starkware)
crates/starknet_committer_cli/src/bin/benchmark_run/Dockerfile line 35 at r4 (raw file):
Previously, nimrod-starkware wrote…
I think the default should be None, @rotem-starkware wdyt?
Done.
rotem-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.
@rotem-starkware reviewed 1 of 3 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware)
25e7965 to
3a7cf7e
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 reviewed all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @dorimedini-starkware)

No description provided.