-
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): add resource bounds to faulty account transaction creator #365
chore(blockifier): add resource bounds to faulty account transaction creator #365
Conversation
9176d8e
to
02b223e
Compare
68fa35c
to
c032388
Compare
02b223e
to
4c06451
Compare
c032388
to
6794b4c
Compare
4c06451
to
ed871c4
Compare
6794b4c
to
6a12a10
Compare
ed871c4
to
747bdeb
Compare
6a12a10
to
932c145
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 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @meship-starkware)
crates/blockifier/src/blockifier/stateful_validator_test.rs
line 50 at r1 (raw file):
// TODO(Arni, 1/5/2024): Cover resource bounds in version 3 txs. Test the validator validate // enough "fee" in version 3 txs.
Can be removed, no?
Code quote:
// TODO(Arni, 1/5/2024): Cover resource bounds in version 3 txs. Test the validator validate
// enough "fee" in version 3 txs.
crates/blockifier/src/blockifier/stateful_validator_test.rs
line 57 at r1 (raw file):
class_hash, validate_constructor, // TODO(Arni, 1/5/2024): Add test for insufficient max fee.
Suggestion:
// TODO(Arni, 1/5/2024): Add test for insufficient maximal resources..
crates/blockifier/src/blockifier/stateful_validator_test.rs
line 74 at r1 (raw file):
let charge_fee = false; let skip_validation = false; let result = stateful_validator.perform_validations(tx, skip_validation, charge_fee);
Please restore
Code quote:
let charge_fee = false;
let skip_validation = false;
let result = stateful_validator.perform_validations(tx, skip_validation, charge_fee);
crates/blockifier/src/blockifier/stateful_validator_test.rs
line 92 at r1 (raw file):
sender_address: faulty_account.get_instance_address(0), class_hash: faulty_account.get_class_hash(), max_fee: Fee(BALANCE),
Suggestion:
tx_version: TransactionVersion::THREE,
sender_address: faulty_account.get_instance_address(0),
class_hash: faulty_account.get_class_hash(),
crates/blockifier/src/transaction/transactions_test.rs
line 1557 at r1 (raw file):
contract_address_salt: salt_manager.next_salt(), resource_bounds: default_testing_resource_bounds(), ..default_args
As it is defined in the default args :)
Same below
Suggestion:
..default_args
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.
Nice catch!
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @meship-starkware)
932c145
to
b4733dc
Compare
Benchmark movements: |
b4733dc
to
1c4d377
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #365 +/- ##
=======================================
Coverage 76.42% 76.42%
=======================================
Files 349 349
Lines 36936 36939 +3
Branches 36936 36939 +3
=======================================
+ Hits 28228 28231 +3
- Misses 6383 6384 +1
+ Partials 2325 2324 -1 ☔ View full report in Codecov by Sentry. |
1c4d377
to
07cee6a
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 4 files reviewed, 2 unresolved discussions (waiting on @noaov1)
crates/blockifier/src/blockifier/stateful_validator_test.rs
line 50 at r1 (raw file):
Previously, noaov1 (Noa Oved) wrote…
Can be removed, no?
Done.
crates/blockifier/src/transaction/transactions_test.rs
line 1557 at r1 (raw file):
Previously, noaov1 (Noa Oved) wrote…
As it is defined in the default args :)
Same below
This does not work because reasource_boundes does not implement copy.
Will be solved soon after nimrod will finish with his PRs. Would you like me to add a TODO?
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 4 of 4 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @meship-starkware)
This change is