Skip to content

feat: add eip2780tx scenario for EIP-2780 gas accounting#187

Open
qu0b wants to merge 2 commits into
masterfrom
qu0b/eip2780tx-scenario
Open

feat: add eip2780tx scenario for EIP-2780 gas accounting#187
qu0b wants to merge 2 commits into
masterfrom
qu0b/eip2780tx-scenario

Conversation

@qu0b

@qu0b qu0b commented Feb 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds eip2780tx scenario with 8 modes that exercise EIP-2780 granular gas accounting paths
  • Includes EIP2780Helper.sol contract with nop(), forwardValue(), and createAndDestroy() functions
  • Registered in the "Simple" scenario category

Modes

Mode EIP-2780 Gas Path Description
new-account GAS_NEW_ACCOUNT surcharge Value transfer to random fresh address
precompile Precompile warmth rules Value transfer to 0x01-0x09 (cycling)
access-list WARM vs COLD recipient Value transfer with recipient in access list
contract-call COLD_ACCOUNT_COST_CODE Call deployed contract's nop()
value-call CALL_VALUE_COST Contract forwards ETH to existing EOA
value-call-new CALL_VALUE_COST + GAS_NEW_ACCOUNT Contract forwards ETH to fresh address
selfdestruct EIP-6780 create+destroy Create child + selfdestruct in same tx
all (default) All above Cycles through all modes round-robin

Test plan

  • go fmt, go vet pass
  • go build -tags=with_blob_v1,ckzg ./cmd/... succeeds
  • spamoor eip2780tx --help shows all flags including --mode
  • Tested in kurtosis ethereum-package (geth+lighthouse, minimal preset) - contract deployed, all 7 modes cycling with 100% tx confirmation rate over 18+ blocks

qu0b and others added 2 commits February 9, 2026 12:00
Add a new scenario that exercises the granular gas accounting paths
introduced by EIP-2780. Includes 8 modes targeting specific gas paths:

- new-account: value transfer to fresh address (GAS_NEW_ACCOUNT)
- precompile: value transfer to 0x01-0x09 (warm precompiles)
- access-list: value transfer with recipient in access list
- contract-call: call deployed contract (COLD_ACCOUNT_COST_CODE)
- value-call: contract forwards ETH to existing EOA (CALL_VALUE_COST)
- value-call-new: contract forwards ETH to fresh address
- selfdestruct: create child + selfdestruct in same tx (EIP-6780)
- all (default): cycles through all modes round-robin

Includes EIP2780Helper.sol contract with nop(), forwardValue(), and
createAndDestroy() functions, plus generated Go bindings via abigen.
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.

1 participant