Commit Graph

5 Commits

Author SHA1 Message Date
Etan Kissling 82d6267951
Merge branch 'dev' into lc-eph 2023-01-12 18:44:54 +01:00
Etan Kissling 700bef7a45
Fix `is_valid_light_client_header` 2022-12-12 13:39:14 +01:00
Etan Kissling e67ca3d309
Compute epoch only once for better readability 2022-12-12 13:09:18 +01:00
Etan Kissling 11d2a59948
Flip `is_valid_light_client_header` logic for extensibility 2022-12-12 12:33:58 +01:00
Etan Kissling 2e97af2627
Add `ExecutionPayloadHeader` to LC data
While the light client sync protocol currently provides access to the
latest `BeaconBlockHeader`, obtaining the matching execution data needs
workarounds such as downloading the full block.

Having ready access to the EL state root simplifies use cases that need
a way to cross-check `eth_getProof` responses against LC data.

Access to `block_hash` unlocks scenarios where a CL light client drives
an EL without `engine_newPayload`. As of Altair, only the CL beacon
block root is available, but the EL block hash is needed for engine API.

Other fields in the `ExecutionPayloadHeader` such as `logs_bloom` may
allow light client applications to monitor blocks for local interest,
e.g. for transfers affecting a certain wallet. This enables to download
only the few relevant blocks instead of every single one.

A new `LightClientStore` is proposed into the Capella spec that may be
used to sync LC data that includes execution data. Existing pre-Capella
LC data will remain as is, but can be locally upgraded before feeding it
into the new `LightClientStore` so that light clients do not need to run
a potentially expensive fork transition at a specific time. This enables
the `LightClientStore` to be upgraded at a use case dependent timing at
any time before Capella hits. Smart contract and embedded deployments
benefit from reduced code size and do not need synchronization with the
beacon chain clock to perform the Capella fork.
2022-12-12 00:48:40 +01:00