Skip to content

feat(firehose): let chain hooks choose post-tx gas accounting - #36

Merged
maoueh merged 1 commit into
streamingfast:release/reth-2.xfrom
panos-xyz:feat/firehose-post-tx-gas-accounting
Sep 17, 2026
Merged

maoueh merged 1 commit into
streamingfast:release/reth-2.xfrom
panos-xyz:feat/firehose-post-tx-gas-accounting

Conversation

@panos-xyz

@panos-xyz panos-xyz commented Sep 17, 2026 •

Copy link
Copy Markdown

FirehoseWrappedExecutor derived post-transaction GasRefund and RewardTransactionFee from Ethereum fee rules. PostTxExtras could add balance changes but could not correct or suppress those two.

  • PostTxGasAccounting { refund_gas_price, reward_gas_price, extra_reward }, with ethereum(...) and none() constructors.
  • PostTxExtras::gas_accounting defaults to Ethereum parameters, so existing chains keep their output.
  • The inspector refunds at refund_gas_price and emits a single RewardTransactionFee of gas_used × reward_gas_price + extra_reward.

The generic post-tx accounting assumes Ethereum fee rules: unused gas is
refunded at the effective gas price and only the priority fee reaches the
beneficiary. Chains that do not burn the base fee, credit an extra data fee
to the beneficiary, or charge gas outside the native balance could only add
balance changes through PostTxExtras, not correct the generic ones.

PostTxExtras::gas_accounting returns the refund price, reward price and extra
reward for the current transaction. The default keeps Ethereum semantics, and
the reward is still emitted as a single RewardTransactionFee change.

Claude-Session: https://claude.ai/code/session_017NVMdn2RC1Nv5tfSTCkvro
@maoueh
maoueh force-pushed the feat/firehose-post-tx-gas-accounting branch from 435f3b6 to 95875b0 Compare September 17, 2026 21:33
@maoueh
maoueh merged commit dca9721 into streamingfast:release/reth-2.x Sep 17, 2026
4 checks passed
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