-
Notifications
You must be signed in to change notification settings - Fork 933
Open
Labels
NetworkingconsensusAn issue/PR that touches consensus code, such as state_processing or block verification.An issue/PR that touches consensus code, such as state_processing or block verification.enhancementNew feature or requestNew feature or requestlight-client
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,LightClientUpdateand all the other types defined here. - Ability to construct merkle proofs for the
state.finalized_checkpoint.root,state.current_sync_committeeandstate.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
BeaconChainto 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,LightClientOptimisticUpdateand 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_deriveto 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 atopunstablewe probably want to integrate with theBeaconTreeHashCacheso 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-statesto improve performance (because caching is then built in to each field'stree_hash_root()method). - NOTE: in-memory tree states is now on
stableas of v5.2.0.
philknows, Giulio2002, notbdu, claravanstaden, carver and 6 more
Metadata
Metadata
Assignees
Labels
NetworkingconsensusAn issue/PR that touches consensus code, such as state_processing or block verification.An issue/PR that touches consensus code, such as state_processing or block verification.enhancementNew feature or requestNew feature or requestlight-client