Notice: This document is a work-in-progress for researchers and implementers.
This upgrade adds information about the execution payload to light client data as part of the Capella upgrade. It extends the Altair Light Client specifications. The fork document explains how to upgrade existing Altair based deployments to Capella.
Additional documents describes the impact of the upgrade on certain roles:
Name | SSZ equivalent | Description |
---|---|---|
ExecutionBranch |
Vector[Bytes32, floorlog2(EXECUTION_PAYLOAD_GINDEX)] |
Merkle branch of execution_payload within BeaconBlockBody |
Name | Value |
---|---|
EXECUTION_PAYLOAD_GINDEX |
get_generalized_index(BeaconBlockBody, 'execution_payload') (= 25) |
class LightClientHeader(Container):
# Beacon block header
beacon: BeaconBlockHeader
# Execution payload header corresponding to `beacon.body_root` (from Capella onward)
execution: ExecutionPayloadHeader
execution_branch: ExecutionBranch
def get_lc_execution_root(header: LightClientHeader) -> Root:
epoch = compute_epoch_at_slot(header.beacon.slot)
if epoch >= CAPELLA_FORK_EPOCH:
return hash_tree_root(header.execution)
return Root()
def is_valid_light_client_header(header: LightClientHeader) -> bool:
epoch = compute_epoch_at_slot(header.beacon.slot)
if epoch < CAPELLA_FORK_EPOCH:
return (
header.execution == ExecutionPayloadHeader()
and header.execution_branch == ExecutionBranch()
)
return is_valid_merkle_branch(
leaf=get_lc_execution_root(header),
branch=header.execution_branch,
depth=floorlog2(EXECUTION_PAYLOAD_GINDEX),
index=get_subtree_index(EXECUTION_PAYLOAD_GINDEX),
root=header.beacon.body_root,
)