feat: add eip2780tx scenario for EIP-2780 gas accounting#187
Open
qu0b wants to merge 2 commits into
Open
Conversation
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.
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.
Summary
eip2780txscenario with 8 modes that exercise EIP-2780 granular gas accounting pathsEIP2780Helper.solcontract withnop(),forwardValue(), andcreateAndDestroy()functionsModes
new-accountprecompileaccess-listcontract-callnop()value-callvalue-call-newselfdestructall(default)Test plan
go fmt,go vetpassgo build -tags=with_blob_v1,ckzg ./cmd/...succeedsspamoor eip2780tx --helpshows all flags including--mode