-
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): fix default strk l2 gas price test util #2444
chore(blockifier): fix default strk l2 gas price test util #2444
Conversation
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Artifacts upload workflows: |
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, all discussions resolved (waiting on @alonh5)
crates/blockifier/src/versioned_constants_test.rs
line 213 at r1 (raw file):
assert_eq!(expected_l2_gas_price.get(), result_l2_gas_price.get()); }
I'm not sure we want to add this test.
- In theory, we are testing the
convert
function here. In practice, we test that the test util is correct. - Each time versioned constants change, we must change this value.
- a. I am not sure it is interesting to keep the test util accurate for this conversion.
Code quote:
#[rstest]
#[case::strk(DEFAULT_STRK_L1_GAS_PRICE, DEFAULT_STRK_L2_GAS_PRICE)]
fn test_convert_l1_to_l2_gas_price_round_up(
#[case] l1_gas_price: NonzeroGasPrice,
#[case] expected_l2_gas_price: NonzeroGasPrice,
) {
let result_l2_gas_price = NonzeroGasPrice::new(
VersionedConstants::latest_constants()
.convert_l1_to_l2_gas_price_round_up(l1_gas_price.into()),
)
.unwrap();
assert_eq!(expected_l2_gas_price.get(), result_l2_gas_price.get());
}
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## arni/test_utils/gas_prices/move_consts_to_snapi #2444 +/- ##
==================================================================================
Coverage ? 51.56%
==================================================================================
Files ? 291
Lines ? 33227
Branches ? 33227
==================================================================================
Hits ? 17133
Misses ? 14951
Partials ? 1143 ☔ View full report in Codecov by Sentry. |
f1030a1
to
4760d79
Compare
0dcf39a
to
71ef06d
Compare
Benchmark movements: |
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 1 of 3 files at r2, all commit messages.
Reviewable status: 1 of 3 files reviewed, 1 unresolved discussion (waiting on @ArniStarkware)
crates/blockifier/src/versioned_constants_test.rs
line 213 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
I'm not sure we want to add this test.
- In theory, we are testing the
convert
function here. In practice, we test that the test util is correct.- Each time versioned constants change, we must change this value.
- a. I am not sure it is interesting to keep the test util accurate for this conversion.
When you say test util, do you mean the DEFAULT_STRK_L2_GAS_PRICE
constant?
I agree, I think we can remove this test and restore the value. In that case this PR can be closed right?
105bf9a
to
3e497cf
Compare
Closed due to no need. |
No description provided.