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

Add safety check that min basefee must be positive for gas estimation #2621

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

PlasmaPower
Copy link
Collaborator

No description provided.

@PlasmaPower PlasmaPower marked this pull request as ready for review August 29, 2024 15:48
@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Aug 29, 2024
Copy link
Member

@joshuacolvin0 joshuacolvin0 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -69,6 +69,9 @@ func (con ArbOwner) SetL2BaseFee(c ctx, evm mech, priceInWei huge) error {

// SetMinimumL2BaseFee sets the minimum base fee needed for a transaction to succeed
func (con ArbOwner) SetMinimumL2BaseFee(c ctx, evm mech, priceInWei huge) error {
if c.txProcessor.MsgIsNonMutating() && priceInWei.Sign() == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

the idea is to only fail eth_call / gas estimation and leave normal operation unchanged?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep. It should be fine to change normal operation too, but I think let's leave that for the next ArbOS version.

@joshuacolvin0 joshuacolvin0 merged commit 98cd864 into master Aug 29, 2024
13 checks passed
@joshuacolvin0 joshuacolvin0 deleted the min-basefee-safety branch August 29, 2024 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-approved s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants