From 535e62e62206a35f1dd5b953b5e5c78a1dd0f6eb Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Mon, 6 Nov 2023 08:56:37 +0100 Subject: [PATCH] Rename receipt to avoid duplicate meaning of `LegacyReceipt` --- EIPS/eip-2718.md | 4 ++-- EIPS/eip-2976.md | 6 +++--- EIPS/eip-6493.md | 4 ++-- assets/eip-6493/convert.py | 2 +- assets/eip-6493/ssz_types.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/EIPS/eip-2718.md b/EIPS/eip-2718.md index 83a19b0fa865d..44b4d068a86ea 100644 --- a/EIPS/eip-2718.md +++ b/EIPS/eip-2718.md @@ -39,10 +39,10 @@ This makes it so we do not have to worry about signatures for one transaction ty ### Receipts As of `FORK_BLOCK_NUMBER`, the receipt root in the block header **MUST** be the root hash of `patriciaTrie(rlp(Index) => Receipt)` where: * `Index` is the index in the block of the transaction this receipt is for -* `Receipt` is either `TransactionType || ReceiptPayload` or `LegacyReceipt` +* `Receipt` is either `TransactionType || ReceiptPayload` or `HomesteadReceipt` * `TransactionType` is a positive unsigned 8-bit number between `0` and `0x7f` that represents the type of the transaction * `ReceiptPayload` is an opaque byte array whose interpretation is dependent on the `TransactionType` and defined in future EIPs -* `LegacyReceipt` is `rlp([status, cumulativeGasUsed, logsBloom, logs])` +* `HomesteadReceipt` is `rlp([status, cumulativeGasUsed, logsBloom, logs])` The `TransactionType` of the receipt **MUST** match the `TransactionType` of the transaction with a matching `Index`. diff --git a/EIPS/eip-2976.md b/EIPS/eip-2976.md index 6f8056f967d75..1f955970fba38 100644 --- a/EIPS/eip-2976.md +++ b/EIPS/eip-2976.md @@ -39,11 +39,11 @@ All changes specified below apply to all protocol/versions retroactively. * `LegacyTransaction` is an array of the form `[nonce, gasPrice, gasLimit, to, value, data, v, r, s]` * `LegacyTransactionHash` is `keccak256(rlp(LegacyTransaction))` * `TransactionId` is `keccak256(TypedTransactionHash | LegacyTransactionHash)` -* `Receipt` is either `TypedReceipt` or `LegacyReceipt` +* `Receipt` is either `TypedReceipt` or `HomesteadReceipt` * `TypedReceipt` is a byte array containing `TransactionType || ReceiptPayload` * `ReceiptPayload` is an opaque byte array whose interpretation is dependent on the `TransactionType` and defined in future EIPs -* `LegacyReceipt` is an array of the form `[status, cumulativeGasUsed, logsBloom, logs]` -* `LegacyReceiptHash` is `keccak256(rlp(LegacyReceipt))` +* `HomesteadReceipt` is an array of the form `[status, cumulativeGasUsed, logsBloom, logs]` +* `LegacyReceiptHash` is `keccak256(rlp(HomesteadReceipt))` ### Protocol Behavior If a client receives a `TransactionType` it doesn't recognize via any message, it **SHOULD** disconnect the peer that sent it. diff --git a/EIPS/eip-6493.md b/EIPS/eip-6493.md index b9f781f1963a0..43fbb15d70b9e 100644 --- a/EIPS/eip-6493.md +++ b/EIPS/eip-6493.md @@ -405,7 +405,7 @@ class Receipt(StableContainer[MAX_RECEIPT_FIELDS]): Valid receipt types can be defined using [EIP-7495](./eip-7495.md) `Variant`. ```python -class LegacyReceipt(Variant[Receipt]): +class HomesteadReceipt(Variant[Receipt]): root: Hash32 gas_used: uint64 contract_address: Optional[ExecutionAddress] @@ -425,7 +425,7 @@ class AnyReceipt(OneOf[Receipt]): if value.status is not None: return BasicReceipt - return LegacyReceipt + return HomesteadReceipt ``` Future specifications MAY: diff --git a/assets/eip-6493/convert.py b/assets/eip-6493/convert.py index c1ede61d3e9f0..c59cdcd272163 100644 --- a/assets/eip-6493/convert.py +++ b/assets/eip-6493/convert.py @@ -197,7 +197,7 @@ def upgrade_rlp_receipt_to_ssz(pre_bytes: bytes, ) root = pre.post_state_or_status - return LegacyReceipt( + return HomesteadReceipt( root=root, gas_used=pre.cumulative_gas_used - prev_cumulative_gas_used, contract_address=compute_contract_address( diff --git a/assets/eip-6493/ssz_types.py b/assets/eip-6493/ssz_types.py index c197c3599a573..8273d8705575a 100644 --- a/assets/eip-6493/ssz_types.py +++ b/assets/eip-6493/ssz_types.py @@ -286,7 +286,7 @@ class Receipt(StableContainer[MAX_RECEIPT_FIELDS]): # EIP-658 status: Optional[boolean] -class LegacyReceipt(Variant[Receipt]): +class HomesteadReceipt(Variant[Receipt]): root: Hash32 gas_used: uint64 contract_address: Optional[ExecutionAddress] @@ -306,4 +306,4 @@ def select_variant(cls, value: Receipt) -> Type[Receipt]: if value.status is not None: return BasicReceipt - return LegacyReceipt + return HomesteadReceipt