Skip to content

Update EIP-2780: Clarify interactions with other EIPs#11332

Merged
eth-bot merged 2 commits into
ethereum:masterfrom
gurukamath:update-eip-2780
Apr 22, 2026
Merged

Update EIP-2780: Clarify interactions with other EIPs#11332
eth-bot merged 2 commits into
ethereum:masterfrom
gurukamath:update-eip-2780

Conversation

@gurukamath

Copy link
Copy Markdown
Contributor

Clarify interactions with EIP-7702 and EIP-7928

@gurukamath gurukamath requested a review from eth-bot as a code owner February 18, 2026 13:08
@github-actions github-actions Bot added c-update Modifies an existing proposal s-draft This EIP is a Draft t-core labels Feb 18, 2026
@eth-bot

eth-bot commented Feb 18, 2026

Copy link
Copy Markdown
Collaborator

✅ All reviewers have approved.

@eth-bot eth-bot added the a-review Waiting on author to review label Feb 18, 2026
@github-actions

Copy link
Copy Markdown

The commit 16f1ae9 (as a parent of ab83980) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions Bot added the w-ci Waiting on CI to pass label Feb 18, 2026
Comment thread EIPS/eip-2780.md
- **[EIP-2929](./eip-2929.md) (Gas cost increases for state access).** Refined by this EIP to price non-code cold touches at `500` and code-account cold touches at `2,600`.
- **[EIP-7702](./eip-7702.md) (Set EOA Code).** `TX_BASE_COST` remains `4,500` even if the sender temporarily assumes code for the transaction. Clients must not perform any disk code-load to determine sender type, since 7702 provides code inline. If the transaction executes code that reads or executes its own code, normal `COLD_ACCOUNT_COST_CODE` or `WARM_STATE_READ` costs apply at execution time as per the standard cold/warm model.
- **[EIP-7702](./eip-7702.md) (Set EOA Code).** `TX_BASE_COST` remains `4,500` even if the sender temporarily assumes code for the transaction. Clients must not perform any disk code-load to determine sender type, since 7702 provides code inline. If the transaction executes code that reads or executes its own code, normal `COLD_ACCOUNT_COST_CODE` or `WARM_STATE_READ` costs apply at execution time as per the standard cold/warm model. When `tx.to` is a 7702-delegated account, it is charged `COLD_ACCOUNT_COST_CODE = 2,600` at the intrinsic level. Resolving the delegation requires loading code from the delegation target, which incurs its own `COLD_ACCOUNT_COST_CODE = 2,600` if the target is cold, or `WARM_STATE_READ = 100` if already warm. This also applies to calls made to delegated accounts.
- **[EIP-7928](./eip-7928.md) (Block-Level Access Lists).** The two-tier cold-access model (`COLD_ACCOUNT_COST_NOCODE` vs `COLD_ACCOUNT_COST_CODE`) requires loading the account from disk before the correct charge can be determined. For cold accounts, at least `COLD_ACCOUNT_COST_NOCODE` gas must be available before account access is attempted; if unavailable, the operation fails with out-of-gas without accessing the account. Once an account access is attempted, the account is added to the transaction's accessed set for the BAL. Thereafter, if the account is found to have code, the account read remains in the BAL even if the available gas is less than `COLD_ACCOUNT_COST_CODE` and the call frame fails with out-of-gas.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks correct to me, but wanted to double check with @nerolation - do you see any issues with this?

Comment thread EIPS/eip-2780.md
| ----------------------------------- | ---------------------------------------------------------------- | -------------------------:|
| (NOP) No-transfer to EOA | `TX_BASE_COST` | 4,500 |
| (NOP) No-transfer to empty account | `TX_BASE_COST` | 4,500 |
| (NOP) No-transfer to EOA | `TX_BASE_COST` + `COLD_ACCOUNT_COST_NOCODE` | 5,000 |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

TX_BASE_COST already includes a COLD_ACCOUNT_COST_NOCODE for the sender. Can you explain why we are doing another charge for the receiver? In a no-transfer, is the receiver accessed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. In the table, no-transfer to a contract charges TX_BASE_COST + COLD_ACCOUNT_COST_CODE. But we can't know if the account has code or not, without accessing it. This kind of forces us to load the account anyway which is why an additional charge for the EOA reciever is necessary

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that is correct

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Makes sense! Good catch

@misilva73 misilva73 Apr 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry, thinking a bit about this and it does not make sense to me now. I understand we need to load the account before knowing whether it is a CODE or NOCODE cost. However, that does not mean we are actually doing two cold reads from the account trie. We are still only doing 1 and then charging a different value based on whether the account has code or not. Or am I missing something?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure I understand. My thinking is that since we are forced to load the receiver account, we should either charge COLD_ACCOUNT_COST_NOCODE or COLD_ACCOUNT_COST_CODE depending on the account type (in addition to TX_BASE_COST).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Right, the TX_BASE_COST only includes the sender access cost. Apologies, this is what I was missing. I will approve now

@benaadams

Copy link
Copy Markdown
Contributor

Also needs addition of LOG prices from EIP-7708 (which are currently free)

@github-actions github-actions Bot removed the w-ci Waiting on CI to pass label Apr 21, 2026
@gurukamath

Copy link
Copy Markdown
Contributor Author

@misilva73 Could we merge these clarifications?

@nerolation

Copy link
Copy Markdown
Contributor

The EIP should not make it unreasonable cheap to call EOA (no code), otherwise it impacts the worst-case BAL size and could lead to a new worst-case block size.

@misilva73

Copy link
Copy Markdown
Contributor

The EIP should not make it unreasonable cheap to call EOA (no code), otherwise it impacts the worst-case BAL size and could lead to a new worst-case block size.

@nerolation, we will use the new costs from 8038 for GAS_COLD_ACCOUNT_CODE_ACCESS and GAS_COLD_ACCOUNT_NOCODE_ACCESS. when we have the final numbers for those, we can run the analysis on th worst-case BAL size again.

@misilva73

Copy link
Copy Markdown
Contributor

@misilva73 Could we merge these clarifications?

@gurukamath , I was going over the cost table again, and I am not 100% cure on this. It seems we are charginf 2 accesses to the account trie, when we should be charging just one.

@gurukamath

Copy link
Copy Markdown
Contributor Author

@gurukamath , I was going over the cost table again, and I am not 100% cure on this. It seems we are charginf 2 accesses to the account trie, when we should be charging just one.

The 2 access charge applies to a receiver that has a 7702 delegation (One for the tx receiver and another for the delegated account). In other scenarios we apply a single account access charge.

@gurukamath

gurukamath commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

The EIP should not make it unreasonable cheap to call EOA (no code), otherwise it impacts the worst-case BAL size and could lead to a new worst-case block size.

@nerolation, we will use the new costs from 8038 for GAS_COLD_ACCOUNT_CODE_ACCESS and GAS_COLD_ACCOUNT_NOCODE_ACCESS. when we have the final numbers for those, we can run the analysis on th worst-case BAL size again.

Might already be worth looking at the worst case BAL size for various account access costs, decide what is the acceptable minimum cost for BAL and then have that as the floor for the final 8038 numbers.

@eth-bot eth-bot enabled auto-merge (squash) April 22, 2026 08:02

@eth-bot eth-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

@eth-bot eth-bot merged commit c550387 into ethereum:master Apr 22, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a-review Waiting on author to review c-update Modifies an existing proposal s-draft This EIP is a Draft t-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants