Lodestar light
(PoS) node spec & impl plan
#4705
Labels
epic
Issues used as milestones and tracking multiple issues.
scope-light-clients
All issues regarding light client development.
(this write is still WIP and needs discussion with @dapplion to freeze out and subsequent confirmation with @dadepo for implementation to plug any gaps and provide clarifications)
Background
Mostly people interacting with Ethereum are concerned about what's known as "execution land". In-fact before merge, they could just run
light sync
protocol on the execution client like Geth, which would be able to validate chain building via PoW/PoA rule-set while giving a "read" capability to the blockchain.Post Merge Setup
Since the PoW/PoA rule-set can't be used to validate chain building post-merge, the execution client now necessarily need a CL to drive them. This is an extra headache for those who are just concerned about having access to the current ethereum account state (
full
orlight
).Or now that Ethereum consensus is on PoS rails, how to best utilize the protocol to move to a
less-trust-verify-more
nirvana where doesn't need to run aftercentralized
services and can be morep2p
which really gels with the ethos of a blockchain world.The answer is a
light node
forPoS
consensus which can drivefull
orlight
execution node.Lodestar already allows one to access its light-client api on the current
full
node and has alight-client
module to subscribe and validate and process light client protocol to follow head. Recently a p2p version of this api has been published, but thelight-client
module is not yet capable to consume it.Goal
The aim of this effort is to have a p2p
light node
implementation which will connect to the peers supportinglight PoS
capability i.e. nodes hosting p2p version of light-client api and drive afull
execution node (also coordinate/help execution client supportlight
execution nodes)High Level Specs
Full
PoS nodeAllow connecting
light
PoS capable nodes and manage them separately thanfull
nodeseth6
/snap1
/les..
to process/advertise thelight
node capabilityLight
PoS nodepost-altair
epoch to download the boostraplight
p2p capability, allow other peers to connect withlight
p2p capabilityexecution
client viaexecution api
newPayloadV1
Target
Light
PoS can sync from a checkpoint root via p2p and get synced to current period and staySynced
and track latest/finalizedvalid
state and log itlight
nodes and seedlightclient
data into the networkImplementation
Peering/Networking
full
nodesPrimarily being more "implementation research" oriented, this will be supported by @g11tech / @dapplion and will be seeded as a separate module that can be independently used by the consumer as well to connect to the
full
nodeImplementing the
light
consumerMinus the networking support, the rest of the implementation of the consumer to sync, gossiping, serving req/resp, and optionally driving the execution fcU falls in this category. This is primarily driven by @dadepo with @g11tech guiding the effort (with help from @dapplion )
To reduce networking scope and allowing access to the current modules and api (like block by root, execution engine api), the
light
consumer will currently piggy back on thefull
node networking and use to tolight-sync
.What does the piggyback entails (
--piggybackLight
)Setup:
A
full
lodestar dev node running in single node mode. This should avoid lodestar looking for any information from peers (and hence not banning/removing/ejecting them) while allowing itself to be peered with thelight
node.A
light
lodestar dev node with no validators assigned just running tolight-sync
fromfull
nodechain
and maintain itssync
node
of thefull
full
peer and use same req/resplight-client
to drivesync
process (replace api calls by req/resp, and hookonSSE
to the gossip listeners)execution
engine to newPayloadV1 and fcU and maintain/log statuslight
lodestar dev node connecting with above (2.)light
nodecheckpoint
root to sync (download snapshot/bootstrap and req/resp to sync and start processing thegossip
. Node (2) should not host libp2p udp so that thefull
node is not discovered.Final Integration
full
node to avoid piggybackingTests
TBD
Next Level
This is outside current scope/research task
light
bn node will always stay 1 slot behind the current, however if a light node is connected to afull
node it can listen to the gossip on to get the current slot as well as itssync aggregate
and can display the current slot infolight
client gets are the previous head, so it doesn't really need to have a forkchoice and its simplest forkchoice state can be latest update (which also has finalized). however it will be worthwhile to track thebranch
in order to provide functionality toresolve
the execution block number => execution block hash for serving as proxy for execution jsonrpcThe text was updated successfully, but these errors were encountered: