[x] Add Capella/Deneb changes from corresponding full-node.md spec files
[ ] Add SSZ support for Beacon API endpoints
[ ] Store light client updates in the database (possibly one update per period, but we have to take into account the following:
Also keep in mind, that there may be networks where the sync committee period boundary does not align with the fork schedule, so the database should be flexible enough to support that.
[x] Stateless function that do not use the blockchain service, such as the ones in /beacon-chain/blockchain/lightclient.go, should be placed under beacon-chain/core. Let's create a new /beacon-chain/core/light-client package and move such functions there.
Full nodes SHOULD provide the best derivable LightClientUpdate (according to is_better_update) for each sync committee period covering any epochs in range [max(ALTAIR_FORK_EPOCH, current_epoch - MIN_EPOCHS_FOR_BLOCK_REQUESTS), current_epoch] where current_epoch is defined by the current wall-clock time. Full nodes MAY also provide LightClientUpdate for other sync committee periods.
LightClientUpdate are assigned to sync committee periods based on their attested_header.beacon.slot
LightClientUpdate are only considered if compute_sync_committee_period_at_slot(update.attested_header.beacon.slot) == compute_sync_committee_period_at_slot(update.signature_slot)
Only LightClientUpdate with next_sync_committee as selected by fork choice are provided, regardless of ranking by is_better_update. To uniquely identify a non-finalized sync committee fork, all of period, current_sync_committee and next_sync_committee need to be incorporated, as sync committees may reappear over time.
NOTE: This should be done after all code from https://github.com/prysmaticlabs/prysm/pull/12854 is merged.
is_better_update
full-node.md
spec files/beacon-chain/blockchain/lightclient.go
, should be placed underbeacon-chain/core
. Let's create a new/beacon-chain/core/light-client
package and move such functions there.v1aplha1
instead ofv1
/v2
sendLightClientFinalityUpdate
andsendLightClientOptimisticUpdate
should only send updates when the block is suitable