diff --git a/EIPS/eip-7928.md b/EIPS/eip-7928.md index e7f0963a024b3d..bd138585c097f9 100644 --- a/EIPS/eip-7928.md +++ b/EIPS/eip-7928.md @@ -112,7 +112,6 @@ It **MUST** include: - Withdrawal recipient addresses - Precompiled contracts when called or accessed - Addresses with no state changes **MUST** still be present with empty change lists. Entries from an [EIP-2930](./eip-2930.md) access list **MUST NOT** be included automatically. Only addresses and storage slots that are actually touched or changed during execution are recorded. @@ -155,11 +154,22 @@ Record **post‑transaction** balances (`uint128`) for: - Transaction **senders** (gas + value). - Transaction **recipients** (only if `value > 0`). +- CALL/CALLCODE **senders** (value). +- CALL/CALLCODE **recipients** (only if `value > 0`). +- CREATE/CREATE2 recipients (only if `value > 0`). - **Coinbase** (rewards + fees). - **SELFDESTRUCT/SENDALL** beneficiaries. - **Withdrawal recipients** (system withdrawals, [EIP-4895](./eip-4895.md)). -**Zero‑value transfers:** **MUST NOT** be recorded in `balance_changes`, but the corresponding addresses **MUST** still be included with empty `AccountChanges`. +For unaltered account balances: + +If an account’s balance changes during a transaction, but its post-transaction balance is equal to its pre-transaction balance, then the change **MUST NOT** be recorded in `balance_changes`. The sender and recipient address (including the coinbase) **MUST** be included in `AccountChanges`. + +This includes the following special cases where addresses **MUST** be included with empty changes if no other state changes occur. This includes: + +- Zero-value transfer recipients +- Calling a same-transaction SELFDESTRUCT on an address that had a zero pre-transaction balance +- Zero-value block reward recipients #### Code @@ -180,13 +190,13 @@ Record **post‑transaction nonces** for: - **SENDALL:** For positive-value selfdestructs, the sender and beneficiary are recorded with a balance change. - **SELFDESTRUCT (in-transaction):** Accounts destroyed within a transaction **MUST** be included in `AccountChanges` without nonce or code changes. However, if the account had a positive balance pre-transaction, the balance change to zero **MUST** be recorded. Storage keys within the self-destructed contracts that were modified or read **MUST** be included as a `storage_read`. - **Accessed but unchanged:** Include the address with empty changes (e.g., targets of `EXTCODEHASH`, `EXTCODESIZE`, `BALANCE`, `STATICCALL`, etc.). -- **Zero‑value transfers:** Include the address; omit from `balance_changes`. +- **Zero‑value transfers / Unchanged balance in transaction:** Include the address; omit from `balance_changes`. - **Gas refunds:** Record the **final** balance of the sender after each transaction. - **Block rewards:** Record the **final** balance of the fee recipient after each transaction. - **Exceptional halts:** Record the **final** nonce and balance of the sender, and the **final** balance of the fee recipient after each transaction. State changes from the reverted call are discarded, but all accessed addresses **MUST** be included. If no changes remain, addresses are included with empty lists; if storage was read, the corresponding keys **MUST** appear in `storage_reads`. - **Pre‑execution system contract calls:** All state changes **MUST** use `block_access_index = 0`. - **Post‑execution system contract calls:** All state changes **MUST** use `block_access_index = len(transactions) + 1`. -- **EIP-7702 Delegations:** The authority address **MUST** be included with the nonce and code changes after any successful delegation set, reset, or update, and **MUST** also be included with an empty change set if authorization fails due to an invalid nonce. The delegation target **MUST NOT** be included during delegation creation and **MUST** be included when loaded as a call target under authority execution. +- **EIP-7702 Delegations:** The authority address **MUST** be included with the nonce and code changes after any successful delegation set, reset, or update. Additionally it **MUST** be included with an empty change set if authorization fails, but the authority address has already been added to `accessed_addresses` (as defined in [EIP-2929](./eip-2929.md)). The delegation target **MUST NOT** be included during delegation creation and **MUST** be included when loaded as a call target under authority execution. - **EIP‑4895 (Consensus layer withdrawals):** Recipients are recorded with their final balance after the withdrawal. - **EIP‑2935 (block hash):** Record system contract storage diffs of the **single** updated storage slot in the ring buffer. - **EIP‑4788 (beacon root):** Record system contract storage diffs of the **two** updated storage slots in the ring buffer.