From ca32fe834782cc83e166007101c30beac17344ca Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Fri, 13 Jan 2023 11:19:53 +0100 Subject: [PATCH] Add docstrings to explain empty header --- specs/capella/light-client/full-node.md | 4 ++++ specs/eip4844/light-client/full-node.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/specs/capella/light-client/full-node.md b/specs/capella/light-client/full-node.md index 6a2104a38..a406cd771 100644 --- a/specs/capella/light-client/full-node.md +++ b/specs/capella/light-client/full-node.md @@ -57,6 +57,10 @@ def block_to_light_client_header(block: SignedBeaconBlock) -> LightClientHeader: ) execution_branch = compute_merkle_proof_for_block_body(block.message.body, EXECUTION_PAYLOAD_INDEX) else: + # Note that during fork transitions, `finalized_header` may still point to earlier forks. + # While Bellatrix blocks also contain an `ExecutionPayload` (minus `withdrawals_root`), + # it was not included in the corresponding light client data. To ensure compatibility + # with legacy data going through `upgrade_lc_header_to_capella`, leave out execution data. execution_header = ExecutionPayloadHeader() execution_branch = [Bytes32() for _ in range(floorlog2(EXECUTION_PAYLOAD_INDEX))] diff --git a/specs/eip4844/light-client/full-node.md b/specs/eip4844/light-client/full-node.md index e9d7340f6..70983e1b3 100644 --- a/specs/eip4844/light-client/full-node.md +++ b/specs/eip4844/light-client/full-node.md @@ -53,6 +53,10 @@ def block_to_light_client_header(block: SignedBeaconBlock) -> LightClientHeader: execution_branch = compute_merkle_proof_for_block_body(block.message.body, EXECUTION_PAYLOAD_INDEX) else: + # Note that during fork transitions, `finalized_header` may still point to earlier forks. + # While Bellatrix blocks also contain an `ExecutionPayload` (minus `withdrawals_root`), + # it was not included in the corresponding light client data. To ensure compatibility + # with legacy data going through `upgrade_lc_header_to_capella`, leave out execution data. execution_header = ExecutionPayloadHeader() execution_branch = [Bytes32() for _ in range(floorlog2(EXECUTION_PAYLOAD_INDEX))]