From 7fc5c714a162b86f9c90536e8ccc3fe392a549df Mon Sep 17 00:00:00 2001 From: Bastin <43618253+Inspector-Butters@users.noreply.github.com> Date: Tue, 8 Oct 2024 19:07:56 +0200 Subject: [PATCH] Light Client consensus types (#14518) * protos/SSZ * interfaces * types * cleanup/dedup * changelog * use createBranch in headers * error handling --------- Co-authored-by: rkapka --- CHANGELOG.md | 1 + beacon-chain/core/light-client/lightclient.go | 4 +- beacon-chain/rpc/eth/light-client/helpers.go | 8 +- .../rpc/eth/light-client/helpers_test.go | 6 +- config/fieldparams/mainnet.go | 4 +- config/fieldparams/minimal.go | 4 +- consensus-types/interfaces/BUILD.bazel | 1 + consensus-types/interfaces/light_client.go | 58 + consensus-types/light-client/BUILD.bazel | 26 + consensus-types/light-client/bootstrap.go | 208 ++ .../light-client/finality_update.go | 251 +++ consensus-types/light-client/header.go | 192 ++ consensus-types/light-client/helpers.go | 30 + .../light-client/optimistic_update.go | 178 ++ consensus-types/light-client/update.go | 305 +++ proto/prysm/v1alpha1/BUILD.bazel | 16 + proto/prysm/v1alpha1/altair.ssz.go | 647 +++++- proto/prysm/v1alpha1/capella.ssz.go | 873 +++++++- proto/prysm/v1alpha1/deneb.ssz.go | 873 +++++++- proto/prysm/v1alpha1/light_client.pb.go | 1759 +++++++++++++++++ proto/prysm/v1alpha1/light_client.proto | 134 ++ 21 files changed, 5564 insertions(+), 14 deletions(-) create mode 100644 consensus-types/interfaces/light_client.go create mode 100644 consensus-types/light-client/BUILD.bazel create mode 100644 consensus-types/light-client/bootstrap.go create mode 100644 consensus-types/light-client/finality_update.go create mode 100644 consensus-types/light-client/header.go create mode 100644 consensus-types/light-client/helpers.go create mode 100644 consensus-types/light-client/optimistic_update.go create mode 100644 consensus-types/light-client/update.go create mode 100755 proto/prysm/v1alpha1/light_client.pb.go create mode 100644 proto/prysm/v1alpha1/light_client.proto diff --git a/CHANGELOG.md b/CHANGELOG.md index ed4472c6ef..868c3a872f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve - Light client support: Add light client database changes. - Light client support: Implement capella and deneb changes. - Light client support: Implement `BlockToLightClientHeader` function. +- Light client support: Consensus types. - GetBeaconStateV2: add Electra case. - Implement [consensus-specs/3875](https://github.com/ethereum/consensus-specs/pull/3875) - Tests to ensure sepolia config matches the official upstream yaml diff --git a/beacon-chain/core/light-client/lightclient.go b/beacon-chain/core/light-client/lightclient.go index 8af89d2b78..3c1b8a552d 100644 --- a/beacon-chain/core/light-client/lightclient.go +++ b/beacon-chain/core/light-client/lightclient.go @@ -243,8 +243,8 @@ func createDefaultLightClientUpdate() (*ethpbv2.LightClientUpdate, error) { Pubkeys: pubKeys, AggregatePubkey: make([]byte, fieldparams.BLSPubkeyLength), } - nextSyncCommitteeBranch := make([][]byte, fieldparams.NextSyncCommitteeBranchDepth) - for i := 0; i < fieldparams.NextSyncCommitteeBranchDepth; i++ { + nextSyncCommitteeBranch := make([][]byte, fieldparams.SyncCommitteeBranchDepth) + for i := 0; i < fieldparams.SyncCommitteeBranchDepth; i++ { nextSyncCommitteeBranch[i] = make([]byte, fieldparams.RootLength) } executionBranch := make([][]byte, executionBranchNumOfLeaves) diff --git a/beacon-chain/rpc/eth/light-client/helpers.go b/beacon-chain/rpc/eth/light-client/helpers.go index c9750c448f..251364c1d5 100644 --- a/beacon-chain/rpc/eth/light-client/helpers.go +++ b/beacon-chain/rpc/eth/light-client/helpers.go @@ -91,7 +91,7 @@ func createLightClientBootstrapAltair(ctx context.Context, state state.BeaconSta return nil, errors.Wrap(err, "could not get current sync committee proof") } - branch := make([]string, fieldparams.NextSyncCommitteeBranchDepth) + branch := make([]string, fieldparams.SyncCommitteeBranchDepth) for i, proof := range currentSyncCommitteeProof { branch[i] = hexutil.Encode(proof) } @@ -159,7 +159,7 @@ func createLightClientBootstrapCapella(ctx context.Context, state state.BeaconSt return nil, errors.Wrap(err, "could not get current sync committee proof") } - branch := make([]string, fieldparams.NextSyncCommitteeBranchDepth) + branch := make([]string, fieldparams.SyncCommitteeBranchDepth) for i, proof := range currentSyncCommitteeProof { branch[i] = hexutil.Encode(proof) } @@ -227,7 +227,7 @@ func createLightClientBootstrapDeneb(ctx context.Context, state state.BeaconStat return nil, errors.Wrap(err, "could not get current sync committee proof") } - branch := make([]string, fieldparams.NextSyncCommitteeBranchDepth) + branch := make([]string, fieldparams.SyncCommitteeBranchDepth) for i, proof := range currentSyncCommitteeProof { branch[i] = hexutil.Encode(proof) } @@ -288,7 +288,7 @@ func newLightClientOptimisticUpdateFromBeaconState( } func IsSyncCommitteeUpdate(update *v2.LightClientUpdate) bool { - nextSyncCommitteeBranch := make([][]byte, fieldparams.NextSyncCommitteeBranchDepth) + nextSyncCommitteeBranch := make([][]byte, fieldparams.SyncCommitteeBranchDepth) return !reflect.DeepEqual(update.NextSyncCommitteeBranch, nextSyncCommitteeBranch) } diff --git a/beacon-chain/rpc/eth/light-client/helpers_test.go b/beacon-chain/rpc/eth/light-client/helpers_test.go index 726527ef8b..9b27204fc2 100644 --- a/beacon-chain/rpc/eth/light-client/helpers_test.go +++ b/beacon-chain/rpc/eth/light-client/helpers_test.go @@ -13,7 +13,7 @@ import ( // When the update has relevant sync committee func createNonEmptySyncCommitteeBranch() [][]byte { - res := make([][]byte, fieldparams.NextSyncCommitteeBranchDepth) + res := make([][]byte, fieldparams.SyncCommitteeBranchDepth) res[0] = []byte("xyz") return res } @@ -101,7 +101,7 @@ func TestIsBetterUpdate(t *testing.T) { }}, }, }, - NextSyncCommitteeBranch: make([][]byte, fieldparams.NextSyncCommitteeBranchDepth), + NextSyncCommitteeBranch: make([][]byte, fieldparams.SyncCommitteeBranchDepth), SignatureSlot: 9999, }, newUpdate: ðpbv2.LightClientUpdate{ @@ -147,7 +147,7 @@ func TestIsBetterUpdate(t *testing.T) { }}, }, }, - NextSyncCommitteeBranch: make([][]byte, fieldparams.NextSyncCommitteeBranchDepth), + NextSyncCommitteeBranch: make([][]byte, fieldparams.SyncCommitteeBranchDepth), SignatureSlot: 9999, }, expectedResult: false, diff --git a/config/fieldparams/mainnet.go b/config/fieldparams/mainnet.go index 17aeed23f8..a773da403e 100644 --- a/config/fieldparams/mainnet.go +++ b/config/fieldparams/mainnet.go @@ -33,7 +33,9 @@ const ( BlobSize = 131072 // defined to match blob.size in bazel ssz codegen BlobSidecarSize = 131928 // defined to match blob sidecar size in bazel ssz codegen KzgCommitmentInclusionProofDepth = 17 // Merkle proof depth for blob_kzg_commitments list item - NextSyncCommitteeBranchDepth = 5 // NextSyncCommitteeBranchDepth defines the depth of the next sync committee branch. + ExecutionBranchDepth = 4 // ExecutionBranchDepth defines the number of leaves in a merkle proof of the execution payload header. + SyncCommitteeBranchDepth = 5 // SyncCommitteeBranchDepth defines the number of leaves in a merkle proof of a sync committee. + FinalityBranchDepth = 6 // FinalityBranchDepth defines the number of leaves in a merkle proof of the finalized checkpoint root. PendingBalanceDepositsLimit = 134217728 // Maximum number of pending balance deposits in the beacon state. PendingPartialWithdrawalsLimit = 134217728 // Maximum number of pending partial withdrawals in the beacon state. PendingConsolidationsLimit = 262144 // Maximum number of pending consolidations in the beacon state. diff --git a/config/fieldparams/minimal.go b/config/fieldparams/minimal.go index ac022e5823..5f135f639b 100644 --- a/config/fieldparams/minimal.go +++ b/config/fieldparams/minimal.go @@ -33,7 +33,9 @@ const ( BlobSize = 131072 // defined to match blob.size in bazel ssz codegen BlobSidecarSize = 131928 // defined to match blob sidecar size in bazel ssz codegen KzgCommitmentInclusionProofDepth = 17 // Merkle proof depth for blob_kzg_commitments list item - NextSyncCommitteeBranchDepth = 5 // NextSyncCommitteeBranchDepth defines the depth of the next sync committee branch. + ExecutionBranchDepth = 4 // ExecutionBranchDepth defines the number of leaves in a merkle proof of the execution payload header. + SyncCommitteeBranchDepth = 5 // SyncCommitteeBranchDepth defines the number of leaves in a merkle proof of a sync committee. + FinalityBranchDepth = 6 // FinalityBranchDepth defines the number of leaves in a merkle proof of the finalized checkpoint root. PendingBalanceDepositsLimit = 134217728 // Maximum number of pending balance deposits in the beacon state. PendingPartialWithdrawalsLimit = 64 // Maximum number of pending partial withdrawals in the beacon state. PendingConsolidationsLimit = 64 // Maximum number of pending consolidations in the beacon state. diff --git a/consensus-types/interfaces/BUILD.bazel b/consensus-types/interfaces/BUILD.bazel index 9e17fe3adf..51b9c89816 100644 --- a/consensus-types/interfaces/BUILD.bazel +++ b/consensus-types/interfaces/BUILD.bazel @@ -5,6 +5,7 @@ go_library( srcs = [ "beacon_block.go", "error.go", + "light_client.go", "utils.go", "validator.go", ], diff --git a/consensus-types/interfaces/light_client.go b/consensus-types/interfaces/light_client.go new file mode 100644 index 0000000000..a0719b3a37 --- /dev/null +++ b/consensus-types/interfaces/light_client.go @@ -0,0 +1,58 @@ +package interfaces + +import ( + ssz "github.com/prysmaticlabs/fastssz" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + pb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" +) + +type LightClientExecutionBranch = [fieldparams.ExecutionBranchDepth][fieldparams.RootLength]byte +type LightClientSyncCommitteeBranch = [fieldparams.SyncCommitteeBranchDepth][fieldparams.RootLength]byte +type LightClientFinalityBranch = [fieldparams.FinalityBranchDepth][fieldparams.RootLength]byte + +type LightClientHeader interface { + ssz.Marshaler + Version() int + Beacon() *pb.BeaconBlockHeader + Execution() (ExecutionData, error) + ExecutionBranch() (LightClientExecutionBranch, error) +} + +type LightClientBootstrap interface { + ssz.Marshaler + Version() int + Header() LightClientHeader + CurrentSyncCommittee() *pb.SyncCommittee + CurrentSyncCommitteeBranch() LightClientSyncCommitteeBranch +} + +type LightClientUpdate interface { + ssz.Marshaler + Version() int + AttestedHeader() LightClientHeader + NextSyncCommittee() *pb.SyncCommittee + NextSyncCommitteeBranch() LightClientSyncCommitteeBranch + FinalizedHeader() LightClientHeader + FinalityBranch() LightClientFinalityBranch + SyncAggregate() *pb.SyncAggregate + SignatureSlot() primitives.Slot +} + +type LightClientFinalityUpdate interface { + ssz.Marshaler + Version() int + AttestedHeader() LightClientHeader + FinalizedHeader() LightClientHeader + FinalityBranch() LightClientFinalityBranch + SyncAggregate() *pb.SyncAggregate + SignatureSlot() primitives.Slot +} + +type LightClientOptimisticUpdate interface { + ssz.Marshaler + Version() int + AttestedHeader() LightClientHeader + SyncAggregate() *pb.SyncAggregate + SignatureSlot() primitives.Slot +} diff --git a/consensus-types/light-client/BUILD.bazel b/consensus-types/light-client/BUILD.bazel new file mode 100644 index 0000000000..151f22b522 --- /dev/null +++ b/consensus-types/light-client/BUILD.bazel @@ -0,0 +1,26 @@ +load("@prysm//tools/go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "bootstrap.go", + "finality_update.go", + "header.go", + "helpers.go", + "optimistic_update.go", + "update.go", + ], + importpath = "github.com/prysmaticlabs/prysm/v5/consensus-types/light-client", + visibility = ["//visibility:public"], + deps = [ + "//config/fieldparams:go_default_library", + "//consensus-types:go_default_library", + "//consensus-types/blocks:go_default_library", + "//consensus-types/interfaces:go_default_library", + "//consensus-types/primitives:go_default_library", + "//encoding/bytesutil:go_default_library", + "//proto/prysm/v1alpha1:go_default_library", + "//runtime/version:go_default_library", + "@org_golang_google_protobuf//proto:go_default_library", + ], +) diff --git a/consensus-types/light-client/bootstrap.go b/consensus-types/light-client/bootstrap.go new file mode 100644 index 0000000000..ec97de6058 --- /dev/null +++ b/consensus-types/light-client/bootstrap.go @@ -0,0 +1,208 @@ +package light_client + +import ( + "fmt" + + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + consensustypes "github.com/prysmaticlabs/prysm/v5/consensus-types" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + pb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "google.golang.org/protobuf/proto" +) + +func NewWrappedBootstrap(m proto.Message) (interfaces.LightClientBootstrap, error) { + if m == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + switch t := m.(type) { + case *pb.LightClientBootstrapAltair: + return NewWrappedBootstrapAltair(t) + case *pb.LightClientBootstrapCapella: + return NewWrappedBootstrapCapella(t) + case *pb.LightClientBootstrapDeneb: + return NewWrappedBootstrapDeneb(t) + default: + return nil, fmt.Errorf("cannot construct light client bootstrap from type %T", t) + } +} + +type bootstrapAltair struct { + p *pb.LightClientBootstrapAltair + header interfaces.LightClientHeader + currentSyncCommitteeBranch interfaces.LightClientSyncCommitteeBranch +} + +var _ interfaces.LightClientBootstrap = &bootstrapAltair{} + +func NewWrappedBootstrapAltair(p *pb.LightClientBootstrapAltair) (interfaces.LightClientBootstrap, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + header, err := NewWrappedHeaderAltair(p.Header) + if err != nil { + return nil, err + } + branch, err := createBranch[interfaces.LightClientSyncCommitteeBranch]( + "sync committee", + p.CurrentSyncCommitteeBranch, + fieldparams.SyncCommitteeBranchDepth, + ) + if err != nil { + return nil, err + } + + return &bootstrapAltair{ + p: p, + header: header, + currentSyncCommitteeBranch: branch, + }, nil +} + +func (h *bootstrapAltair) MarshalSSZTo(dst []byte) ([]byte, error) { + return h.p.MarshalSSZTo(dst) +} + +func (h *bootstrapAltair) MarshalSSZ() ([]byte, error) { + return h.p.MarshalSSZ() +} + +func (h *bootstrapAltair) SizeSSZ() int { + return h.p.SizeSSZ() +} + +func (h *bootstrapAltair) Version() int { + return version.Altair +} + +func (h *bootstrapAltair) Header() interfaces.LightClientHeader { + return h.header +} + +func (h *bootstrapAltair) CurrentSyncCommittee() *pb.SyncCommittee { + return h.p.CurrentSyncCommittee +} + +func (h *bootstrapAltair) CurrentSyncCommitteeBranch() interfaces.LightClientSyncCommitteeBranch { + return h.currentSyncCommitteeBranch +} + +type bootstrapCapella struct { + p *pb.LightClientBootstrapCapella + header interfaces.LightClientHeader + currentSyncCommitteeBranch interfaces.LightClientSyncCommitteeBranch +} + +var _ interfaces.LightClientBootstrap = &bootstrapCapella{} + +func NewWrappedBootstrapCapella(p *pb.LightClientBootstrapCapella) (interfaces.LightClientBootstrap, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + header, err := NewWrappedHeaderCapella(p.Header) + if err != nil { + return nil, err + } + branch, err := createBranch[interfaces.LightClientSyncCommitteeBranch]( + "sync committee", + p.CurrentSyncCommitteeBranch, + fieldparams.SyncCommitteeBranchDepth, + ) + if err != nil { + return nil, err + } + + return &bootstrapCapella{ + p: p, + header: header, + currentSyncCommitteeBranch: branch, + }, nil +} + +func (h *bootstrapCapella) MarshalSSZTo(dst []byte) ([]byte, error) { + return h.p.MarshalSSZTo(dst) +} + +func (h *bootstrapCapella) MarshalSSZ() ([]byte, error) { + return h.p.MarshalSSZ() +} + +func (h *bootstrapCapella) SizeSSZ() int { + return h.p.SizeSSZ() +} + +func (h *bootstrapCapella) Version() int { + return version.Capella +} + +func (h *bootstrapCapella) Header() interfaces.LightClientHeader { + return h.header +} + +func (h *bootstrapCapella) CurrentSyncCommittee() *pb.SyncCommittee { + return h.p.CurrentSyncCommittee +} + +func (h *bootstrapCapella) CurrentSyncCommitteeBranch() interfaces.LightClientSyncCommitteeBranch { + return h.currentSyncCommitteeBranch +} + +type bootstrapDeneb struct { + p *pb.LightClientBootstrapDeneb + header interfaces.LightClientHeader + currentSyncCommitteeBranch interfaces.LightClientSyncCommitteeBranch +} + +var _ interfaces.LightClientBootstrap = &bootstrapDeneb{} + +func NewWrappedBootstrapDeneb(p *pb.LightClientBootstrapDeneb) (interfaces.LightClientBootstrap, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + header, err := NewWrappedHeaderDeneb(p.Header) + if err != nil { + return nil, err + } + branch, err := createBranch[interfaces.LightClientSyncCommitteeBranch]( + "sync committee", + p.CurrentSyncCommitteeBranch, + fieldparams.SyncCommitteeBranchDepth, + ) + if err != nil { + return nil, err + } + + return &bootstrapDeneb{ + p: p, + header: header, + currentSyncCommitteeBranch: branch, + }, nil +} + +func (h *bootstrapDeneb) MarshalSSZTo(dst []byte) ([]byte, error) { + return h.p.MarshalSSZTo(dst) +} + +func (h *bootstrapDeneb) MarshalSSZ() ([]byte, error) { + return h.p.MarshalSSZ() +} + +func (h *bootstrapDeneb) SizeSSZ() int { + return h.p.SizeSSZ() +} + +func (h *bootstrapDeneb) Version() int { + return version.Deneb +} + +func (h *bootstrapDeneb) Header() interfaces.LightClientHeader { + return h.header +} + +func (h *bootstrapDeneb) CurrentSyncCommittee() *pb.SyncCommittee { + return h.p.CurrentSyncCommittee +} + +func (h *bootstrapDeneb) CurrentSyncCommitteeBranch() interfaces.LightClientSyncCommitteeBranch { + return h.currentSyncCommitteeBranch +} diff --git a/consensus-types/light-client/finality_update.go b/consensus-types/light-client/finality_update.go new file mode 100644 index 0000000000..37de560e60 --- /dev/null +++ b/consensus-types/light-client/finality_update.go @@ -0,0 +1,251 @@ +package light_client + +import ( + "fmt" + + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + consensustypes "github.com/prysmaticlabs/prysm/v5/consensus-types" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + pb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "google.golang.org/protobuf/proto" +) + +func NewWrappedFinalityUpdate(m proto.Message) (interfaces.LightClientFinalityUpdate, error) { + if m == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + switch t := m.(type) { + case *pb.LightClientFinalityUpdateAltair: + return NewWrappedFinalityUpdateAltair(t) + case *pb.LightClientFinalityUpdateCapella: + return NewWrappedFinalityUpdateCapella(t) + case *pb.LightClientFinalityUpdateDeneb: + return NewWrappedFinalityUpdateDeneb(t) + default: + return nil, fmt.Errorf("cannot construct light client finality update from type %T", t) + } +} + +type finalityUpdateAltair struct { + p *pb.LightClientFinalityUpdateAltair + attestedHeader interfaces.LightClientHeader + finalizedHeader interfaces.LightClientHeader + finalityBranch interfaces.LightClientFinalityBranch +} + +var _ interfaces.LightClientFinalityUpdate = &finalityUpdateAltair{} + +func NewWrappedFinalityUpdateAltair(p *pb.LightClientFinalityUpdateAltair) (interfaces.LightClientFinalityUpdate, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + attestedHeader, err := NewWrappedHeaderAltair(p.AttestedHeader) + if err != nil { + return nil, err + } + finalizedHeader, err := NewWrappedHeaderAltair(p.FinalizedHeader) + if err != nil { + return nil, err + } + branch, err := createBranch[interfaces.LightClientFinalityBranch]( + "finality", + p.FinalityBranch, + fieldparams.FinalityBranchDepth, + ) + if err != nil { + return nil, err + } + + return &finalityUpdateAltair{ + p: p, + attestedHeader: attestedHeader, + finalizedHeader: finalizedHeader, + finalityBranch: branch, + }, nil +} + +func (u *finalityUpdateAltair) MarshalSSZTo(dst []byte) ([]byte, error) { + return u.p.MarshalSSZTo(dst) +} + +func (u *finalityUpdateAltair) MarshalSSZ() ([]byte, error) { + return u.p.MarshalSSZ() +} + +func (u *finalityUpdateAltair) SizeSSZ() int { + return u.p.SizeSSZ() +} + +func (u *finalityUpdateAltair) Version() int { + return version.Altair +} + +func (u *finalityUpdateAltair) AttestedHeader() interfaces.LightClientHeader { + return u.attestedHeader +} + +func (u *finalityUpdateAltair) FinalizedHeader() interfaces.LightClientHeader { + return u.finalizedHeader +} + +func (u *finalityUpdateAltair) FinalityBranch() interfaces.LightClientFinalityBranch { + return u.finalityBranch +} + +func (u *finalityUpdateAltair) SyncAggregate() *pb.SyncAggregate { + return u.p.SyncAggregate +} + +func (u *finalityUpdateAltair) SignatureSlot() primitives.Slot { + return u.p.SignatureSlot +} + +type finalityUpdateCapella struct { + p *pb.LightClientFinalityUpdateCapella + attestedHeader interfaces.LightClientHeader + finalizedHeader interfaces.LightClientHeader + finalityBranch interfaces.LightClientFinalityBranch +} + +var _ interfaces.LightClientFinalityUpdate = &finalityUpdateCapella{} + +func NewWrappedFinalityUpdateCapella(p *pb.LightClientFinalityUpdateCapella) (interfaces.LightClientFinalityUpdate, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + attestedHeader, err := NewWrappedHeaderCapella(p.AttestedHeader) + if err != nil { + return nil, err + } + finalizedHeader, err := NewWrappedHeaderCapella(p.FinalizedHeader) + if err != nil { + return nil, err + } + branch, err := createBranch[interfaces.LightClientFinalityBranch]( + "finality", + p.FinalityBranch, + fieldparams.FinalityBranchDepth, + ) + if err != nil { + return nil, err + } + + return &finalityUpdateCapella{ + p: p, + attestedHeader: attestedHeader, + finalizedHeader: finalizedHeader, + finalityBranch: branch, + }, nil +} + +func (u *finalityUpdateCapella) MarshalSSZTo(dst []byte) ([]byte, error) { + return u.p.MarshalSSZTo(dst) +} + +func (u *finalityUpdateCapella) MarshalSSZ() ([]byte, error) { + return u.p.MarshalSSZ() +} + +func (u *finalityUpdateCapella) SizeSSZ() int { + return u.p.SizeSSZ() +} + +func (u *finalityUpdateCapella) Version() int { + return version.Capella +} + +func (u *finalityUpdateCapella) AttestedHeader() interfaces.LightClientHeader { + return u.attestedHeader +} + +func (u *finalityUpdateCapella) FinalizedHeader() interfaces.LightClientHeader { + return u.finalizedHeader +} + +func (u *finalityUpdateCapella) FinalityBranch() interfaces.LightClientFinalityBranch { + return u.finalityBranch +} + +func (u *finalityUpdateCapella) SyncAggregate() *pb.SyncAggregate { + return u.p.SyncAggregate +} + +func (u *finalityUpdateCapella) SignatureSlot() primitives.Slot { + return u.p.SignatureSlot +} + +type finalityUpdateDeneb struct { + p *pb.LightClientFinalityUpdateDeneb + attestedHeader interfaces.LightClientHeader + finalizedHeader interfaces.LightClientHeader + finalityBranch interfaces.LightClientFinalityBranch +} + +var _ interfaces.LightClientFinalityUpdate = &finalityUpdateDeneb{} + +func NewWrappedFinalityUpdateDeneb(p *pb.LightClientFinalityUpdateDeneb) (interfaces.LightClientFinalityUpdate, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + attestedHeader, err := NewWrappedHeaderDeneb(p.AttestedHeader) + if err != nil { + return nil, err + } + finalizedHeader, err := NewWrappedHeaderDeneb(p.FinalizedHeader) + if err != nil { + return nil, err + } + branch, err := createBranch[interfaces.LightClientFinalityBranch]( + "finality", + p.FinalityBranch, + fieldparams.FinalityBranchDepth, + ) + if err != nil { + return nil, err + } + + return &finalityUpdateDeneb{ + p: p, + attestedHeader: attestedHeader, + finalizedHeader: finalizedHeader, + finalityBranch: branch, + }, nil +} + +func (u *finalityUpdateDeneb) MarshalSSZTo(dst []byte) ([]byte, error) { + return u.p.MarshalSSZTo(dst) +} + +func (u *finalityUpdateDeneb) MarshalSSZ() ([]byte, error) { + return u.p.MarshalSSZ() +} + +func (u *finalityUpdateDeneb) SizeSSZ() int { + return u.p.SizeSSZ() +} + +func (u *finalityUpdateDeneb) Version() int { + return version.Deneb +} + +func (u *finalityUpdateDeneb) AttestedHeader() interfaces.LightClientHeader { + return u.attestedHeader +} + +func (u *finalityUpdateDeneb) FinalizedHeader() interfaces.LightClientHeader { + return u.finalizedHeader +} + +func (u *finalityUpdateDeneb) FinalityBranch() interfaces.LightClientFinalityBranch { + return u.finalityBranch +} + +func (u *finalityUpdateDeneb) SyncAggregate() *pb.SyncAggregate { + return u.p.SyncAggregate +} + +func (u *finalityUpdateDeneb) SignatureSlot() primitives.Slot { + return u.p.SignatureSlot +} diff --git a/consensus-types/light-client/header.go b/consensus-types/light-client/header.go new file mode 100644 index 0000000000..496a48424c --- /dev/null +++ b/consensus-types/light-client/header.go @@ -0,0 +1,192 @@ +package light_client + +import ( + "fmt" + + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + consensustypes "github.com/prysmaticlabs/prysm/v5/consensus-types" + "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + pb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "google.golang.org/protobuf/proto" +) + +func NewWrappedHeader(m proto.Message) (interfaces.LightClientHeader, error) { + if m == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + switch t := m.(type) { + case *pb.LightClientHeaderAltair: + return NewWrappedHeaderAltair(t) + case *pb.LightClientHeaderCapella: + return NewWrappedHeaderCapella(t) + case *pb.LightClientHeaderDeneb: + return NewWrappedHeaderDeneb(t) + default: + return nil, fmt.Errorf("cannot construct light client header from type %T", t) + } +} + +type headerAltair struct { + p *pb.LightClientHeaderAltair +} + +var _ interfaces.LightClientHeader = &headerAltair{} + +func NewWrappedHeaderAltair(p *pb.LightClientHeaderAltair) (interfaces.LightClientHeader, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + return &headerAltair{p: p}, nil +} + +func (h *headerAltair) MarshalSSZTo(dst []byte) ([]byte, error) { + return h.p.MarshalSSZTo(dst) +} + +func (h *headerAltair) MarshalSSZ() ([]byte, error) { + return h.p.MarshalSSZ() +} + +func (h *headerAltair) SizeSSZ() int { + return h.p.SizeSSZ() +} + +func (h *headerAltair) Version() int { + return version.Altair +} + +func (h *headerAltair) Beacon() *pb.BeaconBlockHeader { + return h.p.Beacon +} + +func (h *headerAltair) Execution() (interfaces.ExecutionData, error) { + return nil, consensustypes.ErrNotSupported("Execution", version.Altair) +} + +func (h *headerAltair) ExecutionBranch() (interfaces.LightClientExecutionBranch, error) { + return interfaces.LightClientExecutionBranch{}, consensustypes.ErrNotSupported("ExecutionBranch", version.Altair) +} + +type headerCapella struct { + p *pb.LightClientHeaderCapella + execution interfaces.ExecutionData + executionBranch interfaces.LightClientExecutionBranch +} + +var _ interfaces.LightClientHeader = &headerCapella{} + +func NewWrappedHeaderCapella(p *pb.LightClientHeaderCapella) (interfaces.LightClientHeader, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + execution, err := blocks.WrappedExecutionPayloadHeaderCapella(p.Execution) + if err != nil { + return nil, err + } + + branch, err := createBranch[interfaces.LightClientExecutionBranch]( + "execution", + p.ExecutionBranch, + fieldparams.ExecutionBranchDepth, + ) + if err != nil { + return nil, err + } + + return &headerCapella{ + p: p, + execution: execution, + executionBranch: branch, + }, nil +} + +func (h *headerCapella) MarshalSSZTo(dst []byte) ([]byte, error) { + return h.p.MarshalSSZTo(dst) +} + +func (h *headerCapella) MarshalSSZ() ([]byte, error) { + return h.p.MarshalSSZ() +} + +func (h *headerCapella) SizeSSZ() int { + return h.p.SizeSSZ() +} + +func (h *headerCapella) Version() int { + return version.Capella +} + +func (h *headerCapella) Beacon() *pb.BeaconBlockHeader { + return h.p.Beacon +} + +func (h *headerCapella) Execution() (interfaces.ExecutionData, error) { + return h.execution, nil +} + +func (h *headerCapella) ExecutionBranch() (interfaces.LightClientExecutionBranch, error) { + return h.executionBranch, nil +} + +type headerDeneb struct { + p *pb.LightClientHeaderDeneb + execution interfaces.ExecutionData + executionBranch interfaces.LightClientExecutionBranch +} + +var _ interfaces.LightClientHeader = &headerDeneb{} + +func NewWrappedHeaderDeneb(p *pb.LightClientHeaderDeneb) (interfaces.LightClientHeader, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + execution, err := blocks.WrappedExecutionPayloadHeaderDeneb(p.Execution) + if err != nil { + return nil, err + } + + branch, err := createBranch[interfaces.LightClientExecutionBranch]( + "execution", + p.ExecutionBranch, + fieldparams.ExecutionBranchDepth, + ) + if err != nil { + return nil, err + } + + return &headerDeneb{ + p: p, + execution: execution, + executionBranch: branch, + }, nil +} + +func (h *headerDeneb) MarshalSSZTo(dst []byte) ([]byte, error) { + return h.p.MarshalSSZTo(dst) +} + +func (h *headerDeneb) MarshalSSZ() ([]byte, error) { + return h.p.MarshalSSZ() +} + +func (h *headerDeneb) SizeSSZ() int { + return h.p.SizeSSZ() +} + +func (h *headerDeneb) Version() int { + return version.Deneb +} + +func (h *headerDeneb) Beacon() *pb.BeaconBlockHeader { + return h.p.Beacon +} + +func (h *headerDeneb) Execution() (interfaces.ExecutionData, error) { + return h.execution, nil +} + +func (h *headerDeneb) ExecutionBranch() (interfaces.LightClientExecutionBranch, error) { + return h.executionBranch, nil +} diff --git a/consensus-types/light-client/helpers.go b/consensus-types/light-client/helpers.go new file mode 100644 index 0000000000..c2fc9b0592 --- /dev/null +++ b/consensus-types/light-client/helpers.go @@ -0,0 +1,30 @@ +package light_client + +import ( + "fmt" + + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" +) + +type branchConstraint interface { + ~interfaces.LightClientExecutionBranch | ~interfaces.LightClientSyncCommitteeBranch | ~interfaces.LightClientFinalityBranch +} + +func createBranch[T branchConstraint](name string, input [][]byte, depth int) (T, error) { + var zero T + + if len(input) != depth { + return zero, fmt.Errorf("%s branch has %d leaves instead of expected %d", name, len(input), depth) + } + var branch T + for i, leaf := range input { + if len(leaf) != fieldparams.RootLength { + return zero, fmt.Errorf("%s branch leaf at index %d has length %d instead of expected %d", name, i, len(leaf), fieldparams.RootLength) + } + branch[i] = bytesutil.ToBytes32(leaf) + } + + return branch, nil +} diff --git a/consensus-types/light-client/optimistic_update.go b/consensus-types/light-client/optimistic_update.go new file mode 100644 index 0000000000..f1f43d12cf --- /dev/null +++ b/consensus-types/light-client/optimistic_update.go @@ -0,0 +1,178 @@ +package light_client + +import ( + "fmt" + + consensustypes "github.com/prysmaticlabs/prysm/v5/consensus-types" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + pb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "google.golang.org/protobuf/proto" +) + +func NewWrappedOptimisticUpdate(m proto.Message) (interfaces.LightClientOptimisticUpdate, error) { + if m == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + switch t := m.(type) { + case *pb.LightClientOptimisticUpdateAltair: + return NewWrappedOptimisticUpdateAltair(t) + case *pb.LightClientOptimisticUpdateCapella: + return NewWrappedOptimisticUpdateCapella(t) + case *pb.LightClientOptimisticUpdateDeneb: + return NewWrappedOptimisticUpdateDeneb(t) + default: + return nil, fmt.Errorf("cannot construct light client optimistic update from type %T", t) + } +} + +type OptimisticUpdateAltair struct { + p *pb.LightClientOptimisticUpdateAltair + attestedHeader interfaces.LightClientHeader +} + +var _ interfaces.LightClientOptimisticUpdate = &OptimisticUpdateAltair{} + +func NewWrappedOptimisticUpdateAltair(p *pb.LightClientOptimisticUpdateAltair) (interfaces.LightClientOptimisticUpdate, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + attestedHeader, err := NewWrappedHeaderAltair(p.AttestedHeader) + if err != nil { + return nil, err + } + + return &OptimisticUpdateAltair{ + p: p, + attestedHeader: attestedHeader, + }, nil +} + +func (u *OptimisticUpdateAltair) MarshalSSZTo(dst []byte) ([]byte, error) { + return u.p.MarshalSSZTo(dst) +} + +func (u *OptimisticUpdateAltair) MarshalSSZ() ([]byte, error) { + return u.p.MarshalSSZ() +} + +func (u *OptimisticUpdateAltair) SizeSSZ() int { + return u.p.SizeSSZ() +} + +func (u *OptimisticUpdateAltair) Version() int { + return version.Altair +} + +func (u *OptimisticUpdateAltair) AttestedHeader() interfaces.LightClientHeader { + return u.attestedHeader +} + +func (u *OptimisticUpdateAltair) SyncAggregate() *pb.SyncAggregate { + return u.p.SyncAggregate +} + +func (u *OptimisticUpdateAltair) SignatureSlot() primitives.Slot { + return u.p.SignatureSlot +} + +type OptimisticUpdateCapella struct { + p *pb.LightClientOptimisticUpdateCapella + attestedHeader interfaces.LightClientHeader +} + +var _ interfaces.LightClientOptimisticUpdate = &OptimisticUpdateCapella{} + +func NewWrappedOptimisticUpdateCapella(p *pb.LightClientOptimisticUpdateCapella) (interfaces.LightClientOptimisticUpdate, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + attestedHeader, err := NewWrappedHeaderCapella(p.AttestedHeader) + if err != nil { + return nil, err + } + + return &OptimisticUpdateCapella{ + p: p, + attestedHeader: attestedHeader, + }, nil +} + +func (u *OptimisticUpdateCapella) MarshalSSZTo(dst []byte) ([]byte, error) { + return u.p.MarshalSSZTo(dst) +} + +func (u *OptimisticUpdateCapella) MarshalSSZ() ([]byte, error) { + return u.p.MarshalSSZ() +} + +func (u *OptimisticUpdateCapella) SizeSSZ() int { + return u.p.SizeSSZ() +} + +func (u *OptimisticUpdateCapella) Version() int { + return version.Capella +} + +func (u *OptimisticUpdateCapella) AttestedHeader() interfaces.LightClientHeader { + return u.attestedHeader +} + +func (u *OptimisticUpdateCapella) SyncAggregate() *pb.SyncAggregate { + return u.p.SyncAggregate +} + +func (u *OptimisticUpdateCapella) SignatureSlot() primitives.Slot { + return u.p.SignatureSlot +} + +type OptimisticUpdateDeneb struct { + p *pb.LightClientOptimisticUpdateDeneb + attestedHeader interfaces.LightClientHeader +} + +var _ interfaces.LightClientOptimisticUpdate = &OptimisticUpdateDeneb{} + +func NewWrappedOptimisticUpdateDeneb(p *pb.LightClientOptimisticUpdateDeneb) (interfaces.LightClientOptimisticUpdate, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + attestedHeader, err := NewWrappedHeaderDeneb(p.AttestedHeader) + if err != nil { + return nil, err + } + + return &OptimisticUpdateDeneb{ + p: p, + attestedHeader: attestedHeader, + }, nil +} + +func (u *OptimisticUpdateDeneb) MarshalSSZTo(dst []byte) ([]byte, error) { + return u.p.MarshalSSZTo(dst) +} + +func (u *OptimisticUpdateDeneb) MarshalSSZ() ([]byte, error) { + return u.p.MarshalSSZ() +} + +func (u *OptimisticUpdateDeneb) SizeSSZ() int { + return u.p.SizeSSZ() +} + +func (u *OptimisticUpdateDeneb) Version() int { + return version.Deneb +} + +func (u *OptimisticUpdateDeneb) AttestedHeader() interfaces.LightClientHeader { + return u.attestedHeader +} + +func (u *OptimisticUpdateDeneb) SyncAggregate() *pb.SyncAggregate { + return u.p.SyncAggregate +} + +func (u *OptimisticUpdateDeneb) SignatureSlot() primitives.Slot { + return u.p.SignatureSlot +} diff --git a/consensus-types/light-client/update.go b/consensus-types/light-client/update.go new file mode 100644 index 0000000000..00430e393a --- /dev/null +++ b/consensus-types/light-client/update.go @@ -0,0 +1,305 @@ +package light_client + +import ( + "fmt" + + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + consensustypes "github.com/prysmaticlabs/prysm/v5/consensus-types" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + pb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "google.golang.org/protobuf/proto" +) + +func NewWrappedUpdate(m proto.Message) (interfaces.LightClientUpdate, error) { + if m == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + switch t := m.(type) { + case *pb.LightClientUpdateAltair: + return NewWrappedUpdateAltair(t) + case *pb.LightClientUpdateCapella: + return NewWrappedUpdateCapella(t) + case *pb.LightClientUpdateDeneb: + return NewWrappedUpdateDeneb(t) + default: + return nil, fmt.Errorf("cannot construct light client update from type %T", t) + } +} + +type updateAltair struct { + p *pb.LightClientUpdateAltair + attestedHeader interfaces.LightClientHeader + nextSyncCommitteeBranch interfaces.LightClientSyncCommitteeBranch + finalizedHeader interfaces.LightClientHeader + finalityBranch interfaces.LightClientFinalityBranch +} + +var _ interfaces.LightClientUpdate = &updateAltair{} + +func NewWrappedUpdateAltair(p *pb.LightClientUpdateAltair) (interfaces.LightClientUpdate, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + attestedHeader, err := NewWrappedHeaderAltair(p.AttestedHeader) + if err != nil { + return nil, err + } + finalizedHeader, err := NewWrappedHeaderAltair(p.FinalizedHeader) + if err != nil { + return nil, err + } + scBranch, err := createBranch[interfaces.LightClientSyncCommitteeBranch]( + "sync committee", + p.NextSyncCommitteeBranch, + fieldparams.SyncCommitteeBranchDepth, + ) + if err != nil { + return nil, err + } + finalityBranch, err := createBranch[interfaces.LightClientFinalityBranch]( + "finality", + p.FinalityBranch, + fieldparams.FinalityBranchDepth, + ) + if err != nil { + return nil, err + } + + return &updateAltair{ + p: p, + attestedHeader: attestedHeader, + nextSyncCommitteeBranch: scBranch, + finalizedHeader: finalizedHeader, + finalityBranch: finalityBranch, + }, nil +} + +func (u *updateAltair) MarshalSSZTo(dst []byte) ([]byte, error) { + return u.p.MarshalSSZTo(dst) +} + +func (u *updateAltair) MarshalSSZ() ([]byte, error) { + return u.p.MarshalSSZ() +} + +func (u *updateAltair) SizeSSZ() int { + return u.p.SizeSSZ() +} + +func (u *updateAltair) Version() int { + return version.Altair +} + +func (u *updateAltair) AttestedHeader() interfaces.LightClientHeader { + return u.attestedHeader +} + +func (u *updateAltair) NextSyncCommittee() *pb.SyncCommittee { + return u.p.NextSyncCommittee +} + +func (u *updateAltair) NextSyncCommitteeBranch() interfaces.LightClientSyncCommitteeBranch { + return u.nextSyncCommitteeBranch +} + +func (u *updateAltair) FinalizedHeader() interfaces.LightClientHeader { + return u.finalizedHeader +} + +func (u *updateAltair) FinalityBranch() interfaces.LightClientFinalityBranch { + return u.finalityBranch +} + +func (u *updateAltair) SyncAggregate() *pb.SyncAggregate { + return u.p.SyncAggregate +} + +func (u *updateAltair) SignatureSlot() primitives.Slot { + return u.p.SignatureSlot +} + +type updateCapella struct { + p *pb.LightClientUpdateCapella + attestedHeader interfaces.LightClientHeader + nextSyncCommitteeBranch interfaces.LightClientSyncCommitteeBranch + finalizedHeader interfaces.LightClientHeader + finalityBranch interfaces.LightClientFinalityBranch +} + +var _ interfaces.LightClientUpdate = &updateCapella{} + +func NewWrappedUpdateCapella(p *pb.LightClientUpdateCapella) (interfaces.LightClientUpdate, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + attestedHeader, err := NewWrappedHeaderCapella(p.AttestedHeader) + if err != nil { + return nil, err + } + finalizedHeader, err := NewWrappedHeaderCapella(p.FinalizedHeader) + if err != nil { + return nil, err + } + scBranch, err := createBranch[interfaces.LightClientSyncCommitteeBranch]( + "sync committee", + p.NextSyncCommitteeBranch, + fieldparams.SyncCommitteeBranchDepth, + ) + if err != nil { + return nil, err + } + finalityBranch, err := createBranch[interfaces.LightClientFinalityBranch]( + "finality", + p.FinalityBranch, + fieldparams.FinalityBranchDepth, + ) + if err != nil { + return nil, err + } + + return &updateCapella{ + p: p, + attestedHeader: attestedHeader, + nextSyncCommitteeBranch: scBranch, + finalizedHeader: finalizedHeader, + finalityBranch: finalityBranch, + }, nil +} + +func (u *updateCapella) MarshalSSZTo(dst []byte) ([]byte, error) { + return u.p.MarshalSSZTo(dst) +} + +func (u *updateCapella) MarshalSSZ() ([]byte, error) { + return u.p.MarshalSSZ() +} + +func (u *updateCapella) SizeSSZ() int { + return u.p.SizeSSZ() +} + +func (u *updateCapella) Version() int { + return version.Capella +} + +func (u *updateCapella) AttestedHeader() interfaces.LightClientHeader { + return u.attestedHeader +} + +func (u *updateCapella) NextSyncCommittee() *pb.SyncCommittee { + return u.p.NextSyncCommittee +} + +func (u *updateCapella) NextSyncCommitteeBranch() interfaces.LightClientSyncCommitteeBranch { + return u.nextSyncCommitteeBranch +} + +func (u *updateCapella) FinalizedHeader() interfaces.LightClientHeader { + return u.finalizedHeader +} + +func (u *updateCapella) FinalityBranch() interfaces.LightClientFinalityBranch { + return u.finalityBranch +} + +func (u *updateCapella) SyncAggregate() *pb.SyncAggregate { + return u.p.SyncAggregate +} + +func (u *updateCapella) SignatureSlot() primitives.Slot { + return u.p.SignatureSlot +} + +type updateDeneb struct { + p *pb.LightClientUpdateDeneb + attestedHeader interfaces.LightClientHeader + nextSyncCommitteeBranch interfaces.LightClientSyncCommitteeBranch + finalizedHeader interfaces.LightClientHeader + finalityBranch interfaces.LightClientFinalityBranch +} + +var _ interfaces.LightClientUpdate = &updateDeneb{} + +func NewWrappedUpdateDeneb(p *pb.LightClientUpdateDeneb) (interfaces.LightClientUpdate, error) { + if p == nil { + return nil, consensustypes.ErrNilObjectWrapped + } + attestedHeader, err := NewWrappedHeaderDeneb(p.AttestedHeader) + if err != nil { + return nil, err + } + finalizedHeader, err := NewWrappedHeaderDeneb(p.FinalizedHeader) + if err != nil { + return nil, err + } + scBranch, err := createBranch[interfaces.LightClientSyncCommitteeBranch]( + "sync committee", + p.NextSyncCommitteeBranch, + fieldparams.SyncCommitteeBranchDepth, + ) + if err != nil { + return nil, err + } + finalityBranch, err := createBranch[interfaces.LightClientFinalityBranch]( + "finality", + p.FinalityBranch, + fieldparams.FinalityBranchDepth, + ) + if err != nil { + return nil, err + } + + return &updateDeneb{ + p: p, + attestedHeader: attestedHeader, + nextSyncCommitteeBranch: scBranch, + finalizedHeader: finalizedHeader, + finalityBranch: finalityBranch, + }, nil +} + +func (u *updateDeneb) MarshalSSZTo(dst []byte) ([]byte, error) { + return u.p.MarshalSSZTo(dst) +} + +func (u *updateDeneb) MarshalSSZ() ([]byte, error) { + return u.p.MarshalSSZ() +} + +func (u *updateDeneb) SizeSSZ() int { + return u.p.SizeSSZ() +} + +func (u *updateDeneb) Version() int { + return version.Deneb +} + +func (u *updateDeneb) AttestedHeader() interfaces.LightClientHeader { + return u.attestedHeader +} + +func (u *updateDeneb) NextSyncCommittee() *pb.SyncCommittee { + return u.p.NextSyncCommittee +} + +func (u *updateDeneb) NextSyncCommitteeBranch() interfaces.LightClientSyncCommitteeBranch { + return u.nextSyncCommitteeBranch +} + +func (u *updateDeneb) FinalizedHeader() interfaces.LightClientHeader { + return u.finalizedHeader +} + +func (u *updateDeneb) FinalityBranch() interfaces.LightClientFinalityBranch { + return u.finalityBranch +} + +func (u *updateDeneb) SyncAggregate() *pb.SyncAggregate { + return u.p.SyncAggregate +} + +func (u *updateDeneb) SignatureSlot() primitives.Slot { + return u.p.SignatureSlot +} diff --git a/proto/prysm/v1alpha1/BUILD.bazel b/proto/prysm/v1alpha1/BUILD.bazel index a9a86e5333..e1245051e0 100644 --- a/proto/prysm/v1alpha1/BUILD.bazel +++ b/proto/prysm/v1alpha1/BUILD.bazel @@ -81,6 +81,11 @@ ssz_altair_objs = [ "BeaconBlockBodyAltair", "BeaconStateAltair", "ContributionAndProof", + "LightClientBootstrapAltair", + "LightClientFinalityUpdateAltair", + "LightClientHeaderAltair", + "LightClientOptimisticUpdateAltair", + "LightClientUpdateAltair", "SignedBeaconBlockAltair", "SignedContributionAndProof", "SyncAggregate", @@ -110,6 +115,11 @@ ssz_capella_objs = [ "BlindedBeaconBlockCapella", "BuilderBidCapella", "HistoricalSummary", + "LightClientBootstrapCapella", + "LightClientFinalityUpdateCapella", + "LightClientHeaderCapella", + "LightClientOptimisticUpdateCapella", + "LightClientUpdateCapella", "SignedBLSToExecutionChange", "SignedBeaconBlockCapella", "SignedBlindedBeaconBlockCapella", @@ -127,6 +137,11 @@ ssz_deneb_objs = [ "BlobSidecar", "BlobSidecars", "BuilderBidDeneb", + "LightClientBootstrapDeneb", + "LightClientFinalityUpdateDeneb", + "LightClientHeaderDeneb", + "LightClientOptimisticUpdateDeneb", + "LightClientUpdateDeneb", "SignedBeaconBlockContentsDeneb", "SignedBeaconBlockDeneb", "SignedBlindedBeaconBlockDeneb", @@ -334,6 +349,7 @@ ssz_proto_files( "beacon_block.proto", "beacon_state.proto", "blobs.proto", + "light_client.proto", "sync_committee.proto", "withdrawals.proto", ], diff --git a/proto/prysm/v1alpha1/altair.ssz.go b/proto/prysm/v1alpha1/altair.ssz.go index 166f17e1f1..8700124222 100644 --- a/proto/prysm/v1alpha1/altair.ssz.go +++ b/proto/prysm/v1alpha1/altair.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: bb838fc0c2dfdadd4a8274dd1b438b1051f7b84d7c8e7470900621284dba8f43 +// Hash: 54ff8b768faa21e2d838e9f6be78af4dfeb76d3d46b32072c09faa16bd2393ea package eth import ( @@ -1747,6 +1747,651 @@ func (s *SyncAggregatorSelectionData) HashTreeRootWith(hh *ssz.Hasher) (err erro return } +// MarshalSSZ ssz marshals the LightClientHeaderAltair object +func (l *LightClientHeaderAltair) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientHeaderAltair object to a target array +func (l *LightClientHeaderAltair) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'Beacon' + if l.Beacon == nil { + l.Beacon = new(BeaconBlockHeader) + } + if dst, err = l.Beacon.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientHeaderAltair object +func (l *LightClientHeaderAltair) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 112 { + return ssz.ErrSize + } + + // Field (0) 'Beacon' + if l.Beacon == nil { + l.Beacon = new(BeaconBlockHeader) + } + if err = l.Beacon.UnmarshalSSZ(buf[0:112]); err != nil { + return err + } + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientHeaderAltair object +func (l *LightClientHeaderAltair) SizeSSZ() (size int) { + size = 112 + return +} + +// HashTreeRoot ssz hashes the LightClientHeaderAltair object +func (l *LightClientHeaderAltair) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientHeaderAltair object with a hasher +func (l *LightClientHeaderAltair) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'Beacon' + if err = l.Beacon.HashTreeRootWith(hh); err != nil { + return + } + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the LightClientBootstrapAltair object +func (l *LightClientBootstrapAltair) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientBootstrapAltair object to a target array +func (l *LightClientBootstrapAltair) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'Header' + if l.Header == nil { + l.Header = new(LightClientHeaderAltair) + } + if dst, err = l.Header.MarshalSSZTo(dst); err != nil { + return + } + + // Field (1) 'CurrentSyncCommittee' + if l.CurrentSyncCommittee == nil { + l.CurrentSyncCommittee = new(SyncCommittee) + } + if dst, err = l.CurrentSyncCommittee.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'CurrentSyncCommitteeBranch' + if size := len(l.CurrentSyncCommitteeBranch); size != 5 { + err = ssz.ErrVectorLengthFn("--.CurrentSyncCommitteeBranch", size, 5) + return + } + for ii := 0; ii < 5; ii++ { + if size := len(l.CurrentSyncCommitteeBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.CurrentSyncCommitteeBranch[ii]", size, 32) + return + } + dst = append(dst, l.CurrentSyncCommitteeBranch[ii]...) + } + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientBootstrapAltair object +func (l *LightClientBootstrapAltair) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 24896 { + return ssz.ErrSize + } + + // Field (0) 'Header' + if l.Header == nil { + l.Header = new(LightClientHeaderAltair) + } + if err = l.Header.UnmarshalSSZ(buf[0:112]); err != nil { + return err + } + + // Field (1) 'CurrentSyncCommittee' + if l.CurrentSyncCommittee == nil { + l.CurrentSyncCommittee = new(SyncCommittee) + } + if err = l.CurrentSyncCommittee.UnmarshalSSZ(buf[112:24736]); err != nil { + return err + } + + // Field (2) 'CurrentSyncCommitteeBranch' + l.CurrentSyncCommitteeBranch = make([][]byte, 5) + for ii := 0; ii < 5; ii++ { + if cap(l.CurrentSyncCommitteeBranch[ii]) == 0 { + l.CurrentSyncCommitteeBranch[ii] = make([]byte, 0, len(buf[24736:24896][ii*32:(ii+1)*32])) + } + l.CurrentSyncCommitteeBranch[ii] = append(l.CurrentSyncCommitteeBranch[ii], buf[24736:24896][ii*32:(ii+1)*32]...) + } + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientBootstrapAltair object +func (l *LightClientBootstrapAltair) SizeSSZ() (size int) { + size = 24896 + return +} + +// HashTreeRoot ssz hashes the LightClientBootstrapAltair object +func (l *LightClientBootstrapAltair) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientBootstrapAltair object with a hasher +func (l *LightClientBootstrapAltair) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'Header' + if err = l.Header.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'CurrentSyncCommittee' + if err = l.CurrentSyncCommittee.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'CurrentSyncCommitteeBranch' + { + if size := len(l.CurrentSyncCommitteeBranch); size != 5 { + err = ssz.ErrVectorLengthFn("--.CurrentSyncCommitteeBranch", size, 5) + return + } + subIndx := hh.Index() + for _, i := range l.CurrentSyncCommitteeBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the LightClientUpdateAltair object +func (l *LightClientUpdateAltair) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientUpdateAltair object to a target array +func (l *LightClientUpdateAltair) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'AttestedHeader' + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderAltair) + } + if dst, err = l.AttestedHeader.MarshalSSZTo(dst); err != nil { + return + } + + // Field (1) 'NextSyncCommittee' + if l.NextSyncCommittee == nil { + l.NextSyncCommittee = new(SyncCommittee) + } + if dst, err = l.NextSyncCommittee.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'NextSyncCommitteeBranch' + if size := len(l.NextSyncCommitteeBranch); size != 5 { + err = ssz.ErrVectorLengthFn("--.NextSyncCommitteeBranch", size, 5) + return + } + for ii := 0; ii < 5; ii++ { + if size := len(l.NextSyncCommitteeBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.NextSyncCommitteeBranch[ii]", size, 32) + return + } + dst = append(dst, l.NextSyncCommitteeBranch[ii]...) + } + + // Field (3) 'FinalizedHeader' + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderAltair) + } + if dst, err = l.FinalizedHeader.MarshalSSZTo(dst); err != nil { + return + } + + // Field (4) 'FinalityBranch' + if size := len(l.FinalityBranch); size != 6 { + err = ssz.ErrVectorLengthFn("--.FinalityBranch", size, 6) + return + } + for ii := 0; ii < 6; ii++ { + if size := len(l.FinalityBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.FinalityBranch[ii]", size, 32) + return + } + dst = append(dst, l.FinalityBranch[ii]...) + } + + // Field (5) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if dst, err = l.SyncAggregate.MarshalSSZTo(dst); err != nil { + return + } + + // Field (6) 'SignatureSlot' + dst = ssz.MarshalUint64(dst, uint64(l.SignatureSlot)) + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientUpdateAltair object +func (l *LightClientUpdateAltair) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 25368 { + return ssz.ErrSize + } + + // Field (0) 'AttestedHeader' + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderAltair) + } + if err = l.AttestedHeader.UnmarshalSSZ(buf[0:112]); err != nil { + return err + } + + // Field (1) 'NextSyncCommittee' + if l.NextSyncCommittee == nil { + l.NextSyncCommittee = new(SyncCommittee) + } + if err = l.NextSyncCommittee.UnmarshalSSZ(buf[112:24736]); err != nil { + return err + } + + // Field (2) 'NextSyncCommitteeBranch' + l.NextSyncCommitteeBranch = make([][]byte, 5) + for ii := 0; ii < 5; ii++ { + if cap(l.NextSyncCommitteeBranch[ii]) == 0 { + l.NextSyncCommitteeBranch[ii] = make([]byte, 0, len(buf[24736:24896][ii*32:(ii+1)*32])) + } + l.NextSyncCommitteeBranch[ii] = append(l.NextSyncCommitteeBranch[ii], buf[24736:24896][ii*32:(ii+1)*32]...) + } + + // Field (3) 'FinalizedHeader' + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderAltair) + } + if err = l.FinalizedHeader.UnmarshalSSZ(buf[24896:25008]); err != nil { + return err + } + + // Field (4) 'FinalityBranch' + l.FinalityBranch = make([][]byte, 6) + for ii := 0; ii < 6; ii++ { + if cap(l.FinalityBranch[ii]) == 0 { + l.FinalityBranch[ii] = make([]byte, 0, len(buf[25008:25200][ii*32:(ii+1)*32])) + } + l.FinalityBranch[ii] = append(l.FinalityBranch[ii], buf[25008:25200][ii*32:(ii+1)*32]...) + } + + // Field (5) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if err = l.SyncAggregate.UnmarshalSSZ(buf[25200:25360]); err != nil { + return err + } + + // Field (6) 'SignatureSlot' + l.SignatureSlot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[25360:25368])) + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientUpdateAltair object +func (l *LightClientUpdateAltair) SizeSSZ() (size int) { + size = 25368 + return +} + +// HashTreeRoot ssz hashes the LightClientUpdateAltair object +func (l *LightClientUpdateAltair) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientUpdateAltair object with a hasher +func (l *LightClientUpdateAltair) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'AttestedHeader' + if err = l.AttestedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'NextSyncCommittee' + if err = l.NextSyncCommittee.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'NextSyncCommitteeBranch' + { + if size := len(l.NextSyncCommitteeBranch); size != 5 { + err = ssz.ErrVectorLengthFn("--.NextSyncCommitteeBranch", size, 5) + return + } + subIndx := hh.Index() + for _, i := range l.NextSyncCommitteeBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + // Field (3) 'FinalizedHeader' + if err = l.FinalizedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (4) 'FinalityBranch' + { + if size := len(l.FinalityBranch); size != 6 { + err = ssz.ErrVectorLengthFn("--.FinalityBranch", size, 6) + return + } + subIndx := hh.Index() + for _, i := range l.FinalityBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + // Field (5) 'SyncAggregate' + if err = l.SyncAggregate.HashTreeRootWith(hh); err != nil { + return + } + + // Field (6) 'SignatureSlot' + hh.PutUint64(uint64(l.SignatureSlot)) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the LightClientFinalityUpdateAltair object +func (l *LightClientFinalityUpdateAltair) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientFinalityUpdateAltair object to a target array +func (l *LightClientFinalityUpdateAltair) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'AttestedHeader' + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderAltair) + } + if dst, err = l.AttestedHeader.MarshalSSZTo(dst); err != nil { + return + } + + // Field (1) 'FinalizedHeader' + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderAltair) + } + if dst, err = l.FinalizedHeader.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'FinalityBranch' + if size := len(l.FinalityBranch); size != 6 { + err = ssz.ErrVectorLengthFn("--.FinalityBranch", size, 6) + return + } + for ii := 0; ii < 6; ii++ { + if size := len(l.FinalityBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.FinalityBranch[ii]", size, 32) + return + } + dst = append(dst, l.FinalityBranch[ii]...) + } + + // Field (3) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if dst, err = l.SyncAggregate.MarshalSSZTo(dst); err != nil { + return + } + + // Field (4) 'SignatureSlot' + dst = ssz.MarshalUint64(dst, uint64(l.SignatureSlot)) + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientFinalityUpdateAltair object +func (l *LightClientFinalityUpdateAltair) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 584 { + return ssz.ErrSize + } + + // Field (0) 'AttestedHeader' + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderAltair) + } + if err = l.AttestedHeader.UnmarshalSSZ(buf[0:112]); err != nil { + return err + } + + // Field (1) 'FinalizedHeader' + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderAltair) + } + if err = l.FinalizedHeader.UnmarshalSSZ(buf[112:224]); err != nil { + return err + } + + // Field (2) 'FinalityBranch' + l.FinalityBranch = make([][]byte, 6) + for ii := 0; ii < 6; ii++ { + if cap(l.FinalityBranch[ii]) == 0 { + l.FinalityBranch[ii] = make([]byte, 0, len(buf[224:416][ii*32:(ii+1)*32])) + } + l.FinalityBranch[ii] = append(l.FinalityBranch[ii], buf[224:416][ii*32:(ii+1)*32]...) + } + + // Field (3) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if err = l.SyncAggregate.UnmarshalSSZ(buf[416:576]); err != nil { + return err + } + + // Field (4) 'SignatureSlot' + l.SignatureSlot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[576:584])) + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientFinalityUpdateAltair object +func (l *LightClientFinalityUpdateAltair) SizeSSZ() (size int) { + size = 584 + return +} + +// HashTreeRoot ssz hashes the LightClientFinalityUpdateAltair object +func (l *LightClientFinalityUpdateAltair) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientFinalityUpdateAltair object with a hasher +func (l *LightClientFinalityUpdateAltair) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'AttestedHeader' + if err = l.AttestedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'FinalizedHeader' + if err = l.FinalizedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'FinalityBranch' + { + if size := len(l.FinalityBranch); size != 6 { + err = ssz.ErrVectorLengthFn("--.FinalityBranch", size, 6) + return + } + subIndx := hh.Index() + for _, i := range l.FinalityBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + // Field (3) 'SyncAggregate' + if err = l.SyncAggregate.HashTreeRootWith(hh); err != nil { + return + } + + // Field (4) 'SignatureSlot' + hh.PutUint64(uint64(l.SignatureSlot)) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the LightClientOptimisticUpdateAltair object +func (l *LightClientOptimisticUpdateAltair) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientOptimisticUpdateAltair object to a target array +func (l *LightClientOptimisticUpdateAltair) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'AttestedHeader' + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderAltair) + } + if dst, err = l.AttestedHeader.MarshalSSZTo(dst); err != nil { + return + } + + // Field (1) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if dst, err = l.SyncAggregate.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'SignatureSlot' + dst = ssz.MarshalUint64(dst, uint64(l.SignatureSlot)) + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientOptimisticUpdateAltair object +func (l *LightClientOptimisticUpdateAltair) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 280 { + return ssz.ErrSize + } + + // Field (0) 'AttestedHeader' + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderAltair) + } + if err = l.AttestedHeader.UnmarshalSSZ(buf[0:112]); err != nil { + return err + } + + // Field (1) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if err = l.SyncAggregate.UnmarshalSSZ(buf[112:272]); err != nil { + return err + } + + // Field (2) 'SignatureSlot' + l.SignatureSlot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[272:280])) + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientOptimisticUpdateAltair object +func (l *LightClientOptimisticUpdateAltair) SizeSSZ() (size int) { + size = 280 + return +} + +// HashTreeRoot ssz hashes the LightClientOptimisticUpdateAltair object +func (l *LightClientOptimisticUpdateAltair) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientOptimisticUpdateAltair object with a hasher +func (l *LightClientOptimisticUpdateAltair) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'AttestedHeader' + if err = l.AttestedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'SyncAggregate' + if err = l.SyncAggregate.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'SignatureSlot' + hh.PutUint64(uint64(l.SignatureSlot)) + + hh.Merkleize(indx) + return +} + // MarshalSSZ ssz marshals the SyncCommitteeMessage object func (s *SyncCommitteeMessage) MarshalSSZ() ([]byte, error) { return ssz.MarshalSSZ(s) diff --git a/proto/prysm/v1alpha1/capella.ssz.go b/proto/prysm/v1alpha1/capella.ssz.go index ff1f01bad0..5428e1e0b4 100644 --- a/proto/prysm/v1alpha1/capella.ssz.go +++ b/proto/prysm/v1alpha1/capella.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: a5507ef7d71897486989f37eb4dbb19fc2c49e7c47f244291a9f3122c9bfe546 +// Hash: 7133c698cd96aab07bbef1347ea98e6ccbd2c5c30d1e7d0f32977b9a7335d9d3 package eth import ( @@ -2729,6 +2729,877 @@ func (h *HistoricalSummary) HashTreeRootWith(hh *ssz.Hasher) (err error) { return } +// MarshalSSZ ssz marshals the LightClientHeaderCapella object +func (l *LightClientHeaderCapella) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientHeaderCapella object to a target array +func (l *LightClientHeaderCapella) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(244) + + // Field (0) 'Beacon' + if l.Beacon == nil { + l.Beacon = new(BeaconBlockHeader) + } + if dst, err = l.Beacon.MarshalSSZTo(dst); err != nil { + return + } + + // Offset (1) 'Execution' + dst = ssz.WriteOffset(dst, offset) + if l.Execution == nil { + l.Execution = new(v1.ExecutionPayloadHeaderCapella) + } + offset += l.Execution.SizeSSZ() + + // Field (2) 'ExecutionBranch' + if size := len(l.ExecutionBranch); size != 4 { + err = ssz.ErrVectorLengthFn("--.ExecutionBranch", size, 4) + return + } + for ii := 0; ii < 4; ii++ { + if size := len(l.ExecutionBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.ExecutionBranch[ii]", size, 32) + return + } + dst = append(dst, l.ExecutionBranch[ii]...) + } + + // Field (1) 'Execution' + if dst, err = l.Execution.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientHeaderCapella object +func (l *LightClientHeaderCapella) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 244 { + return ssz.ErrSize + } + + tail := buf + var o1 uint64 + + // Field (0) 'Beacon' + if l.Beacon == nil { + l.Beacon = new(BeaconBlockHeader) + } + if err = l.Beacon.UnmarshalSSZ(buf[0:112]); err != nil { + return err + } + + // Offset (1) 'Execution' + if o1 = ssz.ReadOffset(buf[112:116]); o1 > size { + return ssz.ErrOffset + } + + if o1 != 244 { + return ssz.ErrInvalidVariableOffset + } + + // Field (2) 'ExecutionBranch' + l.ExecutionBranch = make([][]byte, 4) + for ii := 0; ii < 4; ii++ { + if cap(l.ExecutionBranch[ii]) == 0 { + l.ExecutionBranch[ii] = make([]byte, 0, len(buf[116:244][ii*32:(ii+1)*32])) + } + l.ExecutionBranch[ii] = append(l.ExecutionBranch[ii], buf[116:244][ii*32:(ii+1)*32]...) + } + + // Field (1) 'Execution' + { + buf = tail[o1:] + if l.Execution == nil { + l.Execution = new(v1.ExecutionPayloadHeaderCapella) + } + if err = l.Execution.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientHeaderCapella object +func (l *LightClientHeaderCapella) SizeSSZ() (size int) { + size = 244 + + // Field (1) 'Execution' + if l.Execution == nil { + l.Execution = new(v1.ExecutionPayloadHeaderCapella) + } + size += l.Execution.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the LightClientHeaderCapella object +func (l *LightClientHeaderCapella) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientHeaderCapella object with a hasher +func (l *LightClientHeaderCapella) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'Beacon' + if err = l.Beacon.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'Execution' + if err = l.Execution.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'ExecutionBranch' + { + if size := len(l.ExecutionBranch); size != 4 { + err = ssz.ErrVectorLengthFn("--.ExecutionBranch", size, 4) + return + } + subIndx := hh.Index() + for _, i := range l.ExecutionBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the LightClientBootstrapCapella object +func (l *LightClientBootstrapCapella) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientBootstrapCapella object to a target array +func (l *LightClientBootstrapCapella) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(24788) + + // Offset (0) 'Header' + dst = ssz.WriteOffset(dst, offset) + if l.Header == nil { + l.Header = new(LightClientHeaderCapella) + } + offset += l.Header.SizeSSZ() + + // Field (1) 'CurrentSyncCommittee' + if l.CurrentSyncCommittee == nil { + l.CurrentSyncCommittee = new(SyncCommittee) + } + if dst, err = l.CurrentSyncCommittee.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'CurrentSyncCommitteeBranch' + if size := len(l.CurrentSyncCommitteeBranch); size != 5 { + err = ssz.ErrVectorLengthFn("--.CurrentSyncCommitteeBranch", size, 5) + return + } + for ii := 0; ii < 5; ii++ { + if size := len(l.CurrentSyncCommitteeBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.CurrentSyncCommitteeBranch[ii]", size, 32) + return + } + dst = append(dst, l.CurrentSyncCommitteeBranch[ii]...) + } + + // Field (0) 'Header' + if dst, err = l.Header.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientBootstrapCapella object +func (l *LightClientBootstrapCapella) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 24788 { + return ssz.ErrSize + } + + tail := buf + var o0 uint64 + + // Offset (0) 'Header' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 24788 { + return ssz.ErrInvalidVariableOffset + } + + // Field (1) 'CurrentSyncCommittee' + if l.CurrentSyncCommittee == nil { + l.CurrentSyncCommittee = new(SyncCommittee) + } + if err = l.CurrentSyncCommittee.UnmarshalSSZ(buf[4:24628]); err != nil { + return err + } + + // Field (2) 'CurrentSyncCommitteeBranch' + l.CurrentSyncCommitteeBranch = make([][]byte, 5) + for ii := 0; ii < 5; ii++ { + if cap(l.CurrentSyncCommitteeBranch[ii]) == 0 { + l.CurrentSyncCommitteeBranch[ii] = make([]byte, 0, len(buf[24628:24788][ii*32:(ii+1)*32])) + } + l.CurrentSyncCommitteeBranch[ii] = append(l.CurrentSyncCommitteeBranch[ii], buf[24628:24788][ii*32:(ii+1)*32]...) + } + + // Field (0) 'Header' + { + buf = tail[o0:] + if l.Header == nil { + l.Header = new(LightClientHeaderCapella) + } + if err = l.Header.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientBootstrapCapella object +func (l *LightClientBootstrapCapella) SizeSSZ() (size int) { + size = 24788 + + // Field (0) 'Header' + if l.Header == nil { + l.Header = new(LightClientHeaderCapella) + } + size += l.Header.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the LightClientBootstrapCapella object +func (l *LightClientBootstrapCapella) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientBootstrapCapella object with a hasher +func (l *LightClientBootstrapCapella) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'Header' + if err = l.Header.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'CurrentSyncCommittee' + if err = l.CurrentSyncCommittee.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'CurrentSyncCommitteeBranch' + { + if size := len(l.CurrentSyncCommitteeBranch); size != 5 { + err = ssz.ErrVectorLengthFn("--.CurrentSyncCommitteeBranch", size, 5) + return + } + subIndx := hh.Index() + for _, i := range l.CurrentSyncCommitteeBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the LightClientUpdateCapella object +func (l *LightClientUpdateCapella) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientUpdateCapella object to a target array +func (l *LightClientUpdateCapella) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(25152) + + // Offset (0) 'AttestedHeader' + dst = ssz.WriteOffset(dst, offset) + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderCapella) + } + offset += l.AttestedHeader.SizeSSZ() + + // Field (1) 'NextSyncCommittee' + if l.NextSyncCommittee == nil { + l.NextSyncCommittee = new(SyncCommittee) + } + if dst, err = l.NextSyncCommittee.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'NextSyncCommitteeBranch' + if size := len(l.NextSyncCommitteeBranch); size != 5 { + err = ssz.ErrVectorLengthFn("--.NextSyncCommitteeBranch", size, 5) + return + } + for ii := 0; ii < 5; ii++ { + if size := len(l.NextSyncCommitteeBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.NextSyncCommitteeBranch[ii]", size, 32) + return + } + dst = append(dst, l.NextSyncCommitteeBranch[ii]...) + } + + // Offset (3) 'FinalizedHeader' + dst = ssz.WriteOffset(dst, offset) + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderCapella) + } + offset += l.FinalizedHeader.SizeSSZ() + + // Field (4) 'FinalityBranch' + if size := len(l.FinalityBranch); size != 6 { + err = ssz.ErrVectorLengthFn("--.FinalityBranch", size, 6) + return + } + for ii := 0; ii < 6; ii++ { + if size := len(l.FinalityBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.FinalityBranch[ii]", size, 32) + return + } + dst = append(dst, l.FinalityBranch[ii]...) + } + + // Field (5) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if dst, err = l.SyncAggregate.MarshalSSZTo(dst); err != nil { + return + } + + // Field (6) 'SignatureSlot' + dst = ssz.MarshalUint64(dst, uint64(l.SignatureSlot)) + + // Field (0) 'AttestedHeader' + if dst, err = l.AttestedHeader.MarshalSSZTo(dst); err != nil { + return + } + + // Field (3) 'FinalizedHeader' + if dst, err = l.FinalizedHeader.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientUpdateCapella object +func (l *LightClientUpdateCapella) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 25152 { + return ssz.ErrSize + } + + tail := buf + var o0, o3 uint64 + + // Offset (0) 'AttestedHeader' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 25152 { + return ssz.ErrInvalidVariableOffset + } + + // Field (1) 'NextSyncCommittee' + if l.NextSyncCommittee == nil { + l.NextSyncCommittee = new(SyncCommittee) + } + if err = l.NextSyncCommittee.UnmarshalSSZ(buf[4:24628]); err != nil { + return err + } + + // Field (2) 'NextSyncCommitteeBranch' + l.NextSyncCommitteeBranch = make([][]byte, 5) + for ii := 0; ii < 5; ii++ { + if cap(l.NextSyncCommitteeBranch[ii]) == 0 { + l.NextSyncCommitteeBranch[ii] = make([]byte, 0, len(buf[24628:24788][ii*32:(ii+1)*32])) + } + l.NextSyncCommitteeBranch[ii] = append(l.NextSyncCommitteeBranch[ii], buf[24628:24788][ii*32:(ii+1)*32]...) + } + + // Offset (3) 'FinalizedHeader' + if o3 = ssz.ReadOffset(buf[24788:24792]); o3 > size || o0 > o3 { + return ssz.ErrOffset + } + + // Field (4) 'FinalityBranch' + l.FinalityBranch = make([][]byte, 6) + for ii := 0; ii < 6; ii++ { + if cap(l.FinalityBranch[ii]) == 0 { + l.FinalityBranch[ii] = make([]byte, 0, len(buf[24792:24984][ii*32:(ii+1)*32])) + } + l.FinalityBranch[ii] = append(l.FinalityBranch[ii], buf[24792:24984][ii*32:(ii+1)*32]...) + } + + // Field (5) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if err = l.SyncAggregate.UnmarshalSSZ(buf[24984:25144]); err != nil { + return err + } + + // Field (6) 'SignatureSlot' + l.SignatureSlot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[25144:25152])) + + // Field (0) 'AttestedHeader' + { + buf = tail[o0:o3] + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderCapella) + } + if err = l.AttestedHeader.UnmarshalSSZ(buf); err != nil { + return err + } + } + + // Field (3) 'FinalizedHeader' + { + buf = tail[o3:] + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderCapella) + } + if err = l.FinalizedHeader.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientUpdateCapella object +func (l *LightClientUpdateCapella) SizeSSZ() (size int) { + size = 25152 + + // Field (0) 'AttestedHeader' + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderCapella) + } + size += l.AttestedHeader.SizeSSZ() + + // Field (3) 'FinalizedHeader' + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderCapella) + } + size += l.FinalizedHeader.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the LightClientUpdateCapella object +func (l *LightClientUpdateCapella) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientUpdateCapella object with a hasher +func (l *LightClientUpdateCapella) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'AttestedHeader' + if err = l.AttestedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'NextSyncCommittee' + if err = l.NextSyncCommittee.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'NextSyncCommitteeBranch' + { + if size := len(l.NextSyncCommitteeBranch); size != 5 { + err = ssz.ErrVectorLengthFn("--.NextSyncCommitteeBranch", size, 5) + return + } + subIndx := hh.Index() + for _, i := range l.NextSyncCommitteeBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + // Field (3) 'FinalizedHeader' + if err = l.FinalizedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (4) 'FinalityBranch' + { + if size := len(l.FinalityBranch); size != 6 { + err = ssz.ErrVectorLengthFn("--.FinalityBranch", size, 6) + return + } + subIndx := hh.Index() + for _, i := range l.FinalityBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + // Field (5) 'SyncAggregate' + if err = l.SyncAggregate.HashTreeRootWith(hh); err != nil { + return + } + + // Field (6) 'SignatureSlot' + hh.PutUint64(uint64(l.SignatureSlot)) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the LightClientFinalityUpdateCapella object +func (l *LightClientFinalityUpdateCapella) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientFinalityUpdateCapella object to a target array +func (l *LightClientFinalityUpdateCapella) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(368) + + // Offset (0) 'AttestedHeader' + dst = ssz.WriteOffset(dst, offset) + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderCapella) + } + offset += l.AttestedHeader.SizeSSZ() + + // Offset (1) 'FinalizedHeader' + dst = ssz.WriteOffset(dst, offset) + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderCapella) + } + offset += l.FinalizedHeader.SizeSSZ() + + // Field (2) 'FinalityBranch' + if size := len(l.FinalityBranch); size != 6 { + err = ssz.ErrVectorLengthFn("--.FinalityBranch", size, 6) + return + } + for ii := 0; ii < 6; ii++ { + if size := len(l.FinalityBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.FinalityBranch[ii]", size, 32) + return + } + dst = append(dst, l.FinalityBranch[ii]...) + } + + // Field (3) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if dst, err = l.SyncAggregate.MarshalSSZTo(dst); err != nil { + return + } + + // Field (4) 'SignatureSlot' + dst = ssz.MarshalUint64(dst, uint64(l.SignatureSlot)) + + // Field (0) 'AttestedHeader' + if dst, err = l.AttestedHeader.MarshalSSZTo(dst); err != nil { + return + } + + // Field (1) 'FinalizedHeader' + if dst, err = l.FinalizedHeader.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientFinalityUpdateCapella object +func (l *LightClientFinalityUpdateCapella) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 368 { + return ssz.ErrSize + } + + tail := buf + var o0, o1 uint64 + + // Offset (0) 'AttestedHeader' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 368 { + return ssz.ErrInvalidVariableOffset + } + + // Offset (1) 'FinalizedHeader' + if o1 = ssz.ReadOffset(buf[4:8]); o1 > size || o0 > o1 { + return ssz.ErrOffset + } + + // Field (2) 'FinalityBranch' + l.FinalityBranch = make([][]byte, 6) + for ii := 0; ii < 6; ii++ { + if cap(l.FinalityBranch[ii]) == 0 { + l.FinalityBranch[ii] = make([]byte, 0, len(buf[8:200][ii*32:(ii+1)*32])) + } + l.FinalityBranch[ii] = append(l.FinalityBranch[ii], buf[8:200][ii*32:(ii+1)*32]...) + } + + // Field (3) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if err = l.SyncAggregate.UnmarshalSSZ(buf[200:360]); err != nil { + return err + } + + // Field (4) 'SignatureSlot' + l.SignatureSlot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[360:368])) + + // Field (0) 'AttestedHeader' + { + buf = tail[o0:o1] + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderCapella) + } + if err = l.AttestedHeader.UnmarshalSSZ(buf); err != nil { + return err + } + } + + // Field (1) 'FinalizedHeader' + { + buf = tail[o1:] + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderCapella) + } + if err = l.FinalizedHeader.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientFinalityUpdateCapella object +func (l *LightClientFinalityUpdateCapella) SizeSSZ() (size int) { + size = 368 + + // Field (0) 'AttestedHeader' + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderCapella) + } + size += l.AttestedHeader.SizeSSZ() + + // Field (1) 'FinalizedHeader' + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderCapella) + } + size += l.FinalizedHeader.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the LightClientFinalityUpdateCapella object +func (l *LightClientFinalityUpdateCapella) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientFinalityUpdateCapella object with a hasher +func (l *LightClientFinalityUpdateCapella) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'AttestedHeader' + if err = l.AttestedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'FinalizedHeader' + if err = l.FinalizedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'FinalityBranch' + { + if size := len(l.FinalityBranch); size != 6 { + err = ssz.ErrVectorLengthFn("--.FinalityBranch", size, 6) + return + } + subIndx := hh.Index() + for _, i := range l.FinalityBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + // Field (3) 'SyncAggregate' + if err = l.SyncAggregate.HashTreeRootWith(hh); err != nil { + return + } + + // Field (4) 'SignatureSlot' + hh.PutUint64(uint64(l.SignatureSlot)) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the LightClientOptimisticUpdateCapella object +func (l *LightClientOptimisticUpdateCapella) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientOptimisticUpdateCapella object to a target array +func (l *LightClientOptimisticUpdateCapella) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(172) + + // Offset (0) 'AttestedHeader' + dst = ssz.WriteOffset(dst, offset) + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderCapella) + } + offset += l.AttestedHeader.SizeSSZ() + + // Field (1) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if dst, err = l.SyncAggregate.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'SignatureSlot' + dst = ssz.MarshalUint64(dst, uint64(l.SignatureSlot)) + + // Field (0) 'AttestedHeader' + if dst, err = l.AttestedHeader.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientOptimisticUpdateCapella object +func (l *LightClientOptimisticUpdateCapella) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 172 { + return ssz.ErrSize + } + + tail := buf + var o0 uint64 + + // Offset (0) 'AttestedHeader' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 172 { + return ssz.ErrInvalidVariableOffset + } + + // Field (1) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if err = l.SyncAggregate.UnmarshalSSZ(buf[4:164]); err != nil { + return err + } + + // Field (2) 'SignatureSlot' + l.SignatureSlot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[164:172])) + + // Field (0) 'AttestedHeader' + { + buf = tail[o0:] + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderCapella) + } + if err = l.AttestedHeader.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientOptimisticUpdateCapella object +func (l *LightClientOptimisticUpdateCapella) SizeSSZ() (size int) { + size = 172 + + // Field (0) 'AttestedHeader' + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderCapella) + } + size += l.AttestedHeader.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the LightClientOptimisticUpdateCapella object +func (l *LightClientOptimisticUpdateCapella) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientOptimisticUpdateCapella object with a hasher +func (l *LightClientOptimisticUpdateCapella) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'AttestedHeader' + if err = l.AttestedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'SyncAggregate' + if err = l.SyncAggregate.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'SignatureSlot' + hh.PutUint64(uint64(l.SignatureSlot)) + + hh.Merkleize(indx) + return +} + // MarshalSSZ ssz marshals the BLSToExecutionChange object func (b *BLSToExecutionChange) MarshalSSZ() ([]byte, error) { return ssz.MarshalSSZ(b) diff --git a/proto/prysm/v1alpha1/deneb.ssz.go b/proto/prysm/v1alpha1/deneb.ssz.go index 356ebb7780..71356e7d8e 100644 --- a/proto/prysm/v1alpha1/deneb.ssz.go +++ b/proto/prysm/v1alpha1/deneb.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: 4c3e6932bf84838e8de21e5c121c14d03cbccb051c3990d3b924932f531f4d30 +// Hash: b829ba09699058dc63b76a5eb5a03ce3d7d19b0d94b9e7fca06056f9f2f8b317 package eth import ( @@ -3593,3 +3593,874 @@ func (b *BlobIdentifier) HashTreeRootWith(hh *ssz.Hasher) (err error) { hh.Merkleize(indx) return } + +// MarshalSSZ ssz marshals the LightClientHeaderDeneb object +func (l *LightClientHeaderDeneb) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientHeaderDeneb object to a target array +func (l *LightClientHeaderDeneb) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(244) + + // Field (0) 'Beacon' + if l.Beacon == nil { + l.Beacon = new(BeaconBlockHeader) + } + if dst, err = l.Beacon.MarshalSSZTo(dst); err != nil { + return + } + + // Offset (1) 'Execution' + dst = ssz.WriteOffset(dst, offset) + if l.Execution == nil { + l.Execution = new(v1.ExecutionPayloadHeaderDeneb) + } + offset += l.Execution.SizeSSZ() + + // Field (2) 'ExecutionBranch' + if size := len(l.ExecutionBranch); size != 4 { + err = ssz.ErrVectorLengthFn("--.ExecutionBranch", size, 4) + return + } + for ii := 0; ii < 4; ii++ { + if size := len(l.ExecutionBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.ExecutionBranch[ii]", size, 32) + return + } + dst = append(dst, l.ExecutionBranch[ii]...) + } + + // Field (1) 'Execution' + if dst, err = l.Execution.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientHeaderDeneb object +func (l *LightClientHeaderDeneb) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 244 { + return ssz.ErrSize + } + + tail := buf + var o1 uint64 + + // Field (0) 'Beacon' + if l.Beacon == nil { + l.Beacon = new(BeaconBlockHeader) + } + if err = l.Beacon.UnmarshalSSZ(buf[0:112]); err != nil { + return err + } + + // Offset (1) 'Execution' + if o1 = ssz.ReadOffset(buf[112:116]); o1 > size { + return ssz.ErrOffset + } + + if o1 != 244 { + return ssz.ErrInvalidVariableOffset + } + + // Field (2) 'ExecutionBranch' + l.ExecutionBranch = make([][]byte, 4) + for ii := 0; ii < 4; ii++ { + if cap(l.ExecutionBranch[ii]) == 0 { + l.ExecutionBranch[ii] = make([]byte, 0, len(buf[116:244][ii*32:(ii+1)*32])) + } + l.ExecutionBranch[ii] = append(l.ExecutionBranch[ii], buf[116:244][ii*32:(ii+1)*32]...) + } + + // Field (1) 'Execution' + { + buf = tail[o1:] + if l.Execution == nil { + l.Execution = new(v1.ExecutionPayloadHeaderDeneb) + } + if err = l.Execution.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientHeaderDeneb object +func (l *LightClientHeaderDeneb) SizeSSZ() (size int) { + size = 244 + + // Field (1) 'Execution' + if l.Execution == nil { + l.Execution = new(v1.ExecutionPayloadHeaderDeneb) + } + size += l.Execution.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the LightClientHeaderDeneb object +func (l *LightClientHeaderDeneb) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientHeaderDeneb object with a hasher +func (l *LightClientHeaderDeneb) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'Beacon' + if err = l.Beacon.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'Execution' + if err = l.Execution.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'ExecutionBranch' + { + if size := len(l.ExecutionBranch); size != 4 { + err = ssz.ErrVectorLengthFn("--.ExecutionBranch", size, 4) + return + } + subIndx := hh.Index() + for _, i := range l.ExecutionBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the LightClientBootstrapDeneb object +func (l *LightClientBootstrapDeneb) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientBootstrapDeneb object to a target array +func (l *LightClientBootstrapDeneb) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(24788) + + // Offset (0) 'Header' + dst = ssz.WriteOffset(dst, offset) + if l.Header == nil { + l.Header = new(LightClientHeaderDeneb) + } + offset += l.Header.SizeSSZ() + + // Field (1) 'CurrentSyncCommittee' + if l.CurrentSyncCommittee == nil { + l.CurrentSyncCommittee = new(SyncCommittee) + } + if dst, err = l.CurrentSyncCommittee.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'CurrentSyncCommitteeBranch' + if size := len(l.CurrentSyncCommitteeBranch); size != 5 { + err = ssz.ErrVectorLengthFn("--.CurrentSyncCommitteeBranch", size, 5) + return + } + for ii := 0; ii < 5; ii++ { + if size := len(l.CurrentSyncCommitteeBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.CurrentSyncCommitteeBranch[ii]", size, 32) + return + } + dst = append(dst, l.CurrentSyncCommitteeBranch[ii]...) + } + + // Field (0) 'Header' + if dst, err = l.Header.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientBootstrapDeneb object +func (l *LightClientBootstrapDeneb) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 24788 { + return ssz.ErrSize + } + + tail := buf + var o0 uint64 + + // Offset (0) 'Header' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 24788 { + return ssz.ErrInvalidVariableOffset + } + + // Field (1) 'CurrentSyncCommittee' + if l.CurrentSyncCommittee == nil { + l.CurrentSyncCommittee = new(SyncCommittee) + } + if err = l.CurrentSyncCommittee.UnmarshalSSZ(buf[4:24628]); err != nil { + return err + } + + // Field (2) 'CurrentSyncCommitteeBranch' + l.CurrentSyncCommitteeBranch = make([][]byte, 5) + for ii := 0; ii < 5; ii++ { + if cap(l.CurrentSyncCommitteeBranch[ii]) == 0 { + l.CurrentSyncCommitteeBranch[ii] = make([]byte, 0, len(buf[24628:24788][ii*32:(ii+1)*32])) + } + l.CurrentSyncCommitteeBranch[ii] = append(l.CurrentSyncCommitteeBranch[ii], buf[24628:24788][ii*32:(ii+1)*32]...) + } + + // Field (0) 'Header' + { + buf = tail[o0:] + if l.Header == nil { + l.Header = new(LightClientHeaderDeneb) + } + if err = l.Header.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientBootstrapDeneb object +func (l *LightClientBootstrapDeneb) SizeSSZ() (size int) { + size = 24788 + + // Field (0) 'Header' + if l.Header == nil { + l.Header = new(LightClientHeaderDeneb) + } + size += l.Header.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the LightClientBootstrapDeneb object +func (l *LightClientBootstrapDeneb) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientBootstrapDeneb object with a hasher +func (l *LightClientBootstrapDeneb) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'Header' + if err = l.Header.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'CurrentSyncCommittee' + if err = l.CurrentSyncCommittee.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'CurrentSyncCommitteeBranch' + { + if size := len(l.CurrentSyncCommitteeBranch); size != 5 { + err = ssz.ErrVectorLengthFn("--.CurrentSyncCommitteeBranch", size, 5) + return + } + subIndx := hh.Index() + for _, i := range l.CurrentSyncCommitteeBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the LightClientUpdateDeneb object +func (l *LightClientUpdateDeneb) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientUpdateDeneb object to a target array +func (l *LightClientUpdateDeneb) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(25152) + + // Offset (0) 'AttestedHeader' + dst = ssz.WriteOffset(dst, offset) + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderDeneb) + } + offset += l.AttestedHeader.SizeSSZ() + + // Field (1) 'NextSyncCommittee' + if l.NextSyncCommittee == nil { + l.NextSyncCommittee = new(SyncCommittee) + } + if dst, err = l.NextSyncCommittee.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'NextSyncCommitteeBranch' + if size := len(l.NextSyncCommitteeBranch); size != 5 { + err = ssz.ErrVectorLengthFn("--.NextSyncCommitteeBranch", size, 5) + return + } + for ii := 0; ii < 5; ii++ { + if size := len(l.NextSyncCommitteeBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.NextSyncCommitteeBranch[ii]", size, 32) + return + } + dst = append(dst, l.NextSyncCommitteeBranch[ii]...) + } + + // Offset (3) 'FinalizedHeader' + dst = ssz.WriteOffset(dst, offset) + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderDeneb) + } + offset += l.FinalizedHeader.SizeSSZ() + + // Field (4) 'FinalityBranch' + if size := len(l.FinalityBranch); size != 6 { + err = ssz.ErrVectorLengthFn("--.FinalityBranch", size, 6) + return + } + for ii := 0; ii < 6; ii++ { + if size := len(l.FinalityBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.FinalityBranch[ii]", size, 32) + return + } + dst = append(dst, l.FinalityBranch[ii]...) + } + + // Field (5) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if dst, err = l.SyncAggregate.MarshalSSZTo(dst); err != nil { + return + } + + // Field (6) 'SignatureSlot' + dst = ssz.MarshalUint64(dst, uint64(l.SignatureSlot)) + + // Field (0) 'AttestedHeader' + if dst, err = l.AttestedHeader.MarshalSSZTo(dst); err != nil { + return + } + + // Field (3) 'FinalizedHeader' + if dst, err = l.FinalizedHeader.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientUpdateDeneb object +func (l *LightClientUpdateDeneb) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 25152 { + return ssz.ErrSize + } + + tail := buf + var o0, o3 uint64 + + // Offset (0) 'AttestedHeader' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 25152 { + return ssz.ErrInvalidVariableOffset + } + + // Field (1) 'NextSyncCommittee' + if l.NextSyncCommittee == nil { + l.NextSyncCommittee = new(SyncCommittee) + } + if err = l.NextSyncCommittee.UnmarshalSSZ(buf[4:24628]); err != nil { + return err + } + + // Field (2) 'NextSyncCommitteeBranch' + l.NextSyncCommitteeBranch = make([][]byte, 5) + for ii := 0; ii < 5; ii++ { + if cap(l.NextSyncCommitteeBranch[ii]) == 0 { + l.NextSyncCommitteeBranch[ii] = make([]byte, 0, len(buf[24628:24788][ii*32:(ii+1)*32])) + } + l.NextSyncCommitteeBranch[ii] = append(l.NextSyncCommitteeBranch[ii], buf[24628:24788][ii*32:(ii+1)*32]...) + } + + // Offset (3) 'FinalizedHeader' + if o3 = ssz.ReadOffset(buf[24788:24792]); o3 > size || o0 > o3 { + return ssz.ErrOffset + } + + // Field (4) 'FinalityBranch' + l.FinalityBranch = make([][]byte, 6) + for ii := 0; ii < 6; ii++ { + if cap(l.FinalityBranch[ii]) == 0 { + l.FinalityBranch[ii] = make([]byte, 0, len(buf[24792:24984][ii*32:(ii+1)*32])) + } + l.FinalityBranch[ii] = append(l.FinalityBranch[ii], buf[24792:24984][ii*32:(ii+1)*32]...) + } + + // Field (5) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if err = l.SyncAggregate.UnmarshalSSZ(buf[24984:25144]); err != nil { + return err + } + + // Field (6) 'SignatureSlot' + l.SignatureSlot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[25144:25152])) + + // Field (0) 'AttestedHeader' + { + buf = tail[o0:o3] + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderDeneb) + } + if err = l.AttestedHeader.UnmarshalSSZ(buf); err != nil { + return err + } + } + + // Field (3) 'FinalizedHeader' + { + buf = tail[o3:] + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderDeneb) + } + if err = l.FinalizedHeader.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientUpdateDeneb object +func (l *LightClientUpdateDeneb) SizeSSZ() (size int) { + size = 25152 + + // Field (0) 'AttestedHeader' + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderDeneb) + } + size += l.AttestedHeader.SizeSSZ() + + // Field (3) 'FinalizedHeader' + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderDeneb) + } + size += l.FinalizedHeader.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the LightClientUpdateDeneb object +func (l *LightClientUpdateDeneb) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientUpdateDeneb object with a hasher +func (l *LightClientUpdateDeneb) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'AttestedHeader' + if err = l.AttestedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'NextSyncCommittee' + if err = l.NextSyncCommittee.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'NextSyncCommitteeBranch' + { + if size := len(l.NextSyncCommitteeBranch); size != 5 { + err = ssz.ErrVectorLengthFn("--.NextSyncCommitteeBranch", size, 5) + return + } + subIndx := hh.Index() + for _, i := range l.NextSyncCommitteeBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + // Field (3) 'FinalizedHeader' + if err = l.FinalizedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (4) 'FinalityBranch' + { + if size := len(l.FinalityBranch); size != 6 { + err = ssz.ErrVectorLengthFn("--.FinalityBranch", size, 6) + return + } + subIndx := hh.Index() + for _, i := range l.FinalityBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + // Field (5) 'SyncAggregate' + if err = l.SyncAggregate.HashTreeRootWith(hh); err != nil { + return + } + + // Field (6) 'SignatureSlot' + hh.PutUint64(uint64(l.SignatureSlot)) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the LightClientFinalityUpdateDeneb object +func (l *LightClientFinalityUpdateDeneb) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientFinalityUpdateDeneb object to a target array +func (l *LightClientFinalityUpdateDeneb) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(368) + + // Offset (0) 'AttestedHeader' + dst = ssz.WriteOffset(dst, offset) + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderDeneb) + } + offset += l.AttestedHeader.SizeSSZ() + + // Offset (1) 'FinalizedHeader' + dst = ssz.WriteOffset(dst, offset) + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderDeneb) + } + offset += l.FinalizedHeader.SizeSSZ() + + // Field (2) 'FinalityBranch' + if size := len(l.FinalityBranch); size != 6 { + err = ssz.ErrVectorLengthFn("--.FinalityBranch", size, 6) + return + } + for ii := 0; ii < 6; ii++ { + if size := len(l.FinalityBranch[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.FinalityBranch[ii]", size, 32) + return + } + dst = append(dst, l.FinalityBranch[ii]...) + } + + // Field (3) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if dst, err = l.SyncAggregate.MarshalSSZTo(dst); err != nil { + return + } + + // Field (4) 'SignatureSlot' + dst = ssz.MarshalUint64(dst, uint64(l.SignatureSlot)) + + // Field (0) 'AttestedHeader' + if dst, err = l.AttestedHeader.MarshalSSZTo(dst); err != nil { + return + } + + // Field (1) 'FinalizedHeader' + if dst, err = l.FinalizedHeader.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientFinalityUpdateDeneb object +func (l *LightClientFinalityUpdateDeneb) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 368 { + return ssz.ErrSize + } + + tail := buf + var o0, o1 uint64 + + // Offset (0) 'AttestedHeader' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 368 { + return ssz.ErrInvalidVariableOffset + } + + // Offset (1) 'FinalizedHeader' + if o1 = ssz.ReadOffset(buf[4:8]); o1 > size || o0 > o1 { + return ssz.ErrOffset + } + + // Field (2) 'FinalityBranch' + l.FinalityBranch = make([][]byte, 6) + for ii := 0; ii < 6; ii++ { + if cap(l.FinalityBranch[ii]) == 0 { + l.FinalityBranch[ii] = make([]byte, 0, len(buf[8:200][ii*32:(ii+1)*32])) + } + l.FinalityBranch[ii] = append(l.FinalityBranch[ii], buf[8:200][ii*32:(ii+1)*32]...) + } + + // Field (3) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if err = l.SyncAggregate.UnmarshalSSZ(buf[200:360]); err != nil { + return err + } + + // Field (4) 'SignatureSlot' + l.SignatureSlot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[360:368])) + + // Field (0) 'AttestedHeader' + { + buf = tail[o0:o1] + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderDeneb) + } + if err = l.AttestedHeader.UnmarshalSSZ(buf); err != nil { + return err + } + } + + // Field (1) 'FinalizedHeader' + { + buf = tail[o1:] + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderDeneb) + } + if err = l.FinalizedHeader.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientFinalityUpdateDeneb object +func (l *LightClientFinalityUpdateDeneb) SizeSSZ() (size int) { + size = 368 + + // Field (0) 'AttestedHeader' + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderDeneb) + } + size += l.AttestedHeader.SizeSSZ() + + // Field (1) 'FinalizedHeader' + if l.FinalizedHeader == nil { + l.FinalizedHeader = new(LightClientHeaderDeneb) + } + size += l.FinalizedHeader.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the LightClientFinalityUpdateDeneb object +func (l *LightClientFinalityUpdateDeneb) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientFinalityUpdateDeneb object with a hasher +func (l *LightClientFinalityUpdateDeneb) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'AttestedHeader' + if err = l.AttestedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'FinalizedHeader' + if err = l.FinalizedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'FinalityBranch' + { + if size := len(l.FinalityBranch); size != 6 { + err = ssz.ErrVectorLengthFn("--.FinalityBranch", size, 6) + return + } + subIndx := hh.Index() + for _, i := range l.FinalityBranch { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + // Field (3) 'SyncAggregate' + if err = l.SyncAggregate.HashTreeRootWith(hh); err != nil { + return + } + + // Field (4) 'SignatureSlot' + hh.PutUint64(uint64(l.SignatureSlot)) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the LightClientOptimisticUpdateDeneb object +func (l *LightClientOptimisticUpdateDeneb) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(l) +} + +// MarshalSSZTo ssz marshals the LightClientOptimisticUpdateDeneb object to a target array +func (l *LightClientOptimisticUpdateDeneb) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(172) + + // Offset (0) 'AttestedHeader' + dst = ssz.WriteOffset(dst, offset) + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderDeneb) + } + offset += l.AttestedHeader.SizeSSZ() + + // Field (1) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if dst, err = l.SyncAggregate.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'SignatureSlot' + dst = ssz.MarshalUint64(dst, uint64(l.SignatureSlot)) + + // Field (0) 'AttestedHeader' + if dst, err = l.AttestedHeader.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the LightClientOptimisticUpdateDeneb object +func (l *LightClientOptimisticUpdateDeneb) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 172 { + return ssz.ErrSize + } + + tail := buf + var o0 uint64 + + // Offset (0) 'AttestedHeader' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 172 { + return ssz.ErrInvalidVariableOffset + } + + // Field (1) 'SyncAggregate' + if l.SyncAggregate == nil { + l.SyncAggregate = new(SyncAggregate) + } + if err = l.SyncAggregate.UnmarshalSSZ(buf[4:164]); err != nil { + return err + } + + // Field (2) 'SignatureSlot' + l.SignatureSlot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[164:172])) + + // Field (0) 'AttestedHeader' + { + buf = tail[o0:] + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderDeneb) + } + if err = l.AttestedHeader.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the LightClientOptimisticUpdateDeneb object +func (l *LightClientOptimisticUpdateDeneb) SizeSSZ() (size int) { + size = 172 + + // Field (0) 'AttestedHeader' + if l.AttestedHeader == nil { + l.AttestedHeader = new(LightClientHeaderDeneb) + } + size += l.AttestedHeader.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the LightClientOptimisticUpdateDeneb object +func (l *LightClientOptimisticUpdateDeneb) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(l) +} + +// HashTreeRootWith ssz hashes the LightClientOptimisticUpdateDeneb object with a hasher +func (l *LightClientOptimisticUpdateDeneb) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'AttestedHeader' + if err = l.AttestedHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'SyncAggregate' + if err = l.SyncAggregate.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'SignatureSlot' + hh.PutUint64(uint64(l.SignatureSlot)) + + hh.Merkleize(indx) + return +} diff --git a/proto/prysm/v1alpha1/light_client.pb.go b/proto/prysm/v1alpha1/light_client.pb.go new file mode 100755 index 0000000000..8e342b4334 --- /dev/null +++ b/proto/prysm/v1alpha1/light_client.pb.go @@ -0,0 +1,1759 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.25.1 +// source: proto/prysm/v1alpha1/light_client.proto + +package eth + +import ( + reflect "reflect" + sync "sync" + + github_com_prysmaticlabs_prysm_v5_consensus_types_primitives "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + v1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + _ "github.com/prysmaticlabs/prysm/v5/proto/eth/ext" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type LightClientHeaderAltair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Beacon *BeaconBlockHeader `protobuf:"bytes,1,opt,name=beacon,proto3" json:"beacon,omitempty"` +} + +func (x *LightClientHeaderAltair) Reset() { + *x = LightClientHeaderAltair{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientHeaderAltair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientHeaderAltair) ProtoMessage() {} + +func (x *LightClientHeaderAltair) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientHeaderAltair.ProtoReflect.Descriptor instead. +func (*LightClientHeaderAltair) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{0} +} + +func (x *LightClientHeaderAltair) GetBeacon() *BeaconBlockHeader { + if x != nil { + return x.Beacon + } + return nil +} + +type LightClientHeaderCapella struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Beacon *BeaconBlockHeader `protobuf:"bytes,1,opt,name=beacon,proto3" json:"beacon,omitempty"` + Execution *v1.ExecutionPayloadHeaderCapella `protobuf:"bytes,2,opt,name=execution,proto3" json:"execution,omitempty"` + ExecutionBranch [][]byte `protobuf:"bytes,3,rep,name=execution_branch,json=executionBranch,proto3" json:"execution_branch,omitempty" ssz-size:"4,32"` +} + +func (x *LightClientHeaderCapella) Reset() { + *x = LightClientHeaderCapella{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientHeaderCapella) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientHeaderCapella) ProtoMessage() {} + +func (x *LightClientHeaderCapella) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientHeaderCapella.ProtoReflect.Descriptor instead. +func (*LightClientHeaderCapella) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{1} +} + +func (x *LightClientHeaderCapella) GetBeacon() *BeaconBlockHeader { + if x != nil { + return x.Beacon + } + return nil +} + +func (x *LightClientHeaderCapella) GetExecution() *v1.ExecutionPayloadHeaderCapella { + if x != nil { + return x.Execution + } + return nil +} + +func (x *LightClientHeaderCapella) GetExecutionBranch() [][]byte { + if x != nil { + return x.ExecutionBranch + } + return nil +} + +type LightClientHeaderDeneb struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Beacon *BeaconBlockHeader `protobuf:"bytes,1,opt,name=beacon,proto3" json:"beacon,omitempty"` + Execution *v1.ExecutionPayloadHeaderDeneb `protobuf:"bytes,2,opt,name=execution,proto3" json:"execution,omitempty"` + ExecutionBranch [][]byte `protobuf:"bytes,3,rep,name=execution_branch,json=executionBranch,proto3" json:"execution_branch,omitempty" ssz-size:"4,32"` +} + +func (x *LightClientHeaderDeneb) Reset() { + *x = LightClientHeaderDeneb{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientHeaderDeneb) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientHeaderDeneb) ProtoMessage() {} + +func (x *LightClientHeaderDeneb) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientHeaderDeneb.ProtoReflect.Descriptor instead. +func (*LightClientHeaderDeneb) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{2} +} + +func (x *LightClientHeaderDeneb) GetBeacon() *BeaconBlockHeader { + if x != nil { + return x.Beacon + } + return nil +} + +func (x *LightClientHeaderDeneb) GetExecution() *v1.ExecutionPayloadHeaderDeneb { + if x != nil { + return x.Execution + } + return nil +} + +func (x *LightClientHeaderDeneb) GetExecutionBranch() [][]byte { + if x != nil { + return x.ExecutionBranch + } + return nil +} + +type LightClientBootstrapAltair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *LightClientHeaderAltair `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + CurrentSyncCommittee *SyncCommittee `protobuf:"bytes,2,opt,name=current_sync_committee,json=currentSyncCommittee,proto3" json:"current_sync_committee,omitempty"` + CurrentSyncCommitteeBranch [][]byte `protobuf:"bytes,3,rep,name=current_sync_committee_branch,json=currentSyncCommitteeBranch,proto3" json:"current_sync_committee_branch,omitempty" ssz-size:"5,32"` +} + +func (x *LightClientBootstrapAltair) Reset() { + *x = LightClientBootstrapAltair{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientBootstrapAltair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientBootstrapAltair) ProtoMessage() {} + +func (x *LightClientBootstrapAltair) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientBootstrapAltair.ProtoReflect.Descriptor instead. +func (*LightClientBootstrapAltair) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{3} +} + +func (x *LightClientBootstrapAltair) GetHeader() *LightClientHeaderAltair { + if x != nil { + return x.Header + } + return nil +} + +func (x *LightClientBootstrapAltair) GetCurrentSyncCommittee() *SyncCommittee { + if x != nil { + return x.CurrentSyncCommittee + } + return nil +} + +func (x *LightClientBootstrapAltair) GetCurrentSyncCommitteeBranch() [][]byte { + if x != nil { + return x.CurrentSyncCommitteeBranch + } + return nil +} + +type LightClientBootstrapCapella struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *LightClientHeaderCapella `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + CurrentSyncCommittee *SyncCommittee `protobuf:"bytes,2,opt,name=current_sync_committee,json=currentSyncCommittee,proto3" json:"current_sync_committee,omitempty"` + CurrentSyncCommitteeBranch [][]byte `protobuf:"bytes,3,rep,name=current_sync_committee_branch,json=currentSyncCommitteeBranch,proto3" json:"current_sync_committee_branch,omitempty" ssz-size:"5,32"` +} + +func (x *LightClientBootstrapCapella) Reset() { + *x = LightClientBootstrapCapella{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientBootstrapCapella) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientBootstrapCapella) ProtoMessage() {} + +func (x *LightClientBootstrapCapella) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientBootstrapCapella.ProtoReflect.Descriptor instead. +func (*LightClientBootstrapCapella) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{4} +} + +func (x *LightClientBootstrapCapella) GetHeader() *LightClientHeaderCapella { + if x != nil { + return x.Header + } + return nil +} + +func (x *LightClientBootstrapCapella) GetCurrentSyncCommittee() *SyncCommittee { + if x != nil { + return x.CurrentSyncCommittee + } + return nil +} + +func (x *LightClientBootstrapCapella) GetCurrentSyncCommitteeBranch() [][]byte { + if x != nil { + return x.CurrentSyncCommitteeBranch + } + return nil +} + +type LightClientBootstrapDeneb struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *LightClientHeaderDeneb `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + CurrentSyncCommittee *SyncCommittee `protobuf:"bytes,2,opt,name=current_sync_committee,json=currentSyncCommittee,proto3" json:"current_sync_committee,omitempty"` + CurrentSyncCommitteeBranch [][]byte `protobuf:"bytes,3,rep,name=current_sync_committee_branch,json=currentSyncCommitteeBranch,proto3" json:"current_sync_committee_branch,omitempty" ssz-size:"5,32"` +} + +func (x *LightClientBootstrapDeneb) Reset() { + *x = LightClientBootstrapDeneb{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientBootstrapDeneb) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientBootstrapDeneb) ProtoMessage() {} + +func (x *LightClientBootstrapDeneb) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientBootstrapDeneb.ProtoReflect.Descriptor instead. +func (*LightClientBootstrapDeneb) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{5} +} + +func (x *LightClientBootstrapDeneb) GetHeader() *LightClientHeaderDeneb { + if x != nil { + return x.Header + } + return nil +} + +func (x *LightClientBootstrapDeneb) GetCurrentSyncCommittee() *SyncCommittee { + if x != nil { + return x.CurrentSyncCommittee + } + return nil +} + +func (x *LightClientBootstrapDeneb) GetCurrentSyncCommitteeBranch() [][]byte { + if x != nil { + return x.CurrentSyncCommitteeBranch + } + return nil +} + +type LightClientUpdateAltair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttestedHeader *LightClientHeaderAltair `protobuf:"bytes,1,opt,name=attested_header,json=attestedHeader,proto3" json:"attested_header,omitempty"` + NextSyncCommittee *SyncCommittee `protobuf:"bytes,2,opt,name=next_sync_committee,json=nextSyncCommittee,proto3" json:"next_sync_committee,omitempty"` + NextSyncCommitteeBranch [][]byte `protobuf:"bytes,3,rep,name=next_sync_committee_branch,json=nextSyncCommitteeBranch,proto3" json:"next_sync_committee_branch,omitempty" ssz-size:"5,32"` + FinalizedHeader *LightClientHeaderAltair `protobuf:"bytes,4,opt,name=finalized_header,json=finalizedHeader,proto3" json:"finalized_header,omitempty"` + FinalityBranch [][]byte `protobuf:"bytes,5,rep,name=finality_branch,json=finalityBranch,proto3" json:"finality_branch,omitempty" ssz-size:"6,32"` + SyncAggregate *SyncAggregate `protobuf:"bytes,6,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"` + SignatureSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,7,opt,name=signature_slot,json=signatureSlot,proto3" json:"signature_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` +} + +func (x *LightClientUpdateAltair) Reset() { + *x = LightClientUpdateAltair{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientUpdateAltair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientUpdateAltair) ProtoMessage() {} + +func (x *LightClientUpdateAltair) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientUpdateAltair.ProtoReflect.Descriptor instead. +func (*LightClientUpdateAltair) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{6} +} + +func (x *LightClientUpdateAltair) GetAttestedHeader() *LightClientHeaderAltair { + if x != nil { + return x.AttestedHeader + } + return nil +} + +func (x *LightClientUpdateAltair) GetNextSyncCommittee() *SyncCommittee { + if x != nil { + return x.NextSyncCommittee + } + return nil +} + +func (x *LightClientUpdateAltair) GetNextSyncCommitteeBranch() [][]byte { + if x != nil { + return x.NextSyncCommitteeBranch + } + return nil +} + +func (x *LightClientUpdateAltair) GetFinalizedHeader() *LightClientHeaderAltair { + if x != nil { + return x.FinalizedHeader + } + return nil +} + +func (x *LightClientUpdateAltair) GetFinalityBranch() [][]byte { + if x != nil { + return x.FinalityBranch + } + return nil +} + +func (x *LightClientUpdateAltair) GetSyncAggregate() *SyncAggregate { + if x != nil { + return x.SyncAggregate + } + return nil +} + +func (x *LightClientUpdateAltair) GetSignatureSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.SignatureSlot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +type LightClientUpdateCapella struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttestedHeader *LightClientHeaderCapella `protobuf:"bytes,1,opt,name=attested_header,json=attestedHeader,proto3" json:"attested_header,omitempty"` + NextSyncCommittee *SyncCommittee `protobuf:"bytes,2,opt,name=next_sync_committee,json=nextSyncCommittee,proto3" json:"next_sync_committee,omitempty"` + NextSyncCommitteeBranch [][]byte `protobuf:"bytes,3,rep,name=next_sync_committee_branch,json=nextSyncCommitteeBranch,proto3" json:"next_sync_committee_branch,omitempty" ssz-size:"5,32"` + FinalizedHeader *LightClientHeaderCapella `protobuf:"bytes,4,opt,name=finalized_header,json=finalizedHeader,proto3" json:"finalized_header,omitempty"` + FinalityBranch [][]byte `protobuf:"bytes,5,rep,name=finality_branch,json=finalityBranch,proto3" json:"finality_branch,omitempty" ssz-size:"6,32"` + SyncAggregate *SyncAggregate `protobuf:"bytes,6,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"` + SignatureSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,7,opt,name=signature_slot,json=signatureSlot,proto3" json:"signature_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` +} + +func (x *LightClientUpdateCapella) Reset() { + *x = LightClientUpdateCapella{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientUpdateCapella) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientUpdateCapella) ProtoMessage() {} + +func (x *LightClientUpdateCapella) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientUpdateCapella.ProtoReflect.Descriptor instead. +func (*LightClientUpdateCapella) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{7} +} + +func (x *LightClientUpdateCapella) GetAttestedHeader() *LightClientHeaderCapella { + if x != nil { + return x.AttestedHeader + } + return nil +} + +func (x *LightClientUpdateCapella) GetNextSyncCommittee() *SyncCommittee { + if x != nil { + return x.NextSyncCommittee + } + return nil +} + +func (x *LightClientUpdateCapella) GetNextSyncCommitteeBranch() [][]byte { + if x != nil { + return x.NextSyncCommitteeBranch + } + return nil +} + +func (x *LightClientUpdateCapella) GetFinalizedHeader() *LightClientHeaderCapella { + if x != nil { + return x.FinalizedHeader + } + return nil +} + +func (x *LightClientUpdateCapella) GetFinalityBranch() [][]byte { + if x != nil { + return x.FinalityBranch + } + return nil +} + +func (x *LightClientUpdateCapella) GetSyncAggregate() *SyncAggregate { + if x != nil { + return x.SyncAggregate + } + return nil +} + +func (x *LightClientUpdateCapella) GetSignatureSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.SignatureSlot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +type LightClientUpdateDeneb struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttestedHeader *LightClientHeaderDeneb `protobuf:"bytes,1,opt,name=attested_header,json=attestedHeader,proto3" json:"attested_header,omitempty"` + NextSyncCommittee *SyncCommittee `protobuf:"bytes,2,opt,name=next_sync_committee,json=nextSyncCommittee,proto3" json:"next_sync_committee,omitempty"` + NextSyncCommitteeBranch [][]byte `protobuf:"bytes,3,rep,name=next_sync_committee_branch,json=nextSyncCommitteeBranch,proto3" json:"next_sync_committee_branch,omitempty" ssz-size:"5,32"` + FinalizedHeader *LightClientHeaderDeneb `protobuf:"bytes,4,opt,name=finalized_header,json=finalizedHeader,proto3" json:"finalized_header,omitempty"` + FinalityBranch [][]byte `protobuf:"bytes,5,rep,name=finality_branch,json=finalityBranch,proto3" json:"finality_branch,omitempty" ssz-size:"6,32"` + SyncAggregate *SyncAggregate `protobuf:"bytes,6,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"` + SignatureSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,7,opt,name=signature_slot,json=signatureSlot,proto3" json:"signature_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` +} + +func (x *LightClientUpdateDeneb) Reset() { + *x = LightClientUpdateDeneb{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientUpdateDeneb) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientUpdateDeneb) ProtoMessage() {} + +func (x *LightClientUpdateDeneb) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientUpdateDeneb.ProtoReflect.Descriptor instead. +func (*LightClientUpdateDeneb) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{8} +} + +func (x *LightClientUpdateDeneb) GetAttestedHeader() *LightClientHeaderDeneb { + if x != nil { + return x.AttestedHeader + } + return nil +} + +func (x *LightClientUpdateDeneb) GetNextSyncCommittee() *SyncCommittee { + if x != nil { + return x.NextSyncCommittee + } + return nil +} + +func (x *LightClientUpdateDeneb) GetNextSyncCommitteeBranch() [][]byte { + if x != nil { + return x.NextSyncCommitteeBranch + } + return nil +} + +func (x *LightClientUpdateDeneb) GetFinalizedHeader() *LightClientHeaderDeneb { + if x != nil { + return x.FinalizedHeader + } + return nil +} + +func (x *LightClientUpdateDeneb) GetFinalityBranch() [][]byte { + if x != nil { + return x.FinalityBranch + } + return nil +} + +func (x *LightClientUpdateDeneb) GetSyncAggregate() *SyncAggregate { + if x != nil { + return x.SyncAggregate + } + return nil +} + +func (x *LightClientUpdateDeneb) GetSignatureSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.SignatureSlot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +type LightClientFinalityUpdateAltair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttestedHeader *LightClientHeaderAltair `protobuf:"bytes,1,opt,name=attested_header,json=attestedHeader,proto3" json:"attested_header,omitempty"` + FinalizedHeader *LightClientHeaderAltair `protobuf:"bytes,2,opt,name=finalized_header,json=finalizedHeader,proto3" json:"finalized_header,omitempty"` + FinalityBranch [][]byte `protobuf:"bytes,3,rep,name=finality_branch,json=finalityBranch,proto3" json:"finality_branch,omitempty" ssz-size:"6,32"` + SyncAggregate *SyncAggregate `protobuf:"bytes,4,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"` + SignatureSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,5,opt,name=signature_slot,json=signatureSlot,proto3" json:"signature_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` +} + +func (x *LightClientFinalityUpdateAltair) Reset() { + *x = LightClientFinalityUpdateAltair{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientFinalityUpdateAltair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientFinalityUpdateAltair) ProtoMessage() {} + +func (x *LightClientFinalityUpdateAltair) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientFinalityUpdateAltair.ProtoReflect.Descriptor instead. +func (*LightClientFinalityUpdateAltair) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{9} +} + +func (x *LightClientFinalityUpdateAltair) GetAttestedHeader() *LightClientHeaderAltair { + if x != nil { + return x.AttestedHeader + } + return nil +} + +func (x *LightClientFinalityUpdateAltair) GetFinalizedHeader() *LightClientHeaderAltair { + if x != nil { + return x.FinalizedHeader + } + return nil +} + +func (x *LightClientFinalityUpdateAltair) GetFinalityBranch() [][]byte { + if x != nil { + return x.FinalityBranch + } + return nil +} + +func (x *LightClientFinalityUpdateAltair) GetSyncAggregate() *SyncAggregate { + if x != nil { + return x.SyncAggregate + } + return nil +} + +func (x *LightClientFinalityUpdateAltair) GetSignatureSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.SignatureSlot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +type LightClientFinalityUpdateCapella struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttestedHeader *LightClientHeaderCapella `protobuf:"bytes,1,opt,name=attested_header,json=attestedHeader,proto3" json:"attested_header,omitempty"` + FinalizedHeader *LightClientHeaderCapella `protobuf:"bytes,2,opt,name=finalized_header,json=finalizedHeader,proto3" json:"finalized_header,omitempty"` + FinalityBranch [][]byte `protobuf:"bytes,3,rep,name=finality_branch,json=finalityBranch,proto3" json:"finality_branch,omitempty" ssz-size:"6,32"` + SyncAggregate *SyncAggregate `protobuf:"bytes,4,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"` + SignatureSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,5,opt,name=signature_slot,json=signatureSlot,proto3" json:"signature_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` +} + +func (x *LightClientFinalityUpdateCapella) Reset() { + *x = LightClientFinalityUpdateCapella{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientFinalityUpdateCapella) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientFinalityUpdateCapella) ProtoMessage() {} + +func (x *LightClientFinalityUpdateCapella) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientFinalityUpdateCapella.ProtoReflect.Descriptor instead. +func (*LightClientFinalityUpdateCapella) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{10} +} + +func (x *LightClientFinalityUpdateCapella) GetAttestedHeader() *LightClientHeaderCapella { + if x != nil { + return x.AttestedHeader + } + return nil +} + +func (x *LightClientFinalityUpdateCapella) GetFinalizedHeader() *LightClientHeaderCapella { + if x != nil { + return x.FinalizedHeader + } + return nil +} + +func (x *LightClientFinalityUpdateCapella) GetFinalityBranch() [][]byte { + if x != nil { + return x.FinalityBranch + } + return nil +} + +func (x *LightClientFinalityUpdateCapella) GetSyncAggregate() *SyncAggregate { + if x != nil { + return x.SyncAggregate + } + return nil +} + +func (x *LightClientFinalityUpdateCapella) GetSignatureSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.SignatureSlot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +type LightClientFinalityUpdateDeneb struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttestedHeader *LightClientHeaderDeneb `protobuf:"bytes,1,opt,name=attested_header,json=attestedHeader,proto3" json:"attested_header,omitempty"` + FinalizedHeader *LightClientHeaderDeneb `protobuf:"bytes,2,opt,name=finalized_header,json=finalizedHeader,proto3" json:"finalized_header,omitempty"` + FinalityBranch [][]byte `protobuf:"bytes,3,rep,name=finality_branch,json=finalityBranch,proto3" json:"finality_branch,omitempty" ssz-size:"6,32"` + SyncAggregate *SyncAggregate `protobuf:"bytes,4,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"` + SignatureSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,5,opt,name=signature_slot,json=signatureSlot,proto3" json:"signature_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` +} + +func (x *LightClientFinalityUpdateDeneb) Reset() { + *x = LightClientFinalityUpdateDeneb{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientFinalityUpdateDeneb) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientFinalityUpdateDeneb) ProtoMessage() {} + +func (x *LightClientFinalityUpdateDeneb) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientFinalityUpdateDeneb.ProtoReflect.Descriptor instead. +func (*LightClientFinalityUpdateDeneb) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{11} +} + +func (x *LightClientFinalityUpdateDeneb) GetAttestedHeader() *LightClientHeaderDeneb { + if x != nil { + return x.AttestedHeader + } + return nil +} + +func (x *LightClientFinalityUpdateDeneb) GetFinalizedHeader() *LightClientHeaderDeneb { + if x != nil { + return x.FinalizedHeader + } + return nil +} + +func (x *LightClientFinalityUpdateDeneb) GetFinalityBranch() [][]byte { + if x != nil { + return x.FinalityBranch + } + return nil +} + +func (x *LightClientFinalityUpdateDeneb) GetSyncAggregate() *SyncAggregate { + if x != nil { + return x.SyncAggregate + } + return nil +} + +func (x *LightClientFinalityUpdateDeneb) GetSignatureSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.SignatureSlot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +type LightClientOptimisticUpdateAltair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttestedHeader *LightClientHeaderAltair `protobuf:"bytes,1,opt,name=attested_header,json=attestedHeader,proto3" json:"attested_header,omitempty"` + SyncAggregate *SyncAggregate `protobuf:"bytes,2,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"` + SignatureSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,3,opt,name=signature_slot,json=signatureSlot,proto3" json:"signature_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` +} + +func (x *LightClientOptimisticUpdateAltair) Reset() { + *x = LightClientOptimisticUpdateAltair{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientOptimisticUpdateAltair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientOptimisticUpdateAltair) ProtoMessage() {} + +func (x *LightClientOptimisticUpdateAltair) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientOptimisticUpdateAltair.ProtoReflect.Descriptor instead. +func (*LightClientOptimisticUpdateAltair) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{12} +} + +func (x *LightClientOptimisticUpdateAltair) GetAttestedHeader() *LightClientHeaderAltair { + if x != nil { + return x.AttestedHeader + } + return nil +} + +func (x *LightClientOptimisticUpdateAltair) GetSyncAggregate() *SyncAggregate { + if x != nil { + return x.SyncAggregate + } + return nil +} + +func (x *LightClientOptimisticUpdateAltair) GetSignatureSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.SignatureSlot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +type LightClientOptimisticUpdateCapella struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttestedHeader *LightClientHeaderCapella `protobuf:"bytes,1,opt,name=attested_header,json=attestedHeader,proto3" json:"attested_header,omitempty"` + SyncAggregate *SyncAggregate `protobuf:"bytes,2,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"` + SignatureSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,3,opt,name=signature_slot,json=signatureSlot,proto3" json:"signature_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` +} + +func (x *LightClientOptimisticUpdateCapella) Reset() { + *x = LightClientOptimisticUpdateCapella{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientOptimisticUpdateCapella) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientOptimisticUpdateCapella) ProtoMessage() {} + +func (x *LightClientOptimisticUpdateCapella) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientOptimisticUpdateCapella.ProtoReflect.Descriptor instead. +func (*LightClientOptimisticUpdateCapella) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{13} +} + +func (x *LightClientOptimisticUpdateCapella) GetAttestedHeader() *LightClientHeaderCapella { + if x != nil { + return x.AttestedHeader + } + return nil +} + +func (x *LightClientOptimisticUpdateCapella) GetSyncAggregate() *SyncAggregate { + if x != nil { + return x.SyncAggregate + } + return nil +} + +func (x *LightClientOptimisticUpdateCapella) GetSignatureSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.SignatureSlot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +type LightClientOptimisticUpdateDeneb struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttestedHeader *LightClientHeaderDeneb `protobuf:"bytes,1,opt,name=attested_header,json=attestedHeader,proto3" json:"attested_header,omitempty"` + SyncAggregate *SyncAggregate `protobuf:"bytes,2,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"` + SignatureSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,3,opt,name=signature_slot,json=signatureSlot,proto3" json:"signature_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` +} + +func (x *LightClientOptimisticUpdateDeneb) Reset() { + *x = LightClientOptimisticUpdateDeneb{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LightClientOptimisticUpdateDeneb) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LightClientOptimisticUpdateDeneb) ProtoMessage() {} + +func (x *LightClientOptimisticUpdateDeneb) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_light_client_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LightClientOptimisticUpdateDeneb.ProtoReflect.Descriptor instead. +func (*LightClientOptimisticUpdateDeneb) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP(), []int{14} +} + +func (x *LightClientOptimisticUpdateDeneb) GetAttestedHeader() *LightClientHeaderDeneb { + if x != nil { + return x.AttestedHeader + } + return nil +} + +func (x *LightClientOptimisticUpdateDeneb) GetSyncAggregate() *SyncAggregate { + if x != nil { + return x.SyncAggregate + } + return nil +} + +func (x *LightClientOptimisticUpdateDeneb) GetSignatureSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.SignatureSlot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +var File_proto_prysm_v1alpha1_light_client_proto protoreflect.FileDescriptor + +var file_proto_prysm_v1alpha1_light_client_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x1a, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x65, 0x78, 0x74, 0x2f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, 0x0a, 0x17, 0x4c, 0x69, 0x67, 0x68, 0x74, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x6c, 0x74, 0x61, + 0x69, 0x72, 0x12, 0x40, 0x0a, 0x06, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x62, 0x65, + 0x61, 0x63, 0x6f, 0x6e, 0x22, 0xe2, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, + 0x61, 0x12, 0x40, 0x0a, 0x06, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x62, 0x65, 0x61, + 0x63, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, 0x09, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, + 0x8a, 0xb5, 0x18, 0x04, 0x34, 0x2c, 0x33, 0x32, 0x52, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0xde, 0x01, 0x0a, 0x16, 0x4c, 0x69, + 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, + 0x65, 0x6e, 0x65, 0x62, 0x12, 0x40, 0x0a, 0x06, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, + 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, + 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x09, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, + 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x34, 0x2c, 0x33, 0x32, 0x52, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x8d, 0x02, 0x0a, 0x1a, 0x4c, + 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x46, 0x0a, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x5a, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x52, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x4b, 0x0a, + 0x1d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x35, 0x2c, 0x33, 0x32, 0x52, 0x1a, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x8f, 0x02, 0x0a, 0x1b, 0x4c, + 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x47, 0x0a, 0x06, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, + 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x52, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, + 0x4b, 0x0a, 0x1d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x35, 0x2c, 0x33, 0x32, + 0x52, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x8b, 0x02, 0x0a, + 0x19, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x45, 0x0a, 0x06, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x5a, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x52, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x4b, 0x0a, + 0x1d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x35, 0x2c, 0x33, 0x32, 0x52, 0x1a, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0xd8, 0x04, 0x0a, 0x17, 0x4c, + 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x57, 0x0a, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x52, + 0x0e, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, + 0x54, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, + 0x65, 0x65, 0x52, 0x11, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x45, 0x0a, 0x1a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x79, + 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x62, 0x72, 0x61, + 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x35, + 0x2c, 0x33, 0x32, 0x52, 0x17, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x59, 0x0a, 0x10, + 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x52, 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x74, 0x79, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, + 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x36, 0x2c, 0x33, 0x32, 0x52, 0x0e, 0x66, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x74, 0x79, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, + 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x6c, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, + 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, + 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x22, 0xdb, 0x04, 0x0a, 0x18, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x61, 0x70, 0x65, 0x6c, + 0x6c, 0x61, 0x12, 0x58, 0x0a, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, 0x0e, 0x61, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x13, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x52, + 0x11, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, + 0x65, 0x65, 0x12, 0x45, 0x0a, 0x1a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x35, 0x2c, 0x33, 0x32, + 0x52, 0x17, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x5a, 0x0a, 0x10, 0x66, 0x69, 0x6e, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, + 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x61, 0x70, + 0x65, 0x6c, 0x6c, 0x61, 0x52, 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, + 0x79, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, + 0x8a, 0xb5, 0x18, 0x04, 0x36, 0x2c, 0x33, 0x32, 0x52, 0x0e, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, + 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x6c, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, + 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, + 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, + 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, + 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x6c, 0x6f, 0x74, 0x22, 0xd5, 0x04, 0x0a, 0x16, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x56, + 0x0a, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, + 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x52, 0x11, 0x6e, 0x65, 0x78, 0x74, 0x53, + 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x45, 0x0a, 0x1a, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x65, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, + 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x35, 0x2c, 0x33, 0x32, 0x52, 0x17, 0x6e, 0x65, 0x78, 0x74, + 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x42, 0x72, 0x61, + 0x6e, 0x63, 0x68, 0x12, 0x58, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x0f, 0x66, 0x69, + 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, + 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x36, 0x2c, 0x33, 0x32, + 0x52, 0x0e, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x0d, + 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x6c, 0x0a, + 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, + 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, + 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x0d, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x22, 0xc3, 0x03, 0x0a, 0x1f, + 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, + 0x57, 0x0a, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x6c, 0x74, 0x61, + 0x69, 0x72, 0x52, 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, + 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, + 0x18, 0x04, 0x36, 0x2c, 0x33, 0x32, 0x52, 0x0e, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, + 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x12, 0x6c, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, + 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, + 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, + 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, + 0x6f, 0x74, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x6c, 0x6f, + 0x74, 0x22, 0xc6, 0x03, 0x0a, 0x20, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x58, 0x0a, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, + 0x52, 0x0e, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x12, 0x5a, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, 0x0f, 0x66, 0x69, 0x6e, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x0f, + 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x36, 0x2c, 0x33, 0x32, 0x52, + 0x0e, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, + 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x73, + 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x6c, 0x0a, 0x0e, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, + 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, + 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x0d, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x22, 0xc0, 0x03, 0x0a, 0x1e, 0x4c, + 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x56, 0x0a, + 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x0f, + 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, + 0x31, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x62, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x36, 0x2c, + 0x33, 0x32, 0x52, 0x0e, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, + 0x6c, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x6c, 0x6f, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, + 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x0d, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x22, 0xb7, 0x02, + 0x0a, 0x21, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, + 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x74, + 0x61, 0x69, 0x72, 0x12, 0x57, 0x0a, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x52, 0x0e, 0x61, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x0e, + 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, + 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x6c, 0x0a, 0x0e, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, + 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x22, 0xb9, 0x02, 0x0a, 0x22, 0x4c, 0x69, 0x67, 0x68, + 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x58, + 0x0a, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, + 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x6c, 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, + 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, + 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, + 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, + 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x6c, 0x6f, 0x74, 0x22, 0xb5, 0x02, 0x0a, 0x20, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x56, 0x0a, 0x0f, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6e, 0x65, 0x62, + 0x52, 0x0e, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x0d, + 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x6c, 0x0a, + 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, + 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x69, + 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x0d, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x42, 0x99, 0x01, 0x0a, 0x19, + 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x10, 0x4c, 0x69, 0x67, 0x68, 0x74, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, + 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x35, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, + 0x02, 0x15, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_prysm_v1alpha1_light_client_proto_rawDescOnce sync.Once + file_proto_prysm_v1alpha1_light_client_proto_rawDescData = file_proto_prysm_v1alpha1_light_client_proto_rawDesc +) + +func file_proto_prysm_v1alpha1_light_client_proto_rawDescGZIP() []byte { + file_proto_prysm_v1alpha1_light_client_proto_rawDescOnce.Do(func() { + file_proto_prysm_v1alpha1_light_client_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_prysm_v1alpha1_light_client_proto_rawDescData) + }) + return file_proto_prysm_v1alpha1_light_client_proto_rawDescData +} + +var file_proto_prysm_v1alpha1_light_client_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_proto_prysm_v1alpha1_light_client_proto_goTypes = []interface{}{ + (*LightClientHeaderAltair)(nil), // 0: ethereum.eth.v1alpha1.LightClientHeaderAltair + (*LightClientHeaderCapella)(nil), // 1: ethereum.eth.v1alpha1.LightClientHeaderCapella + (*LightClientHeaderDeneb)(nil), // 2: ethereum.eth.v1alpha1.LightClientHeaderDeneb + (*LightClientBootstrapAltair)(nil), // 3: ethereum.eth.v1alpha1.LightClientBootstrapAltair + (*LightClientBootstrapCapella)(nil), // 4: ethereum.eth.v1alpha1.LightClientBootstrapCapella + (*LightClientBootstrapDeneb)(nil), // 5: ethereum.eth.v1alpha1.LightClientBootstrapDeneb + (*LightClientUpdateAltair)(nil), // 6: ethereum.eth.v1alpha1.LightClientUpdateAltair + (*LightClientUpdateCapella)(nil), // 7: ethereum.eth.v1alpha1.LightClientUpdateCapella + (*LightClientUpdateDeneb)(nil), // 8: ethereum.eth.v1alpha1.LightClientUpdateDeneb + (*LightClientFinalityUpdateAltair)(nil), // 9: ethereum.eth.v1alpha1.LightClientFinalityUpdateAltair + (*LightClientFinalityUpdateCapella)(nil), // 10: ethereum.eth.v1alpha1.LightClientFinalityUpdateCapella + (*LightClientFinalityUpdateDeneb)(nil), // 11: ethereum.eth.v1alpha1.LightClientFinalityUpdateDeneb + (*LightClientOptimisticUpdateAltair)(nil), // 12: ethereum.eth.v1alpha1.LightClientOptimisticUpdateAltair + (*LightClientOptimisticUpdateCapella)(nil), // 13: ethereum.eth.v1alpha1.LightClientOptimisticUpdateCapella + (*LightClientOptimisticUpdateDeneb)(nil), // 14: ethereum.eth.v1alpha1.LightClientOptimisticUpdateDeneb + (*BeaconBlockHeader)(nil), // 15: ethereum.eth.v1alpha1.BeaconBlockHeader + (*v1.ExecutionPayloadHeaderCapella)(nil), // 16: ethereum.engine.v1.ExecutionPayloadHeaderCapella + (*v1.ExecutionPayloadHeaderDeneb)(nil), // 17: ethereum.engine.v1.ExecutionPayloadHeaderDeneb + (*SyncCommittee)(nil), // 18: ethereum.eth.v1alpha1.SyncCommittee + (*SyncAggregate)(nil), // 19: ethereum.eth.v1alpha1.SyncAggregate +} +var file_proto_prysm_v1alpha1_light_client_proto_depIdxs = []int32{ + 15, // 0: ethereum.eth.v1alpha1.LightClientHeaderAltair.beacon:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader + 15, // 1: ethereum.eth.v1alpha1.LightClientHeaderCapella.beacon:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader + 16, // 2: ethereum.eth.v1alpha1.LightClientHeaderCapella.execution:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderCapella + 15, // 3: ethereum.eth.v1alpha1.LightClientHeaderDeneb.beacon:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader + 17, // 4: ethereum.eth.v1alpha1.LightClientHeaderDeneb.execution:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb + 0, // 5: ethereum.eth.v1alpha1.LightClientBootstrapAltair.header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderAltair + 18, // 6: ethereum.eth.v1alpha1.LightClientBootstrapAltair.current_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee + 1, // 7: ethereum.eth.v1alpha1.LightClientBootstrapCapella.header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderCapella + 18, // 8: ethereum.eth.v1alpha1.LightClientBootstrapCapella.current_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee + 2, // 9: ethereum.eth.v1alpha1.LightClientBootstrapDeneb.header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderDeneb + 18, // 10: ethereum.eth.v1alpha1.LightClientBootstrapDeneb.current_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee + 0, // 11: ethereum.eth.v1alpha1.LightClientUpdateAltair.attested_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderAltair + 18, // 12: ethereum.eth.v1alpha1.LightClientUpdateAltair.next_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee + 0, // 13: ethereum.eth.v1alpha1.LightClientUpdateAltair.finalized_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderAltair + 19, // 14: ethereum.eth.v1alpha1.LightClientUpdateAltair.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 1, // 15: ethereum.eth.v1alpha1.LightClientUpdateCapella.attested_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderCapella + 18, // 16: ethereum.eth.v1alpha1.LightClientUpdateCapella.next_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee + 1, // 17: ethereum.eth.v1alpha1.LightClientUpdateCapella.finalized_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderCapella + 19, // 18: ethereum.eth.v1alpha1.LightClientUpdateCapella.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 2, // 19: ethereum.eth.v1alpha1.LightClientUpdateDeneb.attested_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderDeneb + 18, // 20: ethereum.eth.v1alpha1.LightClientUpdateDeneb.next_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee + 2, // 21: ethereum.eth.v1alpha1.LightClientUpdateDeneb.finalized_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderDeneb + 19, // 22: ethereum.eth.v1alpha1.LightClientUpdateDeneb.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 0, // 23: ethereum.eth.v1alpha1.LightClientFinalityUpdateAltair.attested_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderAltair + 0, // 24: ethereum.eth.v1alpha1.LightClientFinalityUpdateAltair.finalized_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderAltair + 19, // 25: ethereum.eth.v1alpha1.LightClientFinalityUpdateAltair.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 1, // 26: ethereum.eth.v1alpha1.LightClientFinalityUpdateCapella.attested_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderCapella + 1, // 27: ethereum.eth.v1alpha1.LightClientFinalityUpdateCapella.finalized_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderCapella + 19, // 28: ethereum.eth.v1alpha1.LightClientFinalityUpdateCapella.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 2, // 29: ethereum.eth.v1alpha1.LightClientFinalityUpdateDeneb.attested_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderDeneb + 2, // 30: ethereum.eth.v1alpha1.LightClientFinalityUpdateDeneb.finalized_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderDeneb + 19, // 31: ethereum.eth.v1alpha1.LightClientFinalityUpdateDeneb.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 0, // 32: ethereum.eth.v1alpha1.LightClientOptimisticUpdateAltair.attested_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderAltair + 19, // 33: ethereum.eth.v1alpha1.LightClientOptimisticUpdateAltair.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 1, // 34: ethereum.eth.v1alpha1.LightClientOptimisticUpdateCapella.attested_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderCapella + 19, // 35: ethereum.eth.v1alpha1.LightClientOptimisticUpdateCapella.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 2, // 36: ethereum.eth.v1alpha1.LightClientOptimisticUpdateDeneb.attested_header:type_name -> ethereum.eth.v1alpha1.LightClientHeaderDeneb + 19, // 37: ethereum.eth.v1alpha1.LightClientOptimisticUpdateDeneb.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 38, // [38:38] is the sub-list for method output_type + 38, // [38:38] is the sub-list for method input_type + 38, // [38:38] is the sub-list for extension type_name + 38, // [38:38] is the sub-list for extension extendee + 0, // [0:38] is the sub-list for field type_name +} + +func init() { file_proto_prysm_v1alpha1_light_client_proto_init() } +func file_proto_prysm_v1alpha1_light_client_proto_init() { + if File_proto_prysm_v1alpha1_light_client_proto != nil { + return + } + file_proto_prysm_v1alpha1_beacon_block_proto_init() + file_proto_prysm_v1alpha1_beacon_state_proto_init() + if !protoimpl.UnsafeEnabled { + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientHeaderAltair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientHeaderCapella); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientHeaderDeneb); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientBootstrapAltair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientBootstrapCapella); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientBootstrapDeneb); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientUpdateAltair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientUpdateCapella); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientUpdateDeneb); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientFinalityUpdateAltair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientFinalityUpdateCapella); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientFinalityUpdateDeneb); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientOptimisticUpdateAltair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientOptimisticUpdateCapella); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_light_client_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LightClientOptimisticUpdateDeneb); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_prysm_v1alpha1_light_client_proto_rawDesc, + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_prysm_v1alpha1_light_client_proto_goTypes, + DependencyIndexes: file_proto_prysm_v1alpha1_light_client_proto_depIdxs, + MessageInfos: file_proto_prysm_v1alpha1_light_client_proto_msgTypes, + }.Build() + File_proto_prysm_v1alpha1_light_client_proto = out.File + file_proto_prysm_v1alpha1_light_client_proto_rawDesc = nil + file_proto_prysm_v1alpha1_light_client_proto_goTypes = nil + file_proto_prysm_v1alpha1_light_client_proto_depIdxs = nil +} diff --git a/proto/prysm/v1alpha1/light_client.proto b/proto/prysm/v1alpha1/light_client.proto new file mode 100644 index 0000000000..6e3ca511ba --- /dev/null +++ b/proto/prysm/v1alpha1/light_client.proto @@ -0,0 +1,134 @@ +// Copyright 2024 Prysmatic Labs. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +syntax = "proto3"; + +package ethereum.eth.v1alpha1; + +import "proto/eth/ext/options.proto"; +import "proto/prysm/v1alpha1/beacon_block.proto"; +import "proto/engine/v1/execution_engine.proto"; +import "proto/prysm/v1alpha1/beacon_state.proto"; + +option csharp_namespace = "Ethereum.Eth.V1alpha1"; +option go_package = "github.com/prysmaticlabs/prysm/v5/proto/eth/v1alpha1;eth"; +option java_multiple_files = true; +option java_outer_classname = "LightClientProto"; +option java_package = "org.ethereum.eth.v1alpha1"; +option php_namespace = "Ethereum\\Eth\\v1alpha1"; + +message LightClientHeaderAltair { + BeaconBlockHeader beacon = 1; +} + +message LightClientHeaderCapella { + BeaconBlockHeader beacon = 1; + ethereum.engine.v1.ExecutionPayloadHeaderCapella execution = 2; + repeated bytes execution_branch = 3 [(ethereum.eth.ext.ssz_size) = "4,32"]; +} + +message LightClientHeaderDeneb { + BeaconBlockHeader beacon = 1; + ethereum.engine.v1.ExecutionPayloadHeaderDeneb execution = 2; + repeated bytes execution_branch = 3 [(ethereum.eth.ext.ssz_size) = "4,32"]; +} + +message LightClientBootstrapAltair { + LightClientHeaderAltair header = 1; + SyncCommittee current_sync_committee = 2; + repeated bytes current_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "5,32"]; +} + +message LightClientBootstrapCapella { + LightClientHeaderCapella header = 1; + SyncCommittee current_sync_committee = 2; + repeated bytes current_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "5,32"]; +} + +message LightClientBootstrapDeneb { + LightClientHeaderDeneb header = 1; + SyncCommittee current_sync_committee = 2; + repeated bytes current_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "5,32"]; +} + +message LightClientUpdateAltair { + LightClientHeaderAltair attested_header = 1; + SyncCommittee next_sync_committee = 2; + repeated bytes next_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "5,32"]; + LightClientHeaderAltair finalized_header = 4; + repeated bytes finality_branch = 5 [(ethereum.eth.ext.ssz_size) = "6,32"]; + SyncAggregate sync_aggregate = 6; + uint64 signature_slot = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; +} + +message LightClientUpdateCapella { + LightClientHeaderCapella attested_header = 1; + SyncCommittee next_sync_committee = 2; + repeated bytes next_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "5,32"]; + LightClientHeaderCapella finalized_header = 4; + repeated bytes finality_branch = 5 [(ethereum.eth.ext.ssz_size) = "6,32"]; + SyncAggregate sync_aggregate = 6; + uint64 signature_slot = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; +} + +message LightClientUpdateDeneb { + LightClientHeaderDeneb attested_header = 1; + SyncCommittee next_sync_committee = 2; + repeated bytes next_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "5,32"]; + LightClientHeaderDeneb finalized_header = 4; + repeated bytes finality_branch = 5 [(ethereum.eth.ext.ssz_size) = "6,32"]; + SyncAggregate sync_aggregate = 6; + uint64 signature_slot = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; +} + +message LightClientFinalityUpdateAltair { + LightClientHeaderAltair attested_header = 1; + LightClientHeaderAltair finalized_header = 2; + repeated bytes finality_branch = 3 [(ethereum.eth.ext.ssz_size) = "6,32"]; + SyncAggregate sync_aggregate = 4; + uint64 signature_slot = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; +} + +message LightClientFinalityUpdateCapella { + LightClientHeaderCapella attested_header = 1; + LightClientHeaderCapella finalized_header = 2; + repeated bytes finality_branch = 3 [(ethereum.eth.ext.ssz_size) = "6,32"]; + SyncAggregate sync_aggregate = 4; + uint64 signature_slot = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; +} + +message LightClientFinalityUpdateDeneb { + LightClientHeaderDeneb attested_header = 1; + LightClientHeaderDeneb finalized_header = 2; + repeated bytes finality_branch = 3 [(ethereum.eth.ext.ssz_size) = "6,32"]; + SyncAggregate sync_aggregate = 4; + uint64 signature_slot = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; +} + +message LightClientOptimisticUpdateAltair { + LightClientHeaderAltair attested_header = 1; + SyncAggregate sync_aggregate = 2; + uint64 signature_slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; +} + +message LightClientOptimisticUpdateCapella { + LightClientHeaderCapella attested_header = 1; + SyncAggregate sync_aggregate = 2; + uint64 signature_slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; +} + +message LightClientOptimisticUpdateDeneb { + LightClientHeaderDeneb attested_header = 1; + SyncAggregate sync_aggregate = 2; + uint64 signature_slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; +} \ No newline at end of file