Skip to content

feat(ledger-tail): log gas_used on proposed_block - #3250

Closed
johnmarcou wants to merge 1 commit into
category-labs:masterfrom
johnmarcou:john/ledger-tail-gas-used-sum
Closed

johnmarcou wants to merge 1 commit into
category-labs:masterfrom
johnmarcou:john/ledger-tail-gas-used-sum

Conversation

@johnmarcou

Copy link
Copy Markdown

This PR implements gas_used reporting in ledger-tail's proposed_block log event.

  • Adds a gas_used field to the proposed_block tracing log line, alongside the existing num_tx
  • Computed as the sum of each proposed transaction's gas_limit, since post-MONAD_ONE unused-gas refunds are hardcoded to 0, making gas_used == gas_limit exactly for every transaction
  • Available synchronously from the proposal's own transaction list, with no need to wait on asynchronous execution output (delayed_execution_results / triedb)
  • Adds alloy-consensus as a dev-dependency of monad-node to bring the Transaction trait (.gas_limit()) into scope for the example binary

@rtsaimonad

Copy link
Copy Markdown
Contributor

@omegablitz do you mind reviewing this for @johnmarcou (MF)?

Post-MONAD_ONE, unused-gas refunds are hardcoded to 0, so a block's
gas_used equals the sum of its transactions' gas_limit exactly. This
lets proposed_block report gas_used directly from the proposal's tx
list, without waiting on asynchronous execution output.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
auto-merge was automatically disabled September 17, 2026 21:00

Head branch was pushed to by a user without write access

@johnmarcou
johnmarcou force-pushed the john/ledger-tail-gas-used-sum branch from 40cd85a to 99bcdfe Compare September 17, 2026 21:00
@omegablitz

Copy link
Copy Markdown
Contributor

Superceded by #3271

@omegablitz omegablitz closed this Sep 17, 2026
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.

4 participants