feat(firehose): let chain hooks choose post-tx gas accounting - #36
Merged
maoueh merged 1 commit intoSep 17, 2026
Conversation
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
force-pushed
the
feat/firehose-post-tx-gas-accounting
branch
from
September 17, 2026 21:33
435f3b6 to
95875b0
Compare
maoueh
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FirehoseWrappedExecutorderived post-transactionGasRefundandRewardTransactionFeefrom Ethereum fee rules.PostTxExtrascould add balance changes but could not correct or suppress those two.PostTxGasAccounting { refund_gas_price, reward_gas_price, extra_reward }, withethereum(...)andnone()constructors.PostTxExtras::gas_accountingdefaults to Ethereum parameters, so existing chains keep their output.refund_gas_priceand emits a singleRewardTransactionFeeofgas_used × reward_gas_price + extra_reward.