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

chore(blockifier): have limit_steps_by_resources flag rep charge_fee flag and enforce_fee ret val #833

Conversation

avivg-starkware
Copy link
Contributor

@avivg-starkware avivg-starkware commented Sep 17, 2024

This change is Reviewable

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch 2 times, most recently from 3a57b77 to bf61e1c Compare September 17, 2024 07:39
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.63%. Comparing base (b0cfe82) to head (3c6fe63).
Report is 415 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (b0cfe82) and HEAD (3c6fe63). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (b0cfe82) HEAD (3c6fe63)
3 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #833       +/-   ##
===========================================
- Coverage   74.18%   63.63%   -10.56%     
===========================================
  Files         359      131      -228     
  Lines       36240    17487    -18753     
  Branches    36240    17487    -18753     
===========================================
- Hits        26886    11128    -15758     
+ Misses       7220     5572     -1648     
+ Partials     2134      787     -1347     
Flag Coverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch from bf61e1c to 843da5d Compare September 17, 2024 07:49
@avivg-starkware avivg-starkware changed the title chore(blockifier): have limit_steps_by_resources flag represent charge_fee flag and enforce_fee return value chore(blockifier): have limit_steps_by_resources flag represent charge_fee flag &enforce_fee ret val Sep 17, 2024
@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch from 843da5d to 6c9a32d Compare September 17, 2024 08:15
@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_enforce_fee branch from 4d232d6 to 7affb82 Compare September 17, 2024 08:16
Copy link

Benchmark movements:
tree_computation_flow performance improved 😺
tree_computation_flow time: [66.310 ms 66.396 ms 66.493 ms]
change: [-2.9615% -1.9610% -1.0823%] (p = 0.00 < 0.05)
Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severe

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch 2 times, most recently from 49d8c5c to 03a7b88 Compare September 17, 2024 12:14
@avivg-starkware avivg-starkware changed the title chore(blockifier): have limit_steps_by_resources flag represent charge_fee flag &enforce_fee ret val chore(blockifier): have limit_steps_by_resources flag rep charge_fee flag and enforce_fee ret val Sep 17, 2024
Copy link
Contributor

@meship-starkware meship-starkware 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 2 files at r1, 9 of 9 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @avivg-starkware)


crates/blockifier/src/blockifier/stateful_validator.rs line 118 at r2 (raw file):

        let tx_context = Arc::new(self.tx_executor.block_context.to_tx_context(tx));

        let limit_steps_by_resources =  tx.create_tx_info().enforce_fee(); //aviv: was true;

Remove all aviv comments.


crates/blockifier/src/concurrency/worker_logic.rs line 30 at r2 (raw file):

    TransactionInfoCreator,
};

Revert this change.

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch 2 times, most recently from 8cbac73 to 3df10e1 Compare September 17, 2024 13:25
Copy link
Contributor

@meship-starkware meship-starkware 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 2 files at r3, all commit messages.
Reviewable status: 9 of 10 files reviewed, 1 unresolved discussion (waiting on @avivg-starkware)

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_enforce_fee branch from 7affb82 to c1309cb Compare September 19, 2024 12:13
@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch from 3df10e1 to a4006fc Compare September 19, 2024 12:55
@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_enforce_fee branch from c1309cb to 7dd6541 Compare September 19, 2024 14:32
@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch from a4006fc to cf3b295 Compare September 19, 2024 14:40
Copy link
Contributor

@meship-starkware meship-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 11 of 14 files at r4, all commit messages.
Reviewable status: 11 of 14 files reviewed, 1 unresolved discussion (waiting on @avivg-starkware)

Copy link
Contributor

@meship-starkware meship-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 14 files at r4.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @avivg-starkware)

Copy link
Contributor

@meship-starkware meship-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: all files reviewed, 1 unresolved discussion (waiting on @avivg-starkware)


crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs line 244 at r4 (raw file):

        ..trivial_external_entry_point_with_address(test_contract_address)
    };

Revert this space

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_enforce_fee branch 2 times, most recently from 531e209 to b47f494 Compare September 29, 2024 13:06
@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch from cf3b295 to 3e17257 Compare September 29, 2024 13:08
@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_enforce_fee branch from b47f494 to 3153235 Compare September 29, 2024 13:24
@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch from 3e17257 to 8491603 Compare September 29, 2024 13:30
@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_enforce_fee branch 3 times, most recently from 30144eb to c62db67 Compare October 13, 2024 14:45
@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch from 18f62c7 to d1996b7 Compare October 13, 2024 15:27
Copy link
Contributor Author

@avivg-starkware avivg-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: 10 of 16 files reviewed, 3 unresolved discussions (waiting on @meship-starkware and @noaov1)


crates/blockifier/src/transaction/transaction_execution.rs line 144 at r7 (raw file):

Previously, noaov1 (Noa Oved) wrote…

We can leave it as is. However, we need to add a special treatment for the L1 handler case.

Done.

Copy link
Contributor

@meship-starkware meship-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 6 files at r13, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @avivg-starkware and @noaov1)

a discussion (no related file):
Please rebase over main


@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch 2 times, most recently from c0fef24 to b7acb06 Compare October 14, 2024 07:03
@avivg-starkware avivg-starkware changed the base branch from avivg/blockifier/combine_charge_fee_w_enforce_fee to main October 14, 2024 07:24
Copy link
Contributor

@meship-starkware meship-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 12 of 12 files at r15, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @noaov1)

Copy link
Collaborator

@noaov1 noaov1 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 6 files at r13, 1 of 12 files at r15, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @avivg-starkware)

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch from b7acb06 to 8408f29 Compare October 14, 2024 13:18
Copy link
Collaborator

@noaov1 noaov1 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 9 files at r10, 4 of 6 files at r13, 9 of 12 files at r15, 3 of 3 files at r16, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @avivg-starkware)

Copy link
Collaborator

@noaov1 noaov1 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: all files reviewed, 1 unresolved discussion (waiting on @avivg-starkware)


crates/blockifier/src/transaction/transaction_execution.rs line 144 at r7 (raw file):

Previously, avivg-starkware wrote…

Done.

Changed my mind- please set it to false.

Copy link
Collaborator

@noaov1 noaov1 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 2 files at r3.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @avivg-starkware)

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch from 8408f29 to ac8ac5e Compare October 15, 2024 08:27
Copy link
Contributor Author

@avivg-starkware avivg-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: all files reviewed, 1 unresolved discussion (waiting on @noaov1)


crates/blockifier/src/transaction/transaction_execution.rs line 144 at r7 (raw file):

Previously, noaov1 (Noa Oved) wrote…

Changed my mind- please set it to false.

Done.

Copy link
Contributor Author

@avivg-starkware avivg-starkware 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 14 files at r4, 1 of 9 files at r9, 1 of 9 files at r10, 2 of 7 files at r12, 4 of 6 files at r13, 10 of 12 files at r15, 3 of 3 files at r16.
Reviewable status: 13 of 22 files reviewed, 1 unresolved discussion (waiting on @meship-starkware and @noaov1)

Copy link
Collaborator

@noaov1 noaov1 left a comment

Choose a reason for hiding this comment

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

Reviewed 9 of 9 files at r17, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @avivg-starkware)


crates/blockifier/src/test_utils/struct_impls.rs line 89 at r17 (raw file):

        self.execute_directly_given_tx_info(
            state,
            TransactionInfo::Deprecated(DeprecatedTransactionInfo::default()),

?

Suggestion:

             // TODO(Yoni, 1/12/2024): change the default to V3.
            TransactionInfo::Deprecated(DeprecatedTransactionInfo::default()),

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch from ac8ac5e to ad89489 Compare October 15, 2024 10:26
Copy link
Contributor Author

@avivg-starkware avivg-starkware left a 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: all files reviewed, 1 unresolved discussion (waiting on @noaov1)


crates/blockifier/src/test_utils/struct_impls.rs line 89 at r17 (raw file):

Previously, noaov1 (Noa Oved) wrote…

?

there's only one comment such as this I see in this file on origin/main ( line 54 ). perhaps it was recently changed?

Copy link
Contributor Author

@avivg-starkware avivg-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 9 of 9 files at r17.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @noaov1)

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch from ad89489 to 3c6fe63 Compare October 15, 2024 14:00
Copy link
Collaborator

@noaov1 noaov1 left a 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 r18, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @avivg-starkware)

Copy link
Contributor Author

@avivg-starkware avivg-starkware left a 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @avivg-starkware)

@avivg-starkware avivg-starkware merged commit f03184b into main Oct 15, 2024
20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2024
@avivg-starkware avivg-starkware deleted the avivg/blockifier/combine_charge_fee_w_limit_steps_by_resources branch October 28, 2024 13:46
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.

3 participants