-
Notifications
You must be signed in to change notification settings - Fork 28
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
chore(blockifier, native_blockifier): update versioned constants #559
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main-v0.13.2 #559 +/- ##
================================================
+ Coverage 76.38% 76.43% +0.04%
================================================
Files 316 316
Lines 34282 34263 -19
Branches 34282 34263 -19
================================================
+ Hits 26188 26190 +2
+ Misses 5817 5797 -20
+ Partials 2277 2276 -1 ☔ View full report in Codecov by Sentry. |
d83a3aa
to
9189079
Compare
3c2a46d
to
380a783
Compare
7f1b309
to
0d617f4
Compare
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.
+reviewer:@dorimedini-starkware +reviewer:@Yonatan-Starkware
Reviewable status: 0 of 3 files reviewed, all discussions resolved (waiting on @dorimedini-starkware and @Yonatan-Starkware)
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.
-reviewer:@Yonatan-Starkware +reviewer:@Yoni-Starkware
Reviewable status: 0 of 3 files reviewed, all discussions resolved (waiting on @dorimedini-starkware and @Yoni-Starkware)
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.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @amosStarkware and @Yoni-Starkware)
crates/blockifier/src/versioned_constants.rs
line 746 at r1 (raw file):
pub max_recursion_depth: usize, pub invoke_tx_max_n_steps: Option<u32>, }
why is only one field optional here?
I would expect either:
- make all three optional (and override only what is
Some
, as you do above) - make none optional, and force the caller to override all three (if the caller needs only one override, the caller can explicitly put the defaults in the other two fields)
I personally prefer (2)
Code quote:
pub struct VersionedConstantsOverrides {
pub validate_max_n_steps: u32,
pub max_recursion_depth: usize,
pub invoke_tx_max_n_steps: Option<u32>,
}
crates/blockifier/src/versioned_constants_test.rs
line 97 at r1 (raw file):
/// Assert versioned constants overrides are used when provided. #[test] fn test_versioned_constants_overrides() {
parametrize all three fields with #[values]
in this test? or is it redundant?
Code quote:
#[test]
fn test_versioned_constants_overrides() {
crates/native_blockifier/src/py_objects.rs
line 53 at r1 (raw file):
pub max_recursion_depth: usize, pub invoke_tx_max_n_steps: Option<u32>, }
see above: I think either all optional or none optional
Code quote:
pub struct PyVersionedConstantsOverrides {
pub validate_max_n_steps: u32,
pub max_recursion_depth: usize,
pub invoke_tx_max_n_steps: Option<u32>,
}
6500b49
to
dc56135
Compare
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, 3 unresolved discussions (waiting on @dorimedini-starkware and @Yoni-Starkware)
crates/blockifier/src/versioned_constants.rs
line 746 at r1 (raw file):
Previously, dorimedini-starkware wrote…
why is only one field optional here?
I would expect either:
- make all three optional (and override only what is
Some
, as you do above)- make none optional, and force the caller to override all three (if the caller needs only one override, the caller can explicitly put the defaults in the other two fields)
I personally prefer (2)
Done.
crates/blockifier/src/versioned_constants_test.rs
line 97 at r1 (raw file):
Previously, dorimedini-starkware wrote…
parametrize all three fields with
#[values]
in this test? or is it redundant?
I added the other values to the test - no need for parameterising IMO
crates/native_blockifier/src/py_objects.rs
line 53 at r1 (raw file):
Previously, dorimedini-starkware wrote…
see above: I think either all optional or none optional
Done.
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.
Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Yoni-Starkware)
dc56135
to
8aae73b
Compare
8aae73b
to
0b13111
Compare
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.
Reviewed all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Yoni-Starkware)
This change is