mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 02:31:19 +00:00
b8c5af665f
* add http streaming light client events * expose ForkChoiceStore * return error in insertFinalizedDeposits * send light client updates * Revert "return error in insertFinalizedDeposits" This reverts commit f7068663b8c8b3a3bf45950d5258011a5e4d803e. * fix: lint * fix: patch the wrong error response * refactor: rename the JSON structs * fix: LC finalized stream return correct format * fix: LC op stream return correct JSON format * fix: omit nil JSON fields * chore: gazzle * fix: make update by range return list directly based on spec * chore: remove unneccessary json annotations * chore: adjust comments * feat: introduce EnableLightClientEvents feature flag * feat: use enable-lightclient-events flag * chore: more logging details * chore: fix rebase errors * chore: adjust data structure to save mem * Update beacon-chain/blockchain/process_block.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * refactor: rename config EnableLightClient * refactor: rename feature flag * refactor: move helper functions to helper pkg * test: fix broken unit tests --------- Co-authored-by: Nicolás Pernas Maradei <nicolas@polymerlabs.org> Co-authored-by: Radosław Kapka <rkapka@wp.pl>
36 lines
1.4 KiB
Go
36 lines
1.4 KiB
Go
package lightclient
|
|
|
|
import (
|
|
"github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/eth/shared"
|
|
)
|
|
|
|
type LightClientBootstrapResponse struct {
|
|
Version string `json:"version"`
|
|
Data *LightClientBootstrap `json:"data"`
|
|
}
|
|
|
|
type LightClientBootstrap struct {
|
|
Header *shared.BeaconBlockHeader `json:"header"`
|
|
CurrentSyncCommittee *shared.SyncCommittee `json:"current_sync_committee"`
|
|
CurrentSyncCommitteeBranch []string `json:"current_sync_committee_branch"`
|
|
}
|
|
|
|
type LightClientUpdate struct {
|
|
AttestedHeader *shared.BeaconBlockHeader `json:"attested_header"`
|
|
NextSyncCommittee *shared.SyncCommittee `json:"next_sync_committee,omitempty"`
|
|
FinalizedHeader *shared.BeaconBlockHeader `json:"finalized_header,omitempty"`
|
|
SyncAggregate *shared.SyncAggregate `json:"sync_aggregate"`
|
|
NextSyncCommitteeBranch []string `json:"next_sync_committee_branch,omitempty"`
|
|
FinalityBranch []string `json:"finality_branch,omitempty"`
|
|
SignatureSlot string `json:"signature_slot"`
|
|
}
|
|
|
|
type LightClientUpdateWithVersion struct {
|
|
Version string `json:"version"`
|
|
Data *LightClientUpdate `json:"data"`
|
|
}
|
|
|
|
type LightClientUpdatesByRangeResponse struct {
|
|
Updates []*LightClientUpdateWithVersion `json:"updates"`
|
|
}
|