Skip to content

execution/protocol: EIP-7778: Block Gas Accounting without Refunds#18663

Merged
yperbasis merged 14 commits intomainfrom
yperbasis/eip-7778
Jan 30, 2026
Merged

execution/protocol: EIP-7778: Block Gas Accounting without Refunds#18663
yperbasis merged 14 commits intomainfrom
yperbasis/eip-7778

Conversation

@yperbasis
Copy link
Member

@yperbasis yperbasis commented Jan 14, 2026

@yperbasis yperbasis linked an issue Jan 14, 2026 that may be closed by this pull request
@yperbasis yperbasis added the Glamsterdam https://eips.ethereum.org/EIPS/eip-7773 label Jan 14, 2026
@yperbasis yperbasis changed the title EIP-7778: Block Gas Accounting without Refunds execution/protocol: EIP-7778: Block Gas Accounting without Refunds Jan 14, 2026
@yperbasis yperbasis changed the base branch from main to bal-devnet-2 January 15, 2026 10:29
@yperbasis yperbasis changed the base branch from bal-devnet-2 to main January 19, 2026 09:01
@yperbasis yperbasis marked this pull request as ready for review January 30, 2026 08:32
@yperbasis yperbasis requested review from Copilot and shohamc1 January 30, 2026 08:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements EIP-7778: Block Gas Accounting without Refunds, which changes how gas is accounted for in blocks by distinguishing between gas the user pays (with refunds) and gas counted toward block limits.

Changes:

  • Introduces a GasUsed struct with separate Receipt and Block fields to track different gas accounting methods
  • Replaces direct GasUsed field access with ReceiptGasUsed and BlockGasUsed throughout the codebase
  • Updates gas accounting logic to implement EIP-7778's Amsterdam fork rules

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
execution/vm/evmtypes/evmtypes.go Splits GasUsed into ReceiptGasUsed and BlockGasUsed fields
execution/protocol/state_transition.go Implements EIP-7778 gas accounting logic with new blockGasUsed tracking
execution/protocol/state_processor.go Introduces GasUsed struct and updates ApplyTransaction signature
execution/protocol/block_exec.go Updates ExecuteBlockEphemerally to use new GasUsed struct
rpc/transactions/tracing.go Updates tracer calls to use ReceiptGasUsed
rpc/jsonrpc/*.go Updates RPC handlers to use ReceiptGasUsed
execution/stagedsync/*.go Updates block execution to use BlockGasUsed for validation
execution/tests/*.go Updates test utilities to use ReceiptGasUsed
execution/types/receipt_test.go Removes unused test code and import statements
execution/types/receipt.go Removes DeriveFields method and adds CumulativeGasUsed helper

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yperbasis yperbasis merged commit c61ef3f into main Jan 30, 2026
24 of 26 checks passed
@yperbasis yperbasis deleted the yperbasis/eip-7778 branch January 30, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Glamsterdam https://eips.ethereum.org/EIPS/eip-7773

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EIP-7778: Block Gas Accounting without Refunds

3 participants