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

fix(l1): fix effective gas price calculation #1881

Merged
merged 6 commits into from
Feb 6, 2025

Conversation

JulianVentura
Copy link
Contributor

@JulianVentura JulianVentura commented Feb 6, 2025

Description

This PR fixes the effective gas price calculation, now returning None if the max_fee_per_gas is lower than the base_fee_per_gas. This is later converted to a VMError::InvalidTransaction before processing the actual transaction.

Copy link

github-actions bot commented Feb 6, 2025

| File                                                               | Lines | Diff |
+--------------------------------------------------------------------+-------+------+
| /home/runner/work/ethrex/ethrex/crates/common/types/transaction.rs | 2549  | +3   |
+--------------------------------------------------------------------+-------+------+

Total lines added: +3
Total lines removed: 0
Total lines changed: 3

@JulianVentura JulianVentura self-assigned this Feb 6, 2025
@JulianVentura JulianVentura marked this pull request as ready for review February 6, 2025 17:44
@JulianVentura JulianVentura requested a review from a team as a code owner February 6, 2025 17:44
Copy link
Contributor

@fborello-lambda fborello-lambda left a comment

Choose a reason for hiding this comment

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

It should work, but I think we could do this with a "oneliner" what do you think?

crates/common/types/transaction.rs Show resolved Hide resolved
@JulianVentura JulianVentura added this pull request to the merge queue Feb 6, 2025
Merged via the queue into main with commit 93ffd3b Feb 6, 2025
20 checks passed
@JulianVentura JulianVentura deleted the fix/calc_effective_gas_price branch February 6, 2025 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants