Skip to content

feat: enforce minimum gas fee floor when Anzeon is enabled#54

Merged
code0xff merged 4 commits intodevfrom
feat/validate-fee
Feb 9, 2026
Merged

feat: enforce minimum gas fee floor when Anzeon is enabled#54
code0xff merged 4 commits intodevfrom
feat/validate-fee

Conversation

@code0xff
Copy link
Contributor

@code0xff code0xff commented Feb 6, 2026

Summary

When Anzeon is enabled and the chain is past the London fork, this PR enforces a minimum gas fee floor (minBaseFee + gasTip) during txpool validation.
The same rule applies not only to DynamicFeeTx but also to Legacy and AccessList transactions, by using GasFeeCap() (which equals gasPrice for legacy-style txs).

Changes

  • Strengthen txpool validation
    • If IsLondon(head.Number) && AnzeonEnabled()
    • Compute minFee = MinBaseFee + GasTip
    • Reject with ErrUnderpriced when tx.GasFeeCap() < minFee
  • Add tests
    • Add TestMinimumGasFeeValidation
    • Cover both legacy tx and dynamic fee tx:
      • Below minimum → reject (ErrUnderpriced)
      • At or above minimum → accept
  • Adjust existing tests
    • Update some test gas fee values to satisfy the new validation rule

Why

  • Under the Anzeon network policy with a base fee floor, prevent transactions below the minimum gas fee from entering the txpool in advance, which:
    • Reduces txpool pollution and spam
    • Ensures consistent enforcement of fee policy

Testing

  • Added and passing minimum gas fee validation tests in
    core/txpool/legacypool/legacypool_test.go

Notes

  • For LegacyTx and AccessListTx, GasFeeCap() returns gasPrice, so this validation effectively means:
    legacy gasPrice >= MinBaseFee + GasTip

@code0xff code0xff self-assigned this Feb 6, 2026
@code0xff code0xff added the enhancement New feature or request label Feb 6, 2026
@code0xff code0xff changed the title feat(txpool): enforce minimum gas fee floor when Anzeon is enabled feat: enforce minimum gas fee floor when Anzeon is enabled Feb 9, 2026
Copy link
Contributor

@hominlee-wemade hominlee-wemade left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@0xmhha 0xmhha left a comment

Choose a reason for hiding this comment

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

LGTM

@code0xff code0xff merged commit 47721b1 into dev Feb 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants