-
Notifications
You must be signed in to change notification settings - Fork 25
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): dedup test util l1 handler creator #2131
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Artifacts upload triggered. View details here |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2131 +/- ##
===========================================
+ Coverage 40.10% 77.38% +37.27%
===========================================
Files 26 108 +82
Lines 1895 13966 +12071
Branches 1895 13966 +12071
===========================================
+ Hits 760 10807 +10047
- Misses 1100 2698 +1598
- Partials 35 461 +426 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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 @giladchase and @yair-starkware)
crates/starknet_api/src/test_utils/l1_handler.rs
line 55 at r1 (raw file):
// if tx_version != TransactionVersion::THREE { // panic!("Unsupported transaction version: {:?}.", l1_handler_tx_args.version); // }
@giladchase - How critical is this validation? The test crates/blockifier/src/transaction/transactions_test.rs
--- test_l1_handler
fails with TransactionVersion::THREE
.
This implies both Versions should be accounted for and tested for... I am working on this PR.
Code quote:
// TODO(Arni): Re-enable this validation.
// if tx_version != TransactionVersion::THREE {
// panic!("Unsupported transaction version: {:?}.", l1_handler_tx_args.version);
// }
0681378
to
3f82a9f
Compare
Artifacts upload triggered. View details here |
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 @yair-starkware)
crates/starknet_api/src/test_utils/l1_handler.rs
line 55 at r1 (raw file):
How critical is this validation
AFAIK we don't intend to support version < 3, if you heard differently then remove the validation, otherwise it's probably better to keep it and fix the source.
crates/blockifier/src/transaction/transactions_test.rs
---test_l1_handler
fails withTransactionVersion::THREE
.
Is this a typo? I don't understand how this can happen, the conditional raises only if transactionVersion is not THREE 🤔 .
3f82a9f
to
d48cc06
Compare
Artifacts upload triggered. View details here |
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 @yair-starkware)
crates/starknet_api/src/test_utils/l1_handler.rs
line 55 at r1 (raw file):
Previously, giladchase wrote…
How critical is this validation
AFAIK we don't intend to support version < 3, if you heard differently then remove the validation, otherwise it's probably better to keep it and fix the source.
crates/blockifier/src/transaction/transactions_test.rs
---test_l1_handler
fails withTransactionVersion::THREE
.Is this a typo? I don't understand how this can happen, the conditional raises only if transactionVersion is not THREE 🤔 .
I will remove this assertion. This test util can be shared with the blockifier test utils, that uses - and assumes the version is 0.
You can see it in this PR.
This is not a typo: In #2146, there is one test case that fails. The test case is of Version::THREE, with USE kzg.
crates/blockifier/src/test_utils/l1_handler.rs
line 24 at r2 (raw file):
paid_fee_on_l1: l1_fee, ..Default::default() })
@giladchase see code dedup. (using the snapi's test util).
See the version zero.
Code quote:
executable_l1_handler_tx(L1HandlerTxArgs {
version: TransactionVersion::ZERO,
contract_address,
entry_point_selector: selector_from_name("l1_handler_set_value"),
calldata,
paid_fee_on_l1: l1_fee,
..Default::default()
})
d48cc06
to
8b70d13
Compare
Artifacts upload triggered. View details here |
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 @yair-starkware)
crates/starknet_api/src/test_utils/l1_handler.rs
line 55 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
I will remove this assertion. This test util can be shared with the blockifier test utils, that uses - and assumes the version is 0.
You can see it in this PR.This is not a typo: In #2146, there is one test case that fails. The test case is of Version::THREE, with USE kzg.
Oh right, ya kill it with fire , tnx!
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 @yair-starkware)
crates/starknet_api/src/test_utils/l1_handler.rs
line 55 at r1 (raw file):
Previously, giladchase wrote…
Oh right, ya kill it with fire , tnx!
I mean delete it altogether, no need to reenable if it if the version3 assumption is incorrect
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 2 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @yair-starkware)
No description provided.