Open
Description
Description
We should support the full node side of the light client protocol.
The components we need for this are:
Groundwork
- Light client types in
consensus/types
. This includesLightClientBootstrap
,LightClientUpdate
and all the other types defined here. - Ability to construct merkle proofs for the
state.finalized_checkpoint.root
,state.current_sync_committee
andstate.next_sync_committee
. - CLI flags to enable / disable the light client server ([Merged by Bors] - Add --light-client-server flag and state cache utils #3714)
- Produce and cache light client data in the
BeaconChain
to support fast gossip validation and RPC processing #4926 - Add Capella & Deneb light client support #4896
- Add SSZ tests for the
LightClient*
types we support #4897
P2P (Gossip & ReqResp)
- Support the new gossip topics defined in the P2P spec
- Support the new network RPCs defined in the P2P spec
REST APIs
- API for
LightClientBootstrap
,LightClientFinalityUpdate
,LightClientOptimisticUpdate
and light client events #3954 - Add beacon API support for light client updates by range #4895
Optimization
- Optimise light client bootstrap and range
Production: enabling Light Client server by default
- Add tests for Light Client ReqResp interfaces #4940
- Measure performance impact and additional resource requirement
- Review inbound request quota config
- Evaluate whether changes to peer count / inbound peer ratio is required
- Enable light client server by default
Additional Details
- Constructing merkle proofs: I think it will be easiest if we pursue a non-generic approach for this initially, as a generic approach would require digging into the guts of
tree_hash_derive
to add methods for generating merkle proofs based on field indices. We probably want that eventually, but a non-generic approach can inform the generic implementation. If we implement this atopunstable
we probably want to integrate with theBeaconTreeHashCache
so that we don't need to re-hash the whole state for the intermediate nodes of the proof. Alternatively we could implement it without caching and rely on the arrival oftree-states
to improve performance (because caching is then built in to each field'stree_hash_root()
method). - NOTE: in-memory tree states is now on
stable
as of v5.2.0.