Skip to content

chore(blockifier): limit l1 gas resources #5207

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

Merged
merged 1 commit into from
Mar 26, 2025
Merged

Conversation

noaov1
Copy link
Collaborator

@noaov1 noaov1 commented Mar 24, 2025

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@noaov1 noaov1 force-pushed the noa/limit_gas_for_l1_handler branch 4 times, most recently from bf5aaf9 to aa3aa62 Compare March 24, 2025 11:28
Copy link
Collaborator

@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 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dorimedini-starkware and @Yoni-Starkware)

@noaov1 noaov1 force-pushed the noa/allow_limit_gas_for_l1 branch from 894a2ae to 04c7de6 Compare March 24, 2025 13:36
@noaov1 noaov1 changed the base branch from noa/allow_limit_gas_for_l1 to main March 24, 2025 14:37
@noaov1 noaov1 force-pushed the noa/limit_gas_for_l1_handler branch from aa3aa62 to 85cd108 Compare March 24, 2025 15:12
Copy link
Collaborator

@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 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dorimedini-starkware and @Yoni-Starkware)

Copy link
Collaborator

@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.

Reviewed 2 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Yoni-Starkware)


crates/blockifier/src/transaction/transaction_execution.rs line 165 at r2 (raw file):

        // Enforce resource bounds.
        FeeCheckReport::check_all_gas_amounts_within_bounds(&l1_handler_bounds, &receipt.gas)?;

what happens if this fails? tx is rejected, right? no reverts on L1 handlers?

Code quote:

FeeCheckReport::check_all_gas_amounts_within_bounds(&l1_handler_bounds, &receipt.gas)?;

Copy link
Collaborator

@Yoni-Starkware Yoni-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 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @noaov1)


crates/blockifier/src/transaction/transaction_execution.rs line 165 at r2 (raw file):

Previously, dorimedini-starkware wrote…

what happens if this fails? tx is rejected, right? no reverts on L1 handlers?

Right


a discussion (no related file):
Wait for the Py side


crates/blockifier/src/fee/fee_checks.rs line 127 at r2 (raw file):

    }

    pub fn check_all_gas_amounts_within_bounds(

Just moved?


crates/blockifier/src/transaction/transaction_execution.rs line 157 at r2 (raw file):

        let execute_call_info = self.run_execute(state, &mut context, &mut remaining_gas)?;
        let l1_handler_payload_size = self.payload_size();
        let receipt = TransactionReceipt::from_l1_handler(

Are you fixing this in another PR?

Code quote:

 receipt = TransactionReceipt::from_l1_handle

Copy link
Collaborator Author

@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, 3 unresolved discussions (waiting on @Yoni-Starkware)


crates/blockifier/src/fee/fee_checks.rs line 127 at r2 (raw file):

Previously, Yoni-Starkware (Yoni) wrote…

Just moved?

And it became public, which is why it was moved.


crates/blockifier/src/transaction/transaction_execution.rs line 157 at r2 (raw file):

Previously, Yoni-Starkware (Yoni) wrote…

Are you fixing this in another PR?

Fixing what? Do you mean this?
(preliminary PR).

Copy link
Collaborator

@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, 3 unresolved discussions (waiting on @noaov1 and @Yoni-Starkware)

Copy link
Collaborator

@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: all files reviewed, 3 unresolved discussions (waiting on @noaov1 and @Yoni-Starkware)

@noaov1 noaov1 force-pushed the noa/limit_gas_for_l1_handler branch from 85cd108 to 611ab10 Compare March 25, 2025 19:23
Copy link
Collaborator Author

@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, 3 unresolved discussions (waiting on @Yoni-Starkware)


a discussion (no related file):

Previously, Yoni-Starkware (Yoni) wrote…

Wait for the Py side

Done.

Copy link
Collaborator

@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, 3 unresolved discussions (waiting on @Yoni-Starkware)

Copy link
Collaborator

@Yoni-Starkware Yoni-Starkware 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 2 of 3 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1)

@noaov1 noaov1 added this pull request to the merge queue Mar 26, 2025
Merged via the queue into main with commit 94ad6a7 Mar 26, 2025
15 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2025
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.

5 participants