Skip to content

Move priority-fee check to validate_transaction#3056

Open
jevinjojo wants to merge 1 commit into
ethereum:forks/amsterdamfrom
jevinjojo:move-priority-fee-check
Open

Move priority-fee check to validate_transaction#3056
jevinjojo wants to merge 1 commit into
ethereum:forks/amsterdamfrom
jevinjojo:move-priority-fee-check

Conversation

@jevinjojo

@jevinjojo jevinjojo commented Jun 26, 2026

Copy link
Copy Markdown

🗒️ Description

Moves the stateless check tx.max_fee_per_gas < tx.max_priority_fee_per_gas
from check_transaction (stateful layer) to validate_transaction
(stateless layer) in the amsterdam fork.

  • The check only compares two fields on the transaction and needs no block
    context, so it belongs in the stateless layer. The remaining checks in that
    block use block_env.base_fee_per_gas and correctly stay in
    check_transaction.

  • In validate_transaction the check is guarded by an
    isinstance(tx, FeeMarketCapableTransaction) check so legacy transactions are
    unaffected. The now-unused import is removed from fork.py

🔗 Related Issues

✅ Checklist

  • All: Ran fast static checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    just static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

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.

Should tx.max_fee_per_gas < tx.max_priority_fee_per_gas be moved to validate_transaction?

1 participant