Skip to content
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

test(blockifier): test enforce_fee flag with new resource bounds #1311

Conversation

dorimedini-starkware
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware commented Oct 10, 2024

This change is Reviewable

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.12%. Comparing base (e3165c4) to head (f76c2ef).
Report is 59 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1311       +/-   ##
===========================================
+ Coverage   40.10%   69.12%   +29.02%     
===========================================
  Files          26      100       +74     
  Lines        1895    13446    +11551     
  Branches     1895    13446    +11551     
===========================================
+ Hits          760     9295     +8535     
- Misses       1100     3750     +2650     
- Partials       35      401      +366     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from baf905b to 0b69dfd Compare October 10, 2024 15:11
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from 63f505b to b1eb61d Compare October 10, 2024 15:11
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from 0b69dfd to bc9fb5a Compare October 13, 2024 08:13
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from b1eb61d to ad71ad0 Compare October 13, 2024 08:13
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from bc9fb5a to 5a44e4a Compare October 13, 2024 08:16
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from ad71ad0 to 94b0ea2 Compare October 13, 2024 08:16
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from 5a44e4a to c941c05 Compare October 13, 2024 12:38
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch 2 times, most recently from 826231f to 24b7c7a Compare October 13, 2024 13:04
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from c941c05 to 700647a Compare October 14, 2024 08:06
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from 24b7c7a to fd1a2e9 Compare October 14, 2024 08:06
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from 700647a to 4661ae0 Compare October 14, 2024 09:14
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from fd1a2e9 to 701e17e Compare October 14, 2024 09:14
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from 4661ae0 to 34f2cfe Compare October 14, 2024 12:12
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from 701e17e to 5b48978 Compare October 14, 2024 12:12
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from 34f2cfe to 6c50f41 Compare October 14, 2024 13:08
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from 5b48978 to 3a92389 Compare October 14, 2024 13:08
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from 6c50f41 to 356d3c9 Compare October 14, 2024 13:38
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch 2 times, most recently from 7338867 to 310f1b1 Compare October 14, 2024 14:28
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from 356d3c9 to e293497 Compare October 15, 2024 07:52
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from 310f1b1 to 6d46d6a Compare October 15, 2024 07:52
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from e293497 to d310e7f Compare October 15, 2024 08:34
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from 6d46d6a to dd72a30 Compare October 15, 2024 08:34
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from d310e7f to 947b091 Compare October 15, 2024 09:00
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from dd72a30 to ed36be2 Compare October 15, 2024 09:00
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from 947b091 to a8bda94 Compare October 15, 2024 11:31
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from ed36be2 to 20e99f2 Compare October 15, 2024 11:32
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test branch from a8bda94 to 409e971 Compare October 15, 2024 12:11
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from 20e99f2 to e5f3853 Compare October 15, 2024 12:36
@dorimedini-starkware dorimedini-starkware changed the base branch from 10-10-test_blockifier_l1_bounds_-_all_bounds_in_stack_trace_test to main October 15, 2024 12:37
@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch 3 times, most recently from 625b6a3 to a3a6d78 Compare October 22, 2024 11:56
Copy link
Contributor

@yoavGrs yoavGrs left a 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 1 files reviewed, 3 unresolved discussions (waiting on @dorimedini-starkware)


crates/blockifier/src/transaction/account_transactions_test.rs line 187 at r1 (raw file):

        deploy_account_tx_args! {
            class_hash: account.get_class_hash(),
            max_fee: Fee(u128::from(bound_multiplier) * MAX_FEE.0),

I prefer to write it explicitly.
(If you accept it, remove thebound_multiplier)

Suggestion:

max_fee: Fee(if zero_bounds { 0 } else { MAX_FEE.0 }),

crates/blockifier/src/transaction/account_transactions_test.rs line 208 at r1 (raw file):

    let account_tx = AccountTransaction::DeployAccount(deploy_account_tx);
    let enforce_fee = account_tx.create_tx_info().enforce_fee();

Please verify that
assert_ne!(zero_bounds, enforce_fee);


crates/blockifier/src/transaction/account_transactions_test.rs line 210 at r1 (raw file):

    let enforce_fee = account_tx.create_tx_info().enforce_fee();
    let result = account_tx.execute(state, &block_context, enforce_fee, true);
    assert_eq!(result.is_err(), enforce_fee);

Explain in a comment, why the tx fails where there are gas bounds.

Copy link
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a 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 1 files reviewed, 2 unresolved discussions (waiting on @yoavGrs)


crates/blockifier/src/transaction/account_transactions_test.rs line 208 at r1 (raw file):

Previously, yoavGrs wrote…

Please verify that
assert_ne!(zero_bounds, enforce_fee);

Done.


crates/blockifier/src/transaction/account_transactions_test.rs line 210 at r1 (raw file):

Previously, yoavGrs wrote…

Explain in a comment, why the tx fails where there are gas bounds.

Done.

@dorimedini-starkware dorimedini-starkware force-pushed the 10-10-test_blockifier_test_enforce_fee_flag_with_new_resource_bounds branch from a3a6d78 to f76c2ef Compare October 28, 2024 14:47
Copy link

Artifacts upload triggered. View details here

Copy link
Contributor

@yoavGrs yoavGrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dorimedini-starkware)

Copy link
Collaborator Author

dorimedini-starkware commented Oct 29, 2024

Merge activity

  • Oct 29, 6:40 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Oct 29, 6:41 AM EDT: A user merged this pull request with Graphite.

@dorimedini-starkware dorimedini-starkware merged commit 84e8156 into main Oct 29, 2024
12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants