Skip to content

Update EIP-2780: precompile target and account-warming charge changes#11735

Open
rakita wants to merge 8 commits into
ethereum:masterfrom
rakita:eip2780-rm-overhead
Open

Update EIP-2780: precompile target and account-warming charge changes#11735
rakita wants to merge 8 commits into
ethereum:masterfrom
rakita:eip2780-rm-overhead

Conversation

@rakita

@rakita rakita commented May 27, 2026

Copy link
Copy Markdown
Contributor

Refinements to EIP-2780's account-access and value-transfer accounting. All changes are confined to EIPS/eip-2780.md. They fall into four groups.

1. Precompile target normalization

A precompile tx.to is now metered like any other account — all precompile carve-outs were removed:

  • Dropped the to "warm at tx start, charged zero" rule.
  • Removed the new-account-surcharge precompile exclusion and the is_precompile check from the intrinsic-gas pseudocode.
  • Removed the precompile mention from the warmth policy.
  • Deleted the precompile-specific test vectors.

A value-bearing transaction to a precompile now follows the standard tx.to rules.

2. Transaction-level accounts always charged cold

tx.sender, tx.to, and any EIP-7702 delegation target are now always charged at the cold rate; access-list membership no longer warms them or reduces their per-account cost.

  • Removed WARM_STATE_READ = 100 from the gas table and the warm delegation-target reduction.
  • Removed the "warmth discovered through an access list overrides the cold cost" rule; added an explicit summary that there is no warm rate for these three accounts.
  • Updated the warmth policy and the EIP-2930 / EIP-7702 interaction notes to state access lists only warm other execution-level account touches.
  • Updated the access-list test vector accordingly.

The general EIP-2929 cold/warm model still applies to other accounts touched during execution and to internal CALLs.

3. Self-transfer / self-CALL is a true no-op

A self-transfer (from == to) or self-CALL with value no longer requires any extra write:

  • Self-CALL with value: CALL_VALUE_COST = 0 (previously STATE_UPDATE = 1,000) — balance is unchanged, no leaf write, and EIP-7708 emits no transfer log.
  • Self-transfer balance is unchanged; no recipient leaf write or transfer log is charged. The nonce/balance update coalesces into the single account-leaf write already in TX_BASE_COST.
  • Added/updated test vectors for the self-transfer and internal self-CALL cases.

4. CALL_VALUE_COST / STATE_UPDATE clarifications

  • Value-moving calls repriced as a single new account-leaf write on the to account (the caller's leaf already updates via the fee): CALL_VALUE_COST = STATE_UPDATE + TRANSFER_LOG_COST.
  • Clarified that STATE_UPDATE is charged once when an account's nonce or balance changes in a transition.

Linters pass locally (markdownlint-cli2 with repo config, eipw with config/eipw.toml).

@rakita rakita requested a review from eth-bot as a code owner May 27, 2026 13:32
@github-actions github-actions Bot added c-update Modifies an existing proposal s-draft This EIP is a Draft t-core labels May 27, 2026
@eth-bot

eth-bot commented May 27, 2026

Copy link
Copy Markdown
Collaborator

File EIPS/eip-2780.md

Requires 1 more review from Authors: @anderselowsson, @benaadams, @lightclient, @misilva73, @sassal, @uriklarman

@eth-bot eth-bot added the a-review Waiting on author to review label May 27, 2026
@benaadams

Copy link
Copy Markdown
Contributor

Self-transfer case

Have to special case this for ETH transfers emit log anyway?

@benaadams

Copy link
Copy Markdown
Contributor

To clarify self-transfer is already special cased in Eip-7708 to not emit a log (as no ETH moves); so why do we charge for LOG + transfer if neither happens?

@rakita

rakita commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

To clarify self-transfer is already special cased in Eip-7708 to not emit a log (as no ETH moves); so why do we charge for LOG + transfer if neither happens?

That makes sense and will change the PR. The intention was to remove the gas discount. I don't have a strong stance, but I would feel better if it is priced the same.

rakita added 3 commits May 28, 2026 10:59
Address review feedback: EIP-7708 does not emit a transfer log when
caller == to, so the intrinsic and CALL value-moving accounting should
not charge TRANSFER_LOG_COST in that case.
Drop the self-transfer guard around TRANSFER_LOG_COST and the
"to a different account" qualifier. Price every value-bearing
transfer uniformly; the slight overcharge on self-transfer NOPs is
preferable to the spec complexity of carving them out.
- Remove access-list warming shortcut for tx.to (and, for 7702
  delegated targets, the delegation target). The transaction target
  is always charged at the cold rate at the intrinsic level.
- Drop the standalone 'Warmth discovered through an access list...'
  bullet and replace with an explicit 'tx.to is always charged cold'
  statement.
- Update the EIP-2930 and EIP-7702 interactions bullets accordingly.
- Tighten test case 4 and remove test 6 (Warmth and access list
  interplay); execution-level CALL warming via EIP-2929 is unchanged.
@abc-123-c

Copy link
Copy Markdown

In the case of a self-transfer, if the value is > 0, will the log still be emitted correctly? This is similar to a self-transfer in ERC20.

@benaadams

Copy link
Copy Markdown
Contributor

You are still charging for transfer logs even when they aren't emitted

@benaadams

Copy link
Copy Markdown
Contributor

In the case of a self-transfer, if the value is > 0, will the log still be emitted correctly? This is similar to a self-transfer in ERC20.

No log is emitted for self-transfers as per https://eips.ethereum.org/EIPS/eip-7708

@Helkomine

Helkomine commented May 29, 2026

Copy link
Copy Markdown
Contributor

No log is emitted for self-transfers as per https://eips.ethereum.org/EIPS/eip-7708

So, should we update EIP-7708 to remove the case where log is not emitted for self-transfer? This would reduce the number of test branches and accurately reflect the behavior of ERC-20.

@benaadams

Copy link
Copy Markdown
Contributor

No log is emitted for self-transfers as per https://eips.ethereum.org/EIPS/eip-7708
So, should we update EIP-7708 to remove the case where log is not emitted for self-transfer? This would reduce the number of test branches and accurately reflect the behavior of ERC-20.

Don't see why, EIP-7708 is live on devnets and has active tests. Its motivation is to surface balance changes and self-transfer isn't a balance transfer.

ERC20 have custom transfer implementations (could be fee-on-transfer) so a self-transfer isn't necessarily idempotent

@Helkomine

Copy link
Copy Markdown
Contributor

Don't see why, EIP-7708 is live on devnets and has active tests. Its motivation is to surface balance changes and self-transfer isn't a balance transfer.

ERC20 have custom transfer implementations (could be fee-on-transfer) so a self-transfer isn't necessarily idempotent

I believe the protocol is overcomplicating things with minor interface details while simultaneously cutting meaningful incentives for the same reason. For example, retaining self-transfer verification branches while reducing the transaction access list discount. We're wasting effort on something the interface can handle instead of prioritizing transaction performance.

@gurukamath

Copy link
Copy Markdown
Contributor

To clarify self-transfer is already special cased in Eip-7708 to not emit a log (as no ETH moves); so why do we charge for LOG + transfer if neither happens?

That makes sense and will change the PR. The intention was to remove the gas discount. I don't have a strong stance, but I would feel better if it is priced the same.

Charging the same gas for self and other transfers make sense to me from a design simplicity perspective. Yes, that means we end up charging an extra emit log costs for self transfers where a log never gets emitted. But I think self-transfers are too niche to carve out an exception for. Perhaps we should just explicitly document this trade-off in the EIP text to make it clear that this is a deliberate call that has been made.

@abc-123-c

Copy link
Copy Markdown

That makes sense and will change the PR. The intention was to remove the gas discount. I don't have a strong stance, but I would feel better if it is priced the same.

Charging the same gas for self and other transfers make sense to me from a design simplicity perspective. Yes, that means we end up charging an extra emit log costs for self transfers where a log never gets emitted. But I think self-transfers are too niche to carve out an exception for. Perhaps we should just explicitly document this trade-off in the EIP text to make it clear that this is a deliberate call that has been made.

I agree there shouldn't be any discount for self-transfer, but could we still maintain emitting for it? We would make the implementation even simpler if we eliminated that exception.

@benaadams

Copy link
Copy Markdown
Contributor

Don't see why, EIP-7708 is live on devnets and has active tests. Its motivation is to surface balance changes and self-transfer isn't a balance transfer.
ERC20 have custom transfer implementations (could be fee-on-transfer) so a self-transfer isn't necessarily idempotent

while reducing the transaction access list discount.

EIP-7981 repricing makes access lists not sensible to use other than in their original justification (which was unbricking some contracts) https://eips.ethereum.org/EIPS/eip-7981

They are essentially deprecated; also they add no value to To since its already specified ahead of time so including it in a access list is just duplication

@Helkomine

Copy link
Copy Markdown
Contributor

EIP-7981 repricing makes access lists not sensible to use other than in their original justification (which was unbricking some contracts) https://eips.ethereum.org/EIPS/eip-7981

They are essentially deprecated; also they add no value to To since its already specified ahead of time so including it in a access list is just duplication

Yes, that example is not reasonable ; it would be more appropriate to compare using precompiled contracts.

However, I see one aspect of this EIP that isn't optimized for ETH to compete with ERC-20: the STATE_UPDATE fee when transferring ETH. It would be better to separate it into cold and warm price tiers, similar to the storage slots of ERC-20. We already have EIP-2200 to address reentrancy, so I think we should relax this part further.

@benaadams

Copy link
Copy Markdown
Contributor

EIP-7981 repricing makes access lists not sensible to use other than in their original justification (which was unbricking some contracts) https://eips.ethereum.org/EIPS/eip-7981
They are essentially deprecated; also they add no value to To since its already specified ahead of time so including it in a access list is just duplication

Yes, that example is not reasonable ; it would be more appropriate to compare using precompiled contracts.

However, I see one aspect of this EIP that isn't optimized for ETH to compete with ERC-20: the STATE_UPDATE fee when transferring ETH. It would be better to separate it into cold and warm price tiers, similar to the storage slots of ERC-20. We already have EIP-2200 to address reentrancy, so I think we should relax this part further.

Again that is controlled by EIP-8038 rather than this EIP; so COLD_ACCOUNT_ACCESS vs ACCOUNT_WRITE https://eips.ethereum.org/EIPS/eip-8038

rakita added 2 commits June 2, 2026 12:51
Restore the self-transfer carve-out: when caller == to, charge neither
TRANSFER_LOG_COST nor a value-transfer leaf write, since EIP-7708 emits
no log for self-transfers and the balance is unchanged. Internal
self-CALL with value is now CALL_VALUE_COST = 0.
…ways cold

Remove the warm/cold difference for the transaction-level accounts.
tx.sender, tx.to, and any EIP-7702 delegation target are always charged
at the cold rate; access-list membership never warms them or reduces
their per-account cost. Clarify warmth policy, EIP-2930 interaction, and
the 7702 access-list test vector accordingly.
@rakita rakita changed the title Update EIP-2780: remove self-transfer and precompile edge cases Update EIP-2780: precompile target and account-warming charge changes Jun 2, 2026
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