Skip to content

[pallet-revive] ETH blocks/tx receipts mismatch in terms of base_fee_per_gas/effective_gas_price #10177

@iulianbarbu

Description

@iulianbarbu

The mismatch is based on:

  1. assethub runtime has usually pallet_transaction_payment configured with an index before pallet_revive, and on_finalize hooks are executed ordered by index.
  2. an eth block is committed to storage in pallet_revive on_finalize hook.
  3. in pallet-revive's on_finalize, to build the eth block we read pallet-transaction-payment's NextFeeMultiplier from storage, when setting its base_fee_per_gas.
  4. before 3. (as mentioned in 1.), pallet-transaction-payment's on_finalize is called, which updates the NextFeeMultiplier value, which will be relevant for the transactions included in the next block.
  5. when 3. ends, the current eth block base_fee_per_gas will point to a NextFeeMultiplier which is not relevant for the eth block, but for the next eth block.

TL;DR each eth block's base_fee_per_gas points to the NextFeeMultipier considered in the fees calculations for the transactions in the next substrate/eth block, not the transactions of the current block. This is something different than how anvil/eth blocks are built after EIP1559.

LE: related problem #10177 (comment) fixed by #10148

cc @pgherveou @athei

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions