diff --git a/setup.py b/setup.py index 39eccad53..efd4c29d5 100644 --- a/setup.py +++ b/setup.py @@ -535,7 +535,7 @@ class NoopExecutionEngine(ExecutionEngine): parent_hash: Hash32, timestamp: uint64, random: Bytes32, - feeRecipient: Bytes20) -> uint64: + feeRecipient: ExecutionAddress) -> uint64: raise NotImplementedError("no default block production") def get_payload(self: ExecutionEngine, payload_id: uint64) -> ExecutionPayload: diff --git a/specs/merge/beacon-chain.md b/specs/merge/beacon-chain.md index 9be89fcea..1be41a81e 100644 --- a/specs/merge/beacon-chain.md +++ b/specs/merge/beacon-chain.md @@ -54,6 +54,7 @@ This patch adds transaction execution to the beacon chain as part of the Merge f | - | - | - | | `OpaqueTransaction` | `ByteList[MAX_BYTES_PER_OPAQUE_TRANSACTION]` | a [typed transaction envelope](https://eips.ethereum.org/EIPS/eip-2718#opaque-byte-array-rather-than-an-rlp-array) structured as `TransactionType \|\| TransactionPayload` | | `Transaction` | `Union[OpaqueTransaction]` | a transaction | +| `ExecutionAddress` | `Bytes20` | Address of account on the execution layer | ## Constants @@ -159,7 +160,7 @@ class BeaconState(Container): class ExecutionPayload(Container): # Execution block header fields parent_hash: Hash32 - coinbase: Bytes20 # 'beneficiary' in the yellow paper + coinbase: ExecutionAddress # 'beneficiary' in the yellow paper state_root: Bytes32 receipt_root: Bytes32 # 'receipts root' in the yellow paper logs_bloom: ByteVector[BYTES_PER_LOGS_BLOOM] @@ -181,7 +182,7 @@ class ExecutionPayload(Container): class ExecutionPayloadHeader(Container): # Execution block header fields parent_hash: Hash32 - coinbase: Bytes20 + coinbase: ExecutionAddress state_root: Bytes32 receipt_root: Bytes32 logs_bloom: ByteVector[BYTES_PER_LOGS_BLOOM] diff --git a/specs/merge/validator.md b/specs/merge/validator.md index dc67997c7..e175a083e 100644 --- a/specs/merge/validator.md +++ b/specs/merge/validator.md @@ -53,7 +53,7 @@ def prepare_payload(self: ExecutionEngine, parent_hash: Hash32, timestamp: uint64, random: Bytes32, - fee_recipient: Bytes20) -> uint64: + fee_recipient: ExecutionAddress) -> uint64: """ Return ``payload_id`` that is used to obtain the execution payload in a subsequent ``get_payload`` call. """ @@ -103,7 +103,7 @@ def get_pow_block_at_total_difficulty(total_difficulty: uint256, pow_chain: Sequ def prepare_execution_payload(state: BeaconState, pow_chain: Sequence[PowBlock], - fee_recipient: Bytes20, + fee_recipient: ExecutionAddress, execution_engine: ExecutionEngine) -> Optional[uint64]: if not is_merge_complete(state): terminal_pow_block = get_pow_block_at_total_difficulty(TERMINAL_TOTAL_DIFFICULTY, pow_chain) diff --git a/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py b/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py index 6126346a9..0d03447a7 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py +++ b/tests/core/pyspec/eth2spec/test/helpers/execution_payload.py @@ -11,7 +11,7 @@ def build_empty_execution_payload(spec, state, randao_mix=None): payload = spec.ExecutionPayload( parent_hash=latest.block_hash, - coinbase=spec.Bytes20(), + coinbase=spec.ExecutionAddress(), state_root=latest.state_root, # no changes to the state receipt_root=b"no receipts here" + b"\x00" * 16, # TODO: root of empty MPT may be better. logs_bloom=spec.ByteVector[spec.BYTES_PER_LOGS_BLOOM](), # TODO: zeroed logs bloom for empty logs ok?