Skip to content

Blocks base_fee_per_gas don't match EIP-1559 #883

@anaPerezGhiglia

Description

@anaPerezGhiglia

Problem description

While developing NomicFoundation/edr, we identified at least six blocks on Base Mainnet whose header base_fee_per_gas values do not match the values derived from the EIP-1559 calculation. We were unable to find any specification or documented exception that would explain this discrepancy.

Technical details

  • All failing bocks are blocks which parent gas used was over the target
  • The inconsistent blocks are:
    • 39628092
    • 39628093
    • 39628094
    • 39628095
    • 39628096
    • 39628097
  • Other over-target blocks do match EIP-1559 specification.

You can check the tests that evidence this here

having ALCHEMY_URL environment variable defined in context you can run the tests with

cargo test --package edr_op --test main --all-features -- integration::base_fee_calc::test_dynamic_base_fee_base_mainnet

Double checks

We have validated that:

  • the data returned by Alchemy json rpc node matches the data exposed by basescan
  • EDR base fee calculation matches the EIP-1559 spec
    • in the tests we are also validating that EDR calculations matches alloy-eips calculation to double check.

Note: Sorry in advance if this issue does not belong in this repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions