diff --git a/EIPS/eip-7377.md b/EIPS/eip-7377.md index 37b827d4004a82..fcbfbe0f9441b3 100644 --- a/EIPS/eip-7377.md +++ b/EIPS/eip-7377.md @@ -13,7 +13,7 @@ requires: 170, 1559, 2718 ## Abstract -Introduce a new [EIP-2718](./eip-2718.md) transaction type with the format `0x04 || rlp([chainId, nonce, maxFeePerGas, maxPriorityFeePerGas, gasLimit, codePtr, storage, data, value, accessList, yParity, r, s])` which sets the sending account's `code` field in the state trie to the `code` value at `codePtr` and applies the storage tuples to the sender's storage trie. +Introduce a new [EIP-2718](./eip-2718.md) transaction type with the format `0x04 || rlp([chainId, nonce, maxFeePerGas, maxPriorityFeePerGas, gasLimit, codeAddr, storage, data, value, accessList, yParity, r, s])` which sets the sending account's `code` field in the state trie to the `code` value at `codeAddr` and applies the storage tuples to the sender's storage trie. ## Motivation @@ -40,7 +40,7 @@ At the fork block `X`, introduce the migration transaction type. | `maxFeePerGas` | `int256` | | `maxPriorityFeePerGas` | `int256` | | `gasLimit` | `uint64` | -| `codePtr` | `address` | +| `codeAddr` | `address` | | `storage` | `List[Tuple[uint256, uint256]]` | | `data` | `bytes` | | `value` | `int256` | @@ -49,17 +49,17 @@ At the fork block `X`, introduce the migration transaction type. | `v` | `uint256` | | `r` | `uint256` | -The EIP-2718 `TransactionType` is `0x04` and the `TransactionPayload` is `rlp([chainId, nonce, maxFeePerGas, maxPriorityFeePerGas, gasLimit, codePtr, storageTuples, data, value, accessList, yParity, r, s])`. +The EIP-2718 `TransactionType` is `0x04` and the `TransactionPayload` is `rlp([chainId, nonce, maxFeePerGas, maxPriorityFeePerGas, gasLimit, codeAddr, storageTuples, data, value, accessList, yParity, r, s])`. -The transaction's signature hash is `keccak256(0x04 || rlp([chainId, nonce, maxFeePerGas, maxPriorityFeePerGas, gasLimit, codePtr, storageTuples, data, value, accessList])` +The transaction's signature hash is `keccak256(0x04 || rlp([chainId, nonce, maxFeePerGas, maxPriorityFeePerGas, gasLimit, codeAddr, storageTuples, data, value, accessList])` #### Validation A migration transaction is considered valid if the follow properties hold: * all [EIP-1559](./eip-1559.md) properties, unless specified otherwise -* the code at `codePtr` is less than the [EIP-170](./eip-170.md) limit of `24576` -* the code at `codePtr` must not have size `0` +* the code at `codeAddr` is less than the [EIP-170](./eip-170.md) limit of `24576` +* the code at `codeAddr` must not have size `0` The intrinsic gas calculation modified from [EIP-1559](./eip-1559.md) to be `21000 + 16 * non-zero calldata bytes + 4 * zero calldata bytes + 1900 * access list storage key count + 2400 * access list address count + 15000 * length of storage`. @@ -71,7 +71,7 @@ Executing a migration transaction transaction has two parts. Unlike standard contract deployment, a migration transaction directly specifies what `code` value the sender's account should be set to. -As the first step of processing the transaction, set the sender's `code` to `state[tx.codePtr].code`. Next, for each tuple in `tx.storage` and the sender's storage trie, set `storage[t.first] = t.second`. +As the first step of processing the transaction, set the sender's `code` to `state[tx.codeAddr].code`. Next, for each tuple in `tx.storage` and the sender's storage trie, set `storage[t.first] = t.second`. ##### Transaction Execution