Commit Graph

9 Commits

Author SHA1 Message Date
Etan Kissling 0fb2447a95
Merge branch 'dev' into lc-blockfuncs 2022-11-19 12:20:18 +01:00
Michael Sproul 897b97990f
Further clarify light client slot checks 2022-11-11 22:09:33 +11:00
Michael Sproul dae1011194
Fix typos
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2022-11-09 09:41:21 +11:00
Michael Sproul 91de8a09f3
Fix slot checks in light client p2p spec 2022-11-08 17:06:07 +11:00
Etan Kissling 08ff71688f
Merge branch 'dev' into lc-blockfuncs 2022-11-07 15:03:20 +01:00
Etan Kissling ff0e525ecc
Pass blocks to LC data creation functions
Future light client protocol extensions may include data from the block
in addition to data from the state, e.g., `ExecutionPayloadHeader`.
To prepare for this, also pass the block to the corresponding functions.
In practice, blocks access is easier than historic state access, meaning
there are no practical limitations due to this change.
2022-10-28 22:14:25 +02:00
Etan Kissling c399e11aa7
Document how to derive fork context for LC gossip
For LC gossip, the documentation did not specify what slot number to use
for deriving the gossip objects. This missing documentation is now added
to document using `attested_header.slot`.
2022-10-27 21:23:09 +02:00
Etan Kissling 52a741f7c6
Improve grammar
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-25 15:46:29 +02:00
Etan Kissling 56363cd94a
Define libp2p protocol for light client sync
While the current Altair specs define structures to aid light client
development, one missing key aspect is the network protocol definition.

Certain implementations have started defining their own REST based APIs,
e.g., Lodestar at https://github.com/ChainSafe/lodestar/blob/master/packages/api/src/routes/lightclient.ts
While such APIs are useful, REST does not seem to be the ideomatic
choice as the sole API available at such a low level for Ethereum.

This patch introduces a libp2p based protocol to allow light clients to
sync to the latest `BeaconBlockHeader` in a trustless and decentralized
manner, building on top of prior work from:
- @hwwhww at https://github.com/ethereum/consensus-specs/pull/2267
- @jinfwhuang at https://github.com/ethereum/consensus-specs/pull/2786
- Lodestar's REST API (also has an endpoint to fetch merkle proofs!)
2022-07-22 17:56:41 +02:00