diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml deleted file mode 100644 index d44281e341db..000000000000 --- a/.github/workflows/changelog.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: CI - -on: - pull_request: - branches: - - develop - -jobs: - changed_files: - runs-on: ubuntu-latest - name: Check CHANGELOG.md - steps: - - uses: actions/checkout@v4 - - name: changelog modified - id: changelog-modified - uses: tj-actions/changed-files@v45 - with: - files: CHANGELOG.md - - - name: List all changed files - env: - ALL_CHANGED_FILES: ${{ steps.changelog-modified.outputs.all_changed_files }} - run: | - if [[ ${ALL_CHANGED_FILES[*]} =~ (^|[[:space:]])"CHANGELOG.md"($|[[:space:]]) ]]; - then - echo "CHANGELOG.md was modified."; - exit 0; - else - echo "CHANGELOG.md was not modified."; - echo "Please see CHANGELOG.md and follow the instructions to add your changes to that file." - echo "In some rare scenarios, a changelog entry is not required and this CI check can be ignored." - exit 1; - fi diff --git a/beacon-chain/blockchain/BUILD.bazel b/beacon-chain/blockchain/BUILD.bazel index c12a3d1340bd..899fa024419a 100644 --- a/beacon-chain/blockchain/BUILD.bazel +++ b/beacon-chain/blockchain/BUILD.bazel @@ -6,9 +6,11 @@ go_library( "chain_info.go", "chain_info_forkchoice.go", "currently_syncing_block.go", + "currently_syncing_execution_payload_envelope.go", "defragment.go", "error.go", "execution_engine.go", + "execution_engine_epbs.go", "forkchoice_update_execution.go", "head.go", "head_sync_committee_info.go", @@ -25,6 +27,8 @@ go_library( "receive_attestation.go", "receive_blob.go", "receive_block.go", + "receive_execution_payload_envelope.go", + "receive_payload_attestation_message.go", "service.go", "tracked_proposer.go", "weak_subjectivity_checks.go", @@ -43,6 +47,7 @@ go_library( "//beacon-chain/cache:go_default_library", "//beacon-chain/core/altair:go_default_library", "//beacon-chain/core/blocks:go_default_library", + "//beacon-chain/core/epbs:go_default_library", "//beacon-chain/core/epoch/precompute:go_default_library", "//beacon-chain/core/feed:go_default_library", "//beacon-chain/core/feed/state:go_default_library", @@ -97,6 +102,7 @@ go_library( "@com_github_prometheus_client_golang//prometheus:go_default_library", "@com_github_prometheus_client_golang//prometheus/promauto:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", + "@io_opencensus_go//trace:go_default_library", "@org_golang_x_sync//errgroup:go_default_library", ], ) @@ -109,6 +115,7 @@ go_test( "chain_info_norace_test.go", "chain_info_test.go", "checktags_test.go", + "epbs_test.go", "error_test.go", "execution_engine_test.go", "forkchoice_update_execution_test.go", @@ -124,6 +131,7 @@ go_test( "process_block_test.go", "receive_attestation_test.go", "receive_block_test.go", + "receive_execution_payload_envelope_test.go", "service_norace_test.go", "service_test.go", "setup_test.go", @@ -177,6 +185,7 @@ go_test( "//testing/assert:go_default_library", "//testing/require:go_default_library", "//testing/util:go_default_library", + "//testing/util/random:go_default_library", "//time:go_default_library", "//time/slots:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", diff --git a/beacon-chain/blockchain/chain_info.go b/beacon-chain/blockchain/chain_info.go index f0b59e33ce02..6fd2e1f12f94 100644 --- a/beacon-chain/blockchain/chain_info.go +++ b/beacon-chain/blockchain/chain_info.go @@ -43,7 +43,7 @@ type ForkchoiceFetcher interface { GetProposerHead() [32]byte SetForkChoiceGenesisTime(uint64) UpdateHead(context.Context, primitives.Slot) - HighestReceivedBlockSlot() primitives.Slot + HighestReceivedBlockSlotRoot() (primitives.Slot, [32]byte) ReceivedBlocksLastEpoch() (uint64, error) InsertNode(context.Context, state.BeaconState, consensus_blocks.ROBlock) error ForkChoiceDump(context.Context) (*forkchoice.Dump, error) @@ -51,6 +51,7 @@ type ForkchoiceFetcher interface { ProposerBoost() [32]byte RecentBlockSlot(root [32]byte) (primitives.Slot, error) IsCanonical(ctx context.Context, blockRoot [32]byte) (bool, error) + GetPTCVote(root [32]byte) primitives.PTCStatus } // TimeFetcher retrieves the Ethereum consensus data that's related to time. @@ -119,6 +120,12 @@ type OptimisticModeFetcher interface { IsOptimisticForRoot(ctx context.Context, root [32]byte) (bool, error) } +// ExecutionPayloadFetcher defines a common interface that returns forkchoice +// information about payload block hashes +type ExecutionPayloadFetcher interface { + HashInForkchoice([32]byte) bool +} + // FinalizedCheckpt returns the latest finalized checkpoint from chain store. func (s *Service) FinalizedCheckpt() *ethpb.Checkpoint { s.cfg.ForkChoiceStore.RLock() @@ -400,6 +407,14 @@ func (s *Service) InForkchoice(root [32]byte) bool { return s.cfg.ForkChoiceStore.HasNode(root) } +// HashInForkchoice returns true if the given payload block hash is found in +// forkchoice +func (s *Service) HashInForkchoice(hash [32]byte) bool { + s.cfg.ForkChoiceStore.RLock() + defer s.cfg.ForkChoiceStore.RUnlock() + return s.cfg.ForkChoiceStore.HasHash(hash) +} + // IsOptimisticForRoot takes the root as argument instead of the current head // and returns true if it is optimistic. func (s *Service) IsOptimisticForRoot(ctx context.Context, root [32]byte) (bool, error) { diff --git a/beacon-chain/blockchain/chain_info_forkchoice.go b/beacon-chain/blockchain/chain_info_forkchoice.go index e61444d1c024..d8098241ad02 100644 --- a/beacon-chain/blockchain/chain_info_forkchoice.go +++ b/beacon-chain/blockchain/chain_info_forkchoice.go @@ -6,6 +6,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" consensus_blocks "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" "github.com/prysmaticlabs/prysm/v5/consensus-types/forkchoice" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" ) @@ -30,11 +31,11 @@ func (s *Service) SetForkChoiceGenesisTime(timestamp uint64) { s.cfg.ForkChoiceStore.SetGenesisTime(timestamp) } -// HighestReceivedBlockSlot returns the corresponding value from forkchoice -func (s *Service) HighestReceivedBlockSlot() primitives.Slot { +// HighestReceivedBlockSlotRoot returns the corresponding value from forkchoice +func (s *Service) HighestReceivedBlockSlotRoot() (primitives.Slot, [32]byte) { s.cfg.ForkChoiceStore.RLock() defer s.cfg.ForkChoiceStore.RUnlock() - return s.cfg.ForkChoiceStore.HighestReceivedBlockSlot() + return s.cfg.ForkChoiceStore.HighestReceivedBlockSlotRoot() } // ReceivedBlocksLastEpoch returns the corresponding value from forkchoice @@ -100,3 +101,30 @@ func (s *Service) ParentRoot(root [32]byte) ([32]byte, error) { defer s.cfg.ForkChoiceStore.RUnlock() return s.cfg.ForkChoiceStore.ParentRoot(root) } + +// GetPTCVote wraps a call to the corresponding method in forkchoice and checks +// the currently syncing status +// Warning: this method will return the current PTC status regardless of +// timeliness. A client MUST call this method when about to submit a PTC +// attestation, that is exactly at the threshold to submit the attestation. +func (s *Service) GetPTCVote(root [32]byte) primitives.PTCStatus { + s.cfg.ForkChoiceStore.RLock() + f := s.cfg.ForkChoiceStore.GetPTCVote() + s.cfg.ForkChoiceStore.RUnlock() + if f != primitives.PAYLOAD_ABSENT { + return f + } + f, isSyncing := s.payloadBeingSynced.isSyncing(root) + if isSyncing { + return f + } + return primitives.PAYLOAD_ABSENT +} + +// insertPayloadEnvelope wraps a locked call to the corresponding method in +// forkchoice +func (s *Service) insertPayloadEnvelope(envelope interfaces.ROExecutionPayloadEnvelope) error { + s.cfg.ForkChoiceStore.Lock() + defer s.cfg.ForkChoiceStore.Unlock() + return s.cfg.ForkChoiceStore.InsertPayloadEnvelope(envelope) +} diff --git a/beacon-chain/blockchain/chain_info_test.go b/beacon-chain/blockchain/chain_info_test.go index b5f92c316e55..aedbbf71f868 100644 --- a/beacon-chain/blockchain/chain_info_test.go +++ b/beacon-chain/blockchain/chain_info_test.go @@ -37,6 +37,7 @@ func prepareForkchoiceState( blockRoot [32]byte, parentRoot [32]byte, payloadHash [32]byte, + parentHash [32]byte, justified *ethpb.Checkpoint, finalized *ethpb.Checkpoint, ) (state.BeaconState, consensus_blocks.ROBlock, error) { @@ -69,7 +70,8 @@ func prepareForkchoiceState( ParentRoot: parentRoot[:], Body: ðpb.BeaconBlockBodyBellatrix{ ExecutionPayload: &enginev1.ExecutionPayload{ - BlockHash: payloadHash[:], + BlockHash: payloadHash[:], + ParentHash: parentHash[:], }, }, }, @@ -142,7 +144,7 @@ func TestUnrealizedJustifiedBlockHash(t *testing.T) { service := &Service{cfg: &config{ForkChoiceStore: doublylinkedtree.New()}} ojc := ðpb.Checkpoint{Root: []byte{'j'}} ofc := ðpb.Checkpoint{Root: []byte{'f'}} - st, roblock, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + st, roblock, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) service.cfg.ForkChoiceStore.SetBalancesByRooter(func(_ context.Context, _ [32]byte) ([]uint64, error) { return []uint64{}, nil }) @@ -336,22 +338,22 @@ func TestService_ChainHeads(t *testing.T) { c := &Service{cfg: &config{ForkChoiceStore: doublylinkedtree.New()}} ojc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} ofc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - st, roblock, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + st, roblock, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, c.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 100, [32]byte{'a'}, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + st, roblock, err = prepareForkchoiceState(ctx, 100, [32]byte{'a'}, [32]byte{}, [32]byte{'A'}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, c.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, params.BeaconConfig().ZeroHash, ojc, ofc) + st, roblock, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, [32]byte{'A'}, ojc, ofc) require.NoError(t, err) require.NoError(t, c.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 102, [32]byte{'c'}, [32]byte{'b'}, params.BeaconConfig().ZeroHash, ojc, ofc) + st, roblock, err = prepareForkchoiceState(ctx, 102, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, [32]byte{'B'}, ojc, ofc) require.NoError(t, err) require.NoError(t, c.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 103, [32]byte{'d'}, [32]byte{'a'}, params.BeaconConfig().ZeroHash, ojc, ofc) + st, roblock, err = prepareForkchoiceState(ctx, 103, [32]byte{'d'}, [32]byte{'a'}, [32]byte{'D'}, [32]byte{'C'}, ojc, ofc) require.NoError(t, err) require.NoError(t, c.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 104, [32]byte{'e'}, [32]byte{'b'}, params.BeaconConfig().ZeroHash, ojc, ofc) + st, roblock, err = prepareForkchoiceState(ctx, 104, [32]byte{'e'}, [32]byte{'b'}, [32]byte{'E'}, [32]byte{'D'}, ojc, ofc) require.NoError(t, err) require.NoError(t, c.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) @@ -433,10 +435,10 @@ func TestService_IsOptimistic(t *testing.T) { ojc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} ofc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} c := &Service{cfg: &config{ForkChoiceStore: doublylinkedtree.New()}, head: &head{root: [32]byte{'b'}}} - st, roblock, err := prepareForkchoiceState(ctx, 100, [32]byte{'a'}, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + st, roblock, err := prepareForkchoiceState(ctx, 100, [32]byte{'a'}, [32]byte{}, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, c.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, params.BeaconConfig().ZeroHash, ojc, ofc) + st, roblock, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'A'}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, c.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) @@ -469,10 +471,10 @@ func TestService_IsOptimisticForRoot(t *testing.T) { c := &Service{cfg: &config{ForkChoiceStore: doublylinkedtree.New()}, head: &head{root: [32]byte{'b'}}} ojc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} ofc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - st, roblock, err := prepareForkchoiceState(ctx, 100, [32]byte{'a'}, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + st, roblock, err := prepareForkchoiceState(ctx, 100, [32]byte{'a'}, [32]byte{}, [32]byte{'A'}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, c.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, params.BeaconConfig().ZeroHash, ojc, ofc) + st, roblock, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, ojc, ofc) require.NoError(t, err) require.NoError(t, c.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) diff --git a/beacon-chain/blockchain/currently_syncing_execution_payload_envelope.go b/beacon-chain/blockchain/currently_syncing_execution_payload_envelope.go new file mode 100644 index 000000000000..c2c182e0569d --- /dev/null +++ b/beacon-chain/blockchain/currently_syncing_execution_payload_envelope.go @@ -0,0 +1,36 @@ +package blockchain + +import ( + "sync" + + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" +) + +type currentlySyncingPayload struct { + sync.Mutex + roots map[[32]byte]primitives.PTCStatus +} + +func (b *currentlySyncingPayload) set(envelope interfaces.ROExecutionPayloadEnvelope) { + b.Lock() + defer b.Unlock() + if envelope.PayloadWithheld() { + b.roots[envelope.BeaconBlockRoot()] = primitives.PAYLOAD_WITHHELD + } else { + b.roots[envelope.BeaconBlockRoot()] = primitives.PAYLOAD_PRESENT + } +} + +func (b *currentlySyncingPayload) unset(root [32]byte) { + b.Lock() + defer b.Unlock() + delete(b.roots, root) +} + +func (b *currentlySyncingPayload) isSyncing(root [32]byte) (status primitives.PTCStatus, isSyncing bool) { + b.Lock() + defer b.Unlock() + status, isSyncing = b.roots[root] + return +} diff --git a/beacon-chain/blockchain/epbs_test.go b/beacon-chain/blockchain/epbs_test.go new file mode 100644 index 000000000000..0f8d313f8db4 --- /dev/null +++ b/beacon-chain/blockchain/epbs_test.go @@ -0,0 +1,18 @@ +package blockchain + +import ( + "testing" + + doublylinkedtree "github.com/prysmaticlabs/prysm/v5/beacon-chain/forkchoice/doubly-linked-tree" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/testing/require" +) + +func TestServiceGetPTCVote(t *testing.T) { + c := ¤tlySyncingPayload{roots: make(map[[32]byte]primitives.PTCStatus)} + s := &Service{cfg: &config{ForkChoiceStore: doublylinkedtree.New()}, payloadBeingSynced: c} + r := [32]byte{'r'} + require.Equal(t, primitives.PAYLOAD_ABSENT, s.GetPTCVote(r)) + c.roots[r] = primitives.PAYLOAD_WITHHELD + require.Equal(t, primitives.PAYLOAD_WITHHELD, s.GetPTCVote(r)) +} diff --git a/beacon-chain/blockchain/error.go b/beacon-chain/blockchain/error.go index 87ed0d2416db..abb218be45de 100644 --- a/beacon-chain/blockchain/error.go +++ b/beacon-chain/blockchain/error.go @@ -30,6 +30,9 @@ var ( ErrNotCheckpoint = errors.New("not a checkpoint in forkchoice") // ErrNilHead is returned when no head is present in the blockchain service. ErrNilHead = errors.New("nil head") + // errInvalidValidatorIndex is returned when a validator index is + // invalid or unexpected + errInvalidValidatorIndex = errors.New("invalid validator index") ) var errMaxBlobsExceeded = errors.New("Expected commitments in block exceeds MAX_BLOBS_PER_BLOCK") diff --git a/beacon-chain/blockchain/execution_engine.go b/beacon-chain/blockchain/execution_engine.go index 0317098b0923..36202f841454 100644 --- a/beacon-chain/blockchain/execution_engine.go +++ b/beacon-chain/blockchain/execution_engine.go @@ -2,6 +2,7 @@ package blockchain import ( "context" + "crypto/sha256" "fmt" "github.com/ethereum/go-ethereum/common" @@ -27,6 +28,8 @@ import ( "github.com/sirupsen/logrus" ) +const blobCommitmentVersionKZG uint8 = 0x01 + var defaultLatestValidHash = bytesutil.PadTo([]byte{0xff}, 32) // notifyForkchoiceUpdate signals execution engine the fork choice updates. Execution engine should: @@ -91,6 +94,14 @@ func (s *Service) notifyForkchoiceUpdate(ctx context.Context, arg *fcuConfig) (* log.WithError(err).Error("Could not set head root to invalid") return nil, nil } + if len(invalidRoots) == 0 { + log.WithFields(logrus.Fields{ + "slot": headBlk.Slot(), + "blockRoot": fmt.Sprintf("%#x", bytesutil.Trunc(headRoot[:])), + }).Warn("invalid payload") + return nil, nil + } + if err := s.removeInvalidBlockAndState(ctx, invalidRoots); err != nil { log.WithError(err).Error("Could not remove invalid block and state") return nil, nil @@ -105,6 +116,7 @@ func (s *Service) notifyForkchoiceUpdate(ctx context.Context, arg *fcuConfig) (* }).Warn("Pruned invalid blocks, could not update head root") return nil, invalidBlock{error: ErrInvalidPayload, root: arg.headRoot, invalidAncestorRoots: invalidRoots} } + b, err := s.getBlock(ctx, r) if err != nil { log.WithError(err).Error("Could not get head block") @@ -320,6 +332,7 @@ func (s *Service) getPayloadAttribute(ctx context.Context, st state.BeaconState, } // Get timestamp. + log.WithFields(logrus.Fields{"slot": slot, "stateslot": st.Slot()}).Info("about to compute attributes") t, err := slots.ToTime(uint64(s.genesisTime.Unix()), slot) if err != nil { log.WithError(err).Error("Could not get timestamp to get payload attribute") @@ -328,7 +341,7 @@ func (s *Service) getPayloadAttribute(ctx context.Context, st state.BeaconState, var attr payloadattribute.Attributer switch st.Version() { - case version.Deneb, version.Electra: + case version.Deneb, version.Electra, version.EPBS: withdrawals, _, err := st.ExpectedWithdrawals() if err != nil { log.WithError(err).Error("Could not get expected withdrawals to get payload attribute") @@ -407,7 +420,13 @@ func kzgCommitmentsToVersionedHashes(body interfaces.ReadOnlyBeaconBlockBody) ([ versionedHashes := make([]common.Hash, len(commitments)) for i, commitment := range commitments { - versionedHashes[i] = primitives.ConvertKzgCommitmentToVersionedHash(commitment) + versionedHashes[i] = ConvertKzgCommitmentToVersionedHash(commitment) } return versionedHashes, nil } + +func ConvertKzgCommitmentToVersionedHash(commitment []byte) common.Hash { + versionedHash := sha256.Sum256(commitment) + versionedHash[0] = blobCommitmentVersionKZG + return versionedHash +} diff --git a/beacon-chain/blockchain/execution_engine_epbs.go b/beacon-chain/blockchain/execution_engine_epbs.go new file mode 100644 index 000000000000..edb0695edb26 --- /dev/null +++ b/beacon-chain/blockchain/execution_engine_epbs.go @@ -0,0 +1,68 @@ +package blockchain + +import ( + "context" + "fmt" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/execution" + "github.com/prysmaticlabs/prysm/v5/config/features" + payloadattribute "github.com/prysmaticlabs/prysm/v5/consensus-types/payload-attribute" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + "github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "github.com/sirupsen/logrus" +) + +// notifyForkchoiceUpdate signals execution engine the fork choice updates. Execution engine should: +// 1. Re-organizes the execution payload chain and corresponding state to make head_block_hash the head. +// 2. Applies finality to the execution state: it irreversibly persists the chain of all execution payloads and corresponding state, up to and including finalized_block_hash. +func (s *Service) notifyForkchoiceUpdateEPBS(ctx context.Context, blockhash [32]byte, attributes payloadattribute.Attributer) (*enginev1.PayloadIDBytes, error) { + ctx, span := trace.StartSpan(ctx, "blockChain.notifyForkchoiceUpdateEPBS") + defer span.End() + + finalizedHash := s.cfg.ForkChoiceStore.FinalizedPayloadBlockHash() + justifiedHash := s.cfg.ForkChoiceStore.UnrealizedJustifiedPayloadBlockHash() + fcs := &enginev1.ForkchoiceState{ + HeadBlockHash: blockhash[:], + SafeBlockHash: justifiedHash[:], + FinalizedBlockHash: finalizedHash[:], + } + if attributes == nil { + attributes = payloadattribute.EmptyWithVersion(version.EPBS) + } + log.WithFields(logrus.Fields{ + "Version": attributes.Version(), + "Timestamp": attributes.Timestamp(), + "blockHash": fmt.Sprintf("%#x", blockhash), + }).Info("calling FCU V3 with attributes") + + payloadID, lastValidHash, err := s.cfg.ExecutionEngineCaller.ForkchoiceUpdated(ctx, fcs, attributes) + if err != nil { + switch { + case errors.Is(err, execution.ErrAcceptedSyncingPayloadStatus): + forkchoiceUpdatedOptimisticNodeCount.Inc() + log.WithFields(logrus.Fields{ + "headPayloadBlockHash": fmt.Sprintf("%#x", bytesutil.Trunc(blockhash[:])), + "finalizedPayloadBlockHash": fmt.Sprintf("%#x", bytesutil.Trunc(finalizedHash[:])), + }).Info("Called fork choice updated with optimistic block") + return payloadID, nil + case errors.Is(err, execution.ErrInvalidPayloadStatus): + log.WithError(err).Info("forkchoice updated to invalid block") + return nil, invalidBlock{error: ErrInvalidPayload, root: [32]byte(lastValidHash)} + default: + log.WithError(err).Error(ErrUndefinedExecutionEngineError) + return nil, nil + } + } + forkchoiceUpdatedValidNodeCount.Inc() + // If the forkchoice update call has an attribute, update the payload ID cache. + hasAttr := attributes != nil && !attributes.IsEmpty() + if hasAttr && payloadID == nil && !features.Get().PrepareAllPayloads { + log.WithFields(logrus.Fields{ + "blockHash": fmt.Sprintf("%#x", blockhash), + }).Error("Received nil payload ID on VALID engine response") + } + return payloadID, nil +} diff --git a/beacon-chain/blockchain/execution_engine_test.go b/beacon-chain/blockchain/execution_engine_test.go index ce8b132bc465..9a2a98de624c 100644 --- a/beacon-chain/blockchain/execution_engine_test.go +++ b/beacon-chain/blockchain/execution_engine_test.go @@ -46,13 +46,13 @@ func Test_NotifyForkchoiceUpdate_GetPayloadAttrErrorCanContinue(t *testing.T) { ojc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} ofc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - state, blkRoot, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 1, altairBlkRoot, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 1, altairBlkRoot, [32]byte{}, [32]byte{'A'}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 2, bellatrixBlkRoot, altairBlkRoot, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 2, bellatrixBlkRoot, altairBlkRoot, [32]byte{'B'}, [32]byte{'A'}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) @@ -104,13 +104,13 @@ func Test_NotifyForkchoiceUpdate(t *testing.T) { ojc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} ofc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - state, blkRoot, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 1, altairBlkRoot, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 1, altairBlkRoot, [32]byte{}, [32]byte{'A'}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 2, bellatrixBlkRoot, altairBlkRoot, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 2, bellatrixBlkRoot, altairBlkRoot, [32]byte{'B'}, [32]byte{'A'}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) @@ -287,16 +287,16 @@ func Test_NotifyForkchoiceUpdate_NIlLVH(t *testing.T) { require.NoError(t, fcs.UpdateJustifiedCheckpoint(ctx, &forkchoicetypes.Checkpoint{})) ojc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} ofc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - state, blkRoot, err := prepareForkchoiceState(ctx, 1, bra, [32]byte{}, [32]byte{'A'}, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, 1, bra, [32]byte{}, [32]byte{'A'}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 2, brb, bra, [32]byte{'B'}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 2, brb, bra, [32]byte{'B'}, [32]byte{'A'}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 3, brc, brb, [32]byte{'C'}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 3, brc, brb, [32]byte{'C'}, [32]byte{'B'}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 4, brd, brc, [32]byte{'D'}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 4, brd, brc, [32]byte{'D'}, [32]byte{'C'}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) @@ -316,10 +316,8 @@ func Test_NotifyForkchoiceUpdate_NIlLVH(t *testing.T) { headRoot: brd, } _, err = service.notifyForkchoiceUpdate(ctx, a) - require.Equal(t, true, IsInvalidBlock(err)) - require.Equal(t, brd, InvalidBlockRoot(err)) - require.Equal(t, brd, InvalidAncestorRoots(err)[0]) - require.Equal(t, 1, len(InvalidAncestorRoots(err))) + // The incoming block is not invalid because the empty node is still valid on ePBS. + require.Equal(t, false, IsInvalidBlock(err)) } // @@ -398,28 +396,28 @@ func Test_NotifyForkchoiceUpdateRecursive_DoublyLinkedTree(t *testing.T) { require.NoError(t, fcs.UpdateJustifiedCheckpoint(ctx, &forkchoicetypes.Checkpoint{})) ojc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} ofc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - state, blkRoot, err := prepareForkchoiceState(ctx, 1, bra, [32]byte{}, [32]byte{'A'}, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, 1, bra, [32]byte{}, [32]byte{'A'}, [32]byte{}, ojc, ofc) require.NoError(t, err) bState, _ := util.DeterministicGenesisState(t, 10) require.NoError(t, beaconDB.SaveState(ctx, bState, bra)) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 2, brb, bra, [32]byte{'B'}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 2, brb, bra, [32]byte{'B'}, [32]byte{'A'}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 3, brc, brb, [32]byte{'C'}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 3, brc, brb, [32]byte{'C'}, [32]byte{'B'}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 4, brd, brc, [32]byte{'D'}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 4, brd, brc, [32]byte{'D'}, [32]byte{'C'}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 5, bre, brb, [32]byte{'E'}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 5, bre, brb, [32]byte{'E'}, [32]byte{'D'}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 6, brf, bre, [32]byte{'F'}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 6, brf, bre, [32]byte{'F'}, [32]byte{'E'}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 7, brg, bre, [32]byte{'G'}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 7, brg, bre, [32]byte{'G'}, [32]byte{'F'}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) @@ -512,10 +510,10 @@ func Test_NotifyNewPayload(t *testing.T) { require.NoError(t, err) ojc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} ofc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - state, blkRoot, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 1, r, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 1, r, [32]byte{}, [32]byte{'A'}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) @@ -692,7 +690,7 @@ func Test_NotifyNewPayload(t *testing.T) { } service.cfg.ExecutionEngineCaller = e root := [32]byte{'a'} - state, blkRoot, err := prepareForkchoiceState(ctx, 0, root, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, 0, root, [32]byte{}, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) postVersion, postHeader, err := getStateVersionAndPayload(tt.postState) @@ -759,17 +757,17 @@ func Test_reportInvalidBlock(t *testing.T) { service, tr := minimalTestService(t) ctx, _, fcs := tr.ctx, tr.db, tr.fcs jcp := ðpb.Checkpoint{} - st, root, err := prepareForkchoiceState(ctx, 0, [32]byte{'A'}, [32]byte{}, [32]byte{'a'}, jcp, jcp) + st, root, err := prepareForkchoiceState(ctx, 0, [32]byte{'A'}, [32]byte{}, [32]byte{'a'}, [32]byte{}, jcp, jcp) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, root)) - st, root, err = prepareForkchoiceState(ctx, 1, [32]byte{'B'}, [32]byte{'A'}, [32]byte{'b'}, jcp, jcp) + st, root, err = prepareForkchoiceState(ctx, 1, [32]byte{'B'}, [32]byte{'A'}, [32]byte{'b'}, [32]byte{'a'}, jcp, jcp) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, root)) - st, root, err = prepareForkchoiceState(ctx, 2, [32]byte{'C'}, [32]byte{'B'}, [32]byte{'c'}, jcp, jcp) + st, root, err = prepareForkchoiceState(ctx, 2, [32]byte{'C'}, [32]byte{'B'}, [32]byte{'c'}, [32]byte{'b'}, jcp, jcp) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, root)) - st, root, err = prepareForkchoiceState(ctx, 3, [32]byte{'D'}, [32]byte{'C'}, [32]byte{'d'}, jcp, jcp) + st, root, err = prepareForkchoiceState(ctx, 3, [32]byte{'D'}, [32]byte{'C'}, [32]byte{'d'}, [32]byte{'c'}, jcp, jcp) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, root)) @@ -931,7 +929,7 @@ func Test_UpdateLastValidatedCheckpoint(t *testing.T) { fjc := &forkchoicetypes.Checkpoint{Epoch: 0, Root: params.BeaconConfig().ZeroHash} require.NoError(t, fcs.UpdateJustifiedCheckpoint(ctx, fjc)) require.NoError(t, fcs.UpdateFinalizedCheckpoint(fjc)) - state, blkRoot, err := prepareForkchoiceState(ctx, 0, genesisRoot, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, 0, genesisRoot, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) fcs.SetOriginRoot(genesisRoot) @@ -965,7 +963,7 @@ func Test_UpdateLastValidatedCheckpoint(t *testing.T) { require.NoError(t, beaconDB.SaveStateSummary(ctx, opStateSummary)) tenjc := ðpb.Checkpoint{Epoch: 10, Root: genesisRoot[:]} tenfc := ðpb.Checkpoint{Epoch: 10, Root: genesisRoot[:]} - state, blkRoot, err = prepareForkchoiceState(ctx, 320, opRoot, genesisRoot, params.BeaconConfig().ZeroHash, tenjc, tenfc) + state, blkRoot, err = prepareForkchoiceState(ctx, 320, opRoot, genesisRoot, params.BeaconConfig().ZeroHash, [32]byte{}, tenjc, tenfc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) assert.NoError(t, beaconDB.SaveGenesisBlockRoot(ctx, opRoot)) @@ -994,7 +992,7 @@ func Test_UpdateLastValidatedCheckpoint(t *testing.T) { require.NoError(t, beaconDB.SaveStateSummary(ctx, validSummary)) twentyjc := ðpb.Checkpoint{Epoch: 20, Root: validRoot[:]} twentyfc := ðpb.Checkpoint{Epoch: 20, Root: validRoot[:]} - state, blkRoot, err = prepareForkchoiceState(ctx, 640, validRoot, genesisRoot, params.BeaconConfig().ZeroHash, twentyjc, twentyfc) + state, blkRoot, err = prepareForkchoiceState(ctx, 640, validRoot, genesisRoot, params.BeaconConfig().ZeroHash, [32]byte{}, twentyjc, twentyfc) require.NoError(t, err) fcs.SetBalancesByRooter(func(_ context.Context, _ [32]byte) ([]uint64, error) { return []uint64{}, nil }) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) @@ -1056,8 +1054,8 @@ func TestService_removeInvalidBlockAndState(t *testing.T) { require.NoError(t, service.removeInvalidBlockAndState(ctx, [][32]byte{r1, r2})) - require.Equal(t, false, service.hasBlock(ctx, r1)) - require.Equal(t, false, service.hasBlock(ctx, r2)) + require.Equal(t, false, service.chainHasBlock(ctx, r1)) + require.Equal(t, false, service.chainHasBlock(ctx, r2)) require.Equal(t, false, service.cfg.BeaconDB.HasStateSummary(ctx, r1)) require.Equal(t, false, service.cfg.BeaconDB.HasStateSummary(ctx, r2)) has, err := service.cfg.StateGen.HasState(ctx, r1) diff --git a/beacon-chain/blockchain/forkchoice_update_execution_test.go b/beacon-chain/blockchain/forkchoice_update_execution_test.go index 459b785d2699..615617a1177a 100644 --- a/beacon-chain/blockchain/forkchoice_update_execution_test.go +++ b/beacon-chain/blockchain/forkchoice_update_execution_test.go @@ -122,13 +122,13 @@ func TestService_forkchoiceUpdateWithExecution_SameHeadRootNewProposer(t *testin ojc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} ofc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - state, blkRoot, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 1, altairBlkRoot, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 1, altairBlkRoot, [32]byte{}, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 2, bellatrixBlkRoot, altairBlkRoot, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 2, bellatrixBlkRoot, altairBlkRoot, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, state, blkRoot)) @@ -164,10 +164,10 @@ func TestShouldOverrideFCU(t *testing.T) { headRoot := [32]byte{'b'} parentRoot := [32]byte{'a'} ojc := ðpb.Checkpoint{} - st, root, err := prepareForkchoiceState(ctx, 1, parentRoot, [32]byte{}, [32]byte{}, ojc, ojc) + st, root, err := prepareForkchoiceState(ctx, 1, parentRoot, [32]byte{}, [32]byte{}, [32]byte{}, ojc, ojc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, root)) - st, root, err = prepareForkchoiceState(ctx, 2, headRoot, parentRoot, [32]byte{}, ojc, ojc) + st, root, err = prepareForkchoiceState(ctx, 2, headRoot, parentRoot, [32]byte{}, [32]byte{}, ojc, ojc) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, root)) diff --git a/beacon-chain/blockchain/head_test.go b/beacon-chain/blockchain/head_test.go index 4bdda69e9d43..eff897436cbb 100644 --- a/beacon-chain/blockchain/head_test.go +++ b/beacon-chain/blockchain/head_test.go @@ -48,7 +48,7 @@ func TestSaveHead_Different(t *testing.T) { require.NoError(t, err) ojc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} ofc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - state, blkRoot, err := prepareForkchoiceState(ctx, oldBlock.Block().Slot(), oldRoot, oldBlock.Block().ParentRoot(), [32]byte{}, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, oldBlock.Block().Slot(), oldRoot, oldBlock.Block().ParentRoot(), [32]byte{}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) service.head = &head{ @@ -63,11 +63,11 @@ func TestSaveHead_Different(t *testing.T) { wsb := util.SaveBlock(t, context.Background(), service.cfg.BeaconDB, newHeadSignedBlock) newRoot, err := newHeadBlock.HashTreeRoot() require.NoError(t, err) - state, blkRoot, err = prepareForkchoiceState(ctx, slots.PrevSlot(wsb.Block().Slot()), wsb.Block().ParentRoot(), service.cfg.ForkChoiceStore.CachedHeadRoot(), [32]byte{}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, slots.PrevSlot(wsb.Block().Slot()), wsb.Block().ParentRoot(), service.cfg.ForkChoiceStore.CachedHeadRoot(), [32]byte{}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, wsb.Block().Slot(), newRoot, wsb.Block().ParentRoot(), [32]byte{}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, wsb.Block().Slot(), newRoot, wsb.Block().ParentRoot(), [32]byte{}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) headState, err := util.NewBeaconState() @@ -101,7 +101,7 @@ func TestSaveHead_Different_Reorg(t *testing.T) { require.NoError(t, err) ojc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} ofc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - state, blkRoot, err := prepareForkchoiceState(ctx, oldBlock.Block().Slot(), oldRoot, oldBlock.Block().ParentRoot(), [32]byte{}, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, oldBlock.Block().Slot(), oldRoot, oldBlock.Block().ParentRoot(), [32]byte{}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) service.head = &head{ @@ -110,7 +110,7 @@ func TestSaveHead_Different_Reorg(t *testing.T) { } reorgChainParent := [32]byte{'B'} - state, blkRoot, err = prepareForkchoiceState(ctx, 0, reorgChainParent, oldRoot, oldBlock.Block().ParentRoot(), ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, 0, reorgChainParent, oldRoot, oldBlock.Block().ParentRoot(), [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) @@ -122,7 +122,7 @@ func TestSaveHead_Different_Reorg(t *testing.T) { wsb := util.SaveBlock(t, context.Background(), service.cfg.BeaconDB, newHeadSignedBlock) newRoot, err := newHeadBlock.HashTreeRoot() require.NoError(t, err) - state, blkRoot, err = prepareForkchoiceState(ctx, wsb.Block().Slot(), newRoot, wsb.Block().ParentRoot(), [32]byte{}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, wsb.Block().Slot(), newRoot, wsb.Block().ParentRoot(), [32]byte{}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) headState, err := util.NewBeaconState() @@ -238,11 +238,11 @@ func TestRetrieveHead_ReadOnly(t *testing.T) { wsb := util.SaveBlock(t, context.Background(), service.cfg.BeaconDB, newHeadSignedBlock) newRoot, err := newHeadBlock.HashTreeRoot() require.NoError(t, err) - state, blkRoot, err := prepareForkchoiceState(ctx, slots.PrevSlot(wsb.Block().Slot()), wsb.Block().ParentRoot(), service.cfg.ForkChoiceStore.CachedHeadRoot(), [32]byte{}, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, slots.PrevSlot(wsb.Block().Slot()), wsb.Block().ParentRoot(), service.cfg.ForkChoiceStore.CachedHeadRoot(), [32]byte{}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, wsb.Block().Slot(), newRoot, wsb.Block().ParentRoot(), [32]byte{}, ojc, ofc) + state, blkRoot, err = prepareForkchoiceState(ctx, wsb.Block().Slot(), newRoot, wsb.Block().ParentRoot(), [32]byte{}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) headState, err := util.NewBeaconState() @@ -304,7 +304,7 @@ func TestSaveOrphanedAtts(t *testing.T) { for _, blk := range []*ethpb.SignedBeaconBlock{blkG, blk1, blk2, blk3, blk4} { r, err := blk.Block.HashTreeRoot() require.NoError(t, err) - state, blkRoot, err := prepareForkchoiceState(ctx, blk.Block.Slot, r, bytesutil.ToBytes32(blk.Block.ParentRoot), [32]byte{}, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, blk.Block.Slot, r, bytesutil.ToBytes32(blk.Block.ParentRoot), [32]byte{}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) util.SaveBlock(t, ctx, beaconDB, blk) @@ -381,7 +381,7 @@ func TestSaveOrphanedOps(t *testing.T) { for _, blk := range []*ethpb.SignedBeaconBlock{blkG, blk1, blk2, blk3, blk4} { r, err := blk.Block.HashTreeRoot() require.NoError(t, err) - state, blkRoot, err := prepareForkchoiceState(ctx, blk.Block.Slot, r, bytesutil.ToBytes32(blk.Block.ParentRoot), [32]byte{}, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, blk.Block.Slot, r, bytesutil.ToBytes32(blk.Block.ParentRoot), [32]byte{}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) util.SaveBlock(t, ctx, beaconDB, blk) @@ -451,7 +451,7 @@ func TestSaveOrphanedAtts_CanFilter(t *testing.T) { for _, blk := range []*ethpb.SignedBeaconBlockCapella{blkG, blk1, blk2, blk4} { r, err := blk.Block.HashTreeRoot() require.NoError(t, err) - state, blkRoot, err := prepareForkchoiceState(ctx, blk.Block.Slot, r, bytesutil.ToBytes32(blk.Block.ParentRoot), [32]byte{}, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, blk.Block.Slot, r, bytesutil.ToBytes32(blk.Block.ParentRoot), [32]byte{}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) util.SaveBlock(t, ctx, beaconDB, blk) @@ -509,7 +509,7 @@ func TestSaveOrphanedAtts_DoublyLinkedTrie(t *testing.T) { for _, blk := range []*ethpb.SignedBeaconBlock{blkG, blk1, blk2, blk3, blk4} { r, err := blk.Block.HashTreeRoot() require.NoError(t, err) - state, blkRoot, err := prepareForkchoiceState(ctx, blk.Block.Slot, r, bytesutil.ToBytes32(blk.Block.ParentRoot), [32]byte{}, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, blk.Block.Slot, r, bytesutil.ToBytes32(blk.Block.ParentRoot), [32]byte{}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) util.SaveBlock(t, ctx, beaconDB, blk) @@ -568,7 +568,7 @@ func TestSaveOrphanedAtts_CanFilter_DoublyLinkedTrie(t *testing.T) { for _, blk := range []*ethpb.SignedBeaconBlock{blkG, blk1, blk2, blk4} { r, err := blk.Block.HashTreeRoot() require.NoError(t, err) - state, blkRoot, err := prepareForkchoiceState(ctx, blk.Block.Slot, r, bytesutil.ToBytes32(blk.Block.ParentRoot), [32]byte{}, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, blk.Block.Slot, r, bytesutil.ToBytes32(blk.Block.ParentRoot), [32]byte{}, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) util.SaveBlock(t, ctx, beaconDB, blk) @@ -583,7 +583,7 @@ func TestUpdateHead_noSavedChanges(t *testing.T) { ctx, beaconDB, fcs := tr.ctx, tr.db, tr.fcs ojp := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - st, blkRoot, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, [32]byte{}, ojp, ojp) + st, blkRoot, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, [32]byte{}, [32]byte{}, ojp, ojp) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, blkRoot)) @@ -603,7 +603,7 @@ func TestUpdateHead_noSavedChanges(t *testing.T) { headRoot := service.headRoot() require.Equal(t, [32]byte{}, headRoot) - st, blkRoot, err = prepareForkchoiceState(ctx, 0, bellatrixBlkRoot, [32]byte{}, [32]byte{}, fcp, fcp) + st, blkRoot, err = prepareForkchoiceState(ctx, 0, bellatrixBlkRoot, [32]byte{}, [32]byte{}, [32]byte{}, fcp, fcp) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, blkRoot)) fcs.SetBalancesByRooter(func(context.Context, [32]byte) ([]uint64, error) { return []uint64{1, 2}, nil }) diff --git a/beacon-chain/blockchain/log.go b/beacon-chain/blockchain/log.go index b8f4e0d94168..ac3d0bf0cdda 100644 --- a/beacon-chain/blockchain/log.go +++ b/beacon-chain/blockchain/log.go @@ -45,28 +45,44 @@ func logStateTransitionData(b interfaces.ReadOnlyBeaconBlock) error { } log = log.WithField("syncBitsCount", agg.SyncCommitteeBits.Count()) } - if b.Version() >= version.Bellatrix { - p, err := b.Body().Execution() + if b.Version() >= version.EPBS { + sh, err := b.Body().SignedExecutionPayloadHeader() if err != nil { return err } - log = log.WithField("payloadHash", fmt.Sprintf("%#x", bytesutil.Trunc(p.BlockHash()))) - txs, err := p.Transactions() - switch { - case errors.Is(err, consensus_types.ErrUnsupportedField): - case err != nil: + header, err := sh.Header() + if err != nil { return err - default: - log = log.WithField("txCount", len(txs)) - txsPerSlotCount.Set(float64(len(txs))) } - } - if b.Version() >= version.Deneb { - kzgs, err := b.Body().BlobKzgCommitments() - if err != nil { - log.WithError(err).Error("Failed to get blob KZG commitments") - } else if len(kzgs) > 0 { - log = log.WithField("kzgCommitmentCount", len(kzgs)) + log = log.WithFields(logrus.Fields{"payloadHash": fmt.Sprintf("%#x", header.BlockHash()), + "builderIndex": header.BuilderIndex(), + "value": header.Value(), + "blobKzgCommitmentsRoot": fmt.Sprintf("%#x", header.BlobKzgCommitmentsRoot()), + }) + } else { + if b.Version() >= version.Bellatrix { + p, err := b.Body().Execution() + if err != nil { + return err + } + log = log.WithField("payloadHash", fmt.Sprintf("%#x", bytesutil.Trunc(p.BlockHash()))) + txs, err := p.Transactions() + switch { + case errors.Is(err, consensus_types.ErrUnsupportedField): + case err != nil: + return err + default: + log = log.WithField("txCount", len(txs)) + txsPerSlotCount.Set(float64(len(txs))) + } + } + if b.Version() >= version.Deneb { + kzgs, err := b.Body().BlobKzgCommitments() + if err != nil { + log.WithError(err).Error("Failed to get blob KZG commitments") + } else if len(kzgs) > 0 { + log = log.WithField("kzgCommitmentCount", len(kzgs)) + } } } log.Info("Finished applying state transition") @@ -112,6 +128,9 @@ func logBlockSyncStatus(block interfaces.ReadOnlyBeaconBlock, blockRoot [32]byte // logs payload related data every slot. func logPayload(block interfaces.ReadOnlyBeaconBlock) error { + if block.Version() >= version.EPBS { + return nil + } isExecutionBlk, err := blocks.IsExecutionBlock(block.Body()) if err != nil { return errors.Wrap(err, "could not determine if block is execution block") diff --git a/beacon-chain/blockchain/metrics.go b/beacon-chain/blockchain/metrics.go index 8abcce3a2c52..551a48b8a4c4 100644 --- a/beacon-chain/blockchain/metrics.go +++ b/beacon-chain/blockchain/metrics.go @@ -182,6 +182,10 @@ var ( Name: "chain_service_processing_milliseconds", Help: "Total time to call a chain service in ReceiveBlock()", }) + executionEngineProcessingTime = promauto.NewSummary(prometheus.SummaryOpts{ + Name: "execution_engine_processing_milliseconds", + Help: "Total time to process an execution payload envelope in ReceiveExecutionPayloadEnvelope()", + }) dataAvailWaitedTime = promauto.NewSummary(prometheus.SummaryOpts{ Name: "da_waited_time_milliseconds", Help: "Total time spent waiting for a data availability check in ReceiveBlock()", diff --git a/beacon-chain/blockchain/options.go b/beacon-chain/blockchain/options.go index 38492502a1f9..8f09a68c4a2b 100644 --- a/beacon-chain/blockchain/options.go +++ b/beacon-chain/blockchain/options.go @@ -1,6 +1,8 @@ package blockchain import ( + "sync" + "github.com/prysmaticlabs/prysm/v5/async/event" "github.com/prysmaticlabs/prysm/v5/beacon-chain/cache" statefeed "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/feed/state" @@ -69,6 +71,22 @@ func WithDepositCache(c cache.DepositCache) Option { } } +// WithPayloadAttestationCache for payload attestation cache. +func WithPayloadAttestationCache(c *cache.PayloadAttestationCache) Option { + return func(s *Service) error { + s.cfg.PayloadAttestationCache = c + return nil + } +} + +// WithPayloadEnvelopeCache for payload envelope cache. +func WithPayloadEnvelopeCache(c *sync.Map) Option { + return func(s *Service) error { + s.cfg.PayloadEnvelopeCache = c + return nil + } +} + // WithPayloadIDCache for payload ID cache. func WithPayloadIDCache(c *cache.PayloadIDCache) Option { return func(s *Service) error { diff --git a/beacon-chain/blockchain/process_attestation.go b/beacon-chain/blockchain/process_attestation.go index 540a4ba40047..b303fd774842 100644 --- a/beacon-chain/blockchain/process_attestation.go +++ b/beacon-chain/blockchain/process_attestation.go @@ -97,7 +97,7 @@ func (s *Service) OnAttestation(ctx context.Context, a ethpb.Att, disparity time // We assume trusted attestation in this function has verified signature. // Update forkchoice store with the new attestation for updating weight. - s.cfg.ForkChoiceStore.ProcessAttestation(ctx, indexedAtt.GetAttestingIndices(), bytesutil.ToBytes32(a.GetData().BeaconBlockRoot), a.GetData().Target.Epoch) + s.cfg.ForkChoiceStore.ProcessAttestation(ctx, indexedAtt.GetAttestingIndices(), bytesutil.ToBytes32(a.GetData().BeaconBlockRoot), a.GetData().Slot) return nil } diff --git a/beacon-chain/blockchain/process_attestation_test.go b/beacon-chain/blockchain/process_attestation_test.go index bb1ea712ccfd..0832b2db6b12 100644 --- a/beacon-chain/blockchain/process_attestation_test.go +++ b/beacon-chain/blockchain/process_attestation_test.go @@ -32,7 +32,7 @@ func TestStore_OnAttestation_ErrorConditions(t *testing.T) { util.SaveBlock(t, ctx, beaconDB, blkWithoutState) cp := ðpb.Checkpoint{} - st, roblock, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, cp, cp) + st, roblock, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, params.BeaconConfig().ZeroHash, [32]byte{}, cp, cp) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) @@ -41,7 +41,7 @@ func TestStore_OnAttestation_ErrorConditions(t *testing.T) { r, err := blkWithStateBadAtt.Block.HashTreeRoot() require.NoError(t, err) cp = ðpb.Checkpoint{Root: r[:]} - st, roblock, err = prepareForkchoiceState(ctx, blkWithStateBadAtt.Block.Slot, r, [32]byte{}, params.BeaconConfig().ZeroHash, cp, cp) + st, roblock, err = prepareForkchoiceState(ctx, blkWithStateBadAtt.Block.Slot, r, [32]byte{}, params.BeaconConfig().ZeroHash, [32]byte{}, cp, cp) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) util.SaveBlock(t, ctx, beaconDB, blkWithStateBadAtt) @@ -139,7 +139,7 @@ func TestStore_OnAttestation_Ok_DoublyLinkedTree(t *testing.T) { require.NoError(t, service.cfg.BeaconDB.SaveState(ctx, copied, tRoot)) ojc := ðpb.Checkpoint{Epoch: 0, Root: tRoot[:]} ofc := ðpb.Checkpoint{Epoch: 0, Root: tRoot[:]} - state, roblock, err := prepareForkchoiceState(ctx, 0, tRoot, tRoot, params.BeaconConfig().ZeroHash, ojc, ofc) + state, roblock, err := prepareForkchoiceState(ctx, 0, tRoot, tRoot, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, roblock)) require.NoError(t, service.OnAttestation(ctx, att[0], 0)) @@ -170,7 +170,7 @@ func TestService_GetRecentPreState(t *testing.T) { err = s.SetFinalizedCheckpoint(cp0) require.NoError(t, err) - st, root, err := prepareForkchoiceState(ctx, 31, [32]byte(ckRoot), [32]byte{}, [32]byte{'R'}, cp0, cp0) + st, root, err := prepareForkchoiceState(ctx, 31, [32]byte(ckRoot), [32]byte{}, [32]byte{'R'}, [32]byte{}, cp0, cp0) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, root)) service.head = &head{ @@ -202,7 +202,7 @@ func TestService_GetAttPreState_Concurrency(t *testing.T) { require.NoError(t, service.cfg.BeaconDB.SaveState(ctx, s, bytesutil.ToBytes32([]byte{'A'}))) require.NoError(t, service.cfg.BeaconDB.SaveStateSummary(ctx, ðpb.StateSummary{Root: ckRoot})) - st, root, err := prepareForkchoiceState(ctx, 100, [32]byte(cp1.Root), [32]byte{}, [32]byte{'R'}, cp1, cp1) + st, root, err := prepareForkchoiceState(ctx, 100, [32]byte(cp1.Root), [32]byte{}, [32]byte{'R'}, [32]byte{}, cp1, cp1) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, root)) @@ -259,7 +259,7 @@ func TestStore_SaveCheckpointState(t *testing.T) { require.NoError(t, service.cfg.BeaconDB.SaveState(ctx, s, bytesutil.ToBytes32([]byte{'A'}))) require.NoError(t, service.cfg.BeaconDB.SaveStateSummary(ctx, ðpb.StateSummary{Root: bytesutil.PadTo([]byte{'A'}, fieldparams.RootLength)})) - st, root, err := prepareForkchoiceState(ctx, 1, [32]byte(cp1.Root), [32]byte{}, [32]byte{'R'}, cp1, cp1) + st, root, err := prepareForkchoiceState(ctx, 1, [32]byte(cp1.Root), [32]byte{}, [32]byte{'R'}, [32]byte{}, cp1, cp1) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, root)) s1, err := service.getAttPreState(ctx, cp1) @@ -273,7 +273,7 @@ func TestStore_SaveCheckpointState(t *testing.T) { _, err = service.getAttPreState(ctx, cp2) require.ErrorContains(t, "epoch 2 root 0x4200000000000000000000000000000000000000000000000000000000000000: not a checkpoint in forkchoice", err) - st, root, err = prepareForkchoiceState(ctx, 33, [32]byte(cp2.Root), [32]byte(cp1.Root), [32]byte{'R'}, cp2, cp2) + st, root, err = prepareForkchoiceState(ctx, 33, [32]byte(cp2.Root), [32]byte(cp1.Root), [32]byte{'R'}, [32]byte{}, cp2, cp2) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, root)) @@ -298,7 +298,7 @@ func TestStore_SaveCheckpointState(t *testing.T) { cp3 := ðpb.Checkpoint{Epoch: 1, Root: bytesutil.PadTo([]byte{'C'}, fieldparams.RootLength)} require.NoError(t, service.cfg.BeaconDB.SaveState(ctx, s, bytesutil.ToBytes32([]byte{'C'}))) require.NoError(t, service.cfg.BeaconDB.SaveStateSummary(ctx, ðpb.StateSummary{Root: bytesutil.PadTo([]byte{'C'}, fieldparams.RootLength)})) - st, root, err = prepareForkchoiceState(ctx, 31, [32]byte(cp3.Root), [32]byte(cp2.Root), [32]byte{'P'}, cp2, cp2) + st, root, err = prepareForkchoiceState(ctx, 31, [32]byte(cp3.Root), [32]byte(cp2.Root), [32]byte{'P'}, [32]byte{}, cp2, cp2) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, root)) @@ -318,7 +318,7 @@ func TestStore_UpdateCheckpointState(t *testing.T) { require.NoError(t, err) checkpoint := ðpb.Checkpoint{Epoch: epoch, Root: r1[:]} require.NoError(t, service.cfg.BeaconDB.SaveState(ctx, baseState, bytesutil.ToBytes32(checkpoint.Root))) - st, roblock, err := prepareForkchoiceState(ctx, blk.Block.Slot, r1, [32]byte{}, params.BeaconConfig().ZeroHash, checkpoint, checkpoint) + st, roblock, err := prepareForkchoiceState(ctx, blk.Block.Slot, r1, [32]byte{}, params.BeaconConfig().ZeroHash, [32]byte{}, checkpoint, checkpoint) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) returned, err := service.getAttPreState(ctx, checkpoint) @@ -336,7 +336,7 @@ func TestStore_UpdateCheckpointState(t *testing.T) { require.NoError(t, err) newCheckpoint := ðpb.Checkpoint{Epoch: epoch, Root: r2[:]} require.NoError(t, service.cfg.BeaconDB.SaveState(ctx, baseState, bytesutil.ToBytes32(newCheckpoint.Root))) - st, roblock, err = prepareForkchoiceState(ctx, blk.Block.Slot, r2, r1, params.BeaconConfig().ZeroHash, newCheckpoint, newCheckpoint) + st, roblock, err = prepareForkchoiceState(ctx, blk.Block.Slot, r2, r1, params.BeaconConfig().ZeroHash, [32]byte{}, newCheckpoint, newCheckpoint) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, roblock)) returned, err = service.getAttPreState(ctx, newCheckpoint) diff --git a/beacon-chain/blockchain/process_block.go b/beacon-chain/blockchain/process_block.go index 7a55c3f83fba..1935e8a2930a 100644 --- a/beacon-chain/blockchain/process_block.go +++ b/beacon-chain/blockchain/process_block.go @@ -67,7 +67,9 @@ func (s *Service) postBlockProcess(cfg *postBlockProcessConfig) error { fcuArgs := &fcuConfig{} if s.inRegularSync() { - defer s.handleSecondFCUCall(cfg, fcuArgs) + if cfg.roblock.Version() < version.EPBS { + defer s.handleSecondFCUCall(cfg, fcuArgs) + } } defer s.sendLightClientFeeds(cfg) defer s.sendStateFeedOnBlock(cfg) @@ -99,6 +101,18 @@ func (s *Service) postBlockProcess(cfg *postBlockProcessConfig) error { s.logNonCanonicalBlockReceived(cfg.roblock.Root(), cfg.headRoot) return nil } + if cfg.roblock.Version() >= version.EPBS { + if err := s.saveHead(ctx, cfg.headRoot, cfg.roblock, cfg.postState); err != nil { + log.WithError(err).Error("could not save head") + } + if err := s.pruneAttsFromPool(cfg.roblock); err != nil { + log.WithError(err).Error("could not prune attestations from pool") + } + + // update the NSC and handle epoch boundaries here since we do + // not send FCU at all + return s.updateCachesPostBlockProcessing(cfg) + } if err := s.getFCUArgs(cfg, fcuArgs); err != nil { log.WithError(err).Error("Could not get forkchoice update argument") return nil @@ -375,7 +389,7 @@ func (s *Service) handleBlockAttestations(ctx context.Context, blk interfaces.Re } r := bytesutil.ToBytes32(a.GetData().BeaconBlockRoot) if s.cfg.ForkChoiceStore.HasNode(r) { - s.cfg.ForkChoiceStore.ProcessAttestation(ctx, indices, r, a.GetData().Target.Epoch) + s.cfg.ForkChoiceStore.ProcessAttestation(ctx, indices, r, a.GetData().Slot) } else if err := s.cfg.AttPool.SaveBlockAttestation(a); err != nil { return err } @@ -478,9 +492,15 @@ func (s *Service) runLateBlockTasks() { attThreshold := params.BeaconConfig().SecondsPerSlot / 3 ticker := slots.NewSlotTickerWithOffset(s.genesisTime, time.Duration(attThreshold)*time.Second, params.BeaconConfig().SecondsPerSlot) + epbs := params.BeaconConfig().EPBSForkEpoch for { select { - case <-ticker.C(): + case slot := <-ticker.C(): + if slots.ToEpoch(slot) == epbs && slot%32 == 0 { + ticker.Done() + attThreshold := params.BeaconConfig().SecondsPerSlot / 4 + ticker = slots.NewSlotTickerWithOffset(s.genesisTime, time.Duration(attThreshold)*time.Second, params.BeaconConfig().SecondsPerSlot) + } s.lateBlockTasks(s.ctx) case <-s.ctx.Done(): log.Debug("Context closed, exiting routine") @@ -651,24 +671,36 @@ func (s *Service) lateBlockTasks(ctx context.Context) { return } - s.headLock.RLock() - headBlock, err := s.headBlock() - if err != nil { + if headState.Version() >= version.EPBS { + bh, err := headState.LatestBlockHash() + if err != nil { + log.WithError(err).Debug("could not perform late block tasks: failed to retrieve latest block hash") + return + } + _, err = s.notifyForkchoiceUpdateEPBS(ctx, [32]byte(bh), attribute) + if err != nil { + log.WithError(err).Debug("could not perform late block tasks: failed to update forkchoice with engine") + } + } else { + s.headLock.RLock() + headBlock, err := s.headBlock() + if err != nil { + s.headLock.RUnlock() + log.WithError(err).Debug("could not perform late block tasks: failed to retrieve head block") + return + } s.headLock.RUnlock() - log.WithError(err).Debug("could not perform late block tasks: failed to retrieve head block") - return - } - s.headLock.RUnlock() - fcuArgs := &fcuConfig{ - headState: headState, - headRoot: headRoot, - headBlock: headBlock, - attributes: attribute, - } - _, err = s.notifyForkchoiceUpdate(ctx, fcuArgs) - if err != nil { - log.WithError(err).Debug("could not perform late block tasks: failed to update forkchoice with engine") + fcuArgs := &fcuConfig{ + headState: headState, + headRoot: headRoot, + headBlock: headBlock, + attributes: attribute, + } + _, err = s.notifyForkchoiceUpdate(ctx, fcuArgs) + if err != nil { + log.WithError(err).Debug("could not perform late block tasks: failed to update forkchoice with engine") + } } } diff --git a/beacon-chain/blockchain/process_block_helpers.go b/beacon-chain/blockchain/process_block_helpers.go index fe01f582bfa5..2181145b4c68 100644 --- a/beacon-chain/blockchain/process_block_helpers.go +++ b/beacon-chain/blockchain/process_block_helpers.go @@ -6,6 +6,7 @@ import ( "time" lightclient "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/light-client" + "github.com/prysmaticlabs/prysm/v5/runtime/version" "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" @@ -304,7 +305,32 @@ func (s *Service) getBlockPreState(ctx context.Context, b interfaces.ReadOnlyBea return nil, err } - preState, err := s.cfg.StateGen.StateByRoot(ctx, b.ParentRoot()) + parentRoot := b.ParentRoot() + s.ForkChoicer().RLock() + parentSlot, err := s.ForkChoicer().Slot(parentRoot) + if err != nil { + return nil, err + } + parentIsEPBS := slots.ToEpoch(parentSlot) >= params.BeaconConfig().EPBSForkEpoch + s.ForkChoicer().RUnlock() + if parentIsEPBS && b.Version() >= version.EPBS { + s.ForkChoicer().RLock() + parentHash := s.ForkChoicer().HashForBlockRoot(parentRoot) + s.ForkChoicer().RUnlock() + signedBid, err := b.Body().SignedExecutionPayloadHeader() + if err != nil { + return nil, errors.Wrap(err, "could not get signed execution payload header") + } + bid, err := signedBid.Header() + if err != nil { + return nil, errors.Wrap(err, "could not get execution payload header") + } + if parentHash == bid.ParentBlockHash() { + // It's based on full, use the state by hash + parentRoot = parentHash + } + } + preState, err := s.cfg.StateGen.StateByRoot(ctx, parentRoot) if err != nil { return nil, errors.Wrapf(err, "could not get pre state for slot %d", b.Slot()) } diff --git a/beacon-chain/blockchain/process_block_test.go b/beacon-chain/blockchain/process_block_test.go index 053eb5fc4780..99314103044a 100644 --- a/beacon-chain/blockchain/process_block_test.go +++ b/beacon-chain/blockchain/process_block_test.go @@ -140,7 +140,7 @@ func TestFillForkChoiceMissingBlocks_CanSave(t *testing.T) { // the parent of the last block inserted is the tree node. fcp := ðpb.Checkpoint{Epoch: 0, Root: service.originBlockRoot[:]} r0 := bytesutil.ToBytes32(roots[0]) - state, blkRoot, err := prepareForkchoiceState(ctx, 0, r0, service.originBlockRoot, [32]byte{}, fcp, fcp) + state, blkRoot, err := prepareForkchoiceState(ctx, 0, r0, service.originBlockRoot, [32]byte{}, [32]byte{}, fcp, fcp) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) fcp2 := &forkchoicetypes.Checkpoint{Epoch: 0, Root: r0} @@ -182,7 +182,7 @@ func TestFillForkChoiceMissingBlocks_RootsMatch(t *testing.T) { // the parent of the last block inserted is the tree node. fcp := ðpb.Checkpoint{Epoch: 0, Root: service.originBlockRoot[:]} r0 := bytesutil.ToBytes32(roots[0]) - state, blkRoot, err := prepareForkchoiceState(ctx, 0, r0, service.originBlockRoot, [32]byte{}, fcp, fcp) + state, blkRoot, err := prepareForkchoiceState(ctx, 0, r0, service.originBlockRoot, [32]byte{}, [32]byte{}, fcp, fcp) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) fcp2 := &forkchoicetypes.Checkpoint{Epoch: 0, Root: r0} @@ -462,7 +462,7 @@ func TestAncestor_CanUseForkchoice(t *testing.T) { beaconBlock.Block.ParentRoot = bytesutil.PadTo(b.Block.ParentRoot, 32) r, err := b.Block.HashTreeRoot() require.NoError(t, err) - st, blkRoot, err := prepareForkchoiceState(context.Background(), b.Block.Slot, r, bytesutil.ToBytes32(b.Block.ParentRoot), params.BeaconConfig().ZeroHash, ojc, ofc) + st, blkRoot, err := prepareForkchoiceState(context.Background(), b.Block.Slot, r, bytesutil.ToBytes32(b.Block.ParentRoot), params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, blkRoot)) } @@ -502,7 +502,7 @@ func TestAncestor_CanUseDB(t *testing.T) { util.SaveBlock(t, context.Background(), beaconDB, beaconBlock) } - st, blkRoot, err := prepareForkchoiceState(context.Background(), 200, r200, r200, params.BeaconConfig().ZeroHash, ojc, ofc) + st, blkRoot, err := prepareForkchoiceState(context.Background(), 200, r200, r200, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, blkRoot)) @@ -1109,7 +1109,7 @@ func TestOnBlock_ProcessBlocksParallel(t *testing.T) { logHook := logTest.NewGlobal() for i := 0; i < 10; i++ { fc := ðpb.Checkpoint{} - st, blkRoot, err := prepareForkchoiceState(ctx, 0, wsb1.Block().ParentRoot(), [32]byte{}, [32]byte{}, fc, fc) + st, blkRoot, err := prepareForkchoiceState(ctx, 0, wsb1.Block().ParentRoot(), [32]byte{}, [32]byte{}, [32]byte{}, fc, fc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, st, blkRoot)) var wg sync.WaitGroup diff --git a/beacon-chain/blockchain/receive_attestation.go b/beacon-chain/blockchain/receive_attestation.go index e4776eae4d37..2c161a0e798a 100644 --- a/beacon-chain/blockchain/receive_attestation.go +++ b/beacon-chain/blockchain/receive_attestation.go @@ -10,6 +10,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" "github.com/prysmaticlabs/prysm/v5/config/params" + payloadattribute "github.com/prysmaticlabs/prysm/v5/consensus-types/payload-attribute" "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" "github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace" @@ -147,15 +148,35 @@ func (s *Service) UpdateHead(ctx context.Context, proposingSlot primitives.Slot) return } newAttHeadElapsedTime.Observe(float64(time.Since(start).Milliseconds())) + var attributes payloadattribute.Attributer + if s.inRegularSync() { + attributes = s.getPayloadAttribute(ctx, headState, proposingSlot, newHeadRoot[:]) + } + if headState.Version() >= version.EPBS { + bh, err := headState.LatestBlockHash() + if err != nil { + log.WithError(err).Error("could not get latest block hash") + return + } + _, err = s.notifyForkchoiceUpdateEPBS(ctx, [32]byte(bh), attributes) + if err != nil { + log.WithError(err).Error("could not notify forkchoice update") + } + if err := s.saveHead(ctx, newHeadRoot, headBlock, headState); err != nil { + log.WithError(err).Error("could not save head") + return + } + if err := s.pruneAttsFromPool(headBlock); err != nil { + log.WithError(err).Error("could not prune attestations from pool") + } + return + } fcuArgs := &fcuConfig{ headState: headState, headRoot: newHeadRoot, headBlock: headBlock, proposingSlot: proposingSlot, } - if s.inRegularSync() { - fcuArgs.attributes = s.getPayloadAttribute(ctx, headState, proposingSlot, newHeadRoot[:]) - } if fcuArgs.attributes != nil && s.shouldOverrideFCU(newHeadRoot, proposingSlot) { return } @@ -177,7 +198,7 @@ func (s *Service) processAttestations(ctx context.Context, disparity time.Durati } hasState := s.cfg.BeaconDB.HasStateSummary(ctx, bytesutil.ToBytes32(a.GetData().BeaconBlockRoot)) - hasBlock := s.hasBlock(ctx, bytesutil.ToBytes32(a.GetData().BeaconBlockRoot)) + hasBlock := s.chainHasBlock(ctx, bytesutil.ToBytes32(a.GetData().BeaconBlockRoot)) if !(hasState && hasBlock) { continue } diff --git a/beacon-chain/blockchain/receive_attestation_test.go b/beacon-chain/blockchain/receive_attestation_test.go index 6a905d67c770..8fdd706d61b7 100644 --- a/beacon-chain/blockchain/receive_attestation_test.go +++ b/beacon-chain/blockchain/receive_attestation_test.go @@ -43,11 +43,11 @@ func TestVerifyLMDFFGConsistent(t *testing.T) { f := service.cfg.ForkChoiceStore fc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - state, r32, err := prepareForkchoiceState(ctx, 32, [32]byte{'a'}, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, fc, fc) + state, r32, err := prepareForkchoiceState(ctx, 32, [32]byte{'a'}, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, [32]byte{}, fc, fc) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, r32)) - state, r33, err := prepareForkchoiceState(ctx, 33, [32]byte{'b'}, r32.Root(), params.BeaconConfig().ZeroHash, fc, fc) + state, r33, err := prepareForkchoiceState(ctx, 33, [32]byte{'b'}, r32.Root(), params.BeaconConfig().ZeroHash, [32]byte{}, fc, fc) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, r33)) @@ -83,7 +83,7 @@ func TestProcessAttestations_Ok(t *testing.T) { require.NoError(t, service.cfg.BeaconDB.SaveState(ctx, copied, tRoot)) ofc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} ojc := ðpb.Checkpoint{Root: params.BeaconConfig().ZeroHash[:]} - state, blkRoot, err := prepareForkchoiceState(ctx, 0, tRoot, tRoot, params.BeaconConfig().ZeroHash, ojc, ofc) + state, blkRoot, err := prepareForkchoiceState(ctx, 0, tRoot, tRoot, params.BeaconConfig().ZeroHash, [32]byte{}, ojc, ofc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) attsToSave := make([]ethpb.Att, len(atts)) @@ -147,7 +147,7 @@ func TestService_ProcessAttestationsAndUpdateHead(t *testing.T) { r, err := b.Block.HashTreeRoot() require.NoError(t, err) util.SaveBlock(t, ctx, service.cfg.BeaconDB, b) - state, blkRoot, err := prepareForkchoiceState(ctx, 2, r, service.originBlockRoot, [32]byte{'b'}, ojc, ojc) + state, blkRoot, err := prepareForkchoiceState(ctx, 2, r, service.originBlockRoot, [32]byte{'b'}, [32]byte{}, ojc, ojc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) require.Equal(t, 3, fcs.NodeCount()) @@ -196,7 +196,7 @@ func TestService_UpdateHead_NoAtts(t *testing.T) { r, err := b.Block.HashTreeRoot() require.NoError(t, err) util.SaveBlock(t, ctx, service.cfg.BeaconDB, b) - state, blkRoot, err := prepareForkchoiceState(ctx, 2, r, service.originBlockRoot, [32]byte{'b'}, ojc, ojc) + state, blkRoot, err := prepareForkchoiceState(ctx, 2, r, service.originBlockRoot, [32]byte{'b'}, [32]byte{}, ojc, ojc) require.NoError(t, err) require.NoError(t, service.cfg.ForkChoiceStore.InsertNode(ctx, state, blkRoot)) require.Equal(t, 3, fcs.NodeCount()) diff --git a/beacon-chain/blockchain/receive_block.go b/beacon-chain/blockchain/receive_block.go index ff8c4d9187e4..4a3a69ba1a8e 100644 --- a/beacon-chain/blockchain/receive_block.go +++ b/beacon-chain/blockchain/receive_block.go @@ -41,18 +41,30 @@ var epochsSinceFinalityExpandCache = primitives.Epoch(4) // BlockReceiver interface defines the methods of chain service for receiving and processing new blocks. type BlockReceiver interface { ReceiveBlock(ctx context.Context, block interfaces.ReadOnlySignedBeaconBlock, blockRoot [32]byte, avs das.AvailabilityStore) error + ReceiveExecutionPayloadEnvelope(ctx context.Context, env interfaces.ROSignedExecutionPayloadEnvelope, avs das.AvailabilityStore) error ReceiveBlockBatch(ctx context.Context, blocks []blocks.ROBlock, avs das.AvailabilityStore) error HasBlock(ctx context.Context, root [32]byte) bool RecentBlockSlot(root [32]byte) (primitives.Slot, error) BlockBeingSynced([32]byte) bool } +// PayloadAttestationReceiver defines methods of the chain service for receiving +// and processing new payload attestations and payload attestation messages +type PayloadAttestationReceiver interface { + ReceivePayloadAttestationMessage(ctx context.Context, a *ethpb.PayloadAttestationMessage) error +} + // BlobReceiver interface defines the methods of chain service for receiving new // blobs type BlobReceiver interface { ReceiveBlob(context.Context, blocks.VerifiedROBlob) error } +// ExecutionPayloadReceiver interface defines the methods of chain service for receiving `ROExecutionPayloadEnvelope`. +type ExecutionPayloadReceiver interface { + ReceiveExecutionPayloadEnvelope(ctx context.Context, envelope interfaces.ROSignedExecutionPayloadEnvelope, _ das.AvailabilityStore) error +} + // SlashingReceiver interface defines the methods of chain service for receiving validated slashing over the wire. type SlashingReceiver interface { ReceiveAttesterSlashing(ctx context.Context, slashing ethpb.AttSlashing) @@ -89,14 +101,30 @@ func (s *Service) ReceiveBlock(ctx context.Context, block interfaces.ReadOnlySig if err != nil { return err } - - postState, isValidPayload, err := s.validateExecutionAndConsensus(ctx, preState, roblock) - if err != nil { - return err - } - daWaitedTime, err := s.handleDA(ctx, blockCopy, blockRoot, avs) - if err != nil { - return err + var postState state.BeaconState + var isValidPayload bool + var daWaitedTime time.Duration + if blockCopy.Version() >= version.EPBS { + postState, err = s.validateStateTransition(ctx, preState, roblock) + if err != nil { + return errors.Wrap(err, "could not validate state transition") + } + optimistic, err := s.IsOptimisticForRoot(ctx, roblock.Block().ParentRoot()) + if err != nil { + return errors.Wrap(err, "could not check if parent is optimistic") + } + // if the parent is not optimistic then we can set the block as + // not optimistic. + isValidPayload = !optimistic + } else { + postState, isValidPayload, err = s.validateExecutionAndConsensus(ctx, preState, roblock) + if err != nil { + return err + } + daWaitedTime, err = s.handleDA(ctx, blockCopy, blockRoot, avs) + if err != nil { + return err + } } // Defragment the state before continuing block processing. s.defragmentState(postState) diff --git a/beacon-chain/blockchain/receive_execution_payload_envelope.go b/beacon-chain/blockchain/receive_execution_payload_envelope.go new file mode 100644 index 000000000000..5af704ffc21c --- /dev/null +++ b/beacon-chain/blockchain/receive_execution_payload_envelope.go @@ -0,0 +1,244 @@ +package blockchain + +import ( + "bytes" + "context" + "fmt" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/epbs" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/transition" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/das" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/execution" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + "github.com/sirupsen/logrus" + "go.opencensus.io/trace" + "golang.org/x/sync/errgroup" +) + +// ReceiveExecutionPayloadEnvelope is a function that defines the operations (minus pubsub) +// that are performed on a received execution payload envelope. The operations consist of: +// 1. Validate the payload, apply state transition. +// 2. Apply fork choice to the processed payload +// 3. Save latest head info +func (s *Service) ReceiveExecutionPayloadEnvelope(ctx context.Context, signed interfaces.ROSignedExecutionPayloadEnvelope, _ das.AvailabilityStore) error { + receivedTime := time.Now() + envelope, err := signed.Envelope() + if err != nil { + return err + } + root := envelope.BeaconBlockRoot() + s.payloadBeingSynced.set(envelope) + defer s.payloadBeingSynced.unset(root) + + preState, err := s.getPayloadEnvelopePrestate(ctx, envelope) + if err != nil { + return errors.Wrap(err, "could not get prestate") + } + log.WithField("slot", preState.Slot()).Info("receiving envelope with prestate slot") + + eg, _ := errgroup.WithContext(ctx) + eg.Go(func() error { + if err := epbs.ValidatePayloadStateTransition(ctx, preState, envelope); err != nil { + return errors.Wrap(err, "failed to validate consensus state transition function") + } + return nil + }) + var isValidPayload bool + eg.Go(func() error { + var err error + isValidPayload, err = s.validateExecutionOnEnvelope(ctx, envelope) + if err != nil { + return errors.Wrap(err, "could not notify the engine of the new payload") + } + return nil + }) + + if err := eg.Wait(); err != nil { + return err + } + daStartTime := time.Now() + // TODO: Add DA check + daWaitedTime := time.Since(daStartTime) + dataAvailWaitedTime.Observe(float64(daWaitedTime.Milliseconds())) + if err := s.savePostPayload(ctx, signed, preState); err != nil { + return err + } + if err := s.insertPayloadEnvelope(envelope); err != nil { + return errors.Wrap(err, "could not insert payload to forkchoice") + } + if isValidPayload { + s.ForkChoicer().Lock() + if err := s.ForkChoicer().SetOptimisticToValid(ctx, root); err != nil { + s.ForkChoicer().Unlock() + return errors.Wrap(err, "could not set optimistic payload to valid") + } + s.ForkChoicer().Unlock() + } + + headRoot, err := s.HeadRoot(ctx) + if err != nil { + log.WithError(err).Error("could not get headroot to compute attributes") + return nil + } + logWithFields := logrus.WithFields(logrus.Fields{ + "blockRoot": fmt.Sprintf("%#x", root), + "stateRoot": fmt.Sprintf("%#x", envelope.StateRoot()), + "builder": envelope.BuilderIndex(), + }) + if bytes.Equal(headRoot, root[:]) { + slot := envelope.Slot() + if slot == 0 { + slot = preState.Slot() + } + attr := s.getPayloadAttribute(ctx, preState, slot+1, headRoot) + execution, err := envelope.Execution() + if err != nil { + log.WithError(err).Error("could not get execution data") + return nil + } + blockHash := [32]byte(execution.BlockHash()) + payloadID, err := s.notifyForkchoiceUpdateEPBS(ctx, blockHash, attr) + if err != nil { + if IsInvalidBlock(err) { + // TODO handle the lvh here + return err + } + return nil + } + if attr != nil && !attr.IsEmpty() && payloadID != nil { + var pid [8]byte + copy(pid[:], payloadID[:]) + log.WithFields(logrus.Fields{ + "blockRoot": fmt.Sprintf("%#x", bytesutil.Trunc(headRoot)), + "headSlot": slot, + "payloadID": fmt.Sprintf("%#x", bytesutil.Trunc(payloadID[:])), + }).Info("Forkchoice updated with payload attributes for proposal") + s.cfg.PayloadIDCache.Set(slot+1, root, pid) + } + // simply update the headstate in head + s.headLock.Lock() + s.head.state = preState.Copy() + s.headLock.Unlock() + // update the NSC with the hash for the full block + if err := transition.UpdateNextSlotCache(ctx, blockHash[:], preState); err != nil { + log.WithError(err).Error("could not update next slot cache with payload") + } + logWithFields = logWithFields.WithFields(logrus.Fields{ + "blockHash": fmt.Sprintf("%#x", blockHash), + }) + } + timeWithoutDaWait := time.Since(receivedTime) - daWaitedTime + executionEngineProcessingTime.Observe(float64(timeWithoutDaWait.Milliseconds())) + logWithFields.Info("Successfully processed execution payload envelope") + return nil +} + +// notifyNewPayload signals execution engine on a new payload. +// It returns true if the EL has returned VALID for the block +func (s *Service) notifyNewEnvelope(ctx context.Context, envelope interfaces.ROExecutionPayloadEnvelope) (bool, error) { + ctx, span := trace.StartSpan(ctx, "blockChain.notifyNewPayload") + defer span.End() + + payload, err := envelope.Execution() + if err != nil { + return false, errors.Wrap(err, "could not get execution payload") + } + + versionedHashes := envelope.VersionedHashes() + root := envelope.BeaconBlockRoot() + parentRoot, err := s.ParentRoot(root) + if err != nil { + return false, errors.Wrap(err, "could not get parent block root") + } + pr := common.Hash(parentRoot) + requests := envelope.ExecutionRequests() + lastValidHash, err := s.cfg.ExecutionEngineCaller.NewPayload(ctx, payload, versionedHashes, &pr, requests) + switch { + case err == nil: + newPayloadValidNodeCount.Inc() + return true, nil + case errors.Is(err, execution.ErrAcceptedSyncingPayloadStatus): + newPayloadOptimisticNodeCount.Inc() + log.WithFields(logrus.Fields{ + "payloadBlockHash": fmt.Sprintf("%#x", bytesutil.Trunc(payload.BlockHash())), + }).Info("Called new payload with optimistic block") + return false, nil + case errors.Is(err, execution.ErrInvalidPayloadStatus): + lvh := bytesutil.ToBytes32(lastValidHash) + return false, invalidBlock{ + error: ErrInvalidPayload, + lastValidHash: lvh, + } + default: + return false, errors.WithMessage(ErrUndefinedExecutionEngineError, err.Error()) + } +} + +// validateExecutionOnEnvelope notifies the engine of the incoming execution payload and returns true if the payload is valid +func (s *Service) validateExecutionOnEnvelope(ctx context.Context, e interfaces.ROExecutionPayloadEnvelope) (bool, error) { + isValidPayload, err := s.notifyNewEnvelope(ctx, e) + if err == nil { + return isValidPayload, nil + } + blockRoot := e.BeaconBlockRoot() + parentRoot, rootErr := s.ParentRoot(blockRoot) + if rootErr != nil { + return false, errors.Wrap(rootErr, "could not get parent block root") + } + s.cfg.ForkChoiceStore.Lock() + err = s.handleInvalidExecutionError(ctx, err, blockRoot, parentRoot) + s.cfg.ForkChoiceStore.Unlock() + return false, err +} + +func (s *Service) getPayloadEnvelopePrestate(ctx context.Context, e interfaces.ROExecutionPayloadEnvelope) (state.BeaconState, error) { + ctx, span := trace.StartSpan(ctx, "blockChain.getPayloadEnvelopePreState") + defer span.End() + + // Verify incoming payload has a valid pre state. + root := e.BeaconBlockRoot() + // Verify the referred block is known to forkchoice + if !s.InForkchoice(root) { + return nil, errors.New("Cannot import execution payload envelope for unknown block") + } + if err := s.verifyBlkPreState(ctx, root); err != nil { + return nil, errors.Wrap(err, "could not verify payload prestate") + } + + preState, err := s.cfg.StateGen.StateByRoot(ctx, root) + if err != nil { + return nil, errors.Wrap(err, "could not get pre state") + } + if preState == nil || preState.IsNil() { + return nil, errors.Wrap(err, "nil pre state") + } + return preState, nil +} + +func (s *Service) savePostPayload(ctx context.Context, signed interfaces.ROSignedExecutionPayloadEnvelope, st state.BeaconState) error { + if err := s.cfg.BeaconDB.SaveBlindPayloadEnvelope(ctx, signed); err != nil { + return err + } + envelope, err := signed.Envelope() + if err != nil { + return err + } + execution, err := envelope.Execution() + if err != nil { + return err + } + r := envelope.BeaconBlockRoot() + if err := s.cfg.StateGen.SaveState(ctx, [32]byte(execution.BlockHash()), st); err != nil { + log.Warnf("Rolling back insertion of block with root %#x", r) + if err := s.cfg.BeaconDB.DeleteBlock(ctx, r); err != nil { + log.WithError(err).Errorf("Could not delete block with block root %#x", r) + } + return errors.Wrap(err, "could not save state") + } + return nil +} diff --git a/beacon-chain/blockchain/receive_execution_payload_envelope_test.go b/beacon-chain/blockchain/receive_execution_payload_envelope_test.go new file mode 100644 index 000000000000..cab1956202e6 --- /dev/null +++ b/beacon-chain/blockchain/receive_execution_payload_envelope_test.go @@ -0,0 +1,100 @@ +package blockchain + +import ( + "testing" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/cache" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/das" + mockExecution "github.com/prysmaticlabs/prysm/v5/beacon-chain/execution/testing" + forkchoicetypes "github.com/prysmaticlabs/prysm/v5/beacon-chain/forkchoice/types" + "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" +) + +func Test_getPayloadEnvelopePrestate(t *testing.T) { + service, tr := minimalTestService(t) + ctx, fcs := tr.ctx, tr.fcs + + gs, _ := util.DeterministicGenesisStateEpbs(t, 32) + require.NoError(t, service.saveGenesisData(ctx, gs)) + require.NoError(t, fcs.UpdateFinalizedCheckpoint(&forkchoicetypes.Checkpoint{Root: service.originBlockRoot})) + + p := random.ExecutionPayloadEnvelope(t) + p.BeaconBlockRoot = service.originBlockRoot[:] + e, err := blocks.WrappedROExecutionPayloadEnvelope(p) + require.NoError(t, err) + + _, err = service.getPayloadEnvelopePrestate(ctx, e) + require.NoError(t, err) +} + +func Test_notifyNewEnvelope(t *testing.T) { + service, tr := minimalTestService(t, WithPayloadIDCache(cache.NewPayloadIDCache())) + ctx, fcs := tr.ctx, tr.fcs + gs, _ := util.DeterministicGenesisStateEpbs(t, 32) + require.NoError(t, service.saveGenesisData(ctx, gs)) + require.NoError(t, fcs.UpdateFinalizedCheckpoint(&forkchoicetypes.Checkpoint{Root: service.originBlockRoot})) + p := random.ExecutionPayloadEnvelope(t) + p.BeaconBlockRoot = service.originBlockRoot[:] + e, err := blocks.WrappedROExecutionPayloadEnvelope(p) + require.NoError(t, err) + engine := &mockExecution.EngineClient{} + service.cfg.ExecutionEngineCaller = engine + isValidPayload, err := service.notifyNewEnvelope(ctx, e) + require.NoError(t, err) + require.Equal(t, true, isValidPayload) +} + +func Test_validateExecutionOnEnvelope(t *testing.T) { + service, tr := minimalTestService(t, WithPayloadIDCache(cache.NewPayloadIDCache())) + ctx, fcs := tr.ctx, tr.fcs + gs, _ := util.DeterministicGenesisStateEpbs(t, 32) + require.NoError(t, service.saveGenesisData(ctx, gs)) + require.NoError(t, fcs.UpdateFinalizedCheckpoint(&forkchoicetypes.Checkpoint{Root: service.originBlockRoot})) + p := random.ExecutionPayloadEnvelope(t) + p.BeaconBlockRoot = service.originBlockRoot[:] + e, err := blocks.WrappedROExecutionPayloadEnvelope(p) + require.NoError(t, err) + engine := &mockExecution.EngineClient{} + service.cfg.ExecutionEngineCaller = engine + isValidPayload, err := service.validateExecutionOnEnvelope(ctx, e) + require.NoError(t, err) + require.Equal(t, true, isValidPayload) +} + +func Test_ReceiveExecutionPayloadEnvelope(t *testing.T) { + service, tr := minimalTestService(t, WithPayloadIDCache(cache.NewPayloadIDCache())) + ctx, fcs := tr.ctx, tr.fcs + gs, _ := util.DeterministicGenesisStateEpbs(t, 32) + require.NoError(t, service.saveGenesisData(ctx, gs)) + require.NoError(t, fcs.UpdateFinalizedCheckpoint(&forkchoicetypes.Checkpoint{Root: service.originBlockRoot})) + post := gs.Copy() + p := &enginev1.ExecutionPayloadEnvelope{ + Payload: &enginev1.ExecutionPayloadElectra{ + ParentHash: make([]byte, 32), + BlockHash: make([]byte, 32), + }, + BeaconBlockRoot: service.originBlockRoot[:], + BlobKzgCommitments: make([][]byte, 0), + StateRoot: make([]byte, 32), + ExecutionRequests: &enginev1.ExecutionRequests{}, + } + e, err := blocks.WrappedROExecutionPayloadEnvelope(p) + require.NoError(t, err) + das := &das.MockAvailabilityStore{} + + blockHeader := post.LatestBlockHeader() + prevStateRoot, err := post.HashTreeRoot(ctx) + require.NoError(t, err) + blockHeader.StateRoot = prevStateRoot[:] + require.NoError(t, post.SetLatestBlockHeader(blockHeader)) + stRoot, err := post.HashTreeRoot(ctx) + require.NoError(t, err) + p.StateRoot = stRoot[:] + engine := &mockExecution.EngineClient{} + service.cfg.ExecutionEngineCaller = engine + require.NoError(t, service.ReceiveExecutionPayloadEnvelope(ctx, e, das)) +} diff --git a/beacon-chain/blockchain/receive_payload_attestation_message.go b/beacon-chain/blockchain/receive_payload_attestation_message.go new file mode 100644 index 000000000000..daf00b451126 --- /dev/null +++ b/beacon-chain/blockchain/receive_payload_attestation_message.go @@ -0,0 +1,33 @@ +package blockchain + +import ( + "context" + "slices" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" +) + +func (s *Service) ReceivePayloadAttestationMessage(ctx context.Context, a *eth.PayloadAttestationMessage) error { + if err := helpers.ValidateNilPayloadAttestationMessage(a); err != nil { + return err + } + root := [32]byte(a.Data.BeaconBlockRoot) + st, err := s.HeadStateReadOnly(ctx) + if err != nil { + return err + } + ptc, err := helpers.GetPayloadTimelinessCommittee(ctx, st, a.Data.Slot) + if err != nil { + return err + } + idx := slices.Index(ptc, a.ValidatorIndex) + if idx == -1 { + return errInvalidValidatorIndex + } + if s.cfg.PayloadAttestationCache.Seen(root, uint64(primitives.ValidatorIndex(idx))) { + return nil + } + return s.cfg.PayloadAttestationCache.Add(a, uint64(idx)) +} diff --git a/beacon-chain/blockchain/service.go b/beacon-chain/blockchain/service.go index c984a2f79750..ee592319ae3a 100644 --- a/beacon-chain/blockchain/service.go +++ b/beacon-chain/blockchain/service.go @@ -66,6 +66,7 @@ type Service struct { syncComplete chan struct{} blobNotifiers *blobNotifierMap blockBeingSynced *currentlySyncingBlock + payloadBeingSynced *currentlySyncingPayload blobStorage *filesystem.BlobStorage lastPublishedLightClientEpoch primitives.Epoch } @@ -76,6 +77,8 @@ type config struct { ChainStartFetcher execution.ChainStartFetcher BeaconDB db.HeadAccessDatabase DepositCache cache.DepositCache + PayloadAttestationCache *cache.PayloadAttestationCache + PayloadEnvelopeCache *sync.Map PayloadIDCache *cache.PayloadIDCache TrackedValidatorsCache *cache.TrackedValidatorsCache AttPool attestations.Pool @@ -180,6 +183,7 @@ func NewService(ctx context.Context, opts ...Option) (*Service, error) { blobNotifiers: bn, cfg: &config{}, blockBeingSynced: ¤tlySyncingBlock{roots: make(map[[32]byte]struct{})}, + payloadBeingSynced: ¤tlySyncingPayload{roots: make(map[[32]byte]primitives.PTCStatus)}, } for _, opt := range opts { if err := opt(srv); err != nil { @@ -555,7 +559,7 @@ func (s *Service) saveGenesisData(ctx context.Context, genesisState state.Beacon // 2.) Check DB. // Checking 1.) is ten times faster than checking 2.) // this function requires a lock in forkchoice -func (s *Service) hasBlock(ctx context.Context, root [32]byte) bool { +func (s *Service) chainHasBlock(ctx context.Context, root [32]byte) bool { if s.cfg.ForkChoiceStore.HasNode(root) { return true } diff --git a/beacon-chain/blockchain/service_test.go b/beacon-chain/blockchain/service_test.go index e511559ae5a4..2f255b6fc8a1 100644 --- a/beacon-chain/blockchain/service_test.go +++ b/beacon-chain/blockchain/service_test.go @@ -386,8 +386,8 @@ func TestHasBlock_ForkChoiceAndDB_DoublyLinkedTree(t *testing.T) { require.NoError(t, err) require.NoError(t, s.cfg.ForkChoiceStore.InsertNode(ctx, beaconState, roblock)) - assert.Equal(t, false, s.hasBlock(ctx, [32]byte{}), "Should not have block") - assert.Equal(t, true, s.hasBlock(ctx, r), "Should have block") + assert.Equal(t, false, s.chainHasBlock(ctx, [32]byte{}), "Should not have block") + assert.Equal(t, true, s.chainHasBlock(ctx, r), "Should have block") } func TestServiceStop_SaveCachedBlocks(t *testing.T) { diff --git a/beacon-chain/blockchain/testing/BUILD.bazel b/beacon-chain/blockchain/testing/BUILD.bazel index 600d086e34f5..90c1bfcb7073 100644 --- a/beacon-chain/blockchain/testing/BUILD.bazel +++ b/beacon-chain/blockchain/testing/BUILD.bazel @@ -3,7 +3,10 @@ load("@prysm//tools/go:def.bzl", "go_library") go_library( name = "go_default_library", testonly = True, - srcs = ["mock.go"], + srcs = [ + "mock.go", + "mock_epbs.go", + ], importpath = "github.com/prysmaticlabs/prysm/v5/beacon-chain/blockchain/testing", visibility = [ "//beacon-chain:__subpackages__", diff --git a/beacon-chain/blockchain/testing/mock.go b/beacon-chain/blockchain/testing/mock.go index 92edfa23a9a7..620213c095fe 100644 --- a/beacon-chain/blockchain/testing/mock.go +++ b/beacon-chain/blockchain/testing/mock.go @@ -37,44 +37,50 @@ var ErrNilState = errors.New("nil state") // ChainService defines the mock interface for testing type ChainService struct { - NotFinalized bool - Optimistic bool - ValidAttestation bool - ValidatorsRoot [32]byte - PublicKey [fieldparams.BLSPubkeyLength]byte - FinalizedCheckPoint *ethpb.Checkpoint - CurrentJustifiedCheckPoint *ethpb.Checkpoint - PreviousJustifiedCheckPoint *ethpb.Checkpoint - Slot *primitives.Slot // Pointer because 0 is a useful value, so checking against it can be incorrect. - Balance *precompute.Balance - CanonicalRoots map[[32]byte]bool - Fork *ethpb.Fork - ETH1Data *ethpb.Eth1Data - InitSyncBlockRoots map[[32]byte]bool - DB db.Database - State state.BeaconState - Block interfaces.ReadOnlySignedBeaconBlock - VerifyBlkDescendantErr error - stateNotifier statefeed.Notifier - BlocksReceived []interfaces.ReadOnlySignedBeaconBlock - SyncCommitteeIndices []primitives.CommitteeIndex - blockNotifier blockfeed.Notifier - opNotifier opfeed.Notifier - Root []byte - SyncCommitteeDomain []byte - SyncSelectionProofDomain []byte - SyncContributionProofDomain []byte - SyncCommitteePubkeys [][]byte - Genesis time.Time - ForkChoiceStore forkchoice.ForkChoicer - ReceiveBlockMockErr error - OptimisticCheckRootReceived [32]byte - FinalizedRoots map[[32]byte]bool - OptimisticRoots map[[32]byte]bool - BlockSlot primitives.Slot - SyncingRoot [32]byte - Blobs []blocks.VerifiedROBlob - TargetRoot [32]byte + NotFinalized bool + Optimistic bool + ValidAttestation bool + ValidatorsRoot [32]byte + PublicKey [fieldparams.BLSPubkeyLength]byte + FinalizedCheckPoint *ethpb.Checkpoint + CurrentJustifiedCheckPoint *ethpb.Checkpoint + PreviousJustifiedCheckPoint *ethpb.Checkpoint + Slot *primitives.Slot // Pointer because 0 is a useful value, so checking against it can be incorrect. + Balance *precompute.Balance + CanonicalRoots map[[32]byte]bool + Fork *ethpb.Fork + ETH1Data *ethpb.Eth1Data + InitSyncBlockRoots map[[32]byte]bool + DB db.Database + State state.BeaconState + Block interfaces.ReadOnlySignedBeaconBlock + ExecutionPayloadEnvelope interfaces.ROExecutionPayloadEnvelope + VerifyBlkDescendantErr error + stateNotifier statefeed.Notifier + BlocksReceived []interfaces.ReadOnlySignedBeaconBlock + SyncCommitteeIndices []primitives.CommitteeIndex + blockNotifier blockfeed.Notifier + opNotifier opfeed.Notifier + Root []byte + SyncCommitteeDomain []byte + SyncSelectionProofDomain []byte + SyncContributionProofDomain []byte + SyncCommitteePubkeys [][]byte + Genesis time.Time + ForkChoiceStore forkchoice.ForkChoicer + ReceiveBlockMockErr error + ReceiveEnvelopeMockErr error + OptimisticCheckRootReceived [32]byte + FinalizedRoots map[[32]byte]bool + OptimisticRoots map[[32]byte]bool + BlockSlot primitives.Slot + SyncingRoot [32]byte + Blobs []blocks.VerifiedROBlob + TargetRoot [32]byte + HighestReceivedSlot primitives.Slot + HighestReceivedRoot [32]byte + PayloadStatus primitives.PTCStatus + ReceivePayloadAttestationMessageErr error } func (s *ChainService) Ancestor(ctx context.Context, root []byte, slot primitives.Slot) ([]byte, error) { @@ -641,12 +647,12 @@ func (s *ChainService) ReceivedBlocksLastEpoch() (uint64, error) { return 0, nil } -// HighestReceivedBlockSlot mocks the same method in the chain service -func (s *ChainService) HighestReceivedBlockSlot() primitives.Slot { +// HighestReceivedBlockSlotRoot mocks the same method in the chain service +func (s *ChainService) HighestReceivedBlockSlotRoot() (primitives.Slot, [32]byte) { if s.ForkChoiceStore != nil { - return s.ForkChoiceStore.HighestReceivedBlockSlot() + return s.ForkChoiceStore.HighestReceivedBlockSlotRoot() } - return 0 + return s.HighestReceivedSlot, s.HighestReceivedRoot } // InsertNode mocks the same method in the chain service @@ -706,3 +712,17 @@ func (c *ChainService) ReceiveBlob(_ context.Context, b blocks.VerifiedROBlob) e func (c *ChainService) TargetRootForEpoch(_ [32]byte, _ primitives.Epoch) ([32]byte, error) { return c.TargetRoot, nil } + +// HashInForkchoice mocks the same method in the chain service +func (c *ChainService) HashInForkchoice([32]byte) bool { + return false +} + +// ReceivePayloadAttestationMessage mocks the same method in the chain service +func (c *ChainService) ReceivePayloadAttestationMessage(_ context.Context, _ *ethpb.PayloadAttestationMessage) error { + return c.ReceivePayloadAttestationMessageErr +} + +func (c *ChainService) GetPTCVote(root [32]byte) primitives.PTCStatus { + return c.PayloadStatus +} diff --git a/beacon-chain/blockchain/testing/mock_epbs.go b/beacon-chain/blockchain/testing/mock_epbs.go new file mode 100644 index 000000000000..04831a4e98c7 --- /dev/null +++ b/beacon-chain/blockchain/testing/mock_epbs.go @@ -0,0 +1,25 @@ +package testing + +import ( + "context" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/das" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" +) + +// ReceiveExecutionPayloadEnvelope mocks the method in chain service. +func (s *ChainService) ReceiveExecutionPayloadEnvelope(ctx context.Context, env interfaces.ROExecutionPayloadEnvelope, _ das.AvailabilityStore) error { + if s.ReceiveBlockMockErr != nil { + return s.ReceiveBlockMockErr + } + if s.State == nil { + return ErrNilState + } + if s.State.Slot() == env.Slot() { + if err := s.State.SetLatestFullSlot(s.State.Slot()); err != nil { + return err + } + } + s.ExecutionPayloadEnvelope = env + return nil +} diff --git a/beacon-chain/cache/BUILD.bazel b/beacon-chain/cache/BUILD.bazel index 3defcdfac58f..1c186487a67a 100644 --- a/beacon-chain/cache/BUILD.bazel +++ b/beacon-chain/cache/BUILD.bazel @@ -15,11 +15,13 @@ go_library( "doc.go", "error.go", "interfaces.go", + "payload_attestation.go", "payload_id.go", "proposer_indices.go", "proposer_indices_disabled.go", # keep "proposer_indices_type.go", "registration.go", + "signed_execution_header.go", "skip_slot_cache.go", "subnet_ids.go", "sync_committee.go", @@ -42,11 +44,13 @@ go_library( "//config/params:go_default_library", "//consensus-types/primitives:go_default_library", "//container/slice:go_default_library", + "//crypto/bls:go_default_library", "//crypto/hash:go_default_library", "//crypto/rand:go_default_library", "//encoding/bytesutil:go_default_library", "//math:go_default_library", "//monitoring/tracing/trace:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//runtime/version:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", @@ -70,10 +74,12 @@ go_test( "checkpoint_state_test.go", "committee_fuzz_test.go", "committee_test.go", + "payload_attestation_test.go", "payload_id_test.go", "private_access_test.go", "proposer_indices_test.go", "registration_test.go", + "signed_execution_header_test.go", "skip_slot_cache_test.go", "subnet_ids_test.go", "sync_committee_head_state_test.go", @@ -88,7 +94,9 @@ go_test( "//config/fieldparams:go_default_library", "//config/params:go_default_library", "//consensus-types/primitives:go_default_library", + "//crypto/bls:go_default_library", "//encoding/bytesutil:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//testing/assert:go_default_library", "//testing/require:go_default_library", diff --git a/beacon-chain/cache/payload_attestation.go b/beacon-chain/cache/payload_attestation.go new file mode 100644 index 000000000000..359b6b03871e --- /dev/null +++ b/beacon-chain/cache/payload_attestation.go @@ -0,0 +1,132 @@ +package cache + +import ( + "errors" + "sync" + + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" +) + +var errNilPayloadAttestationMessage = errors.New("nil Payload Attestation Message") + +// PayloadAttestationCache keeps a map of all the PTC votes that were seen, +// already aggregated. The key is the beacon block root. +type PayloadAttestationCache struct { + root [32]byte + attestations [primitives.PAYLOAD_INVALID_STATUS]*eth.PayloadAttestation + sync.Mutex +} + +// Seen returns true if a vote for the given Beacon Block Root has already been processed +// for this Payload Timeliness Committee index. This will return true even if +// the Payload status differs. +func (p *PayloadAttestationCache) Seen(root [32]byte, idx uint64) bool { + p.Lock() + defer p.Unlock() + if p.root != root { + return false + } + for _, agg := range p.attestations { + if agg == nil { + continue + } + if agg.AggregationBits.BitAt(idx) { + return true + } + } + return false +} + +// messageToPayloadAttestation creates a PayloadAttestation with a single +// aggregated bit from the passed PayloadAttestationMessage +func messageToPayloadAttestation(att *eth.PayloadAttestationMessage, idx uint64) *eth.PayloadAttestation { + bits := primitives.NewPayloadAttestationAggregationBits() + bits.SetBitAt(idx, true) + data := ð.PayloadAttestationData{ + BeaconBlockRoot: bytesutil.SafeCopyBytes(att.Data.BeaconBlockRoot), + Slot: att.Data.Slot, + PayloadStatus: att.Data.PayloadStatus, + } + return ð.PayloadAttestation{ + AggregationBits: bits, + Data: data, + Signature: bytesutil.SafeCopyBytes(att.Signature), + } +} + +// aggregateSigFromMessage returns the aggregated signature from a Payload +// Attestation by adding the passed signature in the PayloadAttestationMessage, +// no signature validation is performed. +func aggregateSigFromMessage(aggregated *eth.PayloadAttestation, message *eth.PayloadAttestationMessage) ([]byte, error) { + aggSig, err := bls.SignatureFromBytesNoValidation(aggregated.Signature) + if err != nil { + return nil, err + } + sig, err := bls.SignatureFromBytesNoValidation(message.Signature) + if err != nil { + return nil, err + } + return bls.AggregateSignatures([]bls.Signature{aggSig, sig}).Marshal(), nil +} + +// Add adds a PayloadAttestationMessage to the internal cache of aggregated +// PayloadAttestations. +// If the index has already been seen for this attestation status the function does nothing. +// If the root is not the cached root, the function will clear the previous cache +// This function assumes that the message has already been validated. In +// particular that the signature is valid and that the block root corresponds to +// the given slot in the attestation data. +func (p *PayloadAttestationCache) Add(att *eth.PayloadAttestationMessage, idx uint64) error { + if att == nil || att.Data == nil || att.Data.BeaconBlockRoot == nil { + return errNilPayloadAttestationMessage + } + p.Lock() + defer p.Unlock() + root := [32]byte(att.Data.BeaconBlockRoot) + if p.root != root { + p.root = root + p.attestations = [primitives.PAYLOAD_INVALID_STATUS]*eth.PayloadAttestation{} + } + agg := p.attestations[att.Data.PayloadStatus] + if agg == nil { + p.attestations[att.Data.PayloadStatus] = messageToPayloadAttestation(att, idx) + return nil + } + if agg.AggregationBits.BitAt(idx) { + return nil + } + sig, err := aggregateSigFromMessage(agg, att) + if err != nil { + return err + } + agg.Signature = sig + agg.AggregationBits.SetBitAt(idx, true) + return nil +} + +// Get returns the aggregated PayloadAttestation for the given root and status +// if the root doesn't exist or status is invalid, the function returns nil. +func (p *PayloadAttestationCache) Get(root [32]byte, status primitives.PTCStatus) *eth.PayloadAttestation { + p.Lock() + defer p.Unlock() + + if p.root != root { + return nil + } + if status >= primitives.PAYLOAD_INVALID_STATUS { + return nil + } + + return eth.CopyPayloadAttestation(p.attestations[status]) +} + +// Clear clears the internal map +func (p *PayloadAttestationCache) Clear() { + p.Lock() + defer p.Unlock() + p.root = [32]byte{} + p.attestations = [primitives.PAYLOAD_INVALID_STATUS]*eth.PayloadAttestation{} +} diff --git a/beacon-chain/cache/payload_attestation_test.go b/beacon-chain/cache/payload_attestation_test.go new file mode 100644 index 000000000000..1bb7067c9adf --- /dev/null +++ b/beacon-chain/cache/payload_attestation_test.go @@ -0,0 +1,143 @@ +package cache + +import ( + "testing" + + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" +) + +func TestPayloadAttestationCache(t *testing.T) { + p := &PayloadAttestationCache{} + + //Test Has seen + root := [32]byte{'r'} + idx := uint64(5) + require.Equal(t, false, p.Seen(root, idx)) + + // Test Add + msg := ð.PayloadAttestationMessage{ + Signature: bls.NewAggregateSignature().Marshal(), + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: root[:], + Slot: 1, + PayloadStatus: primitives.PAYLOAD_PRESENT, + }, + } + + // Add new root + require.NoError(t, p.Add(msg, idx)) + require.Equal(t, true, p.Seen(root, idx)) + require.Equal(t, root, p.root) + att := p.attestations[primitives.PAYLOAD_PRESENT] + indices := att.AggregationBits.BitIndices() + require.DeepEqual(t, []int{int(idx)}, indices) + singleSig := bytesutil.SafeCopyBytes(msg.Signature) + require.DeepEqual(t, singleSig, att.Signature) + + // Test Seen + require.Equal(t, true, p.Seen(root, idx)) + require.Equal(t, false, p.Seen(root, idx+1)) + + // Add another attestation on the same data + msg2 := ð.PayloadAttestationMessage{ + Signature: bls.NewAggregateSignature().Marshal(), + Data: att.Data, + } + idx2 := uint64(7) + require.NoError(t, p.Add(msg2, idx2)) + att = p.attestations[primitives.PAYLOAD_PRESENT] + indices = att.AggregationBits.BitIndices() + require.DeepEqual(t, []int{int(idx), int(idx2)}, indices) + require.DeepNotEqual(t, att.Signature, msg.Signature) + + // Try again the same index + require.NoError(t, p.Add(msg2, idx2)) + att2 := p.attestations[primitives.PAYLOAD_PRESENT] + indices = att.AggregationBits.BitIndices() + require.DeepEqual(t, []int{int(idx), int(idx2)}, indices) + require.DeepEqual(t, att, att2) + + // Test Seen + require.Equal(t, true, p.Seen(root, idx2)) + require.Equal(t, false, p.Seen(root, idx2+1)) + + // Add another payload status for a different payload status + msg3 := ð.PayloadAttestationMessage{ + Signature: bls.NewAggregateSignature().Marshal(), + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: root[:], + Slot: 1, + PayloadStatus: primitives.PAYLOAD_WITHHELD, + }, + } + idx3 := uint64(17) + + require.NoError(t, p.Add(msg3, idx3)) + att3 := p.attestations[primitives.PAYLOAD_WITHHELD] + indices3 := att3.AggregationBits.BitIndices() + require.DeepEqual(t, []int{int(idx3)}, indices3) + require.DeepEqual(t, singleSig, att3.Signature) + + // Add a different root + root2 := [32]byte{'s'} + msg.Data.BeaconBlockRoot = root2[:] + require.NoError(t, p.Add(msg, idx)) + require.Equal(t, root2, p.root) + require.Equal(t, true, p.Seen(root2, idx)) + require.Equal(t, false, p.Seen(root, idx)) + att = p.attestations[primitives.PAYLOAD_PRESENT] + indices = att.AggregationBits.BitIndices() + require.DeepEqual(t, []int{int(idx)}, indices) +} + +func TestPayloadAttestationCache_Get(t *testing.T) { + root := [32]byte{1, 2, 3} + wrongRoot := [32]byte{4, 5, 6} + status := primitives.PAYLOAD_PRESENT + invalidStatus := primitives.PAYLOAD_INVALID_STATUS + + cache := &PayloadAttestationCache{ + root: root, + attestations: [primitives.PAYLOAD_INVALID_STATUS]*eth.PayloadAttestation{ + { + Signature: []byte{1}, + }, + { + Signature: []byte{2}, + }, + { + Signature: []byte{3}, + }, + }, + } + + t.Run("valid root and status", func(t *testing.T) { + result := cache.Get(root, status) + require.NotNil(t, result, "Expected a non-nil result") + require.DeepEqual(t, cache.attestations[status], result) + }) + + t.Run("invalid root", func(t *testing.T) { + result := cache.Get(wrongRoot, status) + require.IsNil(t, result) + }) + + t.Run("status out of bound", func(t *testing.T) { + result := cache.Get(root, invalidStatus) + require.IsNil(t, result) + }) + + t.Run("no attestation", func(t *testing.T) { + emptyCache := &PayloadAttestationCache{ + root: root, + attestations: [primitives.PAYLOAD_INVALID_STATUS]*eth.PayloadAttestation{}, + } + + result := emptyCache.Get(root, status) + require.IsNil(t, result) + }) +} diff --git a/beacon-chain/cache/signed_execution_header.go b/beacon-chain/cache/signed_execution_header.go new file mode 100644 index 000000000000..921ab15a09c9 --- /dev/null +++ b/beacon-chain/cache/signed_execution_header.go @@ -0,0 +1,76 @@ +package cache + +import ( + "bytes" + "sync" + + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" +) + +// ExecutionPayloadHeaders is used by the sync service to store signed execution payload headers after they pass validation, +// and filter out subsequent headers with lower value. +// The signed header from this cache could be used by the proposer when proposing the next slot. +type ExecutionPayloadHeaders struct { + headers map[primitives.Slot][]*enginev1.SignedExecutionPayloadHeader + sync.RWMutex +} + +func NewExecutionPayloadHeaders() *ExecutionPayloadHeaders { + return &ExecutionPayloadHeaders{ + headers: make(map[primitives.Slot][]*enginev1.SignedExecutionPayloadHeader), + } +} + +// SaveSignedExecutionPayloadHeader saves the signed execution payload header to the cache. +// The cache stores headers for up to two slots. If the input slot is higher than the lowest slot +// currently in the cache, the lowest slot is removed to make space for the new header. +// Only the highest value header for a given parent block hash will be stored. +// This function assumes caller already checks header's slot is current or next slot, it doesn't account for slot validation. +func (c *ExecutionPayloadHeaders) SaveSignedExecutionPayloadHeader(header *enginev1.SignedExecutionPayloadHeader) { + c.Lock() + defer c.Unlock() + + for s := range c.headers { + if s+1 < header.Message.Slot { + delete(c.headers, s) + } + } + + // Add or update the header in the map + if _, ok := c.headers[header.Message.Slot]; !ok { + c.headers[header.Message.Slot] = []*enginev1.SignedExecutionPayloadHeader{header} + } else { + found := false + for i, h := range c.headers[header.Message.Slot] { + if bytes.Equal(h.Message.ParentBlockHash, header.Message.ParentBlockHash) && bytes.Equal(h.Message.ParentBlockRoot, header.Message.ParentBlockRoot) { + if header.Message.Value > h.Message.Value { + c.headers[header.Message.Slot][i] = header + } + found = true + break + } + } + if !found { + c.headers[header.Message.Slot] = append(c.headers[header.Message.Slot], header) + } + } +} + +// SignedExecutionPayloadHeader returns the signed payload header for the given slot and parent block hash and block root. +// Returns nil if the header is not found. +// This should be used when the caller wants the header to match parent block hash and parent block root such as proposer choosing a header to propose. +func (c *ExecutionPayloadHeaders) SignedExecutionPayloadHeader(slot primitives.Slot, parentBlockHash []byte, parentBlockRoot []byte) *enginev1.SignedExecutionPayloadHeader { + c.RLock() + defer c.RUnlock() + + if headers, ok := c.headers[slot]; ok { + for _, header := range headers { + if bytes.Equal(header.Message.ParentBlockHash, parentBlockHash) && bytes.Equal(header.Message.ParentBlockRoot, parentBlockRoot) { + return header + } + } + } + + return nil +} diff --git a/beacon-chain/cache/signed_execution_header_test.go b/beacon-chain/cache/signed_execution_header_test.go new file mode 100644 index 000000000000..9a65eba7bcb2 --- /dev/null +++ b/beacon-chain/cache/signed_execution_header_test.go @@ -0,0 +1,243 @@ +package cache + +import ( + "testing" + + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + "github.com/prysmaticlabs/prysm/v5/testing/require" +) + +func Test_SaveSignedExecutionPayloadHeader(t *testing.T) { + t.Run("First header should be added to cache", func(t *testing.T) { + c := NewExecutionPayloadHeaders() + header := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 1, + ParentBlockHash: []byte("parent1"), + Value: 100, + }, + } + c.SaveSignedExecutionPayloadHeader(header) + require.Equal(t, 1, len(c.headers)) + require.Equal(t, header, c.headers[1][0]) + }) + + t.Run("Second header with higher slot should be added, and both slots should be in cache", func(t *testing.T) { + c := NewExecutionPayloadHeaders() + header1 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 1, + ParentBlockHash: []byte("parent1"), + Value: 100, + }, + } + header2 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 2, + ParentBlockHash: []byte("parent2"), + Value: 100, + }, + } + c.SaveSignedExecutionPayloadHeader(header1) + c.SaveSignedExecutionPayloadHeader(header2) + require.Equal(t, 2, len(c.headers)) + require.Equal(t, header1, c.headers[1][0]) + require.Equal(t, header2, c.headers[2][0]) + }) + + t.Run("Third header with higher slot should replace the oldest slot", func(t *testing.T) { + c := NewExecutionPayloadHeaders() + header1 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 1, + ParentBlockHash: []byte("parent1"), + Value: 100, + }, + } + header2 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 2, + ParentBlockHash: []byte("parent2"), + Value: 100, + }, + } + header3 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 3, + ParentBlockHash: []byte("parent3"), + Value: 100, + }, + } + c.SaveSignedExecutionPayloadHeader(header1) + c.SaveSignedExecutionPayloadHeader(header2) + c.SaveSignedExecutionPayloadHeader(header3) + require.Equal(t, 2, len(c.headers)) + require.Equal(t, header2, c.headers[2][0]) + require.Equal(t, header3, c.headers[3][0]) + }) + + t.Run("Header with same slot but higher value should replace the existing one", func(t *testing.T) { + c := NewExecutionPayloadHeaders() + header1 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 2, + ParentBlockHash: []byte("parent2"), + Value: 100, + }, + } + header2 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 2, + ParentBlockHash: []byte("parent2"), + Value: 200, + }, + } + c.SaveSignedExecutionPayloadHeader(header1) + c.SaveSignedExecutionPayloadHeader(header2) + require.Equal(t, 1, len(c.headers[2])) + require.Equal(t, header2, c.headers[2][0]) + }) + + t.Run("Header with different parent block hash should be appended to the same slot", func(t *testing.T) { + c := NewExecutionPayloadHeaders() + header1 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 2, + ParentBlockHash: []byte("parent1"), + Value: 100, + }, + } + header2 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 2, + ParentBlockHash: []byte("parent2"), + Value: 200, + }, + } + c.SaveSignedExecutionPayloadHeader(header1) + c.SaveSignedExecutionPayloadHeader(header2) + require.Equal(t, 2, len(c.headers[2])) + require.Equal(t, header1, c.headers[2][0]) + require.Equal(t, header2, c.headers[2][1]) + }) +} + +func TestSignedExecutionPayloadHeader(t *testing.T) { + t.Run("Return header when slot and parentBlockHash match", func(t *testing.T) { + c := NewExecutionPayloadHeaders() + header := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 1, + ParentBlockHash: []byte("parent1"), + ParentBlockRoot: []byte("root1"), + Value: 100, + }, + } + c.SaveSignedExecutionPayloadHeader(header) + result := c.SignedExecutionPayloadHeader(1, []byte("parent1"), []byte("root1")) + require.NotNil(t, result) + require.Equal(t, header, result) + }) + + t.Run("Return nil when no matching slot and parentBlockHash", func(t *testing.T) { + c := NewExecutionPayloadHeaders() + header := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 1, + ParentBlockHash: []byte("parent1"), + ParentBlockRoot: []byte("root1"), + Value: 100, + }, + } + c.SaveSignedExecutionPayloadHeader(header) + result := c.SignedExecutionPayloadHeader(2, []byte("parent2"), []byte("root1")) + require.IsNil(t, result) + }) + + t.Run("Return nil when no matching slot and parentBlockRoot", func(t *testing.T) { + c := NewExecutionPayloadHeaders() + header := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 1, + ParentBlockHash: []byte("parent1"), + ParentBlockRoot: []byte("root1"), + Value: 100, + }, + } + c.SaveSignedExecutionPayloadHeader(header) + result := c.SignedExecutionPayloadHeader(2, []byte("parent1"), []byte("root2")) + require.IsNil(t, result) + }) + + t.Run("Return header when there are two slots in the cache and a match is found", func(t *testing.T) { + c := NewExecutionPayloadHeaders() + header1 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 1, + ParentBlockHash: []byte("parent1"), + Value: 100, + }, + } + header2 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 2, + ParentBlockHash: []byte("parent2"), + Value: 200, + }, + } + c.SaveSignedExecutionPayloadHeader(header1) + c.SaveSignedExecutionPayloadHeader(header2) + + // Check for the first header + result1 := c.SignedExecutionPayloadHeader(1, []byte("parent1"), []byte{}) + require.NotNil(t, result1) + require.Equal(t, header1, result1) + + // Check for the second header + result2 := c.SignedExecutionPayloadHeader(2, []byte("parent2"), []byte{}) + require.NotNil(t, result2) + require.Equal(t, header2, result2) + }) + + t.Run("Return nil when slot is evicted from cache", func(t *testing.T) { + c := NewExecutionPayloadHeaders() + header1 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 1, + ParentBlockHash: []byte("parent1"), + Value: 100, + }, + } + header2 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 2, + ParentBlockHash: []byte("parent2"), + Value: 200, + }, + } + header3 := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 3, + ParentBlockHash: []byte("parent3"), + Value: 300, + }, + } + c.SaveSignedExecutionPayloadHeader(header1) + c.SaveSignedExecutionPayloadHeader(header2) + c.SaveSignedExecutionPayloadHeader(header3) + + // The first slot should be evicted, so result should be nil + result := c.SignedExecutionPayloadHeader(1, []byte("parent1"), []byte{}) + require.IsNil(t, result) + + // The second slot should still be present + result = c.SignedExecutionPayloadHeader(2, []byte("parent2"), []byte{}) + require.NotNil(t, result) + require.Equal(t, header2, result) + + // The third slot should be present + result = c.SignedExecutionPayloadHeader(3, []byte("parent3"), []byte{}) + require.NotNil(t, result) + require.Equal(t, header3, result) + }) +} diff --git a/beacon-chain/core/blocks/BUILD.bazel b/beacon-chain/core/blocks/BUILD.bazel index 64d5861acd63..d98b1acf5b7f 100644 --- a/beacon-chain/core/blocks/BUILD.bazel +++ b/beacon-chain/core/blocks/BUILD.bazel @@ -107,6 +107,7 @@ go_test( "//testing/assert:go_default_library", "//testing/require:go_default_library", "//testing/util:go_default_library", + "//testing/util/random:go_default_library", "//time/slots:go_default_library", "@com_github_google_gofuzz//:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", diff --git a/beacon-chain/core/blocks/genesis.go b/beacon-chain/core/blocks/genesis.go index d3d687faa534..03e4f3072e2a 100644 --- a/beacon-chain/core/blocks/genesis.go +++ b/beacon-chain/core/blocks/genesis.go @@ -12,6 +12,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + "github.com/prysmaticlabs/prysm/v5/encoding/ssz" enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" ) @@ -222,6 +223,42 @@ func NewGenesisBlockForState(ctx context.Context, st state.BeaconState) (interfa }, Signature: params.BeaconConfig().EmptySignature[:], }) + case *ethpb.BeaconStateEPBS: + kzgs := make([][]byte, 0) + kzgRoot, err := ssz.KzgCommitmentsRoot(kzgs) + if err != nil { + return nil, err + } + return blocks.NewSignedBeaconBlock(ðpb.SignedBeaconBlockEpbs{ + Block: ðpb.BeaconBlockEpbs{ + ParentRoot: params.BeaconConfig().ZeroHash[:], + StateRoot: root[:], + Body: ðpb.BeaconBlockBodyEpbs{ + RandaoReveal: make([]byte, 96), + Eth1Data: ðpb.Eth1Data{ + DepositRoot: make([]byte, 32), + BlockHash: make([]byte, 32), + }, + Graffiti: make([]byte, 32), + SyncAggregate: ðpb.SyncAggregate{ + SyncCommitteeBits: make([]byte, fieldparams.SyncCommitteeLength/8), + SyncCommitteeSignature: make([]byte, fieldparams.BLSSignatureLength), + }, + SignedExecutionPayloadHeader: &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: make([]byte, 32), + ParentBlockRoot: make([]byte, 32), + BlockHash: make([]byte, 32), + BlobKzgCommitmentsRoot: kzgRoot[:], + }, + Signature: make([]byte, 96), + }, + BlsToExecutionChanges: make([]*ethpb.SignedBLSToExecutionChange, 0), + PayloadAttestations: make([]*ethpb.PayloadAttestation, 0), + }, + }, + Signature: params.BeaconConfig().EmptySignature[:], + }) default: return nil, ErrUnrecognizedState } diff --git a/beacon-chain/core/blocks/payload.go b/beacon-chain/core/blocks/payload.go index e697fad104b1..950ede1160c4 100644 --- a/beacon-chain/core/blocks/payload.go +++ b/beacon-chain/core/blocks/payload.go @@ -58,6 +58,9 @@ func IsMergeTransitionComplete(st state.BeaconState) (bool, error) { // // return block.body.execution_payload != ExecutionPayload() func IsExecutionBlock(body interfaces.ReadOnlyBeaconBlockBody) (bool, error) { + if body.Version() >= version.Capella { + return true, nil + } if body == nil { return false, errors.New("nil block body") } @@ -239,12 +242,47 @@ func verifyBlobCommitmentCount(body interfaces.ReadOnlyBeaconBlockBody) error { // GetBlockPayloadHash returns the hash of the execution payload of the block func GetBlockPayloadHash(blk interfaces.ReadOnlyBeaconBlock) ([32]byte, error) { var payloadHash [32]byte - if IsPreBellatrixVersion(blk.Version()) { - return payloadHash, nil + if blk.Version() >= version.EPBS { + header, err := blk.Body().SignedExecutionPayloadHeader() + if err != nil { + return payloadHash, err + } + payload, err := header.Header() + if err != nil { + return payloadHash, err + } + return payload.BlockHash(), nil } - payload, err := blk.Body().Execution() - if err != nil { - return payloadHash, err + if blk.Version() >= version.Bellatrix { + payload, err := blk.Body().Execution() + if err != nil { + return payloadHash, err + } + return bytesutil.ToBytes32(payload.BlockHash()), nil + } + return payloadHash, nil +} + +// GetBlockParentHash returns the hash of the parent execution payload +func GetBlockParentHash(blk interfaces.ReadOnlyBeaconBlock) ([32]byte, error) { + var parentHash [32]byte + if blk.Version() >= version.EPBS { + header, err := blk.Body().SignedExecutionPayloadHeader() + if err != nil { + return parentHash, err + } + payload, err := header.Header() + if err != nil { + return parentHash, err + } + return payload.ParentBlockHash(), nil + } + if blk.Version() >= version.Bellatrix { + payload, err := blk.Body().Execution() + if err != nil { + return parentHash, err + } + return bytesutil.ToBytes32(payload.ParentHash()), nil } - return bytesutil.ToBytes32(payload.BlockHash()), nil + return parentHash, nil } diff --git a/beacon-chain/core/blocks/withdrawals.go b/beacon-chain/core/blocks/withdrawals.go index f52378243b3d..76730d365f58 100644 --- a/beacon-chain/core/blocks/withdrawals.go +++ b/beacon-chain/core/blocks/withdrawals.go @@ -14,8 +14,8 @@ import ( "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" "github.com/prysmaticlabs/prysm/v5/crypto/bls" "github.com/prysmaticlabs/prysm/v5/crypto/hash" - "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" "github.com/prysmaticlabs/prysm/v5/encoding/ssz" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/v5/runtime/version" ) @@ -115,14 +115,97 @@ func ValidateBLSToExecutionChange(st state.ReadOnlyBeaconState, signed *ethpb.Si return val, nil } +func checkWithdrawalsAgainstPayload( + executionData interfaces.ExecutionData, + numExpected int, + expectedRoot [32]byte, +) error { + var wdRoot [32]byte + if executionData.IsBlinded() { + r, err := executionData.WithdrawalsRoot() + if err != nil { + return errors.Wrap(err, "could not get withdrawals root") + } + copy(wdRoot[:], r) + } else { + wds, err := executionData.Withdrawals() + if err != nil { + return errors.Wrap(err, "could not get withdrawals") + } + + if len(wds) != numExpected { + return fmt.Errorf("execution payload header has %d withdrawals when %d were expected", len(wds), numExpected) + } + + wdRoot, err = ssz.WithdrawalSliceRoot(wds, fieldparams.MaxWithdrawalsPerPayload) + if err != nil { + return errors.Wrap(err, "could not get withdrawals root") + } + } + if expectedRoot != wdRoot { + return fmt.Errorf("expected withdrawals root %#x, got %#x", expectedRoot, wdRoot) + } + return nil +} + +func processWithdrawalStateTransition( + st state.BeaconState, + expectedWithdrawals []*enginev1.Withdrawal, + partialWithdrawalsCount uint64, +) (err error) { + for _, withdrawal := range expectedWithdrawals { + err := helpers.DecreaseBalance(st, withdrawal.ValidatorIndex, withdrawal.Amount) + if err != nil { + return errors.Wrap(err, "could not decrease balance") + } + } + if st.Version() >= version.Electra { + if err := st.DequeuePartialWithdrawals(partialWithdrawalsCount); err != nil { + return fmt.Errorf("unable to dequeue partial withdrawals from state: %w", err) + } + } + + if len(expectedWithdrawals) > 0 { + if err := st.SetNextWithdrawalIndex(expectedWithdrawals[len(expectedWithdrawals)-1].Index + 1); err != nil { + return errors.Wrap(err, "could not set next withdrawal index") + } + } + var nextValidatorIndex primitives.ValidatorIndex + if uint64(len(expectedWithdrawals)) < params.BeaconConfig().MaxWithdrawalsPerPayload { + nextValidatorIndex, err = st.NextWithdrawalValidatorIndex() + if err != nil { + return errors.Wrap(err, "could not get next withdrawal validator index") + } + nextValidatorIndex += primitives.ValidatorIndex(params.BeaconConfig().MaxValidatorsPerWithdrawalsSweep) + nextValidatorIndex = nextValidatorIndex % primitives.ValidatorIndex(st.NumValidators()) + } else { + nextValidatorIndex = expectedWithdrawals[len(expectedWithdrawals)-1].ValidatorIndex + 1 + if nextValidatorIndex == primitives.ValidatorIndex(st.NumValidators()) { + nextValidatorIndex = 0 + } + } + if err := st.SetNextWithdrawalValidatorIndex(nextValidatorIndex); err != nil { + return errors.Wrap(err, "could not set next withdrawal validator index") + } + return nil +} + // ProcessWithdrawals processes the validator withdrawals from the provided execution payload // into the beacon state. // // Spec pseudocode definition: // -// def process_withdrawals(state: BeaconState, payload: ExecutionPayload) -> None: +// def process_withdrawals(state: BeaconState, payload: ExecutionPayload) -> None: +// if state.fork.current_version >= EIP7732_FORK_VERSION : +// if not is_parent_block_full(state): # [New in EIP-7732] +// return +// +// expected_withdrawals, partial_withdrawals_count = get_expected_withdrawals(state) # [Modified in Electra:EIP7251] // -// expected_withdrawals, processed_partial_withdrawals_count = get_expected_withdrawals(state) # [Modified in Electra:EIP7251] +// if state.fork.current_version >= EIP7732_FORK_VERSION : +// state.latest_withdrawals_root = hash_tree_root(expected_withdrawals) # [New in EIP-7732] +// else : +// assert len(payload.withdrawals) == len(expected_withdrawals) // // assert len(payload.withdrawals) == len(expected_withdrawals) // @@ -149,76 +232,39 @@ func ValidateBLSToExecutionChange(st state.ReadOnlyBeaconState, signed *ethpb.Si // next_validator_index = ValidatorIndex(next_index % len(state.validators)) // state.next_withdrawal_validator_index = next_validator_index func ProcessWithdrawals(st state.BeaconState, executionData interfaces.ExecutionData) (state.BeaconState, error) { - expectedWithdrawals, processedPartialWithdrawalsCount, err := st.ExpectedWithdrawals() - if err != nil { - return nil, errors.Wrap(err, "could not get expected withdrawals") - } - - var wdRoot [32]byte - if executionData.IsBlinded() { - r, err := executionData.WithdrawalsRoot() + if st.Version() >= version.EPBS { + IsParentBlockFull, err := st.IsParentBlockFull() if err != nil { - return nil, errors.Wrap(err, "could not get withdrawals root") - } - wdRoot = bytesutil.ToBytes32(r) - } else { - wds, err := executionData.Withdrawals() - if err != nil { - return nil, errors.Wrap(err, "could not get withdrawals") + return nil, errors.Wrap(err, "could not check if parent block is full") } - if len(wds) != len(expectedWithdrawals) { - return nil, fmt.Errorf("execution payload header has %d withdrawals when %d were expected", len(wds), len(expectedWithdrawals)) + if !IsParentBlockFull { + return st, nil } + } - wdRoot, err = ssz.WithdrawalSliceRoot(wds, fieldparams.MaxWithdrawalsPerPayload) - if err != nil { - return nil, errors.Wrap(err, "could not get withdrawals root") - } + expectedWithdrawals, partialWithdrawalsCount, err := st.ExpectedWithdrawals() + if err != nil { + return nil, errors.Wrap(err, "could not get expected withdrawals") } expectedRoot, err := ssz.WithdrawalSliceRoot(expectedWithdrawals, fieldparams.MaxWithdrawalsPerPayload) if err != nil { return nil, errors.Wrap(err, "could not get expected withdrawals root") } - if expectedRoot != wdRoot { - return nil, fmt.Errorf("expected withdrawals root %#x, got %#x", expectedRoot, wdRoot) - } - for _, withdrawal := range expectedWithdrawals { - err := helpers.DecreaseBalance(st, withdrawal.ValidatorIndex, withdrawal.Amount) - if err != nil { - return nil, errors.Wrap(err, "could not decrease balance") - } - } - - if st.Version() >= version.Electra { - if err := st.DequeuePartialWithdrawals(processedPartialWithdrawalsCount); err != nil { - return nil, fmt.Errorf("unable to dequeue partial withdrawals from state: %w", err) - } - } - - if len(expectedWithdrawals) > 0 { - if err := st.SetNextWithdrawalIndex(expectedWithdrawals[len(expectedWithdrawals)-1].Index + 1); err != nil { - return nil, errors.Wrap(err, "could not set next withdrawal index") - } - } - var nextValidatorIndex primitives.ValidatorIndex - if uint64(len(expectedWithdrawals)) < params.BeaconConfig().MaxWithdrawalsPerPayload { - nextValidatorIndex, err = st.NextWithdrawalValidatorIndex() + if st.Version() >= version.EPBS { + err = st.SetLastWithdrawalsRoot(expectedRoot[:]) if err != nil { - return nil, errors.Wrap(err, "could not get next withdrawal validator index") + return nil, errors.Wrap(err, "could not set withdrawals root") } - nextValidatorIndex += primitives.ValidatorIndex(params.BeaconConfig().MaxValidatorsPerWithdrawalsSweep) - nextValidatorIndex = nextValidatorIndex % primitives.ValidatorIndex(st.NumValidators()) } else { - nextValidatorIndex = expectedWithdrawals[len(expectedWithdrawals)-1].ValidatorIndex + 1 - if nextValidatorIndex == primitives.ValidatorIndex(st.NumValidators()) { - nextValidatorIndex = 0 + if err := checkWithdrawalsAgainstPayload(executionData, len(expectedWithdrawals), expectedRoot); err != nil { + return nil, err } } - if err := st.SetNextWithdrawalValidatorIndex(nextValidatorIndex); err != nil { - return nil, errors.Wrap(err, "could not set next withdrawal validator index") + if err := processWithdrawalStateTransition(st, expectedWithdrawals, partialWithdrawalsCount); err != nil { + return nil, err } return st, nil } diff --git a/beacon-chain/core/blocks/withdrawals_test.go b/beacon-chain/core/blocks/withdrawals_test.go index 7d7dc5dc08f6..87ea88f5f004 100644 --- a/beacon-chain/core/blocks/withdrawals_test.go +++ b/beacon-chain/core/blocks/withdrawals_test.go @@ -22,6 +22,7 @@ import ( ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/v5/runtime/version" "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" "github.com/prysmaticlabs/prysm/v5/time/slots" ) @@ -1132,13 +1133,407 @@ func TestProcessWithdrawals(t *testing.T) { checkPostState(t, test.Control, post) } params.BeaconConfig().MaxValidatorsPerWithdrawalsSweep = saved - }) } }) } } +func TestProcessWithdrawalsEPBS(t *testing.T) { + const ( + currentEpoch = primitives.Epoch(10) + epochInFuture = primitives.Epoch(12) + epochInPast = primitives.Epoch(8) + numValidators = 128 + notWithdrawableIndex = 127 + notPartiallyWithdrawable = 126 + maxSweep = uint64(80) + ) + maxEffectiveBalance := params.BeaconConfig().MaxEffectiveBalance + + type args struct { + Name string + NextWithdrawalValidatorIndex primitives.ValidatorIndex + NextWithdrawalIndex uint64 + FullWithdrawalIndices []primitives.ValidatorIndex + PendingPartialWithdrawalIndices []primitives.ValidatorIndex + Withdrawals []*enginev1.Withdrawal + PendingPartialWithdrawals []*ethpb.PendingPartialWithdrawal // Electra + LatestBlockHash []byte // EIP-7732 + } + type control struct { + NextWithdrawalValidatorIndex primitives.ValidatorIndex + NextWithdrawalIndex uint64 + Balances map[uint64]uint64 + } + type Test struct { + Args args + Control control + } + executionAddress := func(i primitives.ValidatorIndex) []byte { + wc := make([]byte, 20) + wc[19] = byte(i) + return wc + } + withdrawalAmount := func(i primitives.ValidatorIndex) uint64 { + return maxEffectiveBalance + uint64(i)*100000 + } + fullWithdrawal := func(i primitives.ValidatorIndex, idx uint64) *enginev1.Withdrawal { + return &enginev1.Withdrawal{ + Index: idx, + ValidatorIndex: i, + Address: executionAddress(i), + Amount: withdrawalAmount(i), + } + } + PendingPartialWithdrawal := func(i primitives.ValidatorIndex, idx uint64) *enginev1.Withdrawal { + return &enginev1.Withdrawal{ + Index: idx, + ValidatorIndex: i, + Address: executionAddress(i), + Amount: withdrawalAmount(i) - maxEffectiveBalance, + } + } + tests := []Test{ + { + Args: args{ + Name: "success no withdrawals", + NextWithdrawalValidatorIndex: 10, + NextWithdrawalIndex: 3, + }, + Control: control{ + NextWithdrawalValidatorIndex: 90, + NextWithdrawalIndex: 3, + }, + }, + { + Args: args{ + Name: "success one full withdrawal", + NextWithdrawalIndex: 3, + NextWithdrawalValidatorIndex: 5, + FullWithdrawalIndices: []primitives.ValidatorIndex{70}, + Withdrawals: []*enginev1.Withdrawal{ + fullWithdrawal(70, 3), + }, + }, + Control: control{ + NextWithdrawalValidatorIndex: 85, + NextWithdrawalIndex: 4, + Balances: map[uint64]uint64{70: 0}, + }, + }, + { + Args: args{ + Name: "success one partial withdrawal", + NextWithdrawalIndex: 21, + NextWithdrawalValidatorIndex: 120, + PendingPartialWithdrawalIndices: []primitives.ValidatorIndex{7}, + Withdrawals: []*enginev1.Withdrawal{ + PendingPartialWithdrawal(7, 21), + }, + }, + Control: control{ + NextWithdrawalValidatorIndex: 72, + NextWithdrawalIndex: 22, + Balances: map[uint64]uint64{7: maxEffectiveBalance}, + }, + }, + { + Args: args{ + Name: "success many full withdrawals", + NextWithdrawalIndex: 22, + NextWithdrawalValidatorIndex: 4, + FullWithdrawalIndices: []primitives.ValidatorIndex{7, 19, 28, 1}, + Withdrawals: []*enginev1.Withdrawal{ + fullWithdrawal(7, 22), fullWithdrawal(19, 23), fullWithdrawal(28, 24), + }, + }, + Control: control{ + NextWithdrawalValidatorIndex: 84, + NextWithdrawalIndex: 25, + Balances: map[uint64]uint64{7: 0, 19: 0, 28: 0}, + }, + }, + { + Args: args{ + Name: "less than max sweep at end", + NextWithdrawalIndex: 22, + NextWithdrawalValidatorIndex: 4, + FullWithdrawalIndices: []primitives.ValidatorIndex{80, 81, 82, 83}, + Withdrawals: []*enginev1.Withdrawal{ + fullWithdrawal(80, 22), fullWithdrawal(81, 23), fullWithdrawal(82, 24), + fullWithdrawal(83, 25), + }, + }, + Control: control{ + NextWithdrawalValidatorIndex: 84, + NextWithdrawalIndex: 26, + Balances: map[uint64]uint64{80: 0, 81: 0, 82: 0, 83: 0}, + }, + }, + { + Args: args{ + Name: "less than max sweep and beginning", + NextWithdrawalIndex: 22, + NextWithdrawalValidatorIndex: 4, + FullWithdrawalIndices: []primitives.ValidatorIndex{4, 5, 6}, + Withdrawals: []*enginev1.Withdrawal{ + fullWithdrawal(4, 22), fullWithdrawal(5, 23), fullWithdrawal(6, 24), + }, + }, + Control: control{ + NextWithdrawalValidatorIndex: 84, + NextWithdrawalIndex: 25, + Balances: map[uint64]uint64{4: 0, 5: 0, 6: 0}, + }, + }, + { + Args: args{ + Name: "success many partial withdrawals", + NextWithdrawalIndex: 22, + NextWithdrawalValidatorIndex: 4, + PendingPartialWithdrawalIndices: []primitives.ValidatorIndex{7, 19, 28}, + Withdrawals: []*enginev1.Withdrawal{ + PendingPartialWithdrawal(7, 22), PendingPartialWithdrawal(19, 23), PendingPartialWithdrawal(28, 24), + }, + }, + Control: control{ + NextWithdrawalValidatorIndex: 84, + NextWithdrawalIndex: 25, + Balances: map[uint64]uint64{ + 7: maxEffectiveBalance, + 19: maxEffectiveBalance, + 28: maxEffectiveBalance, + }, + }, + }, + { + Args: args{ + Name: "success many withdrawals", + NextWithdrawalIndex: 22, + NextWithdrawalValidatorIndex: 88, + FullWithdrawalIndices: []primitives.ValidatorIndex{7, 19, 28}, + PendingPartialWithdrawalIndices: []primitives.ValidatorIndex{2, 1, 89, 15}, + Withdrawals: []*enginev1.Withdrawal{ + PendingPartialWithdrawal(89, 22), PendingPartialWithdrawal(1, 23), PendingPartialWithdrawal(2, 24), + fullWithdrawal(7, 25), PendingPartialWithdrawal(15, 26), fullWithdrawal(19, 27), + fullWithdrawal(28, 28), + }, + }, + Control: control{ + NextWithdrawalValidatorIndex: 40, + NextWithdrawalIndex: 29, + Balances: map[uint64]uint64{ + 7: 0, 19: 0, 28: 0, + 2: maxEffectiveBalance, 1: maxEffectiveBalance, 89: maxEffectiveBalance, + 15: maxEffectiveBalance, + }, + }, + }, + { + Args: args{ + Name: "success many withdrawals with pending partial withdrawals in state", + NextWithdrawalIndex: 22, + NextWithdrawalValidatorIndex: 88, + FullWithdrawalIndices: []primitives.ValidatorIndex{7, 19, 28}, + PendingPartialWithdrawalIndices: []primitives.ValidatorIndex{2, 1, 89, 15}, + Withdrawals: []*enginev1.Withdrawal{ + PendingPartialWithdrawal(89, 22), PendingPartialWithdrawal(1, 23), PendingPartialWithdrawal(2, 24), + fullWithdrawal(7, 25), PendingPartialWithdrawal(15, 26), fullWithdrawal(19, 27), + fullWithdrawal(28, 28), + }, + PendingPartialWithdrawals: []*ethpb.PendingPartialWithdrawal{ + { + Index: 11, + Amount: withdrawalAmount(11) - maxEffectiveBalance, + }, + }, + }, + Control: control{ + NextWithdrawalValidatorIndex: 40, + NextWithdrawalIndex: 29, + Balances: map[uint64]uint64{ + 7: 0, 19: 0, 28: 0, + 2: maxEffectiveBalance, 1: maxEffectiveBalance, 89: maxEffectiveBalance, + 15: maxEffectiveBalance, + }, + }, + }, + + { + Args: args{ + Name: "success more than max fully withdrawals", + NextWithdrawalIndex: 22, + NextWithdrawalValidatorIndex: 0, + FullWithdrawalIndices: []primitives.ValidatorIndex{1, 2, 3, 4, 5, 6, 7, 8, 9, 21, 22, 23, 24, 25, 26, 27, 29, 35, 89}, + Withdrawals: []*enginev1.Withdrawal{ + fullWithdrawal(1, 22), fullWithdrawal(2, 23), fullWithdrawal(3, 24), + fullWithdrawal(4, 25), fullWithdrawal(5, 26), fullWithdrawal(6, 27), + fullWithdrawal(7, 28), fullWithdrawal(8, 29), fullWithdrawal(9, 30), + fullWithdrawal(21, 31), fullWithdrawal(22, 32), fullWithdrawal(23, 33), + fullWithdrawal(24, 34), fullWithdrawal(25, 35), fullWithdrawal(26, 36), + fullWithdrawal(27, 37), + }, + }, + Control: control{ + NextWithdrawalValidatorIndex: 28, + NextWithdrawalIndex: 38, + Balances: map[uint64]uint64{ + 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, + 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, + }, + }, + }, + { + Args: args{ + Name: "success more than max partially withdrawals", + NextWithdrawalIndex: 22, + NextWithdrawalValidatorIndex: 0, + PendingPartialWithdrawalIndices: []primitives.ValidatorIndex{1, 2, 3, 4, 5, 6, 7, 8, 9, 21, 22, 23, 24, 25, 26, 27, 29, 35, 89}, + Withdrawals: []*enginev1.Withdrawal{ + PendingPartialWithdrawal(1, 22), PendingPartialWithdrawal(2, 23), PendingPartialWithdrawal(3, 24), + PendingPartialWithdrawal(4, 25), PendingPartialWithdrawal(5, 26), PendingPartialWithdrawal(6, 27), + PendingPartialWithdrawal(7, 28), PendingPartialWithdrawal(8, 29), PendingPartialWithdrawal(9, 30), + PendingPartialWithdrawal(21, 31), PendingPartialWithdrawal(22, 32), PendingPartialWithdrawal(23, 33), + PendingPartialWithdrawal(24, 34), PendingPartialWithdrawal(25, 35), PendingPartialWithdrawal(26, 36), + PendingPartialWithdrawal(27, 37), + }, + }, + Control: control{ + NextWithdrawalValidatorIndex: 28, + NextWithdrawalIndex: 38, + Balances: map[uint64]uint64{ + 1: maxEffectiveBalance, + 2: maxEffectiveBalance, + 3: maxEffectiveBalance, + 4: maxEffectiveBalance, + 5: maxEffectiveBalance, + 6: maxEffectiveBalance, + 7: maxEffectiveBalance, + 8: maxEffectiveBalance, + 9: maxEffectiveBalance, + 21: maxEffectiveBalance, + 22: maxEffectiveBalance, + 23: maxEffectiveBalance, + 24: maxEffectiveBalance, + 25: maxEffectiveBalance, + 26: maxEffectiveBalance, + 27: maxEffectiveBalance, + }, + }, + }, + { + Args: args{ + Name: "Parent Node is not full", + NextWithdrawalIndex: 22, + NextWithdrawalValidatorIndex: 4, + FullWithdrawalIndices: []primitives.ValidatorIndex{7, 19, 28, 1}, + Withdrawals: []*enginev1.Withdrawal{ + fullWithdrawal(7, 22), fullWithdrawal(19, 23), fullWithdrawal(28, 24), + }, + LatestBlockHash: []byte{1, 2, 3}, + }, + }, + } + + checkPostState := func(t *testing.T, expected control, st state.BeaconState) { + l, err := st.NextWithdrawalValidatorIndex() + require.NoError(t, err) + require.Equal(t, expected.NextWithdrawalValidatorIndex, l) + + n, err := st.NextWithdrawalIndex() + require.NoError(t, err) + require.Equal(t, expected.NextWithdrawalIndex, n) + balances := st.Balances() + for idx, bal := range expected.Balances { + require.Equal(t, bal, balances[idx]) + } + } + + prepareValidators := func(st state.BeaconState, arguments args) error { + validators := make([]*ethpb.Validator, numValidators) + if err := st.SetBalances(make([]uint64, numValidators)); err != nil { + return err + } + for i := range validators { + v := ðpb.Validator{} + v.EffectiveBalance = maxEffectiveBalance + v.WithdrawableEpoch = epochInFuture + v.WithdrawalCredentials = make([]byte, 32) + v.WithdrawalCredentials[31] = byte(i) + if err := st.UpdateBalancesAtIndex(primitives.ValidatorIndex(i), v.EffectiveBalance-uint64(rand.Intn(1000))); err != nil { + return err + } + validators[i] = v + } + for _, idx := range arguments.FullWithdrawalIndices { + if idx != notWithdrawableIndex { + validators[idx].WithdrawableEpoch = epochInPast + } + if err := st.UpdateBalancesAtIndex(idx, withdrawalAmount(idx)); err != nil { + return err + } + validators[idx].WithdrawalCredentials[0] = params.BeaconConfig().ETH1AddressWithdrawalPrefixByte + } + for _, idx := range arguments.PendingPartialWithdrawalIndices { + validators[idx].WithdrawalCredentials[0] = params.BeaconConfig().ETH1AddressWithdrawalPrefixByte + if err := st.UpdateBalancesAtIndex(idx, withdrawalAmount(idx)); err != nil { + return err + } + } + return st.SetValidators(validators) + } + + for _, test := range tests { + t.Run(test.Args.Name, func(t *testing.T) { + saved := params.BeaconConfig().MaxValidatorsPerWithdrawalsSweep + params.BeaconConfig().MaxValidatorsPerWithdrawalsSweep = maxSweep + if test.Args.Withdrawals == nil { + test.Args.Withdrawals = make([]*enginev1.Withdrawal, 0) + } + if test.Args.FullWithdrawalIndices == nil { + test.Args.FullWithdrawalIndices = make([]primitives.ValidatorIndex, 0) + } + if test.Args.PendingPartialWithdrawalIndices == nil { + test.Args.PendingPartialWithdrawalIndices = make([]primitives.ValidatorIndex, 0) + } + slot, err := slots.EpochStart(currentEpoch) + require.NoError(t, err) + var st state.BeaconState + var p interfaces.ExecutionData + spb := ðpb.BeaconStateEPBS{ + Slot: slot, + NextWithdrawalValidatorIndex: test.Args.NextWithdrawalValidatorIndex, + NextWithdrawalIndex: test.Args.NextWithdrawalIndex, + PendingPartialWithdrawals: test.Args.PendingPartialWithdrawals, + LatestExecutionPayloadHeader: &enginev1.ExecutionPayloadHeaderEPBS{ + BlockHash: []byte{}, + }, + LatestBlockHash: test.Args.LatestBlockHash, + } + st, err = state_native.InitializeFromProtoUnsafeEpbs(spb) + require.NoError(t, err) + env := random.ExecutionPayloadEnvelope(t) + env.Payload.Withdrawals = test.Args.Withdrawals + wp, err := consensusblocks.WrappedROExecutionPayloadEnvelope(env) + require.NoError(t, err) + p, err = wp.Execution() + require.NoError(t, err) + err = prepareValidators(st, test.Args) + require.NoError(t, err) + post, err := blocks.ProcessWithdrawals(st, p) + if test.Args.Name == "Parent Node is not full" { + require.IsNil(t, post) + require.IsNil(t, err) + } else { + require.NoError(t, err) + checkPostState(t, test.Control, post) + } + params.BeaconConfig().MaxValidatorsPerWithdrawalsSweep = saved + }) + } +} + func TestProcessBLSToExecutionChanges(t *testing.T) { spb := ðpb.BeaconStateCapella{ Fork: ðpb.Fork{ diff --git a/beacon-chain/core/electra/BUILD.bazel b/beacon-chain/core/electra/BUILD.bazel index 35ef921f3ef0..e195e7194491 100644 --- a/beacon-chain/core/electra/BUILD.bazel +++ b/beacon-chain/core/electra/BUILD.bazel @@ -10,7 +10,6 @@ go_library( "effective_balance_updates.go", "registry_updates.go", "transition.go", - "transition_no_verify_sig.go", "upgrade.go", "validator.go", "withdrawals.go", diff --git a/beacon-chain/core/epbs/BUILD.bazel b/beacon-chain/core/epbs/BUILD.bazel new file mode 100644 index 000000000000..0bb170719c12 --- /dev/null +++ b/beacon-chain/core/epbs/BUILD.bazel @@ -0,0 +1,52 @@ +load("@prysm//tools/go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "attestation.go", + "execution_payload_envelope.go", + "execution_payload_header.go", + "operations.go", + "payload_attestation.go", + ], + importpath = "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/epbs", + visibility = ["//visibility:public"], + deps = [ + "//beacon-chain/core/altair:go_default_library", + "//beacon-chain/core/blocks:go_default_library", + "//beacon-chain/core/electra:go_default_library", + "//beacon-chain/core/helpers:go_default_library", + "//beacon-chain/core/signing:go_default_library", + "//beacon-chain/core/validators:go_default_library", + "//beacon-chain/state:go_default_library", + "//config/params:go_default_library", + "//consensus-types/interfaces:go_default_library", + "//consensus-types/primitives:go_default_library", + "//crypto/bls:go_default_library", + "//network/forks:go_default_library", + "//proto/engine/v1:go_default_library", + "//runtime/version:go_default_library", + "//time/slots:go_default_library", + "@com_github_pkg_errors//:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "attestation_test.go", + "execution_payload_envelope_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//beacon-chain/core/altair:go_default_library", + "//beacon-chain/state/state-native:go_default_library", + "//config/params:go_default_library", + "//consensus-types/blocks:go_default_library", + "//proto/engine/v1:go_default_library", + "//proto/prysm/v1alpha1:go_default_library", + "//testing/require:go_default_library", + "//testing/util:go_default_library", + "//testing/util/random:go_default_library", + ], +) diff --git a/beacon-chain/core/epbs/attestation.go b/beacon-chain/core/epbs/attestation.go new file mode 100644 index 000000000000..9b77e104dfd6 --- /dev/null +++ b/beacon-chain/core/epbs/attestation.go @@ -0,0 +1,13 @@ +package epbs + +import ( + "fmt" +) + +// RemoveValidatorFlag removes validator flag from existing one. +func RemoveValidatorFlag(flag, flagPosition uint8) (uint8, error) { + if flagPosition > 7 { + return flag, fmt.Errorf("flag position %d exceeds length", flagPosition) + } + return flag & ^(1 << flagPosition), nil +} diff --git a/beacon-chain/core/epbs/attestation_test.go b/beacon-chain/core/epbs/attestation_test.go new file mode 100644 index 000000000000..f271f91304b1 --- /dev/null +++ b/beacon-chain/core/epbs/attestation_test.go @@ -0,0 +1,93 @@ +package epbs_test + +import ( + "testing" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/altair" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/epbs" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/testing/require" +) + +func TestValidatorFlag_Remove(t *testing.T) { + tests := []struct { + name string + add []uint8 + remove []uint8 + expectedTrue []uint8 + expectedFalse []uint8 + }{ + { + name: "none", + add: []uint8{}, + remove: []uint8{}, + expectedTrue: []uint8{}, + expectedFalse: []uint8{params.BeaconConfig().TimelySourceFlagIndex, params.BeaconConfig().TimelyTargetFlagIndex, params.BeaconConfig().TimelyHeadFlagIndex}, + }, + { + name: "source", + add: []uint8{params.BeaconConfig().TimelySourceFlagIndex}, + remove: []uint8{params.BeaconConfig().TimelySourceFlagIndex}, + expectedTrue: []uint8{}, + expectedFalse: []uint8{params.BeaconConfig().TimelySourceFlagIndex, params.BeaconConfig().TimelyTargetFlagIndex, params.BeaconConfig().TimelyHeadFlagIndex}, + }, + { + name: "source, target", + add: []uint8{params.BeaconConfig().TimelySourceFlagIndex, params.BeaconConfig().TimelyTargetFlagIndex}, + remove: []uint8{params.BeaconConfig().TimelySourceFlagIndex}, + expectedTrue: []uint8{params.BeaconConfig().TimelyTargetFlagIndex}, + expectedFalse: []uint8{params.BeaconConfig().TimelySourceFlagIndex, params.BeaconConfig().TimelyHeadFlagIndex}, + }, + { + name: "source, target, head", + add: []uint8{params.BeaconConfig().TimelySourceFlagIndex, params.BeaconConfig().TimelyTargetFlagIndex, params.BeaconConfig().TimelyHeadFlagIndex}, + remove: []uint8{params.BeaconConfig().TimelyTargetFlagIndex, params.BeaconConfig().TimelyHeadFlagIndex}, + expectedTrue: []uint8{params.BeaconConfig().TimelySourceFlagIndex}, + expectedFalse: []uint8{params.BeaconConfig().TimelyTargetFlagIndex, params.BeaconConfig().TimelyHeadFlagIndex}, + }, + } + var err error + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + flag := uint8(0) + + // Add flags. + for _, flagPosition := range test.add { + flag, err = altair.AddValidatorFlag(flag, flagPosition) + require.NoError(t, err) + + has, err := altair.HasValidatorFlag(flag, flagPosition) + require.NoError(t, err) + require.Equal(t, true, has) + } + + // Remove flags. + for _, flagPosition := range test.remove { + flag, err = epbs.RemoveValidatorFlag(flag, flagPosition) + require.NoError(t, err) + } + + // Check if flags are set correctly. + for _, flagPosition := range test.expectedTrue { + has, err := altair.HasValidatorFlag(flag, flagPosition) + require.NoError(t, err) + require.Equal(t, true, has) + } + for _, flagPosition := range test.expectedFalse { + has, err := altair.HasValidatorFlag(flag, flagPosition) + require.NoError(t, err) + require.Equal(t, false, has) + } + }) + } +} + +func TestValidatorFlag_Remove_ExceedsLength(t *testing.T) { + _, err := epbs.RemoveValidatorFlag(0, 8) + require.ErrorContains(t, "flag position 8 exceeds length", err) +} + +func TestValidatorFlag_Remove_NotSet(t *testing.T) { + _, err := epbs.RemoveValidatorFlag(0, 1) + require.NoError(t, err) +} diff --git a/beacon-chain/core/epbs/execution_payload_envelope.go b/beacon-chain/core/epbs/execution_payload_envelope.go new file mode 100644 index 000000000000..a9a67f572b3d --- /dev/null +++ b/beacon-chain/core/epbs/execution_payload_envelope.go @@ -0,0 +1,126 @@ +package epbs + +import ( + "context" + "fmt" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/electra" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" +) + +// ValidatePayloadStateTransition performs the process_execution_payload +// function. +func ValidatePayloadStateTransition( + ctx context.Context, + preState state.BeaconState, + envelope interfaces.ROExecutionPayloadEnvelope, +) error { + if err := UpdateHeaderAndVerify(ctx, preState, envelope); err != nil { + return err + } + committedHeader, err := preState.LatestExecutionPayloadHeaderEPBS() + if err != nil { + return err + } + if err := validateAgainstCommittedBid(committedHeader, envelope); err != nil { + return err + } + if err := ProcessPayloadStateTransition(ctx, preState, envelope); err != nil { + return err + } + return checkPostStateRoot(ctx, preState, envelope) +} + +func ProcessPayloadStateTransition( + ctx context.Context, + preState state.BeaconState, + envelope interfaces.ROExecutionPayloadEnvelope, +) error { + er := envelope.ExecutionRequests() + preState, err := electra.ProcessDepositRequests(ctx, preState, er.Deposits) + if err != nil { + return errors.Wrap(err, "could not process deposit receipts") + } + preState, err = electra.ProcessWithdrawalRequests(ctx, preState, er.Withdrawals) + if err != nil { + return errors.Wrap(err, "could not process ercution layer withdrawal requests") + } + if err := electra.ProcessConsolidationRequests(ctx, preState, er.Consolidations); err != nil { + return errors.Wrap(err, "could not process consolidation requests") + } + payload, err := envelope.Execution() + if err != nil { + return errors.Wrap(err, "could not get execution payload") + } + if err := preState.SetLatestBlockHash(payload.BlockHash()); err != nil { + return err + } + return preState.SetLatestFullSlot(preState.Slot()) +} + +func UpdateHeaderAndVerify( + ctx context.Context, + preState state.BeaconState, + envelope interfaces.ROExecutionPayloadEnvelope, +) error { + blockHeader := preState.LatestBlockHeader() + if blockHeader == nil { + return errors.New("invalid nil latest block header") + } + if len(blockHeader.StateRoot) == 0 || [32]byte(blockHeader.StateRoot) == [32]byte{} { + prevStateRoot, err := preState.HashTreeRoot(ctx) + if err != nil { + return errors.Wrap(err, "could not compute previous state root") + } + blockHeader.StateRoot = prevStateRoot[:] + if err := preState.SetLatestBlockHeader(blockHeader); err != nil { + return errors.Wrap(err, "could not set latest block header") + } + } + blockHeaderRoot, err := blockHeader.HashTreeRoot() + if err != nil { + return err + } + beaconBlockRoot := envelope.BeaconBlockRoot() + if blockHeaderRoot != beaconBlockRoot { + return fmt.Errorf("beacon block root does not match previous header, got: %#x wanted: %#x", beaconBlockRoot, blockHeaderRoot) + } + return nil +} + +func validateAgainstCommittedBid( + committedHeader *enginev1.ExecutionPayloadHeaderEPBS, + envelope interfaces.ROExecutionPayloadEnvelope, +) error { + builderIndex := envelope.BuilderIndex() + if committedHeader.BuilderIndex != builderIndex { + return errors.New("builder index does not match committed header") + } + kzgRoot, err := envelope.BlobKzgCommitmentsRoot() + if err != nil { + return err + } + if [32]byte(committedHeader.BlobKzgCommitmentsRoot) != kzgRoot { + return errors.New("blob KZG commitments root does not match committed header") + } + return nil +} + +func checkPostStateRoot( + ctx context.Context, + preState state.BeaconState, + envelope interfaces.ROExecutionPayloadEnvelope, +) error { + stateRoot, err := preState.HashTreeRoot(ctx) + if err != nil { + return err + } + envelopeStateRoot := envelope.StateRoot() + if stateRoot != envelopeStateRoot { + return errors.New("state root mismatch") + } + return nil +} diff --git a/beacon-chain/core/epbs/execution_payload_envelope_test.go b/beacon-chain/core/epbs/execution_payload_envelope_test.go new file mode 100644 index 000000000000..576e214e5ce0 --- /dev/null +++ b/beacon-chain/core/epbs/execution_payload_envelope_test.go @@ -0,0 +1,109 @@ +package epbs + +import ( + "context" + "testing" + + state_native "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native" + "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" +) + +func TestProcessPayloadStateTransition(t *testing.T) { + bh := [32]byte{'h'} + p := random.ExecutionPayloadEnvelope(t) + p.Payload.BlockHash = bh[:] + p.ExecutionRequests = &enginev1.ExecutionRequests{} + e, err := blocks.WrappedROExecutionPayloadEnvelope(p) + require.NoError(t, err) + validators := make([]*ethpb.Validator, 0) + stpb := ðpb.BeaconStateEPBS{Slot: 3, Validators: validators} + st, err := state_native.InitializeFromProtoUnsafeEpbs(stpb) + require.NoError(t, err) + ctx := context.Background() + + lbh, err := st.LatestBlockHash() + require.NoError(t, err) + require.Equal(t, [32]byte{}, [32]byte(lbh)) + + require.NoError(t, ProcessPayloadStateTransition(ctx, st, e)) + + lbh, err = st.LatestBlockHash() + require.NoError(t, err) + require.Equal(t, bh, [32]byte(lbh)) + + lfs, err := st.LatestFullSlot() + require.NoError(t, err) + require.Equal(t, lfs, st.Slot()) +} + +func Test_validateAgainstHeader(t *testing.T) { + bh := [32]byte{'h'} + payload := &enginev1.ExecutionPayloadElectra{BlockHash: bh[:]} + p := random.ExecutionPayloadEnvelope(t) + p.Payload = payload + e, err := blocks.WrappedROExecutionPayloadEnvelope(p) + require.NoError(t, err) + stpb := ðpb.BeaconStateEPBS{Slot: 3} + st, err := state_native.InitializeFromProtoUnsafeEpbs(stpb) + require.NoError(t, err) + ctx := context.Background() + require.ErrorContains(t, "invalid nil latest block header", UpdateHeaderAndVerify(ctx, st, e)) + + prest, _ := util.DeterministicGenesisStateEpbs(t, 64) + br := [32]byte{'r'} + p.BeaconBlockRoot = br[:] + require.ErrorContains(t, "beacon block root does not match previous header", UpdateHeaderAndVerify(ctx, prest, e)) + + header := prest.LatestBlockHeader() + require.NoError(t, err) + headerRoot, err := header.HashTreeRoot() + require.NoError(t, err) + p.BeaconBlockRoot = headerRoot[:] + require.NoError(t, UpdateHeaderAndVerify(ctx, prest, e)) +} + +func Test_validateAgainstCommittedBid(t *testing.T) { + payload := &enginev1.ExecutionPayloadElectra{} + p := random.ExecutionPayloadEnvelope(t) + p.Payload = payload + p.BuilderIndex = 1 + e, err := blocks.WrappedROExecutionPayloadEnvelope(p) + require.NoError(t, err) + h := &enginev1.ExecutionPayloadHeaderEPBS{} + require.ErrorContains(t, "builder index does not match committed header", validateAgainstCommittedBid(h, e)) + + h.BuilderIndex = 1 + p.BlobKzgCommitments = make([][]byte, 6) + for i := range p.BlobKzgCommitments { + p.BlobKzgCommitments[i] = make([]byte, 48) + } + h.BlobKzgCommitmentsRoot = make([]byte, 32) + require.ErrorContains(t, "blob KZG commitments root does not match committed header", validateAgainstCommittedBid(h, e)) + + root, err := e.BlobKzgCommitmentsRoot() + require.NoError(t, err) + h.BlobKzgCommitmentsRoot = root[:] + require.NoError(t, validateAgainstCommittedBid(h, e)) +} + +func TestCheckPostStateRoot(t *testing.T) { + payload := &enginev1.ExecutionPayloadElectra{} + p := random.ExecutionPayloadEnvelope(t) + p.Payload = payload + p.BuilderIndex = 1 + e, err := blocks.WrappedROExecutionPayloadEnvelope(p) + require.NoError(t, err) + ctx := context.Background() + st, _ := util.DeterministicGenesisStateEpbs(t, 64) + p.StateRoot = make([]byte, 32) + require.ErrorContains(t, "state root mismatch", checkPostStateRoot(ctx, st, e)) + root, err := st.HashTreeRoot(ctx) + require.NoError(t, err) + p.StateRoot = root[:] + require.NoError(t, checkPostStateRoot(ctx, st, e)) +} diff --git a/beacon-chain/core/epbs/execution_payload_header.go b/beacon-chain/core/epbs/execution_payload_header.go new file mode 100644 index 000000000000..c328f958da5d --- /dev/null +++ b/beacon-chain/core/epbs/execution_payload_header.go @@ -0,0 +1,50 @@ +package epbs + +import ( + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/network/forks" + "github.com/prysmaticlabs/prysm/v5/time/slots" +) + +// ValidatePayloadHeaderSignature validates the signature of the execution payload header. +func ValidatePayloadHeaderSignature(st state.ReadOnlyBeaconState, sh interfaces.ROSignedExecutionPayloadHeader) error { + h, err := sh.Header() + if err != nil { + return err + } + pubkey := st.PubkeyAtIndex(h.BuilderIndex()) + pub, err := bls.PublicKeyFromBytes(pubkey[:]) + if err != nil { + return err + } + + s := sh.Signature() + sig, err := bls.SignatureFromBytes(s[:]) + if err != nil { + return err + } + + currentEpoch := slots.ToEpoch(h.Slot()) + f, err := forks.Fork(currentEpoch) + if err != nil { + return err + } + + domain, err := signing.Domain(f, currentEpoch, params.BeaconConfig().DomainBeaconBuilder, st.GenesisValidatorsRoot()) + if err != nil { + return err + } + root, err := sh.SigningRoot(domain) + if err != nil { + return err + } + if !sig.Verify(pub, root[:]) { + return signing.ErrSigFailedToVerify + } + + return nil +} diff --git a/beacon-chain/core/electra/transition_no_verify_sig.go b/beacon-chain/core/epbs/operations.go similarity index 84% rename from beacon-chain/core/electra/transition_no_verify_sig.go rename to beacon-chain/core/epbs/operations.go index c7b478b09857..8eb499c2abc4 100644 --- a/beacon-chain/core/electra/transition_no_verify_sig.go +++ b/beacon-chain/core/epbs/operations.go @@ -1,4 +1,4 @@ -package electra +package epbs import ( "context" @@ -6,9 +6,11 @@ import ( "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/blocks" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/electra" v "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/validators" "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/runtime/version" ) var ( @@ -62,11 +64,11 @@ func ProcessOperations( if err != nil { return nil, errors.Wrap(err, "could not process altair attester slashing") } - st, err = ProcessAttestationsNoVerifySignature(ctx, st, block) + st, err = electra.ProcessAttestationsNoVerifySignature(ctx, st, block) if err != nil { return nil, errors.Wrap(err, "could not process altair attestation") } - if _, err := ProcessDeposits(ctx, st, bb.Deposits()); err != nil { // new in electra + if _, err := electra.ProcessDeposits(ctx, st, bb.Deposits()); err != nil { // new in electra return nil, errors.Wrap(err, "could not process altair deposit") } st, err = ProcessVoluntaryExits(ctx, st, bb.VoluntaryExits()) @@ -77,20 +79,27 @@ func ProcessOperations( if err != nil { return nil, errors.Wrap(err, "could not process bls-to-execution changes") } + // new in ePBS + if block.Version() >= version.EPBS { + if err := ProcessPayloadAttestations(st, bb); err != nil { + return nil, err + } + return st, nil + } // new in electra requests, err := bb.ExecutionRequests() if err != nil { return nil, errors.Wrap(err, "could not get execution requests") } - st, err = ProcessDepositRequests(ctx, st, requests.Deposits) + st, err = electra.ProcessDepositRequests(ctx, st, requests.Deposits) if err != nil { return nil, errors.Wrap(err, "could not process deposit receipts") } - st, err = ProcessWithdrawalRequests(ctx, st, requests.Withdrawals) + st, err = electra.ProcessWithdrawalRequests(ctx, st, requests.Withdrawals) if err != nil { return nil, errors.Wrap(err, "could not process execution layer withdrawal requests") } - if err := ProcessConsolidationRequests(ctx, st, requests.Consolidations); err != nil { + if err := electra.ProcessConsolidationRequests(ctx, st, requests.Consolidations); err != nil { return nil, fmt.Errorf("could not process consolidation requests: %w", err) } return st, nil diff --git a/beacon-chain/core/epbs/payload_attestation.go b/beacon-chain/core/epbs/payload_attestation.go new file mode 100644 index 000000000000..cee4050740e9 --- /dev/null +++ b/beacon-chain/core/epbs/payload_attestation.go @@ -0,0 +1,125 @@ +package epbs + +import ( + "bytes" + "context" + "time" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/altair" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" +) + +func ProcessPayloadAttestations(state state.BeaconState, body interfaces.ReadOnlyBeaconBlockBody) error { + atts, err := body.PayloadAttestations() + if err != nil { + return err + } + if len(atts) == 0 { + return nil + } + + ctx, cancel := context.WithTimeout(context.Background(), 12*time.Second) + defer cancel() + lbh := state.LatestBlockHeader() + proposerIndex := lbh.ProposerIndex + var participation []byte + if state.Slot()%32 == 0 { + participation, err = state.PreviousEpochParticipation() + } else { + participation, err = state.CurrentEpochParticipation() + } + if err != nil { + return err + } + totalBalance, err := helpers.TotalActiveBalance(state) + if err != nil { + return err + } + baseReward, err := altair.BaseRewardWithTotalBalance(state, proposerIndex, totalBalance) + if err != nil { + return err + } + lfs, err := state.LatestFullSlot() + if err != nil { + return err + } + + cfg := params.BeaconConfig() + sourceFlagIndex := cfg.TimelySourceFlagIndex + targetFlagIndex := cfg.TimelyTargetFlagIndex + headFlagIndex := cfg.TimelyHeadFlagIndex + penaltyNumerator := uint64(0) + rewardNumerator := uint64(0) + rewardDenominator := (cfg.WeightDenominator - cfg.ProposerWeight) * cfg.WeightDenominator / cfg.ProposerWeight + + for _, att := range atts { + data := att.Data + if !bytes.Equal(data.BeaconBlockRoot, lbh.ParentRoot) { + return errors.New("invalid beacon block root in payload attestation data") + } + if data.Slot+1 != state.Slot() { + return errors.New("invalid data slot") + } + indexed, err := helpers.GetIndexedPayloadAttestation(ctx, state, data.Slot, att) + if err != nil { + return err + } + valid, err := helpers.IsValidIndexedPayloadAttestation(state, indexed) + if err != nil { + return err + } + if !valid { + return errors.New("invalid payload attestation") + } + payloadWasPreset := data.Slot == lfs + votedPresent := data.PayloadStatus == primitives.PAYLOAD_PRESENT + if votedPresent != payloadWasPreset { + for _, idx := range indexed.GetAttestingIndices() { + flags := participation[idx] + has, err := altair.HasValidatorFlag(flags, targetFlagIndex) + if err != nil { + return err + } + if has { + penaltyNumerator += baseReward * cfg.TimelyTargetWeight + } + has, err = altair.HasValidatorFlag(flags, sourceFlagIndex) + if err != nil { + return err + } + if has { + penaltyNumerator += baseReward * cfg.TimelySourceWeight + } + has, err = altair.HasValidatorFlag(flags, headFlagIndex) + if err != nil { + return err + } + if has { + penaltyNumerator += baseReward * cfg.TimelyHeadWeight + } + participation[idx] = 0 + } + } else { + for _, idx := range indexed.GetAttestingIndices() { + participation[idx] = (1 << headFlagIndex) | (1 << sourceFlagIndex) | (1 << targetFlagIndex) + rewardNumerator += baseReward * (cfg.TimelyHeadWeight + cfg.TimelySourceWeight + cfg.TimelyTargetWeight) + } + } + } + if penaltyNumerator > 0 { + if err := helpers.DecreaseBalance(state, proposerIndex, penaltyNumerator/rewardDenominator); err != nil { + return err + } + } + if rewardNumerator > 0 { + if err := helpers.IncreaseBalance(state, proposerIndex, penaltyNumerator/rewardDenominator); err != nil { + return err + } + } + return nil +} diff --git a/beacon-chain/core/helpers/BUILD.bazel b/beacon-chain/core/helpers/BUILD.bazel index 090a57458a6d..4ff959b4806e 100644 --- a/beacon-chain/core/helpers/BUILD.bazel +++ b/beacon-chain/core/helpers/BUILD.bazel @@ -8,6 +8,7 @@ go_library( "block.go", "genesis.go", "metrics.go", + "payload_attestation.go", "randao.go", "rewards_penalties.go", "shuffle.go", @@ -20,11 +21,13 @@ go_library( visibility = ["//visibility:public"], deps = [ "//beacon-chain/cache:go_default_library", + "//beacon-chain/core/signing:go_default_library", "//beacon-chain/core/time:go_default_library", "//beacon-chain/forkchoice/types:go_default_library", "//beacon-chain/state:go_default_library", "//config/fieldparams:go_default_library", "//config/params:go_default_library", + "//consensus-types/epbs:go_default_library", "//consensus-types/interfaces:go_default_library", "//consensus-types/primitives:go_default_library", "//container/slice:go_default_library", @@ -53,6 +56,8 @@ go_test( "attestation_test.go", "beacon_committee_test.go", "block_test.go", + "exports_test.go", + "payload_attestation_test.go", "private_access_fuzz_noop_test.go", # keep "private_access_test.go", "randao_test.go", @@ -69,21 +74,27 @@ go_test( tags = ["CI_race_detection"], deps = [ "//beacon-chain/cache:go_default_library", + "//beacon-chain/core/signing:go_default_library", "//beacon-chain/core/time:go_default_library", "//beacon-chain/forkchoice/types:go_default_library", "//beacon-chain/state:go_default_library", "//beacon-chain/state/state-native:go_default_library", "//config/fieldparams:go_default_library", "//config/params:go_default_library", + "//consensus-types/epbs:go_default_library", "//consensus-types/primitives:go_default_library", "//container/slice:go_default_library", + "//crypto/bls:go_default_library", "//crypto/hash:go_default_library", + "//crypto/rand:go_default_library", "//encoding/bytesutil:go_default_library", + "//math:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//runtime/version:go_default_library", "//testing/assert:go_default_library", "//testing/require:go_default_library", "//testing/util:go_default_library", + "//testing/util/random:go_default_library", "//time:go_default_library", "//time/slots:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", diff --git a/beacon-chain/core/helpers/beacon_committee.go b/beacon-chain/core/helpers/beacon_committee.go index 2e70cf5f0fd4..a0cb67dcba8e 100644 --- a/beacon-chain/core/helpers/beacon_committee.go +++ b/beacon-chain/core/helpers/beacon_committee.go @@ -213,6 +213,7 @@ type CommitteeAssignment struct { Committee []primitives.ValidatorIndex AttesterSlot primitives.Slot CommitteeIndex primitives.CommitteeIndex + PtcSlot primitives.Slot } // verifyAssignmentEpoch verifies if the given epoch is valid for assignment based on the provided state. @@ -294,7 +295,7 @@ func CommitteeAssignments(ctx context.Context, state state.BeaconState, epoch pr if err := verifyAssignmentEpoch(epoch, state); err != nil { return nil, err } - startSlot, err := slots.EpochStart(epoch) + slot, err := slots.EpochStart(epoch) if err != nil { return nil, err } @@ -303,14 +304,17 @@ func CommitteeAssignments(ctx context.Context, state state.BeaconState, epoch pr vals[v] = struct{}{} } assignments := make(map[primitives.ValidatorIndex]*CommitteeAssignment) + + committees, err := BeaconCommittees(ctx, state, slot) + if err != nil { + return nil, errors.Wrap(err, "could not compute beacon committees") + } + ptcPerSlot, ptcMembersPerCommittee := PtcAllocation(len(committees)) // Compute committee assignments for each slot in the epoch. - for slot := startSlot; slot < startSlot+params.BeaconConfig().SlotsPerEpoch; slot++ { - committees, err := BeaconCommittees(ctx, state, slot) - if err != nil { - return nil, errors.Wrap(err, "could not compute beacon committees") - } + endSlot := slot + params.BeaconConfig().SlotsPerEpoch + for { for j, committee := range committees { - for _, vIndex := range committee { + for i, vIndex := range committee { if _, ok := vals[vIndex]; !ok { // Skip if the validator is not in the provided validators slice. continue } @@ -320,8 +324,19 @@ func CommitteeAssignments(ctx context.Context, state state.BeaconState, epoch pr assignments[vIndex].Committee = committee assignments[vIndex].AttesterSlot = slot assignments[vIndex].CommitteeIndex = primitives.CommitteeIndex(j) + if uint64(j) < ptcPerSlot && uint64(i) < ptcMembersPerCommittee { + assignments[vIndex].PtcSlot = slot + } } } + slot++ + if slot == endSlot { + break + } + committees, err = BeaconCommittees(ctx, state, slot) + if err != nil { + return nil, errors.Wrap(err, "could not compute beacon committees") + } } return assignments, nil } diff --git a/beacon-chain/core/helpers/beacon_committee_test.go b/beacon-chain/core/helpers/beacon_committee_test.go index 007685617e22..6e6e156b65b7 100644 --- a/beacon-chain/core/helpers/beacon_committee_test.go +++ b/beacon-chain/core/helpers/beacon_committee_test.go @@ -3,6 +3,7 @@ package helpers_test import ( "context" "fmt" + "slices" "strconv" "testing" @@ -10,6 +11,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/time" state_native "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native" + field_params "github.com/prysmaticlabs/prysm/v5/config/fieldparams" "github.com/prysmaticlabs/prysm/v5/config/params" "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" "github.com/prysmaticlabs/prysm/v5/container/slice" @@ -722,15 +724,26 @@ func TestCommitteeIndices(t *testing.T) { assert.DeepEqual(t, []primitives.CommitteeIndex{0, 1, 3}, indices) } -func TestAttestationCommittees(t *testing.T) { - validators := make([]*ethpb.Validator, params.BeaconConfig().SlotsPerEpoch.Mul(params.BeaconConfig().TargetCommitteeSize)) +func TestCommitteeAssignments_PTC(t *testing.T) { + helpers.ClearCache() + // Create 10 committees. Total 40960 validators. + committeeCount := uint64(10) + validatorCount := committeeCount * params.BeaconConfig().TargetCommitteeSize * uint64(params.BeaconConfig().SlotsPerEpoch) + validators := make([]*ethpb.Validator, validatorCount) + validatorIndices := make([]primitives.ValidatorIndex, validatorCount) + for i := 0; i < len(validators); i++ { + k := make([]byte, 48) + copy(k, strconv.Itoa(i)) validators[i] = ðpb.Validator{ - ExitEpoch: params.BeaconConfig().FarFutureEpoch, + PublicKey: k, + WithdrawalCredentials: make([]byte, 32), + ExitEpoch: params.BeaconConfig().FarFutureEpoch, } + validatorIndices[i] = primitives.ValidatorIndex(i) } - state, err := state_native.InitializeFromProtoPhase0(ðpb.BeaconState{ + state, err := state_native.InitializeFromProtoEpbs(ðpb.BeaconStateEPBS{ Validators: validators, RandaoMixes: make([][]byte, params.BeaconConfig().EpochsPerHistoricalVector), }) @@ -754,6 +767,31 @@ func TestAttestationCommittees(t *testing.T) { assert.Equal(t, params.BeaconConfig().TargetCommitteeSize, uint64(len(committees[0]))) assert.Equal(t, params.BeaconConfig().TargetCommitteeSize, uint64(len(committees[1]))) }) + as, err := helpers.CommitteeAssignments(context.Background(), state, 1, validatorIndices) + require.NoError(t, err) + + // Capture all the slots and all the validator index that belonged in a PTC using a map for verification later. + slotValidatorMap := make(map[primitives.Slot][]primitives.ValidatorIndex) + for i, a := range as { + slotValidatorMap[a.PtcSlot] = append(slotValidatorMap[a.PtcSlot], i) + } + + // Verify that all the slots have the correct number of PTC. + for s, v := range slotValidatorMap { + if s == 0 { + continue + } + // Make sure all the PTC are the correct size from the map. + require.Equal(t, len(v), field_params.PTCSize) + + // Get the actual PTC from the beacon state using the helper function + ptc, err := helpers.GetPayloadTimelinessCommittee(context.Background(), state, s) + require.NoError(t, err) + for _, index := range ptc { + i := slices.Index(v, index) + require.NotEqual(t, -1, i) // PTC not found from the assignment map + } + } } func TestBeaconCommittees(t *testing.T) { diff --git a/beacon-chain/core/helpers/exports_test.go b/beacon-chain/core/helpers/exports_test.go new file mode 100644 index 000000000000..0ec103bbd6a0 --- /dev/null +++ b/beacon-chain/core/helpers/exports_test.go @@ -0,0 +1,12 @@ +package helpers + +var ( + ErrNilMessage = errNilMessage + ErrNilData = errNilData + ErrNilBeaconBlockRoot = errNilBeaconBlockRoot + ErrNilPayloadAttestation = errNilPayloadAttestation + ErrNilSignature = errNilSignature + ErrNilAggregationBits = errNilAggregationBits + ErrPreEPBSState = errPreEPBSState + ErrCommitteeOverflow = errCommitteeOverflow +) diff --git a/beacon-chain/core/helpers/payload_attestation.go b/beacon-chain/core/helpers/payload_attestation.go new file mode 100644 index 000000000000..5f626ff01dee --- /dev/null +++ b/beacon-chain/core/helpers/payload_attestation.go @@ -0,0 +1,296 @@ +package helpers + +import ( + "context" + "slices" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/epbs" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/math" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "github.com/prysmaticlabs/prysm/v5/time/slots" +) + +var ( + errNilMessage = errors.New("nil PayloadAttestationMessage") + errNilData = errors.New("nil PayloadAttestationData") + errNilBeaconBlockRoot = errors.New("nil BeaconBlockRoot") + errNilPayloadAttestation = errors.New("nil PayloadAttestation") + errNilSignature = errors.New("nil Signature") + errNilAggregationBits = errors.New("nil AggregationBits") + errPreEPBSState = errors.New("beacon state pre ePBS fork") + errCommitteeOverflow = errors.New("beacon committee of insufficient size") +) + +// ValidateNilPayloadAttestationData checks if any composite field of the +// payload attestation data is nil +func ValidateNilPayloadAttestationData(data *eth.PayloadAttestationData) error { + if data == nil { + return errNilData + } + if data.BeaconBlockRoot == nil { + return errNilBeaconBlockRoot + } + return nil +} + +// ValidateNilPayloadAttestationMessage checks if any composite field of the +// payload attestation message is nil +func ValidateNilPayloadAttestationMessage(att *eth.PayloadAttestationMessage) error { + if att == nil { + return errNilMessage + } + if att.Signature == nil { + return errNilSignature + } + return ValidateNilPayloadAttestationData(att.Data) +} + +// ValidateNilPayloadAttestation checks if any composite field of the +// payload attestation is nil +func ValidateNilPayloadAttestation(att *eth.PayloadAttestation) error { + if att == nil { + return errNilPayloadAttestation + } + if att.AggregationBits == nil { + return errNilAggregationBits + } + if att.Signature == nil { + return errNilSignature + } + return ValidateNilPayloadAttestationData(att.Data) +} + +// InPayloadTimelinessCommittee returns whether the given index belongs to the +// PTC computed from the passed state. +func InPayloadTimelinessCommittee(ctx context.Context, state state.ReadOnlyBeaconState, slot primitives.Slot, idx primitives.ValidatorIndex) (bool, error) { + ptc, err := GetPayloadTimelinessCommittee(ctx, state, slot) + if err != nil { + return false, err + } + for _, i := range ptc { + if i == idx { + return true, nil + } + } + return false, nil +} + +// GetPayloadTimelinessCommittee returns the PTC for the given slot, computed from the passed state as in the +// spec function `get_ptc`. +func GetPayloadTimelinessCommittee(ctx context.Context, state state.ReadOnlyBeaconState, slot primitives.Slot) (indices []primitives.ValidatorIndex, err error) { + if state.Version() < version.EPBS { + return nil, errPreEPBSState + } + committees, err := BeaconCommittees(ctx, state, slot) + if err != nil { + return nil, errors.Wrap(err, "could not get beacon committees") + } + committeesPerSlot, membersPerCommittee := PtcAllocation(len(committees)) + for i, committee := range committees { + if uint64(i) >= committeesPerSlot { + return + } + if uint64(len(committee)) < membersPerCommittee { + return nil, errCommitteeOverflow + } + indices = append(indices, committee[:membersPerCommittee]...) + } + return +} + +// PtcAllocation returns: +// 1. The number of beacon committees that PTC will borrow from in a slot. +// 2. The number of validators that PTC will borrow from in a beacon committee. +func PtcAllocation(slotCommittees int) (committeesPerSlot, membersPerCommittee uint64) { + committeesPerSlot = math.LargestPowerOfTwo(math.Min(uint64(slotCommittees), fieldparams.PTCSize)) + membersPerCommittee = fieldparams.PTCSize / committeesPerSlot + return +} + +// GetPayloadAttestingIndices returns the set of attester indices corresponding to the given PayloadAttestation. +// +// Spec pseudocode definition: +// +// def get_payload_attesting_indices(state: BeaconState, slot: Slot, +// payload_attestation: PayloadAttestation) -> Set[ValidatorIndex]: +// """ +// Return the set of attesting indices corresponding to ``payload_attestation``. +// """ +// ptc = get_ptc(state, slot) +// return set(index for i, index in enumerate(ptc) if payload_attestation.aggregation_bits[i]) +func GetPayloadAttestingIndices(ctx context.Context, state state.ReadOnlyBeaconState, slot primitives.Slot, att *eth.PayloadAttestation) (indices []primitives.ValidatorIndex, err error) { + if state.Version() < version.EPBS { + return nil, errPreEPBSState + } + + ptc, err := GetPayloadTimelinessCommittee(ctx, state, slot) + if err != nil { + return nil, err + } + + for i, validatorIndex := range ptc { + if att.AggregationBits.BitAt(uint64(i)) { + indices = append(indices, validatorIndex) + } + } + + return +} + +// GetIndexedPayloadAttestation replaces a PayloadAttestation's AggregationBits with sorted AttestingIndices and returns an IndexedPayloadAttestation. +// +// Spec pseudocode definition: +// +// def get_indexed_payload_attestation(state: BeaconState, slot: Slot, +// payload_attestation: PayloadAttestation) -> IndexedPayloadAttestation: +// """ +// Return the indexed payload attestation corresponding to ``payload_attestation``. +// """ +// attesting_indices = get_payload_attesting_indices(state, slot, payload_attestation) +// +// return IndexedPayloadAttestation( +// attesting_indices=sorted(attesting_indices), +// data=payload_attestation.data, +// signature=payload_attestation.signature, +// ) +func GetIndexedPayloadAttestation(ctx context.Context, state state.ReadOnlyBeaconState, slot primitives.Slot, att *eth.PayloadAttestation) (*epbs.IndexedPayloadAttestation, error) { + if state.Version() < version.EPBS { + return nil, errPreEPBSState + } + + attestingIndices, err := GetPayloadAttestingIndices(ctx, state, slot, att) + if err != nil { + return nil, err + } + + slices.Sort(attestingIndices) + + return &epbs.IndexedPayloadAttestation{ + AttestingIndices: attestingIndices, + Data: att.Data, + Signature: att.Signature, + }, nil +} + +// IsValidIndexedPayloadAttestation validates the given IndexedPayloadAttestation. +// +// Spec pseudocode definition: +// +// def is_valid_indexed_payload_attestation( +// state: BeaconState, +// indexed_payload_attestation: IndexedPayloadAttestation) -> bool: +// """ +// Check if ``indexed_payload_attestation`` is not empty, has sorted and unique indices and has +// a valid aggregate signature. +// """ +// # Verify the data is valid +// if indexed_payload_attestation.data.payload_status >= PAYLOAD_INVALID_STATUS: +// return False +// +// # Verify indices are sorted and unique +// indices = indexed_payload_attestation.attesting_indices +// if len(indices) == 0 or not indices == sorted(set(indices)): +// return False +// +// # Verify aggregate signature +// pubkeys = [state.validators[i].pubkey for i in indices] +// domain = get_domain(state, DOMAIN_PTC_ATTESTER, None) +// signing_root = compute_signing_root(indexed_payload_attestation.data, domain) +// return bls.FastAggregateVerify(pubkeys, signing_root, indexed_payload_attestation.signature) +func IsValidIndexedPayloadAttestation(state state.ReadOnlyBeaconState, att *epbs.IndexedPayloadAttestation) (bool, error) { + if state.Version() < version.EPBS { + return false, errPreEPBSState + } + + // Verify the data is valid. + if att.Data.PayloadStatus >= primitives.PAYLOAD_INVALID_STATUS { + return false, nil + } + + // Verify indices are sorted and unique. + indices := att.AttestingIndices + slices.Sort(indices) + if len(indices) == 0 || !slices.Equal(att.AttestingIndices, indices) { + return false, nil + } + + // Verify aggregate signature. + publicKeys := make([]bls.PublicKey, len(indices)) + for i, index := range indices { + validator, err := state.ValidatorAtIndexReadOnly(index) + if err != nil { + return false, err + } + + publicKeyBytes := validator.PublicKey() + publicKey, err := bls.PublicKeyFromBytes(publicKeyBytes[:]) + if err != nil { + return false, err + } + + publicKeys[i] = publicKey + } + + domain, err := signing.Domain( + state.Fork(), + slots.ToEpoch(state.Slot()), + params.BeaconConfig().DomainPTCAttester, + state.GenesisValidatorsRoot(), + ) + if err != nil { + return false, err + } + + signingRoot, err := signing.ComputeSigningRoot(att.Data, domain) + if err != nil { + return false, err + } + + signature, err := bls.SignatureFromBytes(att.Signature) + if err != nil { + return false, err + } + + return signature.FastAggregateVerify(publicKeys, signingRoot), nil +} + +// ValidatePayloadAttestationMessageSignature verifies the signature of a +// payload attestation message. +func ValidatePayloadAttestationMessageSignature(ctx context.Context, st state.ReadOnlyBeaconState, msg *eth.PayloadAttestationMessage) error { + if err := ValidateNilPayloadAttestationMessage(msg); err != nil { + return err + } + val, err := st.ValidatorAtIndex(msg.ValidatorIndex) + if err != nil { + return err + } + pub, err := bls.PublicKeyFromBytes(val.PublicKey) + if err != nil { + return err + } + sig, err := bls.SignatureFromBytes(msg.Signature) + if err != nil { + return err + } + currentEpoch := slots.ToEpoch(st.Slot()) + domain, err := signing.Domain(st.Fork(), currentEpoch, params.BeaconConfig().DomainPTCAttester, st.GenesisValidatorsRoot()) + if err != nil { + return err + } + root, err := signing.ComputeSigningRoot(msg.Data, domain) + if err != nil { + return err + } + if !sig.Verify(pub, root[:]) { + return signing.ErrSigFailedToVerify + } + return nil +} diff --git a/beacon-chain/core/helpers/payload_attestation_test.go b/beacon-chain/core/helpers/payload_attestation_test.go new file mode 100644 index 000000000000..d65da5c5c133 --- /dev/null +++ b/beacon-chain/core/helpers/payload_attestation_test.go @@ -0,0 +1,363 @@ +package helpers_test + +import ( + "context" + "slices" + "strconv" + "testing" + + "github.com/prysmaticlabs/go-bitfield" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + state_native "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/epbs" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/crypto/rand" + "github.com/prysmaticlabs/prysm/v5/math" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" + "github.com/prysmaticlabs/prysm/v5/time/slots" +) + +func TestValidateNilPayloadAttestation(t *testing.T) { + require.ErrorIs(t, helpers.ErrNilData, helpers.ValidateNilPayloadAttestationData(nil)) + data := ð.PayloadAttestationData{} + require.ErrorIs(t, helpers.ErrNilBeaconBlockRoot, helpers.ValidateNilPayloadAttestationData(data)) + data.BeaconBlockRoot = make([]byte, 32) + require.NoError(t, helpers.ValidateNilPayloadAttestationData(data)) + + require.ErrorIs(t, helpers.ErrNilMessage, helpers.ValidateNilPayloadAttestationMessage(nil)) + message := ð.PayloadAttestationMessage{} + require.ErrorIs(t, helpers.ErrNilSignature, helpers.ValidateNilPayloadAttestationMessage(message)) + message.Signature = make([]byte, 96) + require.ErrorIs(t, helpers.ErrNilData, helpers.ValidateNilPayloadAttestationMessage(message)) + message.Data = data + require.NoError(t, helpers.ValidateNilPayloadAttestationMessage(message)) + + require.ErrorIs(t, helpers.ErrNilPayloadAttestation, helpers.ValidateNilPayloadAttestation(nil)) + att := ð.PayloadAttestation{} + require.ErrorIs(t, helpers.ErrNilAggregationBits, helpers.ValidateNilPayloadAttestation(att)) + att.AggregationBits = bitfield.NewBitvector512() + require.ErrorIs(t, helpers.ErrNilSignature, helpers.ValidateNilPayloadAttestation(att)) + att.Signature = message.Signature + require.ErrorIs(t, helpers.ErrNilData, helpers.ValidateNilPayloadAttestation(att)) + att.Data = data + require.NoError(t, helpers.ValidateNilPayloadAttestation(att)) +} + +func TestGetPayloadTimelinessCommittee(t *testing.T) { + helpers.ClearCache() + + // Create 10 committees + committeeCount := uint64(10) + validatorCount := committeeCount * params.BeaconConfig().TargetCommitteeSize * uint64(params.BeaconConfig().SlotsPerEpoch) + validators := make([]*ethpb.Validator, validatorCount) + + for i := 0; i < len(validators); i++ { + k := make([]byte, 48) + copy(k, strconv.Itoa(i)) + validators[i] = ðpb.Validator{ + PublicKey: k, + WithdrawalCredentials: make([]byte, 32), + ExitEpoch: params.BeaconConfig().FarFutureEpoch, + } + } + + state, err := state_native.InitializeFromProtoEpbs(random.BeaconState(t)) + require.NoError(t, err) + require.NoError(t, state.SetValidators(validators)) + require.NoError(t, state.SetSlot(200)) + + ctx := context.Background() + indices, err := helpers.BeaconCommitteeFromState(ctx, state, state.Slot(), 1) + require.NoError(t, err) + require.Equal(t, 128, len(indices)) + + epoch := slots.ToEpoch(state.Slot()) + activeCount, err := helpers.ActiveValidatorCount(ctx, state, epoch) + require.NoError(t, err) + require.Equal(t, uint64(40960), activeCount) + + computedCommitteeCount := helpers.SlotCommitteeCount(activeCount) + require.Equal(t, committeeCount, computedCommitteeCount) + committeesPerSlot := math.LargestPowerOfTwo(math.Min(committeeCount, fieldparams.PTCSize)) + require.Equal(t, uint64(8), committeesPerSlot) + + ptc, err := helpers.GetPayloadTimelinessCommittee(ctx, state, state.Slot()) + require.NoError(t, err) + require.Equal(t, fieldparams.PTCSize, len(ptc)) + + committee1, err := helpers.BeaconCommitteeFromState(ctx, state, state.Slot(), 0) + require.NoError(t, err) + + require.DeepEqual(t, committee1[:64], ptc[:64]) +} + +func Test_PtcAllocation(t *testing.T) { + tests := []struct { + committeeCount int + memberPerCommittee uint64 + committeesPerSlot uint64 + }{ + {1, 512, 1}, + {4, 128, 4}, + {128, 4, 128}, + {512, 1, 512}, + {1024, 1, 512}, + } + + for _, test := range tests { + committeesPerSlot, memberPerCommittee := helpers.PtcAllocation(test.committeeCount) + if memberPerCommittee != test.memberPerCommittee { + t.Errorf("memberPerCommittee(%d) = %d; expected %d", test.committeeCount, memberPerCommittee, test.memberPerCommittee) + } + if committeesPerSlot != test.committeesPerSlot { + t.Errorf("committeesPerSlot(%d) = %d; expected %d", test.committeeCount, committeesPerSlot, test.committeesPerSlot) + } + } +} + +func TestGetPayloadAttestingIndices(t *testing.T) { + helpers.ClearCache() + + // Create 10 committees. Total 40960 validators. + committeeCount := uint64(10) + validatorCount := committeeCount * params.BeaconConfig().TargetCommitteeSize * uint64(params.BeaconConfig().SlotsPerEpoch) + validators := make([]*ethpb.Validator, validatorCount) + + for i := 0; i < len(validators); i++ { + pubkey := make([]byte, 48) + copy(pubkey, strconv.Itoa(i)) + validators[i] = ðpb.Validator{ + PublicKey: pubkey, + WithdrawalCredentials: make([]byte, 32), + ExitEpoch: params.BeaconConfig().FarFutureEpoch, + } + } + + // Create a beacon state. + state, err := state_native.InitializeFromProtoEpbs(ðpb.BeaconStateEPBS{ + Validators: validators, + RandaoMixes: make([][]byte, params.BeaconConfig().EpochsPerHistoricalVector), + }) + require.NoError(t, err) + + // Get PTC. + ptc, err := helpers.GetPayloadTimelinessCommittee(context.Background(), state, state.Slot()) + require.NoError(t, err) + require.Equal(t, fieldparams.PTCSize, len(ptc)) + + // Generate random indices. PTC members at the corresponding indices are considered attested. + randGen := rand.NewDeterministicGenerator() + attesterCount := randGen.Intn(fieldparams.PTCSize) + 1 + indices := randGen.Perm(fieldparams.PTCSize)[:attesterCount] + slices.Sort(indices) + require.Equal(t, attesterCount, len(indices)) + + // Create a PayloadAttestation with AggregationBits set true at the indices. + aggregationBits := bitfield.NewBitvector512() + for _, index := range indices { + aggregationBits.SetBitAt(uint64(index), true) + } + + payloadAttestation := ð.PayloadAttestation{ + AggregationBits: aggregationBits, + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: make([]byte, 32), + }, + Signature: make([]byte, 96), + } + + // Get attesting indices. + attesters, err := helpers.GetPayloadAttestingIndices(context.Background(), state, state.Slot(), payloadAttestation) + require.NoError(t, err) + require.Equal(t, len(indices), len(attesters)) + + // Check if each attester equals to the PTC member at the corresponding index. + for i, index := range indices { + require.Equal(t, attesters[i], ptc[index]) + } +} + +func TestGetIndexedPayloadAttestation(t *testing.T) { + helpers.ClearCache() + + // Create 10 committees. Total 40960 validators. + committeeCount := uint64(10) + validatorCount := committeeCount * params.BeaconConfig().TargetCommitteeSize * uint64(params.BeaconConfig().SlotsPerEpoch) + validators := make([]*ethpb.Validator, validatorCount) + + for i := 0; i < len(validators); i++ { + publicKey := make([]byte, 48) + copy(publicKey, strconv.Itoa(i)) + validators[i] = ðpb.Validator{ + PublicKey: publicKey, + WithdrawalCredentials: make([]byte, 32), + ExitEpoch: params.BeaconConfig().FarFutureEpoch, + } + } + + // Create a beacon state. + state, err := state_native.InitializeFromProtoEpbs(ðpb.BeaconStateEPBS{ + Validators: validators, + RandaoMixes: make([][]byte, params.BeaconConfig().EpochsPerHistoricalVector), + }) + require.NoError(t, err) + + // Get PTC. + ptc, err := helpers.GetPayloadTimelinessCommittee(context.Background(), state, state.Slot()) + require.NoError(t, err) + require.Equal(t, fieldparams.PTCSize, len(ptc)) + + // Generate random indices. PTC members at the corresponding indices are considered attested. + randGen := rand.NewDeterministicGenerator() + attesterCount := randGen.Intn(fieldparams.PTCSize) + 1 + indices := randGen.Perm(fieldparams.PTCSize)[:attesterCount] + slices.Sort(indices) + require.Equal(t, attesterCount, len(indices)) + + // Create a PayloadAttestation with AggregationBits set true at the indices. + aggregationBits := bitfield.NewBitvector512() + for _, index := range indices { + aggregationBits.SetBitAt(uint64(index), true) + } + + payloadAttestation := ð.PayloadAttestation{ + AggregationBits: aggregationBits, + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: make([]byte, 32), + }, + Signature: make([]byte, 96), + } + + // Get attesting indices. + ctx := context.Background() + attesters, err := helpers.GetPayloadAttestingIndices(ctx, state, state.Slot(), payloadAttestation) + require.NoError(t, err) + require.Equal(t, len(indices), len(attesters)) + + // Get an IndexedPayloadAttestation. + indexedPayloadAttestation, err := helpers.GetIndexedPayloadAttestation(ctx, state, state.Slot(), payloadAttestation) + require.NoError(t, err) + require.Equal(t, len(indices), len(indexedPayloadAttestation.AttestingIndices)) + require.DeepEqual(t, payloadAttestation.Data, indexedPayloadAttestation.Data) + require.DeepEqual(t, payloadAttestation.Signature, indexedPayloadAttestation.Signature) + + // Check if the attesting indices are the same. + slices.Sort(attesters) // GetIndexedPayloadAttestation sorts attesting indices. + require.DeepEqual(t, attesters, indexedPayloadAttestation.AttestingIndices) +} + +func TestIsValidIndexedPayloadAttestation(t *testing.T) { + helpers.ClearCache() + + // Create validators. + validatorCount := uint64(350) + validators := make([]*ethpb.Validator, validatorCount) + _, secretKeys, err := util.DeterministicDepositsAndKeys(validatorCount) + require.NoError(t, err) + + for i := 0; i < len(validators); i++ { + validators[i] = ðpb.Validator{ + PublicKey: secretKeys[i].PublicKey().Marshal(), + WithdrawalCredentials: make([]byte, 32), + ExitEpoch: params.BeaconConfig().FarFutureEpoch, + } + } + + // Create a beacon state. + state, err := state_native.InitializeFromProtoEpbs(ðpb.BeaconStateEPBS{ + Validators: validators, + Fork: ðpb.Fork{ + Epoch: 0, + CurrentVersion: params.BeaconConfig().GenesisForkVersion, + PreviousVersion: params.BeaconConfig().GenesisForkVersion, + }, + RandaoMixes: make([][]byte, params.BeaconConfig().EpochsPerHistoricalVector), + }) + require.NoError(t, err) + + // Define test cases. + tests := []struct { + attestation *epbs.IndexedPayloadAttestation + }{ + { + attestation: &epbs.IndexedPayloadAttestation{ + AttestingIndices: []primitives.ValidatorIndex{1}, + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: make([]byte, fieldparams.RootLength), + }, + Signature: make([]byte, fieldparams.BLSSignatureLength), + }, + }, + { + attestation: &epbs.IndexedPayloadAttestation{ + AttestingIndices: []primitives.ValidatorIndex{13, 19}, + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: make([]byte, fieldparams.RootLength), + }, + Signature: make([]byte, fieldparams.BLSSignatureLength), + }, + }, + { + attestation: &epbs.IndexedPayloadAttestation{ + AttestingIndices: []primitives.ValidatorIndex{123, 234, 345}, + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: make([]byte, fieldparams.RootLength), + }, + Signature: make([]byte, fieldparams.BLSSignatureLength), + }, + }, + { + attestation: &epbs.IndexedPayloadAttestation{ + AttestingIndices: []primitives.ValidatorIndex{38, 46, 54, 62, 70, 78, 86, 194}, + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: make([]byte, fieldparams.RootLength), + }, + Signature: make([]byte, fieldparams.BLSSignatureLength), + }, + }, + { + attestation: &epbs.IndexedPayloadAttestation{ + AttestingIndices: []primitives.ValidatorIndex{5}, + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: make([]byte, fieldparams.RootLength), + }, + Signature: make([]byte, fieldparams.BLSSignatureLength), + }, + }, + } + + // Run test cases. + for _, test := range tests { + signatures := make([]bls.Signature, len(test.attestation.AttestingIndices)) + for i, index := range test.attestation.AttestingIndices { + signedBytes, err := signing.ComputeDomainAndSign( + state, + slots.ToEpoch(test.attestation.Data.Slot), + test.attestation.Data, + params.BeaconConfig().DomainPTCAttester, + secretKeys[index], + ) + require.NoError(t, err) + + signature, err := bls.SignatureFromBytes(signedBytes) + require.NoError(t, err) + + signatures[i] = signature + } + + aggregatedSignature := bls.AggregateSignatures(signatures) + test.attestation.Signature = aggregatedSignature.Marshal() + + isValid, err := helpers.IsValidIndexedPayloadAttestation(state, test.attestation) + require.NoError(t, err) + require.Equal(t, true, isValid) + } +} diff --git a/beacon-chain/core/time/slot_epoch.go b/beacon-chain/core/time/slot_epoch.go index 9ffa1561a3bf..97524bec1fd7 100644 --- a/beacon-chain/core/time/slot_epoch.go +++ b/beacon-chain/core/time/slot_epoch.go @@ -108,3 +108,9 @@ func CanUpgradeToElectra(slot primitives.Slot) bool { func CanProcessEpoch(state state.ReadOnlyBeaconState) bool { return (state.Slot()+1)%params.BeaconConfig().SlotsPerEpoch == 0 } + +func CanUpgradeToEpbs(slot primitives.Slot) bool { + epochStart := slots.IsEpochStart(slot) + epbsEpoch := slots.ToEpoch(slot) == params.BeaconConfig().EPBSForkEpoch + return epochStart && epbsEpoch +} diff --git a/beacon-chain/core/transition/BUILD.bazel b/beacon-chain/core/transition/BUILD.bazel index be7d42ada04e..451e7dfbc07d 100644 --- a/beacon-chain/core/transition/BUILD.bazel +++ b/beacon-chain/core/transition/BUILD.bazel @@ -9,6 +9,7 @@ go_library( "state-bellatrix.go", "trailing_slot_state_cache.go", "transition.go", + "transition_epbs.go", "transition_no_verify_sig.go", ], importpath = "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/transition", @@ -20,6 +21,7 @@ go_library( "//beacon-chain/core/capella:go_default_library", "//beacon-chain/core/deneb:go_default_library", "//beacon-chain/core/electra:go_default_library", + "//beacon-chain/core/epbs:go_default_library", "//beacon-chain/core/epoch:go_default_library", "//beacon-chain/core/epoch/precompute:go_default_library", "//beacon-chain/core/execution:go_default_library", @@ -45,6 +47,7 @@ go_library( "//proto/engine/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//runtime/version:go_default_library", + "//time/slots:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_prometheus_client_golang//prometheus:go_default_library", "@com_github_prometheus_client_golang//prometheus/promauto:go_default_library", diff --git a/beacon-chain/core/transition/transition.go b/beacon-chain/core/transition/transition.go index 0ffe051795e7..0e9602ef89c8 100644 --- a/beacon-chain/core/transition/transition.go +++ b/beacon-chain/core/transition/transition.go @@ -19,6 +19,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/execution" "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/time" "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + state_native "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native" "github.com/prysmaticlabs/prysm/v5/config/features" "github.com/prysmaticlabs/prysm/v5/config/params" "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" @@ -26,6 +27,8 @@ import ( "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" "github.com/prysmaticlabs/prysm/v5/monitoring/tracing" prysmTrace "github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace" + v1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/v5/runtime/version" "go.opentelemetry.io/otel/trace" ) @@ -369,6 +372,15 @@ func UpgradeState(ctx context.Context, state state.BeaconState) (state.BeaconSta upgraded = true } + if time.CanUpgradeToEpbs(state.Slot()) { + state, err = UpgradeToEpbs(state) + if err != nil { + tracing.AnnotateError(span, err) + return nil, err + } + upgraded = true + } + if upgraded { log.Debugf("upgraded state to %s", version.String(state.Version())) } @@ -487,3 +499,108 @@ func ProcessEpochPrecompute(ctx context.Context, state state.BeaconState) (state } return state, nil } + +func UpgradeToEpbs(beaconState state.BeaconState) (state.BeaconState, error) { + currentSyncCommittee, err := beaconState.CurrentSyncCommittee() + if err != nil { + return nil, err + } + nextSyncCommittee, err := beaconState.NextSyncCommittee() + if err != nil { + return nil, err + } + prevEpochParticipation, err := beaconState.PreviousEpochParticipation() + if err != nil { + return nil, err + } + currentEpochParticipation, err := beaconState.CurrentEpochParticipation() + if err != nil { + return nil, err + } + inactivityScores, err := beaconState.InactivityScores() + if err != nil { + return nil, err + } + wi, err := beaconState.NextWithdrawalIndex() + if err != nil { + return nil, err + } + vi, err := beaconState.NextWithdrawalValidatorIndex() + if err != nil { + return nil, err + } + summaries, err := beaconState.HistoricalSummaries() + if err != nil { + return nil, err + } + historicalRoots, err := beaconState.HistoricalRoots() + if err != nil { + return nil, err + } + + latestHeader, err := beaconState.LatestExecutionPayloadHeader() + if err != nil { + return nil, err + } + + s := ðpb.BeaconStateEPBS{ + GenesisTime: beaconState.GenesisTime(), + GenesisValidatorsRoot: beaconState.GenesisValidatorsRoot(), + Slot: beaconState.Slot(), + Fork: ðpb.Fork{ + PreviousVersion: beaconState.Fork().CurrentVersion, + CurrentVersion: params.BeaconConfig().EPBSForkVersion, + Epoch: time.CurrentEpoch(beaconState), + }, + LatestBlockHeader: beaconState.LatestBlockHeader(), + BlockRoots: beaconState.BlockRoots(), + StateRoots: beaconState.StateRoots(), + HistoricalRoots: historicalRoots, + Eth1Data: beaconState.Eth1Data(), + Eth1DataVotes: beaconState.Eth1DataVotes(), + Eth1DepositIndex: beaconState.Eth1DepositIndex(), + Validators: beaconState.Validators(), + Balances: beaconState.Balances(), + RandaoMixes: beaconState.RandaoMixes(), + Slashings: beaconState.Slashings(), + PreviousEpochParticipation: prevEpochParticipation, + CurrentEpochParticipation: currentEpochParticipation, + JustificationBits: beaconState.JustificationBits(), + PreviousJustifiedCheckpoint: beaconState.PreviousJustifiedCheckpoint(), + CurrentJustifiedCheckpoint: beaconState.CurrentJustifiedCheckpoint(), + FinalizedCheckpoint: beaconState.FinalizedCheckpoint(), + InactivityScores: inactivityScores, + CurrentSyncCommittee: currentSyncCommittee, + NextSyncCommittee: nextSyncCommittee, + NextWithdrawalIndex: wi, + NextWithdrawalValidatorIndex: vi, + HistoricalSummaries: summaries, + + // TODO: fix this + DepositRequestsStartIndex: 0, + DepositBalanceToConsume: 0, + ExitBalanceToConsume: 0, + EarliestExitEpoch: 0, + ConsolidationBalanceToConsume: 0, + EarliestConsolidationEpoch: 0, + PendingDeposits: make([]*ethpb.PendingDeposit, 0), + PendingPartialWithdrawals: make([]*ethpb.PendingPartialWithdrawal, 0), + PendingConsolidations: make([]*ethpb.PendingConsolidation, 0), + LatestExecutionPayloadHeader: &v1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: make([]byte, 32), + ParentBlockRoot: make([]byte, 32), + BlockHash: make([]byte, 32), + BlobKzgCommitmentsRoot: make([]byte, 32), + }, + LatestBlockHash: latestHeader.BlockHash(), + LatestFullSlot: beaconState.Slot(), + LastWithdrawalsRoot: make([]byte, 32), + } + + post, err := state_native.InitializeFromProtoUnsafeEpbs(s) + if err != nil { + return nil, errors.Wrap(err, "failed to initialize post electra beaconState") + } + + return post, nil +} diff --git a/beacon-chain/core/transition/transition_epbs.go b/beacon-chain/core/transition/transition_epbs.go new file mode 100644 index 000000000000..b297dc8e4cac --- /dev/null +++ b/beacon-chain/core/transition/transition_epbs.go @@ -0,0 +1,111 @@ +package transition + +import ( + "fmt" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/blocks" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/epbs" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "github.com/prysmaticlabs/prysm/v5/time/slots" +) + +func processExecution(state state.BeaconState, body interfaces.ReadOnlyBeaconBlockBody) (err error) { + if body.Version() >= version.EPBS { + state, err = blocks.ProcessWithdrawals(state, nil) + if err != nil { + return errors.Wrap(err, "could not process withdrawals") + } + return processExecutionPayloadHeader(state, body) + } + enabled, err := blocks.IsExecutionEnabled(state, body) + if err != nil { + return errors.Wrap(err, "could not check if execution is enabled") + } + if !enabled { + return nil + } + executionData, err := body.Execution() + if err != nil { + return err + } + if state.Version() >= version.Capella { + state, err = blocks.ProcessWithdrawals(state, executionData) + if err != nil { + return errors.Wrap(err, "could not process withdrawals") + } + } + if err := blocks.ProcessPayload(state, body); err != nil { + return errors.Wrap(err, "could not process execution data") + } + return nil +} + +// This function verifies the signature as it is not necessarily signed by the +// proposer +func processExecutionPayloadHeader(state state.BeaconState, body interfaces.ReadOnlyBeaconBlockBody) (err error) { + sh, err := body.SignedExecutionPayloadHeader() + if err != nil { + return err + } + header, err := sh.Header() + if err != nil { + return err + } + if err := epbs.ValidatePayloadHeaderSignature(state, sh); err != nil { + return err + } + builderIndex := header.BuilderIndex() + builder, err := state.ValidatorAtIndex(builderIndex) + if err != nil { + return err + } + epoch := slots.ToEpoch(state.Slot()) + if builder.ActivationEpoch > epoch || epoch >= builder.ExitEpoch { + return errors.New("builder is not active") + } + if builder.Slashed { + return errors.New("builder is slashed") + } + amount := header.Value() + builderBalance, err := state.BalanceAtIndex(builderIndex) + if err != nil { + return err + } + if amount > primitives.Gwei(builderBalance) { + return errors.New("builder has insufficient balance") + } + // sate.Slot == block.Slot because of process_slot + if header.Slot() != state.Slot() { + return errors.New("incorrect header slot") + } + // the state latest block header has the parent root because of + // process_block_header + blockHeader := state.LatestBlockHeader() + if header.ParentBlockRoot() != [32]byte(blockHeader.ParentRoot) { + return errors.New(fmt.Sprintf("incorrect parent block root, wanted: %#x, got: %#x", blockHeader.ParentRoot, header.ParentBlockRoot())) + } + lbh, err := state.LatestBlockHash() + if err != nil { + return err + } + if header.ParentBlockHash() != [32]byte(lbh) { + return errors.New(fmt.Sprintf("incorrect parent block hash, wanted: %#x, got: %#x", lbh, header.ParentBlockHash())) + } + if err := state.UpdateBalancesAtIndex(builderIndex, builderBalance-uint64(amount)); err != nil { + return err + } + if err := helpers.IncreaseBalance(state, blockHeader.ProposerIndex, uint64(amount)); err != nil { + return err + } + headerEPBS, ok := header.Proto().(*enginev1.ExecutionPayloadHeaderEPBS) + if !ok { + return errors.New("not an ePBS execution payload header") + } + return state.SetLatestExecutionPayloadHeaderEPBS(headerEPBS) +} diff --git a/beacon-chain/core/transition/transition_no_verify_sig.go b/beacon-chain/core/transition/transition_no_verify_sig.go index e633c844d35b..05390e0e152f 100644 --- a/beacon-chain/core/transition/transition_no_verify_sig.go +++ b/beacon-chain/core/transition/transition_no_verify_sig.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/altair" b "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/blocks" - "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/electra" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/epbs" "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/transition/interop" v "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/validators" "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" @@ -132,7 +132,27 @@ func CalculateStateRoot( // Execute per slots transition. var err error - parentRoot := signed.Block().ParentRoot() + var parentRoot [32]byte + // check if based on empty or full + if state.Version() >= version.EPBS { + signedHeader, err := signed.Block().Body().SignedExecutionPayloadHeader() + if err != nil { + return [32]byte{}, errors.Wrap(err, "could not retrieve signed execution payload header") + } + header, err := signedHeader.Header() + if err != nil { + return [32]byte{}, errors.Wrap(err, "could not retrieve execution payload header") + } + lbh, err := state.LatestBlockHash() + if err != nil { + return [32]byte{}, errors.Wrap(err, "could not get state latest block hash") + } + if header.ParentBlockHash() == [32]byte(lbh) { + parentRoot = [32]byte(lbh) + } else { + parentRoot = signed.Block().ParentRoot() + } + } state, err = ProcessSlotsUsingNextSlotCache(ctx, state, parentRoot[:], signed.Block().Slot()) if err != nil { return [32]byte{}, errors.Wrap(err, "could not process slots") @@ -272,7 +292,7 @@ func ProcessOperationsNoVerifyAttsSigs( return nil, err } } else { - state, err = electra.ProcessOperations(ctx, state, beaconBlock) + state, err = epbs.ProcessOperations(ctx, state, beaconBlock) if err != nil { return nil, err } @@ -318,26 +338,9 @@ func ProcessBlockForStateRoot( return nil, errors.Wrap(err, "could not process block header") } - enabled, err := b.IsExecutionEnabled(state, blk.Body()) - if err != nil { - return nil, errors.Wrap(err, "could not check if execution is enabled") - } - if enabled { - executionData, err := blk.Body().Execution() - if err != nil { - return nil, err - } - if state.Version() >= version.Capella { - state, err = b.ProcessWithdrawals(state, executionData) - if err != nil { - return nil, errors.Wrap(err, "could not process withdrawals") - } - } - if err = b.ProcessPayload(state, blk.Body()); err != nil { - return nil, errors.Wrap(err, "could not process execution data") - } + if err := processExecution(state, blk.Body()); err != nil { + return nil, errors.Wrap(err, "could not process execution") } - randaoReveal := signed.Block().Body().RandaoReveal() state, err = b.ProcessRandaoNoVerify(state, randaoReveal[:]) if err != nil { diff --git a/beacon-chain/core/validators/slashing.go b/beacon-chain/core/validators/slashing.go index 1149ac78773a..f307208efcf9 100644 --- a/beacon-chain/core/validators/slashing.go +++ b/beacon-chain/core/validators/slashing.go @@ -22,7 +22,7 @@ func SlashingParamsPerVersion(v int) (slashingQuotient, proposerRewardQuotient, slashingQuotient = cfg.MinSlashingPenaltyQuotientBellatrix proposerRewardQuotient = cfg.ProposerRewardQuotient whistleblowerRewardQuotient = cfg.WhistleBlowerRewardQuotient - case version.Electra: + case version.Electra, version.EPBS: slashingQuotient = cfg.MinSlashingPenaltyQuotientElectra proposerRewardQuotient = cfg.ProposerRewardQuotient whistleblowerRewardQuotient = cfg.WhistleBlowerRewardQuotientElectra diff --git a/beacon-chain/db/iface/BUILD.bazel b/beacon-chain/db/iface/BUILD.bazel index 993d1fd84c98..7e5bc8058e2d 100644 --- a/beacon-chain/db/iface/BUILD.bazel +++ b/beacon-chain/db/iface/BUILD.bazel @@ -18,6 +18,7 @@ go_library( "//consensus-types/primitives:go_default_library", "//monitoring/backup:go_default_library", "//proto/dbval:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/eth/v2:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", diff --git a/beacon-chain/db/iface/interface.go b/beacon-chain/db/iface/interface.go index b75960ef553c..556c674aa12e 100644 --- a/beacon-chain/db/iface/interface.go +++ b/beacon-chain/db/iface/interface.go @@ -18,6 +18,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" "github.com/prysmaticlabs/prysm/v5/monitoring/backup" "github.com/prysmaticlabs/prysm/v5/proto/dbval" + engine "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" ) @@ -25,11 +26,13 @@ import ( type ReadOnlyDatabase interface { // Block related methods. Block(ctx context.Context, blockRoot [32]byte) (interfaces.ReadOnlySignedBeaconBlock, error) + SignedExecutionPayloadHeader(ctx context.Context, blockRoot [32]byte) (interfaces.ROSignedExecutionPayloadHeader, error) Blocks(ctx context.Context, f *filters.QueryFilter) ([]interfaces.ReadOnlySignedBeaconBlock, [][32]byte, error) BlockRoots(ctx context.Context, f *filters.QueryFilter) ([][32]byte, error) BlocksBySlot(ctx context.Context, slot primitives.Slot) ([]interfaces.ReadOnlySignedBeaconBlock, error) BlockRootsBySlot(ctx context.Context, slot primitives.Slot) (bool, [][32]byte, error) HasBlock(ctx context.Context, blockRoot [32]byte) bool + HasBlindPayloadEnvelope(ctx context.Context, hash [32]byte) bool GenesisBlock(ctx context.Context) (interfaces.ReadOnlySignedBeaconBlock, error) GenesisBlockRoot(ctx context.Context) ([32]byte, error) IsFinalizedBlock(ctx context.Context, blockRoot [32]byte) bool @@ -55,6 +58,7 @@ type ReadOnlyDatabase interface { DepositContractAddress(ctx context.Context) ([]byte, error) // ExecutionChainData operations. ExecutionChainData(ctx context.Context) (*ethpb.ETH1ChainData, error) + SignedBlindPayloadEnvelope(ctx context.Context, blockHash []byte) (*engine.SignedBlindPayloadEnvelope, error) // Fee recipients operations. FeeRecipientByValidatorID(ctx context.Context, id primitives.ValidatorIndex) (common.Address, error) RegistrationByValidatorID(ctx context.Context, id primitives.ValidatorIndex) (*ethpb.ValidatorRegistrationV1, error) @@ -92,6 +96,7 @@ type NoHeadAccessDatabase interface { SaveDepositContractAddress(ctx context.Context, addr common.Address) error // SaveExecutionChainData operations. SaveExecutionChainData(ctx context.Context, data *ethpb.ETH1ChainData) error + SaveBlindPayloadEnvelope(ctx context.Context, envelope interfaces.ROSignedExecutionPayloadEnvelope) error // Run any required database migrations. RunMigrations(ctx context.Context) error // Fee recipients operations. diff --git a/beacon-chain/db/kv/BUILD.bazel b/beacon-chain/db/kv/BUILD.bazel index 732da2fb5b2a..40ddb5d0ba01 100644 --- a/beacon-chain/db/kv/BUILD.bazel +++ b/beacon-chain/db/kv/BUILD.bazel @@ -6,10 +6,12 @@ go_library( "archived_point.go", "backfill.go", "backup.go", + "blind_payload_envelope.go", "blocks.go", "checkpoint.go", "deposit_contract.go", "encoding.go", + "epbs.go", "error.go", "execution_chain.go", "finalized_block_roots.go", @@ -53,6 +55,7 @@ go_library( "//monitoring/tracing:go_default_library", "//monitoring/tracing/trace:go_default_library", "//proto/dbval:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/eth/v2:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//runtime/version:go_default_library", @@ -70,6 +73,7 @@ go_library( "@com_github_schollz_progressbar_v3//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@io_etcd_go_bbolt//:go_default_library", + "@io_opencensus_go//trace:go_default_library", "@org_golang_google_protobuf//proto:go_default_library", ], ) @@ -80,10 +84,12 @@ go_test( "archived_point_test.go", "backfill_test.go", "backup_test.go", + "blind_payload_envelope_test.go", "blocks_test.go", "checkpoint_test.go", "deposit_contract_test.go", "encoding_test.go", + "epbs_test.go", "execution_chain_test.go", "finalized_block_roots_test.go", "genesis_test.go", @@ -124,6 +130,7 @@ go_test( "//testing/assert:go_default_library", "//testing/require:go_default_library", "//testing/util:go_default_library", + "//testing/util/random:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_golang_snappy//:go_default_library", "@com_github_pkg_errors//:go_default_library", diff --git a/beacon-chain/db/kv/blind_payload_envelope.go b/beacon-chain/db/kv/blind_payload_envelope.go new file mode 100644 index 000000000000..9071f68e612b --- /dev/null +++ b/beacon-chain/db/kv/blind_payload_envelope.go @@ -0,0 +1,76 @@ +package kv + +import ( + "context" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + engine "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + bolt "go.etcd.io/bbolt" + "go.opencensus.io/trace" +) + +// SaveBlindPayloadEnvelope saves a signed execution payload envelope blind in the database. +func (s *Store) SaveBlindPayloadEnvelope(ctx context.Context, signed interfaces.ROSignedExecutionPayloadEnvelope) error { + ctx, span := trace.StartSpan(ctx, "BeaconDB.SaveBlindPayloadEnvelope") + defer span.End() + + pb := signed.Proto() + if pb == nil { + return errors.New("nil payload envelope") + } + env, ok := pb.(*engine.SignedExecutionPayloadEnvelope) + if !ok { + return errors.New("invalid payload envelope") + } + + r := env.Message.Payload.BlockHash + blind := env.Blind() + if blind == nil { + return errors.New("nil blind payload envelope") + } + enc, err := encode(ctx, blind) + if err != nil { + return err + } + err = s.db.Update(func(tx *bolt.Tx) error { + bucket := tx.Bucket(executionPayloadEnvelopeBucket) + return bucket.Put(r, enc) + }) + + return err +} + +// SignedBlindPayloadEnvelope retrieves a signed execution payload envelope blind from the database. +func (s *Store) SignedBlindPayloadEnvelope(ctx context.Context, blockHash []byte) (*engine.SignedBlindPayloadEnvelope, error) { + ctx, span := trace.StartSpan(ctx, "BeaconDB.SignedBlindPayloadEnvelope") + defer span.End() + + env := &engine.SignedBlindPayloadEnvelope{} + err := s.db.View(func(tx *bolt.Tx) error { + bkt := tx.Bucket(executionPayloadEnvelopeBucket) + enc := bkt.Get(blockHash) + if enc == nil { + return ErrNotFound + } + return decode(ctx, enc, env) + }) + return env, err +} + +func (s *Store) HasBlindPayloadEnvelope(ctx context.Context, hash [32]byte) bool { + _, span := trace.StartSpan(ctx, "BeaconDB.HasBlock") + defer span.End() + if v, ok := s.blockCache.Get(string(hash[:])); v != nil && ok { + return true + } + exists := false + if err := s.db.View(func(tx *bolt.Tx) error { + bkt := tx.Bucket(executionPayloadEnvelopeBucket) + exists = bkt.Get(hash[:]) != nil + return nil + }); err != nil { // This view never returns an error, but we'll handle anyway for sanity. + panic(err) + } + return exists +} diff --git a/beacon-chain/db/kv/blind_payload_envelope_test.go b/beacon-chain/db/kv/blind_payload_envelope_test.go new file mode 100644 index 000000000000..8c73cd262b70 --- /dev/null +++ b/beacon-chain/db/kv/blind_payload_envelope_test.go @@ -0,0 +1,23 @@ +package kv + +import ( + "context" + "testing" + + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" +) + +func TestStore_SignedBlindPayloadEnvelope(t *testing.T) { + db := setupDB(t) + ctx := context.Background() + _, err := db.SignedBlindPayloadEnvelope(ctx, []byte("test")) + require.ErrorIs(t, err, ErrNotFound) + + env := random.SignedBlindPayloadEnvelope(t) + err = db.SaveBlindPayloadEnvelope(ctx, env) + require.NoError(t, err) + got, err := db.SignedBlindPayloadEnvelope(ctx, env.Message.BeaconBlockRoot) + require.NoError(t, err) + require.DeepEqual(t, got, env) +} diff --git a/beacon-chain/db/kv/blocks.go b/beacon-chain/db/kv/blocks.go index 459672f95951..0448abb5e6f5 100644 --- a/beacon-chain/db/kv/blocks.go +++ b/beacon-chain/db/kv/blocks.go @@ -823,6 +823,11 @@ func unmarshalBlock(_ context.Context, enc []byte) (interfaces.ReadOnlySignedBea if err := rawBlock.UnmarshalSSZ(enc[len(electraBlindKey):]); err != nil { return nil, errors.Wrap(err, "could not unmarshal blinded Electra block") } + case hasEpbsKey(enc): + rawBlock = ðpb.SignedBeaconBlockEpbs{} + if err := rawBlock.UnmarshalSSZ(enc[len(epbsKey):]); err != nil { + return nil, errors.Wrap(err, "could not unmarshal EPBS block") + } default: // Marshal block bytes to phase 0 beacon block. rawBlock = ðpb.SignedBeaconBlock{} @@ -852,6 +857,8 @@ func encodeBlock(blk interfaces.ReadOnlySignedBeaconBlock) ([]byte, error) { func keyForBlock(blk interfaces.ReadOnlySignedBeaconBlock) ([]byte, error) { switch blk.Version() { + case version.EPBS: + return epbsKey, nil case version.Electra: if blk.IsBlinded() { return electraBlindKey, nil diff --git a/beacon-chain/db/kv/blocks_test.go b/beacon-chain/db/kv/blocks_test.go index cc6805f1fbba..07e8874624be 100644 --- a/beacon-chain/db/kv/blocks_test.go +++ b/beacon-chain/db/kv/blocks_test.go @@ -18,6 +18,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/testing/assert" "github.com/prysmaticlabs/prysm/v5/testing/require" "github.com/prysmaticlabs/prysm/v5/testing/util" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" "google.golang.org/protobuf/proto" ) @@ -146,6 +147,17 @@ var blockTests = []struct { } return blocks.NewSignedBeaconBlock(b) }}, + { + name: "epbs", + newBlock: func(slot primitives.Slot, root []byte) (interfaces.ReadOnlySignedBeaconBlock, error) { + b := random.SignedBeaconBlock(&testing.T{}) + b.Block.Slot = slot + if root != nil { + b.Block.ParentRoot = root + } + return blocks.NewSignedBeaconBlock(b) + }, + }, } func TestStore_SaveBlock_NoDuplicates(t *testing.T) { @@ -202,7 +214,7 @@ func TestStore_BlocksCRUD(t *testing.T) { retrievedBlock, err = db.Block(ctx, blockRoot) require.NoError(t, err) wanted := retrievedBlock - if retrievedBlock.Version() >= version.Bellatrix { + if retrievedBlock.Version() >= version.Bellatrix && retrievedBlock.Version() < version.EPBS { wanted, err = retrievedBlock.ToBlinded() require.NoError(t, err) } @@ -390,7 +402,7 @@ func TestStore_BlocksCRUD_NoCache(t *testing.T) { require.NoError(t, err) wanted := blk - if blk.Version() >= version.Bellatrix { + if blk.Version() >= version.Bellatrix && blk.Version() < version.EPBS { wanted, err = blk.ToBlinded() require.NoError(t, err) } @@ -609,7 +621,7 @@ func TestStore_SaveBlock_CanGetHighestAt(t *testing.T) { b, err := db.Block(ctx, root) require.NoError(t, err) wanted := block1 - if block1.Version() >= version.Bellatrix { + if block1.Version() >= version.Bellatrix && block1.Version() < version.EPBS { wanted, err = wanted.ToBlinded() require.NoError(t, err) } @@ -627,7 +639,7 @@ func TestStore_SaveBlock_CanGetHighestAt(t *testing.T) { b, err = db.Block(ctx, root) require.NoError(t, err) wanted2 := block2 - if block2.Version() >= version.Bellatrix { + if block2.Version() >= version.Bellatrix && block2.Version() < version.EPBS { wanted2, err = block2.ToBlinded() require.NoError(t, err) } @@ -645,7 +657,7 @@ func TestStore_SaveBlock_CanGetHighestAt(t *testing.T) { b, err = db.Block(ctx, root) require.NoError(t, err) wanted = block3 - if block3.Version() >= version.Bellatrix { + if block3.Version() >= version.Bellatrix && block3.Version() < version.EPBS { wanted, err = wanted.ToBlinded() require.NoError(t, err) } @@ -681,7 +693,7 @@ func TestStore_GenesisBlock_CanGetHighestAt(t *testing.T) { b, err := db.Block(ctx, root) require.NoError(t, err) wanted := block1 - if block1.Version() >= version.Bellatrix { + if block1.Version() >= version.Bellatrix && block1.Version() < version.EPBS { wanted, err = block1.ToBlinded() require.NoError(t, err) } @@ -698,7 +710,7 @@ func TestStore_GenesisBlock_CanGetHighestAt(t *testing.T) { b, err = db.Block(ctx, root) require.NoError(t, err) wanted = genesisBlock - if genesisBlock.Version() >= version.Bellatrix { + if genesisBlock.Version() >= version.Bellatrix && genesisBlock.Version() < version.EPBS { wanted, err = genesisBlock.ToBlinded() require.NoError(t, err) } @@ -715,7 +727,7 @@ func TestStore_GenesisBlock_CanGetHighestAt(t *testing.T) { b, err = db.Block(ctx, root) require.NoError(t, err) wanted = genesisBlock - if genesisBlock.Version() >= version.Bellatrix { + if genesisBlock.Version() >= version.Bellatrix && genesisBlock.Version() < version.EPBS { wanted, err = genesisBlock.ToBlinded() require.NoError(t, err) } @@ -811,7 +823,7 @@ func TestStore_BlocksBySlot_BlockRootsBySlot(t *testing.T) { require.NoError(t, err) wanted := b1 - if b1.Version() >= version.Bellatrix { + if b1.Version() >= version.Bellatrix && b1.Version() < version.EPBS { wanted, err = b1.ToBlinded() require.NoError(t, err) } @@ -827,7 +839,7 @@ func TestStore_BlocksBySlot_BlockRootsBySlot(t *testing.T) { t.Fatalf("Expected 2 blocks, received %d blocks", len(retrievedBlocks)) } wanted = b2 - if b2.Version() >= version.Bellatrix { + if b2.Version() >= version.Bellatrix && b2.Version() < version.EPBS { wanted, err = b2.ToBlinded() require.NoError(t, err) } @@ -837,7 +849,7 @@ func TestStore_BlocksBySlot_BlockRootsBySlot(t *testing.T) { require.NoError(t, err) assert.Equal(t, true, proto.Equal(wantedPb, retrieved0Pb), "Wanted: %v, received: %v", retrievedBlocks[0], wanted) wanted = b3 - if b3.Version() >= version.Bellatrix { + if b3.Version() >= version.Bellatrix && b3.Version() < version.EPBS { wanted, err = b3.ToBlinded() require.NoError(t, err) } diff --git a/beacon-chain/db/kv/encoding.go b/beacon-chain/db/kv/encoding.go index 8149120fe2cb..394d1c9edf99 100644 --- a/beacon-chain/db/kv/encoding.go +++ b/beacon-chain/db/kv/encoding.go @@ -8,6 +8,7 @@ import ( "github.com/golang/snappy" fastssz "github.com/prysmaticlabs/fastssz" "github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace" + engine "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" "google.golang.org/protobuf/proto" ) @@ -78,6 +79,8 @@ func isSSZStorageFormat(obj interface{}) bool { return true case *ethpb.VoluntaryExit: return true + case *engine.SignedBlindPayloadEnvelope: + return true case *ethpb.ValidatorRegistrationV1: return true default: diff --git a/beacon-chain/db/kv/epbs.go b/beacon-chain/db/kv/epbs.go new file mode 100644 index 000000000000..146a300df7e0 --- /dev/null +++ b/beacon-chain/db/kv/epbs.go @@ -0,0 +1,18 @@ +package kv + +import ( + "context" + + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" +) + +func (s *Store) SignedExecutionPayloadHeader(ctx context.Context, blockRoot [32]byte) (interfaces.ROSignedExecutionPayloadHeader, error) { + b, err := s.Block(ctx, blockRoot) + if err != nil { + return nil, err + } + if b.IsNil() { + return nil, ErrNotFound + } + return b.Block().Body().SignedExecutionPayloadHeader() +} diff --git a/beacon-chain/db/kv/epbs_test.go b/beacon-chain/db/kv/epbs_test.go new file mode 100644 index 000000000000..d315684b597b --- /dev/null +++ b/beacon-chain/db/kv/epbs_test.go @@ -0,0 +1,28 @@ +package kv + +import ( + "context" + "testing" + + "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" +) + +func Test_SignedExecutionPayloadHeader(t *testing.T) { + db := setupDB(t) + ctx := context.Background() + + b := random.SignedBeaconBlock(t) + blk, err := blocks.NewSignedBeaconBlock(b) + require.NoError(t, err) + blockRoot, err := blk.Block().HashTreeRoot() + require.NoError(t, err) + + require.NoError(t, db.SaveBlock(ctx, blk)) + retrievedHeader, err := db.SignedExecutionPayloadHeader(ctx, blockRoot) + require.NoError(t, err) + wantedHeader, err := blk.Block().Body().SignedExecutionPayloadHeader() + require.NoError(t, err) + require.DeepEqual(t, wantedHeader, retrievedHeader) +} diff --git a/beacon-chain/db/kv/key.go b/beacon-chain/db/kv/key.go index 60fa9052d3d6..1075492b0690 100644 --- a/beacon-chain/db/kv/key.go +++ b/beacon-chain/db/kv/key.go @@ -65,3 +65,10 @@ func hasElectraBlindKey(enc []byte) bool { } return bytes.Equal(enc[:len(electraBlindKey)], electraBlindKey) } + +func hasEpbsKey(enc []byte) bool { + if len(epbsKey) >= len(enc) { + return false + } + return bytes.Equal(enc[:len(epbsKey)], epbsKey) +} diff --git a/beacon-chain/db/kv/kv.go b/beacon-chain/db/kv/kv.go index 63e49e30485d..110ddf784f16 100644 --- a/beacon-chain/db/kv/kv.go +++ b/beacon-chain/db/kv/kv.go @@ -119,6 +119,9 @@ var Buckets = [][]byte{ feeRecipientBucket, registrationBucket, + + // ePBS + executionPayloadEnvelopeBucket, } // KVStoreOption is a functional option that modifies a kv.Store. diff --git a/beacon-chain/db/kv/schema.go b/beacon-chain/db/kv/schema.go index 30d950514ca2..020f4897b9be 100644 --- a/beacon-chain/db/kv/schema.go +++ b/beacon-chain/db/kv/schema.go @@ -7,15 +7,16 @@ package kv // it easy to scan for keys that have a certain shard number as a prefix and return those // corresponding attestations. var ( - blocksBucket = []byte("blocks") - stateBucket = []byte("state") - stateSummaryBucket = []byte("state-summary") - chainMetadataBucket = []byte("chain-metadata") - checkpointBucket = []byte("check-point") - powchainBucket = []byte("powchain") - stateValidatorsBucket = []byte("state-validators") - feeRecipientBucket = []byte("fee-recipient") - registrationBucket = []byte("registration") + blocksBucket = []byte("blocks") + stateBucket = []byte("state") + stateSummaryBucket = []byte("state-summary") + chainMetadataBucket = []byte("chain-metadata") + checkpointBucket = []byte("check-point") + powchainBucket = []byte("powchain") + stateValidatorsBucket = []byte("state-validators") + feeRecipientBucket = []byte("fee-recipient") + registrationBucket = []byte("registration") + executionPayloadEnvelopeBucket = []byte("execution-payload-envelope") // Light Client Updates Bucket lightClientUpdatesBucket = []byte("light-client-updates") @@ -53,6 +54,7 @@ var ( denebBlindKey = []byte("blind-deneb") electraKey = []byte("electra") electraBlindKey = []byte("blind-electra") + epbsKey = []byte("epbs") // block root included in the beacon state used by weak subjectivity initial sync originCheckpointBlockRootKey = []byte("origin-checkpoint-block-root") diff --git a/beacon-chain/db/kv/state.go b/beacon-chain/db/kv/state.go index 8f840448d452..fca1a14fbc1e 100644 --- a/beacon-chain/db/kv/state.go +++ b/beacon-chain/db/kv/state.go @@ -253,6 +253,10 @@ func (s *Store) saveStatesEfficientInternal(ctx context.Context, tx *bolt.Tx, bl if err := s.processElectra(ctx, rawType, rt[:], bucket, valIdxBkt, validatorKeys[i]); err != nil { return err } + case *ethpb.BeaconStateEPBS: + if err := s.processEPBS(ctx, rawType, rt[:], bucket, valIdxBkt, validatorKeys[i]); err != nil { + return err + } default: return errors.New("invalid state type") } @@ -368,6 +372,24 @@ func (s *Store) processElectra(ctx context.Context, pbState *ethpb.BeaconStateEl return nil } +func (s *Store) processEPBS(ctx context.Context, pbState *ethpb.BeaconStateEPBS, rootHash []byte, bucket, valIdxBkt *bolt.Bucket, validatorKey []byte) error { + valEntries := pbState.Validators + pbState.Validators = make([]*ethpb.Validator, 0) + rawObj, err := pbState.MarshalSSZ() + if err != nil { + return err + } + encodedState := snappy.Encode(nil, append(epbsKey, rawObj...)) + if err := bucket.Put(rootHash, encodedState); err != nil { + return err + } + pbState.Validators = valEntries + if err := valIdxBkt.Put(rootHash, validatorKey); err != nil { + return err + } + return nil +} + func (s *Store) storeValidatorEntriesSeparately(ctx context.Context, tx *bolt.Tx, validatorsEntries map[string]*ethpb.Validator) error { valBkt := tx.Bucket(stateValidatorsBucket) for hashStr, validatorEntry := range validatorsEntries { @@ -517,6 +539,19 @@ func (s *Store) unmarshalState(_ context.Context, enc []byte, validatorEntries [ } switch { + case hasEpbsKey(enc): + protoState := ðpb.BeaconStateEPBS{} + if err := protoState.UnmarshalSSZ(enc[len(epbsKey):]); err != nil { + return nil, errors.Wrap(err, "failed to unmarshal encoding for EPBS") + } + ok, err := s.isStateValidatorMigrationOver() + if err != nil { + return nil, err + } + if ok { + protoState.Validators = validatorEntries + } + return statenative.InitializeFromProtoEpbs(protoState) case hasElectraKey(enc): protoState := ðpb.BeaconStateElectra{} if err := protoState.UnmarshalSSZ(enc[len(electraKey):]); err != nil { @@ -676,6 +711,19 @@ func marshalState(ctx context.Context, st state.ReadOnlyBeaconState) ([]byte, er return nil, err } return snappy.Encode(nil, append(electraKey, rawObj...)), nil + case version.EPBS: + rState, ok := st.ToProtoUnsafe().(*ethpb.BeaconStateEPBS) + if !ok { + return nil, errors.New("non valid inner state") + } + if rState == nil { + return nil, errors.New("nil state") + } + rawObj, err := rState.MarshalSSZ() + if err != nil { + return nil, err + } + return snappy.Encode(nil, append(epbsKey, rawObj...)), nil default: return nil, errors.New("invalid inner state") } diff --git a/beacon-chain/db/kv/state_test.go b/beacon-chain/db/kv/state_test.go index 0083dc8b8858..6c49c060eb35 100644 --- a/beacon-chain/db/kv/state_test.go +++ b/beacon-chain/db/kv/state_test.go @@ -9,6 +9,7 @@ import ( "time" "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + statenative "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native" "github.com/prysmaticlabs/prysm/v5/config/features" "github.com/prysmaticlabs/prysm/v5/config/params" "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" @@ -20,6 +21,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/testing/assert" "github.com/prysmaticlabs/prysm/v5/testing/require" "github.com/prysmaticlabs/prysm/v5/testing/util" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" bolt "go.etcd.io/bbolt" ) @@ -156,6 +158,16 @@ func TestState_CanSaveRetrieve(t *testing.T) { }, rootSeed: 'E', }, + { + name: "epbs", + s: func() state.BeaconState { + stPb := random.BeaconState(t) + st, err := statenative.InitializeFromProtoUnsafeEpbs(stPb) + require.NoError(t, err) + return st + }, + rootSeed: 'F', + }, } db := setupDB(t) @@ -1110,6 +1122,26 @@ func TestDenebState_CanDelete(t *testing.T) { require.Equal(t, state.ReadOnlyBeaconState(nil), savedS, "Unsaved state should've been nil") } +func TestEpbsState_CanDelete(t *testing.T) { + db := setupDB(t) + + r := [32]byte{'A'} + + require.Equal(t, false, db.HasState(context.Background(), r)) + + s := random.BeaconState(t) + st, err := statenative.InitializeFromProtoUnsafeEpbs(s) + require.NoError(t, err) + + require.NoError(t, db.SaveState(context.Background(), st, r)) + require.Equal(t, true, db.HasState(context.Background(), r)) + + require.NoError(t, db.DeleteState(context.Background(), r)) + savedS, err := db.State(context.Background(), r) + require.NoError(t, err) + require.Equal(t, state.ReadOnlyBeaconState(nil), savedS, "Unsaved state should've been nil") +} + func TestStateDeneb_CanSaveRetrieveValidatorEntries(t *testing.T) { db := setupDB(t) diff --git a/beacon-chain/execution/engine_client.go b/beacon-chain/execution/engine_client.go index 6acb0eafd7d1..529cb1a96afd 100644 --- a/beacon-chain/execution/engine_client.go +++ b/beacon-chain/execution/engine_client.go @@ -233,7 +233,7 @@ func (s *Service) ForkchoiceUpdated( if err != nil { return nil, nil, handleRPCError(err) } - case version.Deneb, version.Electra: + case version.Deneb, version.Electra, version.EPBS: a, err := attrs.PbV3() if err != nil { return nil, nil, err diff --git a/beacon-chain/forkchoice/BUILD.bazel b/beacon-chain/forkchoice/BUILD.bazel index 7b922444c9f8..4418befea452 100644 --- a/beacon-chain/forkchoice/BUILD.bazel +++ b/beacon-chain/forkchoice/BUILD.bazel @@ -20,6 +20,7 @@ go_library( "//config/fieldparams:go_default_library", "//consensus-types/blocks:go_default_library", "//consensus-types/forkchoice:go_default_library", + "//consensus-types/interfaces:go_default_library", "//consensus-types/primitives:go_default_library", "@com_github_pkg_errors//:go_default_library", ], diff --git a/beacon-chain/forkchoice/doubly-linked-tree/BUILD.bazel b/beacon-chain/forkchoice/doubly-linked-tree/BUILD.bazel index 1bf47ea02a47..1df5f4599fde 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/BUILD.bazel +++ b/beacon-chain/forkchoice/doubly-linked-tree/BUILD.bazel @@ -4,6 +4,7 @@ go_library( name = "go_default_library", srcs = [ "doc.go", + "epbs.go", "errors.go", "forkchoice.go", "last_root.go", @@ -31,6 +32,7 @@ go_library( "//config/params:go_default_library", "//consensus-types/blocks:go_default_library", "//consensus-types/forkchoice:go_default_library", + "//consensus-types/interfaces:go_default_library", "//consensus-types/primitives:go_default_library", "//encoding/bytesutil:go_default_library", "//monitoring/tracing/trace:go_default_library", @@ -47,6 +49,7 @@ go_library( go_test( name = "go_default_test", srcs = [ + "epbs_test.go", "ffg_update_test.go", "forkchoice_test.go", "last_root_test.go", @@ -71,12 +74,12 @@ go_test( "//consensus-types/forkchoice:go_default_library", "//consensus-types/primitives:go_default_library", "//crypto/hash:go_default_library", - "//encoding/bytesutil:go_default_library", "//proto/engine/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//testing/assert:go_default_library", "//testing/require:go_default_library", "//testing/util:go_default_library", "//time/slots:go_default_library", + "@com_github_prysmaticlabs_go_bitfield//:go_default_library", ], ) diff --git a/beacon-chain/forkchoice/doubly-linked-tree/epbs.go b/beacon-chain/forkchoice/doubly-linked-tree/epbs.go new file mode 100644 index 000000000000..30271febdbb7 --- /dev/null +++ b/beacon-chain/forkchoice/doubly-linked-tree/epbs.go @@ -0,0 +1,91 @@ +package doublylinkedtree + +import ( + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/time/slots" +) + +func (f *ForkChoice) GetPTCVote() primitives.PTCStatus { + highestNode := f.store.highestReceivedNode + if highestNode == nil { + return primitives.PAYLOAD_ABSENT + } + if slots.CurrentSlot(f.store.genesisTime) > highestNode.block.slot { + return primitives.PAYLOAD_ABSENT + } + if highestNode.full { + return primitives.PAYLOAD_PRESENT + } + return primitives.PAYLOAD_ABSENT +} + +func (f *ForkChoice) insertExecutionPayload(b *BlockNode, e interfaces.ExecutionData) error { + s := f.store + hash := [32]byte(e.BlockHash()) + if _, ok := s.fullNodeByPayload[hash]; ok { + // We ignore nodes with the give payload hash already included + return nil + } + n := &Node{ + block: b, + children: make([]*Node, 0), + full: true, + optimistic: true, + } + if n.block.parent != nil { + n.block.parent.children = append(n.block.parent.children, n) + } else { + // make this the tree node + f.store.treeRootNode = n + } + s.fullNodeByPayload[hash] = n + s.updateWithPayload(n) + processedPayloadCount.Inc() + payloadCount.Set(float64(len(s.fullNodeByPayload))) + + // make this node head if the empty node was + if s.headNode.block == n.block { + s.headNode = n + } + if b.slot == s.highestReceivedNode.block.slot { + s.highestReceivedNode = n + } + return nil +} + +// InsertPayloadEnvelope adds a full node to forkchoice from the given payload +// envelope. +func (f *ForkChoice) InsertPayloadEnvelope(envelope interfaces.ROExecutionPayloadEnvelope) error { + s := f.store + b, ok := s.emptyNodeByRoot[envelope.BeaconBlockRoot()] + if !ok { + return ErrNilNode + } + e, err := envelope.Execution() + if err != nil { + return err + } + return f.insertExecutionPayload(b.block, e) +} + +func (s *Store) updateWithPayload(n *Node) { + for _, node := range s.emptyNodeByRoot { + if node.bestDescendant != nil && node.bestDescendant.block == n.block { + node.bestDescendant = n + } + } + for _, node := range s.fullNodeByPayload { + if node.bestDescendant != nil && node.bestDescendant.block == n.block { + node.bestDescendant = n + } + } +} + +func (f *ForkChoice) HashForBlockRoot(root [32]byte) [32]byte { + node, ok := f.store.emptyNodeByRoot[root] + if !ok { + return [32]byte{} + } + return node.block.payloadHash +} diff --git a/beacon-chain/forkchoice/doubly-linked-tree/epbs_test.go b/beacon-chain/forkchoice/doubly-linked-tree/epbs_test.go new file mode 100644 index 000000000000..8358a1611fd6 --- /dev/null +++ b/beacon-chain/forkchoice/doubly-linked-tree/epbs_test.go @@ -0,0 +1,27 @@ +package doublylinkedtree + +import ( + "context" + "testing" + + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/testing/require" +) + +func TestFullInsertionPreEPBS(t *testing.T) { + ctx := context.Background() + f := setup(1, 1) + require.Equal(t, 1, f.NodeCount()) + + payloadHash := [32]byte{'A'} + state, blk, err := prepareForkchoiceState(ctx, f, 1, [32]byte{'a'}, params.BeaconConfig().ZeroHash, payloadHash, 1, 1) + require.NoError(t, err) + require.NoError(t, f.InsertNode(ctx, state, blk)) + node, ok := f.store.emptyNodeByRoot[blk.Root()] + require.Equal(t, true, ok) + require.Equal(t, blk.Root(), node.block.root) + + fullNode, ok := f.store.fullNodeByPayload[payloadHash] + require.Equal(t, true, ok) + require.Equal(t, payloadHash, fullNode.block.payloadHash) +} diff --git a/beacon-chain/forkchoice/doubly-linked-tree/ffg_update_test.go b/beacon-chain/forkchoice/doubly-linked-tree/ffg_update_test.go index bbed0d5b23fb..ea59c995d17b 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/ffg_update_test.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/ffg_update_test.go @@ -20,6 +20,8 @@ func TestFFGUpdates_OneBranch(t *testing.T) { r, err := f.Head(context.Background()) require.NoError(t, err) assert.Equal(t, params.BeaconConfig().ZeroHash, r, "Incorrect head with genesis") + // check that the head is the full block + require.Equal(t, true, f.store.headNode.full) // Define the following tree: // 0 <- justified: 0, finalized: 0 @@ -29,13 +31,13 @@ func TestFFGUpdates_OneBranch(t *testing.T) { // 2 <- justified: 1, finalized: 0 // | // 3 <- justified: 2, finalized: 1 - state, blkRoot, err := prepareForkchoiceState(context.Background(), 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(context.Background(), f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, indexToHash(101), 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 2, indexToHash(2), indexToHash(1), indexToHash(102), 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 2, 1) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 3, indexToHash(3), indexToHash(2), indexToHash(103), 2, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) @@ -101,35 +103,35 @@ func TestFFGUpdates_TwoBranches(t *testing.T) { // | | // justified: 2, finalized: 0 -> 9 10 <- justified: 2, finalized: 0 // Left branch. - state, blkRoot, err := prepareForkchoiceState(context.Background(), 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(context.Background(), f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 2, indexToHash(3), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 2, indexToHash(3), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 3, indexToHash(5), indexToHash(3), params.BeaconConfig().ZeroHash, 1, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 3, indexToHash(5), indexToHash(3), params.BeaconConfig().ZeroHash, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 4, indexToHash(7), indexToHash(5), params.BeaconConfig().ZeroHash, 1, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 4, indexToHash(7), indexToHash(5), params.BeaconConfig().ZeroHash, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 4, indexToHash(9), indexToHash(7), params.BeaconConfig().ZeroHash, 2, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 4, indexToHash(9), indexToHash(7), params.BeaconConfig().ZeroHash, 2, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) // Right branch. - state, blkRoot, err = prepareForkchoiceState(context.Background(), 1, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 1, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 2, indexToHash(4), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 2, indexToHash(4), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 3, indexToHash(6), indexToHash(4), params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 3, indexToHash(6), indexToHash(4), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 4, indexToHash(8), indexToHash(6), params.BeaconConfig().ZeroHash, 1, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 4, indexToHash(8), indexToHash(6), params.BeaconConfig().ZeroHash, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 4, indexToHash(10), indexToHash(8), params.BeaconConfig().ZeroHash, 2, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 4, indexToHash(10), indexToHash(8), params.BeaconConfig().ZeroHash, 2, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) @@ -220,12 +222,12 @@ func setup(justifiedEpoch, finalizedEpoch primitives.Epoch) *ForkChoice { f := New() f.store.justifiedCheckpoint = &forkchoicetypes.Checkpoint{Epoch: justifiedEpoch, Root: params.BeaconConfig().ZeroHash} f.store.finalizedCheckpoint = &forkchoicetypes.Checkpoint{Epoch: finalizedEpoch, Root: params.BeaconConfig().ZeroHash} - state, blkRoot, err := prepareForkchoiceState(ctx, 0, params.BeaconConfig().ZeroHash, [32]byte{}, params.BeaconConfig().ZeroHash, justifiedEpoch, finalizedEpoch) + state, blk, err := prepareForkchoiceState(ctx, f, 0, params.BeaconConfig().ZeroHash, [32]byte{}, params.BeaconConfig().ZeroHash, justifiedEpoch, finalizedEpoch) if err != nil { return nil } f.SetBalancesByRooter(func(_ context.Context, _ [32]byte) ([]uint64, error) { return f.justifiedBalances, nil }) - err = f.InsertNode(ctx, state, blkRoot) + err = f.InsertNode(ctx, state, blk) if err != nil { return nil } diff --git a/beacon-chain/forkchoice/doubly-linked-tree/forkchoice.go b/beacon-chain/forkchoice/doubly-linked-tree/forkchoice.go index 47ed987475fa..0933c4b266cf 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/forkchoice.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/forkchoice.go @@ -17,6 +17,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" "github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" "github.com/prysmaticlabs/prysm/v5/time/slots" "github.com/sirupsen/logrus" ) @@ -30,8 +31,8 @@ func New() *ForkChoice { prevJustifiedCheckpoint: &forkchoicetypes.Checkpoint{}, finalizedCheckpoint: &forkchoicetypes.Checkpoint{}, proposerBoostRoot: [32]byte{}, - nodeByRoot: make(map[[fieldparams.RootLength]byte]*Node), - nodeByPayload: make(map[[fieldparams.RootLength]byte]*Node), + emptyNodeByRoot: make(map[[fieldparams.RootLength]byte]*Node), + fullNodeByPayload: make(map[[fieldparams.RootLength]byte]*Node), slashedIndices: make(map[primitives.ValidatorIndex]bool), receivedBlocksLastEpoch: [fieldparams.SlotsPerEpoch]primitives.Slot{}, } @@ -43,7 +44,7 @@ func New() *ForkChoice { // NodeCount returns the current number of nodes in the Store. func (f *ForkChoice) NodeCount() int { - return len(f.store.nodeByRoot) + return len(f.store.emptyNodeByRoot) } // Head returns the head root from fork choice store. @@ -79,7 +80,7 @@ func (f *ForkChoice) Head( // ProcessAttestation processes attestation for vote accounting, it iterates around validator indices // and update their votes accordingly. -func (f *ForkChoice) ProcessAttestation(ctx context.Context, validatorIndices []uint64, blockRoot [32]byte, targetEpoch primitives.Epoch) { +func (f *ForkChoice) ProcessAttestation(ctx context.Context, validatorIndices []uint64, blockRoot [32]byte, attSlot primitives.Slot) { _, span := trace.StartSpan(ctx, "doublyLinkedForkchoice.ProcessAttestation") defer span.End() @@ -93,9 +94,9 @@ func (f *ForkChoice) ProcessAttestation(ctx context.Context, validatorIndices [] newVote := f.votes[index].nextRoot == params.BeaconConfig().ZeroHash && f.votes[index].currentRoot == params.BeaconConfig().ZeroHash - // Vote gets updated if it's newly allocated or high target epoch. - if newVote || targetEpoch > f.votes[index].nextEpoch { - f.votes[index].nextEpoch = targetEpoch + // Vote gets updated if it's newly allocated or higher attestation slot. + if newVote || attSlot > f.votes[index].slot { + f.votes[index].slot = attSlot f.votes[index].nextRoot = blockRoot } } @@ -125,12 +126,29 @@ func (f *ForkChoice) InsertNode(ctx context.Context, state state.BeaconState, ro jc, fc = f.store.pullTips(state, node, jc, fc) if err := f.updateCheckpoints(ctx, jc, fc); err != nil { - _, remErr := f.store.removeNode(ctx, node) + emptyNode := f.store.emptyNodeByRoot[node.root] + _, remErr := f.store.removeNode(ctx, emptyNode) if remErr != nil { log.WithError(remErr).Error("could not remove node") } return errors.Wrap(err, "could not update checkpoints") } + if roblock.Version() >= version.EPBS { + return nil + } + if roblock.Version() >= version.Bellatrix { + e, err := roblock.Block().Body().Execution() + if err != nil { + return errors.Wrap(err, "could not get execution data") + } + currentEpoch := slots.EpochsSinceGenesis(time.Unix(int64(f.store.genesisTime), 0)) + if err := f.store.treeRootNode.updateBestDescendant(ctx, jc.Epoch, fc.Epoch, currentEpoch); err != nil { + return err + } + if err := f.insertExecutionPayload(node, e); err != nil { + return errors.Wrap(err, "could not insert execution payload to forkchoice") + } + } return nil } @@ -156,16 +174,28 @@ func (f *ForkChoice) updateCheckpoints(ctx context.Context, jc, fc *ethpb.Checkp // HasNode returns true if the node exists in fork choice store, // false else wise. func (f *ForkChoice) HasNode(root [32]byte) bool { - _, ok := f.store.nodeByRoot[root] + _, ok := f.store.emptyNodeByRoot[root] + return ok +} + +// HasHash returns true if the node with the given payload hash exists in fork choice store, +// false else wise. +func (f *ForkChoice) HasHash(hash [32]byte) bool { + _, ok := f.store.fullNodeByPayload[hash] return ok } // IsCanonical returns true if the given root is part of the canonical chain. +// TODO: change the API to pass also full/empty func (f *ForkChoice) IsCanonical(root [32]byte) bool { - node, ok := f.store.nodeByRoot[root] + node, ok := f.store.emptyNodeByRoot[root] if !ok || node == nil { return false } + fullNode, ok := f.store.fullNodeByPayload[node.block.payloadHash] + if ok { + node = fullNode + } if node.bestDescendant == nil { if f.store.headNode.bestDescendant == nil { @@ -185,7 +215,7 @@ func (f *ForkChoice) IsOptimistic(root [32]byte) (bool, error) { return true, nil } - node, ok := f.store.nodeByRoot[root] + node, ok := f.store.emptyNodeByRoot[root] if !ok || node == nil { return true, ErrNilNode } @@ -197,31 +227,37 @@ func (f *ForkChoice) IsOptimistic(root [32]byte) (bool, error) { func (f *ForkChoice) AncestorRoot(ctx context.Context, root [32]byte, slot primitives.Slot) ([32]byte, error) { ctx, span := trace.StartSpan(ctx, "doublyLinkedForkchoice.AncestorRoot") defer span.End() + return f.store.ancestorRoot(ctx, root, slot) +} - node, ok := f.store.nodeByRoot[root] +func (s *Store) ancestorRoot(ctx context.Context, root [32]byte, slot primitives.Slot) ([32]byte, error) { + ctx, span := trace.StartSpan(ctx, "doublyLinkedForkchoice.AncestorRoot") + defer span.End() + + node, ok := s.emptyNodeByRoot[root] if !ok || node == nil { return [32]byte{}, errors.Wrap(ErrNilNode, "could not determine ancestor root") } n := node - for n != nil && n.slot > slot { + for n != nil && n.block.slot > slot { if ctx.Err() != nil { return [32]byte{}, ctx.Err() } - n = n.parent + n = n.block.parent } if n == nil { return [32]byte{}, errors.Wrap(ErrNilNode, "could not determine ancestor root") } - return n.root, nil + return n.block.root, nil } // IsViableForCheckpoint returns whether the root passed is a checkpoint root for any // known chain in forkchoice. func (f *ForkChoice) IsViableForCheckpoint(cp *forkchoicetypes.Checkpoint) (bool, error) { - node, ok := f.store.nodeByRoot[cp.Root] + node, ok := f.store.emptyNodeByRoot[cp.Root] if !ok || node == nil { return false, nil } @@ -229,22 +265,30 @@ func (f *ForkChoice) IsViableForCheckpoint(cp *forkchoicetypes.Checkpoint) (bool if err != nil { return false, err } - if node.slot > epochStart { + if node.block.slot > epochStart { return false, nil } + fullNode := f.store.fullNodeByPayload[node.block.payloadHash] + if len(node.children) == 0 { - return true, nil + if fullNode != nil && len(fullNode.children) == 0 { + return true, nil + } } - if node.slot == epochStart { + if node.block.slot == epochStart { return true, nil } - nodeEpoch := slots.ToEpoch(node.slot) - if nodeEpoch >= cp.Epoch { + for _, child := range node.children { + if child.block.slot > epochStart { + return true, nil + } + } + if fullNode == nil { return false, nil } - for _, child := range node.children { - if child.slot > epochStart { + for _, child := range fullNode.children { + if child.block.slot > epochStart { return true, nil } } @@ -284,34 +328,35 @@ func (f *ForkChoice) updateBalances() error { if vote.currentRoot != vote.nextRoot || oldBalance != newBalance { // Ignore the vote if the root is not in fork choice // store, that means we have not seen the block before. - nextNode, ok := f.store.nodeByRoot[vote.nextRoot] + nextNode, ok := f.store.emptyNodeByRoot[vote.nextRoot] if ok && vote.nextRoot != zHash { // Protection against nil node if nextNode == nil { return errors.Wrap(ErrNilNode, "could not update balances") } - nextNode.balance += newBalance + // New votes count both for full and empty nodes + nextNode.block.balance += newBalance } - currentNode, ok := f.store.nodeByRoot[vote.currentRoot] + currentNode, ok := f.store.emptyNodeByRoot[vote.currentRoot] if ok && vote.currentRoot != zHash { // Protection against nil node if currentNode == nil { return errors.Wrap(ErrNilNode, "could not update balances") } - if currentNode.balance < oldBalance { + if currentNode.block.balance < oldBalance { log.WithFields(logrus.Fields{ "nodeRoot": fmt.Sprintf("%#x", bytesutil.Trunc(vote.currentRoot[:])), "oldBalance": oldBalance, - "nodeBalance": currentNode.balance, - "nodeWeight": currentNode.weight, + "nodeBalance": currentNode.block.balance, + "emptyNodeWeight": currentNode.weight, "proposerBoostRoot": fmt.Sprintf("%#x", bytesutil.Trunc(f.store.proposerBoostRoot[:])), "previousProposerBoostRoot": fmt.Sprintf("%#x", bytesutil.Trunc(f.store.previousProposerBoostRoot[:])), "previousProposerBoostScore": f.store.previousProposerBoostScore, }).Warning("node with invalid balance, setting it to zero") - currentNode.balance = 0 + currentNode.block.balance = 0 } else { - currentNode.balance -= oldBalance + currentNode.block.balance -= oldBalance } } } @@ -336,7 +381,7 @@ func (f *ForkChoice) ProposerBoost() [fieldparams.RootLength]byte { // SetOptimisticToValid sets the node with the given root as a fully validated node func (f *ForkChoice) SetOptimisticToValid(ctx context.Context, root [fieldparams.RootLength]byte) error { - node, ok := f.store.nodeByRoot[root] + node, ok := f.store.emptyNodeByRoot[root] if !ok || node == nil { return errors.Wrap(ErrNilNode, "could not set node to valid") } @@ -383,15 +428,15 @@ func (f *ForkChoice) InsertSlashedIndex(_ context.Context, index primitives.Vali return } - node, ok := f.store.nodeByRoot[f.votes[index].currentRoot] + node, ok := f.store.emptyNodeByRoot[f.votes[index].currentRoot] if !ok || node == nil { return } - if node.balance < f.balances[index] { - node.balance = 0 + if node.block.balance < f.balances[index] { + node.block.balance = 0 } else { - node.balance -= f.balances[index] + node.block.balance -= f.balances[index] } } @@ -418,21 +463,22 @@ func (f *ForkChoice) UpdateFinalizedCheckpoint(fc *forkchoicetypes.Checkpoint) e } // CommonAncestor returns the common ancestor root and slot between the two block roots r1 and r2. +// TODO: change the API to pass full/empty not just roots. func (f *ForkChoice) CommonAncestor(ctx context.Context, r1 [32]byte, r2 [32]byte) ([32]byte, primitives.Slot, error) { ctx, span := trace.StartSpan(ctx, "doublyLinkedForkchoice.CommonAncestorRoot") defer span.End() - n1, ok := f.store.nodeByRoot[r1] + n1, ok := f.store.emptyNodeByRoot[r1] if !ok || n1 == nil { return [32]byte{}, 0, forkchoice.ErrUnknownCommonAncestor } // Do nothing if the input roots are the same. if r1 == r2 { - return r1, n1.slot, nil + return r1, n1.block.slot, nil } - n2, ok := f.store.nodeByRoot[r2] + n2, ok := f.store.emptyNodeByRoot[r2] if !ok || n2 == nil { return [32]byte{}, 0, forkchoice.ErrUnknownCommonAncestor } @@ -441,23 +487,28 @@ func (f *ForkChoice) CommonAncestor(ctx context.Context, r1 [32]byte, r2 [32]byt if ctx.Err() != nil { return [32]byte{}, 0, ctx.Err() } - if n1.slot > n2.slot { - n1 = n1.parent + if n1.block.slot > n2.block.slot { + n1 = n1.block.parent // Reaches the end of the tree and unable to find common ancestor. // This should not happen at runtime as the finalized // node has to be a common ancestor if n1 == nil { return [32]byte{}, 0, forkchoice.ErrUnknownCommonAncestor } - } else { - n2 = n2.parent + } else if n1.block.slot < n2.block.slot { + n2 = n2.block.parent // Reaches the end of the tree and unable to find common ancestor. if n2 == nil { return [32]byte{}, 0, forkchoice.ErrUnknownCommonAncestor } - } - if n1 == n2 { - return n1.root, n1.slot, nil + } else { + if n1.block.root == n2.block.root { + return n1.block.root, n1.block.slot, nil + } + n1 = n1.block.parent + if n1 == nil { + return [32]byte{}, 0, forkchoice.ErrUnknownCommonAncestor + } } } } @@ -501,40 +552,40 @@ func (f *ForkChoice) CachedHeadRoot() [32]byte { if node == nil { return [32]byte{} } - return f.store.headNode.root + return f.store.headNode.block.root } // FinalizedPayloadBlockHash returns the hash of the payload at the finalized checkpoint func (f *ForkChoice) FinalizedPayloadBlockHash() [32]byte { root := f.FinalizedCheckpoint().Root - node, ok := f.store.nodeByRoot[root] + node, ok := f.store.emptyNodeByRoot[root] if !ok || node == nil { // This should not happen return [32]byte{} } - return node.payloadHash + return node.block.payloadHash } // JustifiedPayloadBlockHash returns the hash of the payload at the justified checkpoint func (f *ForkChoice) JustifiedPayloadBlockHash() [32]byte { root := f.JustifiedCheckpoint().Root - node, ok := f.store.nodeByRoot[root] + node, ok := f.store.emptyNodeByRoot[root] if !ok || node == nil { // This should not happen return [32]byte{} } - return node.payloadHash + return node.block.payloadHash } // UnrealizedJustifiedPayloadBlockHash returns the hash of the payload at the unrealized justified checkpoint func (f *ForkChoice) UnrealizedJustifiedPayloadBlockHash() [32]byte { root := f.store.unrealizedJustifiedCheckpoint.Root - node, ok := f.store.nodeByRoot[root] + node, ok := f.store.emptyNodeByRoot[root] if !ok || node == nil { // This should not happen return [32]byte{} } - return node.payloadHash + return node.block.payloadHash } // ForkChoiceDump returns a full dump of forkchoice. @@ -565,7 +616,7 @@ func (f *ForkChoice) ForkChoiceDump(ctx context.Context) (*forkchoice2.Dump, err } var headRoot [32]byte if f.store.headNode != nil { - headRoot = f.store.headNode.root + headRoot = f.store.headNode.block.root } resp := &forkchoice2.Dump{ JustifiedCheckpoint: jc, @@ -587,7 +638,7 @@ func (f *ForkChoice) SetBalancesByRooter(handler forkchoice.BalancesByRooter) { // Weight returns the weight of the given root if found on the store func (f *ForkChoice) Weight(root [32]byte) (uint64, error) { - n, ok := f.store.nodeByRoot[root] + n, ok := f.store.emptyNodeByRoot[root] if !ok || n == nil { return 0, ErrNilNode } @@ -615,11 +666,11 @@ func (f *ForkChoice) updateJustifiedBalances(ctx context.Context, root [32]byte) // Slot returns the slot of the given root if it's known to forkchoice func (f *ForkChoice) Slot(root [32]byte) (primitives.Slot, error) { - n, ok := f.store.nodeByRoot[root] + n, ok := f.store.emptyNodeByRoot[root] if !ok || n == nil { return 0, ErrNilNode } - return n.slot, nil + return n.block.slot, nil } // TargetRootForEpoch returns the root of the target block for a given epoch. @@ -631,28 +682,25 @@ func (f *ForkChoice) Slot(root [32]byte) (primitives.Slot, error) { // which case we return the root of the checkpoint of the chain containing the // passed root, at the given epoch func (f *ForkChoice) TargetRootForEpoch(root [32]byte, epoch primitives.Epoch) ([32]byte, error) { - n, ok := f.store.nodeByRoot[root] + n, ok := f.store.emptyNodeByRoot[root] if !ok || n == nil { return [32]byte{}, ErrNilNode } - nodeEpoch := slots.ToEpoch(n.slot) + nodeEpoch := slots.ToEpoch(n.block.slot) if epoch > nodeEpoch { - return n.root, nil + return n.block.root, nil } - if n.target == nil { + targetNode := n.block.target + if targetNode == nil { return [32]byte{}, nil } - targetRoot := n.target.root + targetRoot := targetNode.root if epoch == nodeEpoch { return targetRoot, nil } - targetNode, ok := f.store.nodeByRoot[targetRoot] - if !ok || targetNode == nil { - return [32]byte{}, ErrNilNode - } // If slot 0 was not missed we consider a previous block to go back at least one epoch if nodeEpoch == slots.ToEpoch(targetNode.slot) { - targetNode = targetNode.parent + targetNode = targetNode.parent.block if targetNode == nil { return [32]byte{}, ErrNilNode } @@ -664,13 +712,13 @@ func (f *ForkChoice) TargetRootForEpoch(root [32]byte, epoch primitives.Epoch) ( // The exception is for the finalized checkpoint root which we return the zero // hash. func (f *ForkChoice) ParentRoot(root [32]byte) ([32]byte, error) { - n, ok := f.store.nodeByRoot[root] + n, ok := f.store.emptyNodeByRoot[root] if !ok || n == nil { return [32]byte{}, ErrNilNode } // Return the zero hash for the tree root - if n.parent == nil { + if n.block.parent == nil { return [32]byte{}, nil } - return n.parent.root, nil + return n.block.parent.block.root, nil } diff --git a/beacon-chain/forkchoice/doubly-linked-tree/forkchoice_test.go b/beacon-chain/forkchoice/doubly-linked-tree/forkchoice_test.go index 4a62115a66c9..0ee0844070a7 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/forkchoice_test.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/forkchoice_test.go @@ -7,6 +7,7 @@ import ( "testing" "time" + "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/prysm/v5/beacon-chain/forkchoice" forkchoicetypes "github.com/prysmaticlabs/prysm/v5/beacon-chain/forkchoice/types" "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" @@ -23,9 +24,11 @@ import ( ) // prepareForkchoiceState prepares a beacon State with the given data to mock -// insert into forkchoice +// insert into forkchoice. This method prepares full states and blocks for +// bellatrix, it cannot be used for ePBS tests. func prepareForkchoiceState( _ context.Context, + f *ForkChoice, slot primitives.Slot, blockRoot [32]byte, parentRoot [32]byte, @@ -48,7 +51,11 @@ func prepareForkchoiceState( finalizedCheckpoint := ðpb.Checkpoint{ Epoch: finalizedEpoch, } - + var parentHash [32]byte + parentNode, ok := f.store.emptyNodeByRoot[parentRoot] + if ok { + parentHash = parentNode.block.payloadHash + } base := ðpb.BeaconStateBellatrix{ Slot: slot, RandaoMixes: make([][]byte, params.BeaconConfig().EpochsPerHistoricalVector), @@ -68,7 +75,8 @@ func prepareForkchoiceState( ParentRoot: parentRoot[:], Body: ðpb.BeaconBlockBodyBellatrix{ ExecutionPayload: &enginev1.ExecutionPayload{ - BlockHash: payloadHash[:], + BlockHash: payloadHash[:], + ParentHash: parentHash[:], }, }, }, @@ -81,16 +89,24 @@ func prepareForkchoiceState( return st, roblock, err } +// Helper function to set all bits in a Bitvector512 +func setAllBits(bv bitfield.Bitvector512) bitfield.Bitvector512 { + for i := 0; i < len(bv); i++ { + bv[i] = 0xFF + } + return bv +} + func TestForkChoice_UpdateBalancesPositiveChange(t *testing.T) { f := setup(0, 0) ctx := context.Background() - st, roblock, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + st, roblock, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) + st, roblock, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) + st, roblock, err = prepareForkchoiceState(ctx, f, 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) @@ -105,27 +121,27 @@ func TestForkChoice_UpdateBalancesPositiveChange(t *testing.T) { f.justifiedBalances = []uint64{10, 20, 30} require.NoError(t, f.updateBalances()) s := f.store - assert.Equal(t, uint64(10), s.nodeByRoot[indexToHash(1)].balance) - assert.Equal(t, uint64(20), s.nodeByRoot[indexToHash(2)].balance) - assert.Equal(t, uint64(30), s.nodeByRoot[indexToHash(3)].balance) + assert.Equal(t, uint64(10), s.emptyNodeByRoot[indexToHash(1)].block.balance) + assert.Equal(t, uint64(20), s.emptyNodeByRoot[indexToHash(2)].block.balance) + assert.Equal(t, uint64(30), s.emptyNodeByRoot[indexToHash(3)].block.balance) } func TestForkChoice_UpdateBalancesNegativeChange(t *testing.T) { f := setup(0, 0) ctx := context.Background() - st, roblock, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + st, roblock, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) + st, roblock, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) + st, roblock, err = prepareForkchoiceState(ctx, f, 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) s := f.store - s.nodeByRoot[indexToHash(1)].balance = 100 - s.nodeByRoot[indexToHash(2)].balance = 100 - s.nodeByRoot[indexToHash(3)].balance = 100 + s.emptyNodeByRoot[indexToHash(1)].block.balance = 100 + s.emptyNodeByRoot[indexToHash(2)].block.balance = 100 + s.emptyNodeByRoot[indexToHash(3)].block.balance = 100 f.balances = []uint64{100, 100, 100} f.votes = []Vote{ @@ -136,27 +152,27 @@ func TestForkChoice_UpdateBalancesNegativeChange(t *testing.T) { f.justifiedBalances = []uint64{10, 20, 30} require.NoError(t, f.updateBalances()) - assert.Equal(t, uint64(10), s.nodeByRoot[indexToHash(1)].balance) - assert.Equal(t, uint64(20), s.nodeByRoot[indexToHash(2)].balance) - assert.Equal(t, uint64(30), s.nodeByRoot[indexToHash(3)].balance) + assert.Equal(t, uint64(10), s.emptyNodeByRoot[indexToHash(1)].block.balance) + assert.Equal(t, uint64(20), s.emptyNodeByRoot[indexToHash(2)].block.balance) + assert.Equal(t, uint64(30), s.emptyNodeByRoot[indexToHash(3)].block.balance) } func TestForkChoice_UpdateBalancesUnderflow(t *testing.T) { f := setup(0, 0) ctx := context.Background() - st, roblock, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + st, roblock, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) + st, roblock, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) + st, roblock, err = prepareForkchoiceState(ctx, f, 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) s := f.store - s.nodeByRoot[indexToHash(1)].balance = 100 - s.nodeByRoot[indexToHash(2)].balance = 100 - s.nodeByRoot[indexToHash(3)].balance = 100 + s.emptyNodeByRoot[indexToHash(1)].block.balance = 100 + s.emptyNodeByRoot[indexToHash(2)].block.balance = 100 + s.emptyNodeByRoot[indexToHash(3)].block.balance = 100 f.balances = []uint64{125, 125, 125} f.votes = []Vote{ @@ -167,30 +183,53 @@ func TestForkChoice_UpdateBalancesUnderflow(t *testing.T) { f.justifiedBalances = []uint64{10, 20, 30} require.NoError(t, f.updateBalances()) - assert.Equal(t, uint64(0), s.nodeByRoot[indexToHash(1)].balance) - assert.Equal(t, uint64(0), s.nodeByRoot[indexToHash(2)].balance) - assert.Equal(t, uint64(5), s.nodeByRoot[indexToHash(3)].balance) + assert.Equal(t, uint64(0), s.emptyNodeByRoot[indexToHash(1)].block.balance) + assert.Equal(t, uint64(0), s.emptyNodeByRoot[indexToHash(2)].block.balance) + assert.Equal(t, uint64(5), s.emptyNodeByRoot[indexToHash(3)].block.balance) } func TestForkChoice_IsCanonical(t *testing.T) { f := setup(1, 1) ctx := context.Background() - st, roblock, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + // there are two nodes in f, the full and empty nodes + require.Equal(t, 1, len(f.store.emptyNodeByRoot)) + require.Equal(t, 1, len(f.store.fullNodeByPayload)) + // The full node is the tree root node + require.Equal(t, true, f.store.treeRootNode.full) + fullRoot := f.store.treeRootNode + // Both blocks have nil best descendants + emptyRoot := f.store.emptyNodeByRoot[[32]byte{}] + require.Equal(t, emptyRoot.block, f.store.treeRootNode.block) + require.Equal(t, false, emptyRoot.full) + require.IsNil(t, emptyRoot.bestDescendant) + require.IsNil(t, fullRoot.bestDescendant) + require.Equal(t, fullRoot, f.store.fullNodeByPayload[[32]byte{}]) + require.Equal(t, fullRoot, f.store.fullNodeByPayload[emptyRoot.block.payloadHash]) + + st, roblock, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, indexToHash(101), 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 2, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + // This block descends from the full node + require.Equal(t, 2, len(fullRoot.children)) + require.Equal(t, 0, len(emptyRoot.children)) + // The full block is the head of chain + fullOne := f.store.fullNodeByPayload[indexToHash(101)] + require.Equal(t, fullRoot.bestDescendant, fullOne) + require.Equal(t, true, f.IsCanonical([32]byte{})) + + st, roblock, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), params.BeaconConfig().ZeroHash, indexToHash(102), 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 3, indexToHash(3), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 3, indexToHash(3), indexToHash(1), indexToHash(103), 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 4, indexToHash(4), indexToHash(2), params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 4, indexToHash(4), indexToHash(2), indexToHash(104), 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 5, indexToHash(5), indexToHash(4), params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 5, indexToHash(5), indexToHash(4), indexToHash(105), 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 6, indexToHash(6), indexToHash(5), params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 6, indexToHash(6), indexToHash(5), indexToHash(106), 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) @@ -205,40 +244,56 @@ func TestForkChoice_IsCanonical(t *testing.T) { func TestForkChoice_IsCanonicalReorg(t *testing.T) { f := setup(1, 1) + rootNode := f.store.treeRootNode ctx := context.Background() - st, roblock, err := prepareForkchoiceState(ctx, 1, [32]byte{'1'}, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err := prepareForkchoiceState(ctx, f, 1, [32]byte{'1'}, params.BeaconConfig().ZeroHash, indexToHash(101), 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 2, [32]byte{'2'}, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + // We have two children for the full root node + require.Equal(t, rootNode, f.store.treeRootNode) + require.Equal(t, true, rootNode.full) + require.Equal(t, 2, len(rootNode.children)) + + st, roblock, err = prepareForkchoiceState(ctx, f, 2, [32]byte{'2'}, params.BeaconConfig().ZeroHash, indexToHash(102), 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 3, [32]byte{'3'}, [32]byte{'1'}, params.BeaconConfig().ZeroHash, 1, 1) + // We have now 4 children on the rootnode: + require.Equal(t, rootNode, f.store.treeRootNode) + require.Equal(t, true, rootNode.full) + require.Equal(t, 4, len(rootNode.children)) + + fullOne := f.store.fullNodeByPayload[indexToHash(101)] + require.Equal(t, 0, len(fullOne.children)) + st, roblock, err = prepareForkchoiceState(ctx, f, 3, [32]byte{'3'}, [32]byte{'1'}, indexToHash(103), 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 4, [32]byte{'4'}, [32]byte{'2'}, params.BeaconConfig().ZeroHash, 1, 1) + require.Equal(t, 2, len(fullOne.children)) + + st, roblock, err = prepareForkchoiceState(ctx, f, 4, [32]byte{'4'}, [32]byte{'2'}, indexToHash(104), 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 5, [32]byte{'5'}, [32]byte{'4'}, params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 5, [32]byte{'5'}, [32]byte{'4'}, indexToHash(105), 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 6, [32]byte{'6'}, [32]byte{'5'}, params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 6, [32]byte{'6'}, [32]byte{'5'}, indexToHash(106), 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - f.store.nodeByRoot[[32]byte{'3'}].balance = 10 + f.store.fullNodeByPayload[indexToHash(103)].block.balance = 10 require.NoError(t, f.store.treeRootNode.applyWeightChanges(ctx)) - require.Equal(t, uint64(10), f.store.nodeByRoot[[32]byte{'1'}].weight) - require.Equal(t, uint64(0), f.store.nodeByRoot[[32]byte{'2'}].weight) + // We get 20 for 101 because both empty and full nodes contribute to it. + require.Equal(t, uint64(10), f.store.fullNodeByPayload[indexToHash(101)].weight) + require.Equal(t, uint64(0), f.store.emptyNodeByRoot[[32]byte{'2'}].weight) require.NoError(t, f.store.treeRootNode.updateBestDescendant(ctx, 1, 1, 1)) - require.DeepEqual(t, [32]byte{'3'}, f.store.treeRootNode.bestDescendant.root) + require.DeepEqual(t, [32]byte{'3'}, f.store.treeRootNode.bestDescendant.block.root) r1 := [32]byte{'1'} f.store.justifiedCheckpoint = &forkchoicetypes.Checkpoint{Epoch: 1, Root: r1} h, err := f.store.head(ctx) require.NoError(t, err) require.DeepEqual(t, [32]byte{'3'}, h) - require.DeepEqual(t, h, f.store.headNode.root) + require.DeepEqual(t, h, f.store.headNode.block.root) require.Equal(t, true, f.IsCanonical(params.BeaconConfig().ZeroHash)) require.Equal(t, true, f.IsCanonical([32]byte{'1'})) @@ -252,17 +307,17 @@ func TestForkChoice_IsCanonicalReorg(t *testing.T) { func TestForkChoice_AncestorRoot(t *testing.T) { f := setup(1, 1) ctx := context.Background() - st, roblock, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 5, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 5, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - f.store.treeRootNode = f.store.nodeByRoot[indexToHash(1)] - f.store.treeRootNode.parent = nil + f.store.treeRootNode = f.store.emptyNodeByRoot[indexToHash(1)] + f.store.treeRootNode.block.parent = nil r, err := f.AncestorRoot(ctx, indexToHash(3), 6) assert.NoError(t, err) @@ -284,10 +339,10 @@ func TestForkChoice_AncestorRoot(t *testing.T) { func TestForkChoice_AncestorEqualSlot(t *testing.T) { f := setup(1, 1) ctx := context.Background() - st, roblock, err := prepareForkchoiceState(ctx, 100, [32]byte{'1'}, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err := prepareForkchoiceState(ctx, f, 100, [32]byte{'1'}, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 101, [32]byte{'3'}, [32]byte{'1'}, params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 101, [32]byte{'3'}, [32]byte{'1'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) @@ -299,10 +354,10 @@ func TestForkChoice_AncestorEqualSlot(t *testing.T) { func TestForkChoice_AncestorLowerSlot(t *testing.T) { f := setup(1, 1) ctx := context.Background() - st, roblock, err := prepareForkchoiceState(ctx, 100, [32]byte{'1'}, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err := prepareForkchoiceState(ctx, f, 100, [32]byte{'1'}, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 200, [32]byte{'3'}, [32]byte{'1'}, params.BeaconConfig().ZeroHash, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 200, [32]byte{'3'}, [32]byte{'1'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) @@ -315,7 +370,7 @@ func TestForkChoice_RemoveEquivocating(t *testing.T) { ctx := context.Background() f := setup(1, 1) // Insert a block it will be head - st, roblock, err := prepareForkchoiceState(ctx, 1, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) + st, roblock, err := prepareForkchoiceState(ctx, f, 1, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) head, err := f.Head(ctx) @@ -323,10 +378,10 @@ func TestForkChoice_RemoveEquivocating(t *testing.T) { require.Equal(t, [32]byte{'a'}, head) // Insert two extra blocks - st, roblock, err = prepareForkchoiceState(ctx, 2, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 2, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 3, [32]byte{'c'}, [32]byte{'a'}, [32]byte{'C'}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 3, [32]byte{'c'}, [32]byte{'a'}, [32]byte{'C'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) head, err = f.Head(ctx) @@ -343,21 +398,21 @@ func TestForkChoice_RemoveEquivocating(t *testing.T) { // Process b's slashing, c is now head f.InsertSlashedIndex(ctx, 1) - require.Equal(t, uint64(200), f.store.nodeByRoot[[32]byte{'b'}].balance) + require.Equal(t, uint64(200), f.store.emptyNodeByRoot[[32]byte{'b'}].block.balance) f.justifiedBalances = []uint64{100, 200, 200, 300} head, err = f.Head(ctx) - require.Equal(t, uint64(200), f.store.nodeByRoot[[32]byte{'b'}].weight) - require.Equal(t, uint64(300), f.store.nodeByRoot[[32]byte{'c'}].weight) + require.Equal(t, uint64(200), f.store.emptyNodeByRoot[[32]byte{'b'}].weight) + require.Equal(t, uint64(300), f.store.emptyNodeByRoot[[32]byte{'c'}].weight) require.NoError(t, err) require.Equal(t, [32]byte{'c'}, head) // Process b's slashing again, should be a noop f.InsertSlashedIndex(ctx, 1) - require.Equal(t, uint64(200), f.store.nodeByRoot[[32]byte{'b'}].balance) + require.Equal(t, uint64(200), f.store.emptyNodeByRoot[[32]byte{'b'}].block.balance) f.justifiedBalances = []uint64{100, 200, 200, 300} head, err = f.Head(ctx) - require.Equal(t, uint64(200), f.store.nodeByRoot[[32]byte{'b'}].weight) - require.Equal(t, uint64(300), f.store.nodeByRoot[[32]byte{'c'}].weight) + require.Equal(t, uint64(200), f.store.emptyNodeByRoot[[32]byte{'b'}].weight) + require.Equal(t, uint64(300), f.store.emptyNodeByRoot[[32]byte{'c'}].weight) require.NoError(t, err) require.Equal(t, [32]byte{'c'}, head) @@ -397,34 +452,34 @@ func TestStore_CommonAncestor(t *testing.T) { // \-- c -- f // \-- g // \ -- h -- i -- j - st, roblock, err := prepareForkchoiceState(ctx, 0, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) + st, roblock, err := prepareForkchoiceState(ctx, f, 0, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 1, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 1, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 2, [32]byte{'c'}, [32]byte{'a'}, [32]byte{'C'}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 2, [32]byte{'c'}, [32]byte{'a'}, [32]byte{'C'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 3, [32]byte{'d'}, [32]byte{'b'}, [32]byte{}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 3, [32]byte{'d'}, [32]byte{'b'}, [32]byte{}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 4, [32]byte{'e'}, [32]byte{'d'}, [32]byte{}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 4, [32]byte{'e'}, [32]byte{'d'}, [32]byte{}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 5, [32]byte{'f'}, [32]byte{'c'}, [32]byte{}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 5, [32]byte{'f'}, [32]byte{'c'}, [32]byte{}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 6, [32]byte{'g'}, [32]byte{'c'}, [32]byte{}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 6, [32]byte{'g'}, [32]byte{'c'}, [32]byte{}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 7, [32]byte{'h'}, [32]byte{'c'}, [32]byte{}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 7, [32]byte{'h'}, [32]byte{'c'}, [32]byte{}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 8, [32]byte{'i'}, [32]byte{'h'}, [32]byte{}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 8, [32]byte{'i'}, [32]byte{'h'}, [32]byte{}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 9, [32]byte{'j'}, [32]byte{'i'}, [32]byte{}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 9, [32]byte{'j'}, [32]byte{'i'}, [32]byte{}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) @@ -517,16 +572,16 @@ func TestStore_CommonAncestor(t *testing.T) { // a -- b -- c -- d f = setup(0, 0) - st, roblock, err = prepareForkchoiceState(ctx, 0, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 0, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 1, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 1, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 2, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 2, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 3, [32]byte{'d'}, [32]byte{'c'}, [32]byte{}, 1, 1) + st, roblock, err = prepareForkchoiceState(ctx, f, 3, [32]byte{'d'}, [32]byte{'c'}, [32]byte{'D'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) tests = []struct { @@ -583,16 +638,18 @@ func TestStore_CommonAncestor(t *testing.T) { _, _, err = f.CommonAncestor(ctx, [32]byte{'z'}, [32]byte{'a'}) require.ErrorIs(t, err, forkchoice.ErrUnknownCommonAncestor) n := &Node{ - slot: 100, - root: [32]byte{'y'}, - justifiedEpoch: 1, - unrealizedJustifiedEpoch: 1, - finalizedEpoch: 1, - unrealizedFinalizedEpoch: 1, - optimistic: true, + block: &BlockNode{ + slot: 100, + root: [32]byte{'y'}, + justifiedEpoch: 1, + unrealizedJustifiedEpoch: 1, + finalizedEpoch: 1, + unrealizedFinalizedEpoch: 1, + }, + optimistic: true, } - f.store.nodeByRoot[[32]byte{'y'}] = n + f.store.emptyNodeByRoot[[32]byte{'y'}] = n // broken link _, _, err = f.CommonAncestor(ctx, [32]byte{'y'}, [32]byte{'a'}) require.ErrorIs(t, err, forkchoice.ErrUnknownCommonAncestor) @@ -693,23 +750,23 @@ func TestForkChoice_UpdateCheckpoints(t *testing.T) { fcs.store.finalizedCheckpoint = tt.finalized fcs.store.genesisTime = uint64(time.Now().Unix()) - uint64(tt.currentSlot)*params.BeaconConfig().SecondsPerSlot - st, roblock, err := prepareForkchoiceState(ctx, 32, [32]byte{'f'}, + st, roblock, err := prepareForkchoiceState(ctx, fcs, 32, [32]byte{'f'}, [32]byte{}, [32]byte{}, tt.finalized.Epoch, tt.finalized.Epoch) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 64, [32]byte{'j'}, + st, roblock, err = prepareForkchoiceState(ctx, fcs, 64, [32]byte{'j'}, [32]byte{'f'}, [32]byte{}, tt.justified.Epoch, tt.finalized.Epoch) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 96, [32]byte{'b'}, + st, roblock, err = prepareForkchoiceState(ctx, fcs, 96, [32]byte{'b'}, [32]byte{'j'}, [32]byte{}, tt.newJustified.Epoch, tt.newFinalized.Epoch) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 96, [32]byte{'c'}, + st, roblock, err = prepareForkchoiceState(ctx, fcs, 96, [32]byte{'c'}, [32]byte{'f'}, [32]byte{}, tt.newJustified.Epoch, tt.newFinalized.Epoch) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, roblock)) - st, roblock, err = prepareForkchoiceState(ctx, 65, [32]byte{'h'}, + st, roblock, err = prepareForkchoiceState(ctx, fcs, 65, [32]byte{'h'}, [32]byte{'f'}, [32]byte{}, tt.newFinalized.Epoch, tt.newFinalized.Epoch) require.NoError(t, err) require.NoError(t, fcs.InsertNode(ctx, st, roblock)) @@ -738,11 +795,11 @@ func TestWeight(t *testing.T) { f := setup(0, 0) root := [32]byte{'a'} - st, roblock, err := prepareForkchoiceState(ctx, 0, root, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) + st, roblock, err := prepareForkchoiceState(ctx, f, 0, root, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) - n, ok := f.store.nodeByRoot[root] + n, ok := f.store.emptyNodeByRoot[root] require.Equal(t, true, ok) n.weight = 10 w, err := f.Weight(root) @@ -770,7 +827,7 @@ func TestForkChoice_UnrealizedJustifiedPayloadBlockHash(t *testing.T) { ctx := context.Background() f := setup(0, 0) - st, roblock, err := prepareForkchoiceState(ctx, 0, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) + st, roblock, err := prepareForkchoiceState(ctx, f, 0, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, roblock)) @@ -783,7 +840,7 @@ func TestForkChoiceIsViableForCheckpoint(t *testing.T) { f := setup(0, 0) ctx := context.Background() - st, blk, err := prepareForkchoiceState(ctx, 0, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 0, 0) + st, blk, err := prepareForkchoiceState(ctx, f, 0, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 0, 0) require.NoError(t, err) // No Node viable, err := f.IsViableForCheckpoint(&forkchoicetypes.Checkpoint{Root: blk.Root()}) @@ -804,7 +861,7 @@ func TestForkChoiceIsViableForCheckpoint(t *testing.T) { require.NoError(t, err) require.Equal(t, true, viable) - st, blk2, err := prepareForkchoiceState(ctx, 1, [32]byte{'b'}, blk.Root(), [32]byte{'B'}, 0, 0) + st, blk2, err := prepareForkchoiceState(ctx, f, 1, [32]byte{'b'}, blk.Root(), [32]byte{'B'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, blk2)) @@ -826,7 +883,7 @@ func TestForkChoiceIsViableForCheckpoint(t *testing.T) { require.NoError(t, err) require.Equal(t, true, viable) - st, blk3, err := prepareForkchoiceState(ctx, 2, [32]byte{'c'}, blk2.Root(), [32]byte{'C'}, 0, 0) + st, blk3, err := prepareForkchoiceState(ctx, f, 2, [32]byte{'c'}, blk2.Root(), [32]byte{'C'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, blk3)) @@ -839,7 +896,7 @@ func TestForkChoiceIsViableForCheckpoint(t *testing.T) { require.NoError(t, err) require.Equal(t, false, viable) - st, blk4, err := prepareForkchoiceState(ctx, params.BeaconConfig().SlotsPerEpoch, [32]byte{'d'}, blk2.Root(), [32]byte{'D'}, 0, 0) + st, blk4, err := prepareForkchoiceState(ctx, f, params.BeaconConfig().SlotsPerEpoch, [32]byte{'d'}, blk2.Root(), [32]byte{'D'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, blk4)) @@ -862,7 +919,7 @@ func TestForkChoiceIsViableForCheckpoint(t *testing.T) { require.Equal(t, false, viable) // Children in next epoch - st, blk5, err := prepareForkchoiceState(ctx, params.BeaconConfig().SlotsPerEpoch+1, [32]byte{'e'}, blk2.Root(), [32]byte{'E'}, 0, 0) + st, blk5, err := prepareForkchoiceState(ctx, f, params.BeaconConfig().SlotsPerEpoch+1, [32]byte{'e'}, blk2.Root(), [32]byte{'E'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, blk5)) @@ -874,7 +931,7 @@ func TestForkChoiceIsViableForCheckpoint(t *testing.T) { func TestForkChoiceSlot(t *testing.T) { f := setup(0, 0) ctx := context.Background() - st, blk, err := prepareForkchoiceState(ctx, 3, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 0, 0) + st, blk, err := prepareForkchoiceState(ctx, f, 3, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 0, 0) require.NoError(t, err) // No Node _, err = f.Slot(blk.Root()) @@ -890,12 +947,12 @@ func TestForkchoiceParentRoot(t *testing.T) { f := setup(0, 0) ctx := context.Background() root1 := [32]byte{'a'} - st, blk, err := prepareForkchoiceState(ctx, 3, root1, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 0, 0) + st, blk, err := prepareForkchoiceState(ctx, f, 3, root1, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, blk)) root2 := [32]byte{'b'} - st, blk, err = prepareForkchoiceState(ctx, 3, root2, root1, [32]byte{'A'}, 0, 0) + st, blk, err = prepareForkchoiceState(ctx, f, 3, root2, root1, [32]byte{'A'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, blk)) @@ -915,7 +972,7 @@ func TestForkchoiceParentRoot(t *testing.T) { func TestForkChoice_CleanupInserting(t *testing.T) { f := setup(0, 0) ctx := context.Background() - st, roblock, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 2, 2) + st, roblock, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 2, 2) f.SetBalancesByRooter(func(_ context.Context, _ [32]byte) ([]uint64, error) { return f.justifiedBalances, errors.New("mock err") }) diff --git a/beacon-chain/forkchoice/doubly-linked-tree/last_root.go b/beacon-chain/forkchoice/doubly-linked-tree/last_root.go index 0f13729a7047..2d867976ad0e 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/last_root.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/last_root.go @@ -8,19 +8,19 @@ import ( // LastRoot returns the last canonical block root in the given epoch func (f *ForkChoice) LastRoot(epoch primitives.Epoch) [32]byte { head := f.store.headNode - headEpoch := slots.ToEpoch(head.slot) + headEpoch := slots.ToEpoch(head.block.slot) epochEnd, err := slots.EpochEnd(epoch) if err != nil { return [32]byte{} } if headEpoch <= epoch { - return head.root + return head.block.root } - for head != nil && head.slot > epochEnd { - head = head.parent + for head != nil && head.block.slot > epochEnd { + head = head.block.parent } if head == nil { return [32]byte{} } - return head.root + return head.block.root } diff --git a/beacon-chain/forkchoice/doubly-linked-tree/last_root_test.go b/beacon-chain/forkchoice/doubly-linked-tree/last_root_test.go index 69b0fbd3827b..9812d525ee54 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/last_root_test.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/last_root_test.go @@ -12,27 +12,27 @@ func TestLastRoot(t *testing.T) { f := setup(0, 0) ctx := context.Background() - st, root, err := prepareForkchoiceState(ctx, 1, [32]byte{'1'}, params.BeaconConfig().ZeroHash, [32]byte{'1'}, 0, 0) + st, root, err := prepareForkchoiceState(ctx, f, 1, [32]byte{'1'}, params.BeaconConfig().ZeroHash, [32]byte{'1'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, root)) - st, root, err = prepareForkchoiceState(ctx, 2, [32]byte{'2'}, [32]byte{'1'}, [32]byte{'2'}, 0, 0) + st, root, err = prepareForkchoiceState(ctx, f, 2, [32]byte{'2'}, [32]byte{'1'}, [32]byte{'2'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, root)) - st, root, err = prepareForkchoiceState(ctx, 3, [32]byte{'3'}, [32]byte{'1'}, [32]byte{'3'}, 0, 0) + st, root, err = prepareForkchoiceState(ctx, f, 3, [32]byte{'3'}, [32]byte{'1'}, [32]byte{'3'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, root)) - st, root, err = prepareForkchoiceState(ctx, 32, [32]byte{'4'}, [32]byte{'3'}, [32]byte{'4'}, 0, 0) + st, root, err = prepareForkchoiceState(ctx, f, 32, [32]byte{'4'}, [32]byte{'3'}, [32]byte{'4'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, root)) - st, root, err = prepareForkchoiceState(ctx, 33, [32]byte{'5'}, [32]byte{'2'}, [32]byte{'5'}, 0, 0) + st, root, err = prepareForkchoiceState(ctx, f, 33, [32]byte{'5'}, [32]byte{'2'}, [32]byte{'5'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, root)) - st, root, err = prepareForkchoiceState(ctx, 34, [32]byte{'6'}, [32]byte{'5'}, [32]byte{'6'}, 0, 0) + st, root, err = prepareForkchoiceState(ctx, f, 34, [32]byte{'6'}, [32]byte{'5'}, [32]byte{'6'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, root)) - headNode, _ := f.store.nodeByRoot[[32]byte{'6'}] + headNode, _ := f.store.emptyNodeByRoot[[32]byte{'6'}] f.store.headNode = headNode - require.Equal(t, [32]byte{'6'}, f.store.headNode.root) + require.Equal(t, [32]byte{'6'}, f.store.headNode.block.root) require.Equal(t, [32]byte{'2'}, f.LastRoot(0)) require.Equal(t, [32]byte{'6'}, f.LastRoot(1)) require.Equal(t, [32]byte{'6'}, f.LastRoot(2)) diff --git a/beacon-chain/forkchoice/doubly-linked-tree/metrics.go b/beacon-chain/forkchoice/doubly-linked-tree/metrics.go index ed6d4ad1eb81..663a6cc74b8a 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/metrics.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/metrics.go @@ -18,7 +18,13 @@ var ( nodeCount = promauto.NewGauge( prometheus.GaugeOpts{ Name: "doublylinkedtree_node_count", - Help: "The number of nodes in the doubly linked tree based store structure.", + Help: "The number of nodes for blocks in the doubly linked tree based store structure.", + }, + ) + payloadCount = promauto.NewGauge( + prometheus.GaugeOpts{ + Name: "doublylinkedtree_payload_count", + Help: "The number of nodes for execution payloads in the doubly linked tree based store structure.", }, ) headChangesCount = promauto.NewCounter( @@ -39,6 +45,12 @@ var ( Help: "The number of times a block is processed for fork choice.", }, ) + processedPayloadCount = promauto.NewCounter( + prometheus.CounterOpts{ + Name: "doublylinkedtree_payload_processed_count", + Help: "The number of times an execution payload is processed for fork choice.", + }, + ) processedAttestationCount = promauto.NewCounter( prometheus.CounterOpts{ Name: "doublylinkedtree_attestation_processed_count", diff --git a/beacon-chain/forkchoice/doubly-linked-tree/no_vote_test.go b/beacon-chain/forkchoice/doubly-linked-tree/no_vote_test.go index a35ce0447a1d..e0fff86cefa3 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/no_vote_test.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/no_vote_test.go @@ -25,7 +25,7 @@ func TestNoVote_CanFindHead(t *testing.T) { // 0 // / // 2 <- head - state, blkRoot, err := prepareForkchoiceState(context.Background(), 0, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err := prepareForkchoiceState(context.Background(), f, 0, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) r, err = f.Head(context.Background()) @@ -36,7 +36,7 @@ func TestNoVote_CanFindHead(t *testing.T) { // 0 // / \ // head -> 2 1 - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) r, err = f.Head(context.Background()) @@ -49,7 +49,7 @@ func TestNoVote_CanFindHead(t *testing.T) { // head -> 2 1 // | // 3 - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(3), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(3), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) r, err = f.Head(context.Background()) @@ -62,7 +62,7 @@ func TestNoVote_CanFindHead(t *testing.T) { // 2 1 // | | // head -> 4 3 - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(4), indexToHash(2), params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(4), indexToHash(2), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) r, err = f.Head(context.Background()) @@ -77,7 +77,7 @@ func TestNoVote_CanFindHead(t *testing.T) { // head -> 4 3 // | // 5 <- justified epoch = 2 - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(5), indexToHash(4), params.BeaconConfig().ZeroHash, 2, 1) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(5), indexToHash(4), params.BeaconConfig().ZeroHash, 2, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) r, err = f.Head(context.Background()) @@ -94,7 +94,7 @@ func TestNoVote_CanFindHead(t *testing.T) { // 5 // | // 6 <- head - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(6), indexToHash(5), params.BeaconConfig().ZeroHash, 2, 1) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(6), indexToHash(5), params.BeaconConfig().ZeroHash, 2, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) r, err = f.Head(context.Background()) diff --git a/beacon-chain/forkchoice/doubly-linked-tree/node.go b/beacon-chain/forkchoice/doubly-linked-tree/node.go index 2c4253b43d24..e09e43792510 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/node.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/node.go @@ -28,14 +28,37 @@ func (n *Node) applyWeightChanges(ctx context.Context) error { return err } childrenWeight += child.weight + if child.full { + childrenWeight -= child.block.balance + } } - if n.root == params.BeaconConfig().ZeroHash { + if n.block.root == params.BeaconConfig().ZeroHash { return nil } - n.weight = n.balance + childrenWeight + n.weight = n.block.balance + childrenWeight return nil } +func compareChildren(child, bestChild *Node) *Node { + // If both are viable, compare their weights. + if child.weight == bestChild.weight { + // tie breaker of equal weights for full blocks + if child.full != bestChild.full { + if child.full { + return child + } + } else { + // Tie-breaker of equal weights by root. + if bytes.Compare(child.block.root[:], bestChild.block.root[:]) > 0 { + return child + } + } + } else if child.weight > bestChild.weight { + return child + } + return bestChild +} + // updateBestDescendant updates the best descendant of this node and its // children. func (n *Node) updateBestDescendant(ctx context.Context, justifiedEpoch, finalizedEpoch, currentEpoch primitives.Epoch) error { @@ -48,7 +71,6 @@ func (n *Node) updateBestDescendant(ctx context.Context, justifiedEpoch, finaliz } var bestChild *Node - bestWeight := uint64(0) hasViableDescendant := false for _, child := range n.children { if child == nil { @@ -61,20 +83,10 @@ func (n *Node) updateBestDescendant(ctx context.Context, justifiedEpoch, finaliz if childLeadsToViableHead && !hasViableDescendant { // The child leads to a viable head, but the current // parent's best child doesn't. - bestWeight = child.weight bestChild = child hasViableDescendant = true } else if childLeadsToViableHead { - // If both are viable, compare their weights. - if child.weight == bestWeight { - // Tie-breaker of equal weights by root. - if bytes.Compare(child.root[:], bestChild.root[:]) > 0 { - bestChild = child - } - } else if child.weight > bestWeight { - bestChild = child - bestWeight = child.weight - } + bestChild = compareChildren(child, bestChild) } } if hasViableDescendant { @@ -99,7 +111,7 @@ func (n *Node) viableForHead(justifiedEpoch, currentEpoch primitives.Epoch) bool // We use n.justifiedEpoch as the voting source because: // 1. if this node is from current epoch, n.justifiedEpoch is the realized justification epoch. // 2. if this node is from a previous epoch, n.justifiedEpoch has already been updated to the unrealized justification epoch. - return n.justifiedEpoch == justifiedEpoch || n.justifiedEpoch+2 >= currentEpoch + return n.block.justifiedEpoch == justifiedEpoch || n.block.justifiedEpoch+2 >= currentEpoch } func (n *Node) leadsToViableHead(justifiedEpoch, currentEpoch primitives.Epoch) bool { @@ -120,10 +132,10 @@ func (n *Node) setNodeAndParentValidated(ctx context.Context) error { } n.optimistic = false - if n.parent == nil { + if n.block.parent == nil { return nil } - return n.parent.setNodeAndParentValidated(ctx) + return n.block.parent.setNodeAndParentValidated(ctx) } // arrivedEarly returns whether this node was inserted before the first @@ -131,7 +143,7 @@ func (n *Node) setNodeAndParentValidated(ctx context.Context) error { // Note that genesisTime has seconds granularity, therefore we use a strict // inequality < here. For example a block that arrives 3.9999 seconds into the // slot will have secs = 3 below. -func (n *Node) arrivedEarly(genesisTime uint64) (bool, error) { +func (n *BlockNode) arrivedEarly(genesisTime uint64) (bool, error) { secs, err := slots.SecondsSinceSlotStart(n.slot, genesisTime, n.timestamp) votingWindow := params.BeaconConfig().SecondsPerSlot / params.BeaconConfig().IntervalsPerSlot return secs < votingWindow, err @@ -142,7 +154,7 @@ func (n *Node) arrivedEarly(genesisTime uint64) (bool, error) { // Note that genesisTime has seconds granularity, therefore we use an // inequality >= here. For example a block that arrives 10.00001 seconds into the // slot will have secs = 10 below. -func (n *Node) arrivedAfterOrphanCheck(genesisTime uint64) (bool, error) { +func (n *BlockNode) arrivedAfterOrphanCheck(genesisTime uint64) (bool, error) { secs, err := slots.SecondsSinceSlotStart(n.slot, genesisTime, n.timestamp) return secs >= ProcessAttestationsThreshold, err } @@ -153,22 +165,22 @@ func (n *Node) nodeTreeDump(ctx context.Context, nodes []*forkchoice2.Node) ([]* return nil, ctx.Err() } var parentRoot [32]byte - if n.parent != nil { - parentRoot = n.parent.root + if n.block.parent != nil { + parentRoot = n.block.parent.block.root } thisNode := &forkchoice2.Node{ - Slot: n.slot, - BlockRoot: n.root[:], + Slot: n.block.slot, + BlockRoot: n.block.root[:], ParentRoot: parentRoot[:], - JustifiedEpoch: n.justifiedEpoch, - FinalizedEpoch: n.finalizedEpoch, - UnrealizedJustifiedEpoch: n.unrealizedJustifiedEpoch, - UnrealizedFinalizedEpoch: n.unrealizedFinalizedEpoch, - Balance: n.balance, + JustifiedEpoch: n.block.justifiedEpoch, + FinalizedEpoch: n.block.finalizedEpoch, + UnrealizedJustifiedEpoch: n.block.unrealizedJustifiedEpoch, + UnrealizedFinalizedEpoch: n.block.unrealizedFinalizedEpoch, + Balance: n.block.balance, Weight: n.weight, ExecutionOptimistic: n.optimistic, - ExecutionBlockHash: n.payloadHash[:], - Timestamp: n.timestamp, + ExecutionBlockHash: n.block.payloadHash[:], + Timestamp: n.block.timestamp, } if n.optimistic { thisNode.Validity = forkchoice2.Optimistic diff --git a/beacon-chain/forkchoice/doubly-linked-tree/node_test.go b/beacon-chain/forkchoice/doubly-linked-tree/node_test.go index f6b40b1c98c9..35842f726c08 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/node_test.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/node_test.go @@ -14,80 +14,65 @@ import ( func TestNode_ApplyWeightChanges_PositiveChange(t *testing.T) { f := setup(0, 0) ctx := context.Background() - state, blk, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blk, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - state, blk, err = prepareForkchoiceState(ctx, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) + state, blk, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - state, blk, err = prepareForkchoiceState(ctx, 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) + state, blk, err = prepareForkchoiceState(ctx, f, 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) // The updated balances of each node is 100 s := f.store - s.nodeByRoot[indexToHash(1)].balance = 100 - s.nodeByRoot[indexToHash(2)].balance = 100 - s.nodeByRoot[indexToHash(3)].balance = 100 + s.emptyNodeByRoot[indexToHash(1)].block.balance = 100 + s.emptyNodeByRoot[indexToHash(2)].block.balance = 100 + s.emptyNodeByRoot[indexToHash(3)].block.balance = 100 assert.NoError(t, s.treeRootNode.applyWeightChanges(ctx)) - assert.Equal(t, uint64(300), s.nodeByRoot[indexToHash(1)].weight) - assert.Equal(t, uint64(200), s.nodeByRoot[indexToHash(2)].weight) - assert.Equal(t, uint64(100), s.nodeByRoot[indexToHash(3)].weight) + assert.Equal(t, uint64(300), s.emptyNodeByRoot[indexToHash(1)].weight) + assert.Equal(t, uint64(200), s.emptyNodeByRoot[indexToHash(2)].weight) + assert.Equal(t, uint64(100), s.emptyNodeByRoot[indexToHash(3)].weight) } func TestNode_ApplyWeightChanges_NegativeChange(t *testing.T) { f := setup(0, 0) ctx := context.Background() - state, blk, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blk, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - state, blk, err = prepareForkchoiceState(ctx, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) + state, blk, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - state, blk, err = prepareForkchoiceState(ctx, 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) + state, blk, err = prepareForkchoiceState(ctx, f, 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) // The updated balances of each node is 100 s := f.store - s.nodeByRoot[indexToHash(1)].weight = 400 - s.nodeByRoot[indexToHash(2)].weight = 400 - s.nodeByRoot[indexToHash(3)].weight = 400 + s.emptyNodeByRoot[indexToHash(1)].weight = 400 + s.emptyNodeByRoot[indexToHash(2)].weight = 400 + s.emptyNodeByRoot[indexToHash(3)].weight = 400 - s.nodeByRoot[indexToHash(1)].balance = 100 - s.nodeByRoot[indexToHash(2)].balance = 100 - s.nodeByRoot[indexToHash(3)].balance = 100 + s.emptyNodeByRoot[indexToHash(1)].block.balance = 100 + s.emptyNodeByRoot[indexToHash(2)].block.balance = 100 + s.emptyNodeByRoot[indexToHash(3)].block.balance = 100 assert.NoError(t, s.treeRootNode.applyWeightChanges(ctx)) - assert.Equal(t, uint64(300), s.nodeByRoot[indexToHash(1)].weight) - assert.Equal(t, uint64(200), s.nodeByRoot[indexToHash(2)].weight) - assert.Equal(t, uint64(100), s.nodeByRoot[indexToHash(3)].weight) -} - -func TestNode_UpdateBestDescendant_NonViableChild(t *testing.T) { - f := setup(1, 1) - ctx := context.Background() - // Input child is not viable. - state, blk, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 2, 3) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, state, blk)) - - // Verify parent's best child and best descendant are `none`. - s := f.store - assert.Equal(t, 1, len(s.treeRootNode.children)) - nilBestDescendant := s.treeRootNode.bestDescendant == nil - assert.Equal(t, true, nilBestDescendant) + assert.Equal(t, uint64(300), s.emptyNodeByRoot[indexToHash(1)].weight) + assert.Equal(t, uint64(200), s.emptyNodeByRoot[indexToHash(2)].weight) + assert.Equal(t, uint64(100), s.emptyNodeByRoot[indexToHash(3)].weight) } func TestNode_UpdateBestDescendant_ViableChild(t *testing.T) { f := setup(1, 1) ctx := context.Background() // Input child is the best descendant - state, blk, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) @@ -100,16 +85,16 @@ func TestNode_UpdateBestDescendant_HigherWeightChild(t *testing.T) { f := setup(1, 1) ctx := context.Background() // Input child is the best descendant - state, blk, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - state, blk, err = prepareForkchoiceState(ctx, 2, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) s := f.store - s.nodeByRoot[indexToHash(1)].weight = 100 - s.nodeByRoot[indexToHash(2)].weight = 200 + s.emptyNodeByRoot[indexToHash(1)].weight = 100 + s.emptyNodeByRoot[indexToHash(2)].weight = 200 assert.NoError(t, s.treeRootNode.updateBestDescendant(ctx, 1, 1, 1)) assert.Equal(t, 2, len(s.treeRootNode.children)) @@ -120,16 +105,16 @@ func TestNode_UpdateBestDescendant_LowerWeightChild(t *testing.T) { f := setup(1, 1) ctx := context.Background() // Input child is the best descendant - state, blk, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - state, blk, err = prepareForkchoiceState(ctx, 2, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) s := f.store - s.nodeByRoot[indexToHash(1)].weight = 200 - s.nodeByRoot[indexToHash(2)].weight = 100 + s.emptyNodeByRoot[indexToHash(1)].weight = 200 + s.emptyNodeByRoot[indexToHash(2)].weight = 100 assert.NoError(t, s.treeRootNode.updateBestDescendant(ctx, 1, 1, 1)) assert.Equal(t, 2, len(s.treeRootNode.children)) @@ -142,13 +127,13 @@ func TestNode_ViableForHead(t *testing.T) { justifiedEpoch primitives.Epoch want bool }{ - {&Node{}, 0, true}, - {&Node{}, 1, false}, - {&Node{finalizedEpoch: 1, justifiedEpoch: 1}, 1, true}, - {&Node{finalizedEpoch: 1, justifiedEpoch: 1}, 2, false}, - {&Node{finalizedEpoch: 1, justifiedEpoch: 2}, 3, false}, - {&Node{finalizedEpoch: 1, justifiedEpoch: 2}, 4, false}, - {&Node{finalizedEpoch: 1, justifiedEpoch: 3}, 4, true}, + {&Node{block: &BlockNode{}}, 0, true}, + {&Node{block: &BlockNode{}}, 1, false}, + {&Node{block: &BlockNode{finalizedEpoch: 1, justifiedEpoch: 1}}, 1, true}, + {&Node{block: &BlockNode{finalizedEpoch: 1, justifiedEpoch: 1}}, 2, false}, + {&Node{block: &BlockNode{finalizedEpoch: 1, justifiedEpoch: 2}}, 3, false}, + {&Node{block: &BlockNode{finalizedEpoch: 1, justifiedEpoch: 2}}, 4, false}, + {&Node{block: &BlockNode{finalizedEpoch: 1, justifiedEpoch: 3}}, 4, true}, } for _, tc := range tests { got := tc.n.viableForHead(tc.justifiedEpoch, 5) @@ -159,26 +144,26 @@ func TestNode_ViableForHead(t *testing.T) { func TestNode_LeadsToViableHead(t *testing.T) { f := setup(4, 3) ctx := context.Background() - state, blk, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - state, blk, err = prepareForkchoiceState(ctx, 2, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - state, blk, err = prepareForkchoiceState(ctx, 3, indexToHash(3), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err = prepareForkchoiceState(ctx, f, 3, indexToHash(3), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - state, blk, err = prepareForkchoiceState(ctx, 4, indexToHash(4), indexToHash(2), params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err = prepareForkchoiceState(ctx, f, 4, indexToHash(4), indexToHash(2), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - state, blk, err = prepareForkchoiceState(ctx, 5, indexToHash(5), indexToHash(3), params.BeaconConfig().ZeroHash, 4, 3) + state, blk, err = prepareForkchoiceState(ctx, f, 5, indexToHash(5), indexToHash(3), params.BeaconConfig().ZeroHash, 4, 3) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) require.Equal(t, true, f.store.treeRootNode.leadsToViableHead(4, 5)) - require.Equal(t, true, f.store.nodeByRoot[indexToHash(5)].leadsToViableHead(4, 5)) - require.Equal(t, false, f.store.nodeByRoot[indexToHash(2)].leadsToViableHead(4, 5)) - require.Equal(t, false, f.store.nodeByRoot[indexToHash(4)].leadsToViableHead(4, 5)) + require.Equal(t, true, f.store.emptyNodeByRoot[indexToHash(5)].leadsToViableHead(4, 5)) + require.Equal(t, false, f.store.emptyNodeByRoot[indexToHash(2)].leadsToViableHead(4, 5)) + require.Equal(t, false, f.store.emptyNodeByRoot[indexToHash(4)].leadsToViableHead(4, 5)) } func TestNode_SetFullyValidated(t *testing.T) { @@ -192,29 +177,28 @@ func TestNode_SetFullyValidated(t *testing.T) { // \ // -- 5 (true) // - state, blk, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - storeNodes[1] = f.store.nodeByRoot[blk.Root()] + storeNodes[1] = f.store.emptyNodeByRoot[blk.Root()] require.NoError(t, f.SetOptimisticToValid(ctx, params.BeaconConfig().ZeroHash)) - state, blk, err = prepareForkchoiceState(ctx, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - storeNodes[2] = f.store.nodeByRoot[blk.Root()] + storeNodes[2] = f.store.emptyNodeByRoot[blk.Root()] require.NoError(t, f.SetOptimisticToValid(ctx, indexToHash(1))) - state, blk, err = prepareForkchoiceState(ctx, 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err = prepareForkchoiceState(ctx, f, 3, indexToHash(3), indexToHash(2), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - storeNodes[3] = f.store.nodeByRoot[blk.Root()] - state, blk, err = prepareForkchoiceState(ctx, 4, indexToHash(4), indexToHash(3), params.BeaconConfig().ZeroHash, 1, 1) + storeNodes[3] = f.store.emptyNodeByRoot[blk.Root()] + state, blk, err = prepareForkchoiceState(ctx, f, 4, indexToHash(4), indexToHash(3), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - storeNodes[4] = f.store.nodeByRoot[blk.Root()] - state, blk, err = prepareForkchoiceState(ctx, 5, indexToHash(5), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) + storeNodes[4] = f.store.emptyNodeByRoot[blk.Root()] + state, blk, err = prepareForkchoiceState(ctx, f, 5, indexToHash(5), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) - storeNodes[5] = f.store.nodeByRoot[blk.Root()] - + storeNodes[5] = f.store.emptyNodeByRoot[blk.Root()] opt, err := f.IsOptimistic(indexToHash(5)) require.NoError(t, err) require.Equal(t, true, opt) @@ -223,7 +207,7 @@ func TestNode_SetFullyValidated(t *testing.T) { require.NoError(t, err) require.Equal(t, true, opt) - require.NoError(t, f.store.nodeByRoot[indexToHash(4)].setNodeAndParentValidated(ctx)) + require.NoError(t, f.store.emptyNodeByRoot[indexToHash(4)].setNodeAndParentValidated(ctx)) // block 5 should still be optimistic opt, err = f.IsOptimistic(indexToHash(5)) @@ -245,16 +229,16 @@ func TestNode_SetFullyValidated(t *testing.T) { require.Equal(t, len(respNodes), f.NodeCount()) for i, respNode := range respNodes { - require.Equal(t, storeNodes[i].slot, respNode.Slot) - require.DeepEqual(t, storeNodes[i].root[:], respNode.BlockRoot) - require.Equal(t, storeNodes[i].balance, respNode.Balance) + require.Equal(t, storeNodes[i].block.slot, respNode.Slot) + require.DeepEqual(t, storeNodes[i].block.root[:], respNode.BlockRoot) + require.Equal(t, storeNodes[i].block.balance, respNode.Balance) require.Equal(t, storeNodes[i].weight, respNode.Weight) require.Equal(t, storeNodes[i].optimistic, respNode.ExecutionOptimistic) - require.Equal(t, storeNodes[i].justifiedEpoch, respNode.JustifiedEpoch) - require.Equal(t, storeNodes[i].unrealizedJustifiedEpoch, respNode.UnrealizedJustifiedEpoch) - require.Equal(t, storeNodes[i].finalizedEpoch, respNode.FinalizedEpoch) - require.Equal(t, storeNodes[i].unrealizedFinalizedEpoch, respNode.UnrealizedFinalizedEpoch) - require.Equal(t, storeNodes[i].timestamp, respNode.Timestamp) + require.Equal(t, storeNodes[i].block.justifiedEpoch, respNode.JustifiedEpoch) + require.Equal(t, storeNodes[i].block.unrealizedJustifiedEpoch, respNode.UnrealizedJustifiedEpoch) + require.Equal(t, storeNodes[i].block.finalizedEpoch, respNode.FinalizedEpoch) + require.Equal(t, storeNodes[i].block.unrealizedFinalizedEpoch, respNode.UnrealizedFinalizedEpoch) + require.Equal(t, storeNodes[i].block.timestamp, respNode.Timestamp) } } @@ -266,16 +250,16 @@ func TestNode_TimeStampsChecks(t *testing.T) { driftGenesisTime(f, 1, 1) root := [32]byte{'a'} f.justifiedBalances = []uint64{10} - state, blk, err := prepareForkchoiceState(ctx, 1, root, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 0, 0) + state, blk, err := prepareForkchoiceState(ctx, f, 1, root, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) headRoot, err := f.Head(ctx) require.NoError(t, err) require.Equal(t, root, headRoot) - early, err := f.store.headNode.arrivedEarly(f.store.genesisTime) + early, err := f.store.headNode.block.arrivedEarly(f.store.genesisTime) require.NoError(t, err) require.Equal(t, true, early) - late, err := f.store.headNode.arrivedAfterOrphanCheck(f.store.genesisTime) + late, err := f.store.headNode.block.arrivedAfterOrphanCheck(f.store.genesisTime) require.NoError(t, err) require.Equal(t, false, late) @@ -283,47 +267,47 @@ func TestNode_TimeStampsChecks(t *testing.T) { // late block driftGenesisTime(f, 2, orphanLateBlockFirstThreshold+1) root = [32]byte{'b'} - state, blk, err = prepareForkchoiceState(ctx, 2, root, [32]byte{'a'}, [32]byte{'B'}, 0, 0) + state, blk, err = prepareForkchoiceState(ctx, f, 2, root, [32]byte{'a'}, [32]byte{'B'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) headRoot, err = f.Head(ctx) require.NoError(t, err) require.Equal(t, root, headRoot) - early, err = f.store.headNode.arrivedEarly(f.store.genesisTime) + early, err = f.store.headNode.block.arrivedEarly(f.store.genesisTime) require.NoError(t, err) require.Equal(t, false, early) - late, err = f.store.headNode.arrivedAfterOrphanCheck(f.store.genesisTime) + late, err = f.store.headNode.block.arrivedAfterOrphanCheck(f.store.genesisTime) require.NoError(t, err) require.Equal(t, false, late) // very late block driftGenesisTime(f, 3, ProcessAttestationsThreshold+1) root = [32]byte{'c'} - state, blk, err = prepareForkchoiceState(ctx, 3, root, [32]byte{'b'}, [32]byte{'C'}, 0, 0) + state, blk, err = prepareForkchoiceState(ctx, f, 3, root, [32]byte{'b'}, [32]byte{'C'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) headRoot, err = f.Head(ctx) require.NoError(t, err) require.Equal(t, root, headRoot) - early, err = f.store.headNode.arrivedEarly(f.store.genesisTime) + early, err = f.store.headNode.block.arrivedEarly(f.store.genesisTime) require.NoError(t, err) require.Equal(t, false, early) - late, err = f.store.headNode.arrivedAfterOrphanCheck(f.store.genesisTime) + late, err = f.store.headNode.block.arrivedAfterOrphanCheck(f.store.genesisTime) require.NoError(t, err) require.Equal(t, true, late) // block from the future root = [32]byte{'d'} - state, blk, err = prepareForkchoiceState(ctx, 5, root, [32]byte{'c'}, [32]byte{'D'}, 1, 1) + state, blk, err = prepareForkchoiceState(ctx, f, 5, root, [32]byte{'c'}, [32]byte{'D'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) headRoot, err = f.Head(ctx) require.NoError(t, err) require.Equal(t, root, headRoot) - early, err = f.store.headNode.arrivedEarly(f.store.genesisTime) + early, err = f.store.headNode.block.arrivedEarly(f.store.genesisTime) require.ErrorContains(t, "invalid timestamp", err) require.Equal(t, true, early) - late, err = f.store.headNode.arrivedAfterOrphanCheck(f.store.genesisTime) + late, err = f.store.headNode.block.arrivedAfterOrphanCheck(f.store.genesisTime) require.ErrorContains(t, "invalid timestamp", err) require.Equal(t, false, late) } diff --git a/beacon-chain/forkchoice/doubly-linked-tree/on_tick_test.go b/beacon-chain/forkchoice/doubly-linked-tree/on_tick_test.go index 36268df8bd79..0605fcde8209 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/on_tick_test.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/on_tick_test.go @@ -59,19 +59,19 @@ func TestStore_NewSlot(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { f := setup(test.args.justified.Epoch, test.args.finalized.Epoch) - state, blkRoot, err := prepareForkchoiceState(ctx, 0, [32]byte{}, [32]byte{}, [32]byte{}, 0, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 0, [32]byte{}, [32]byte{}, [32]byte{}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) // genesis - state, blkRoot, err = prepareForkchoiceState(ctx, 32, [32]byte{'a'}, [32]byte{}, [32]byte{}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 32, [32]byte{'a'}, [32]byte{}, [32]byte{}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) // finalized - state, blkRoot, err = prepareForkchoiceState(ctx, 64, [32]byte{'b'}, [32]byte{'a'}, [32]byte{}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 64, [32]byte{'b'}, [32]byte{'a'}, [32]byte{}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) // justified - state, blkRoot, err = prepareForkchoiceState(ctx, 96, bj, [32]byte{'a'}, [32]byte{}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 96, bj, [32]byte{'a'}, [32]byte{}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) // best justified - state, blkRoot, err = prepareForkchoiceState(ctx, 97, [32]byte{'d'}, [32]byte{}, [32]byte{}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 97, [32]byte{'d'}, [32]byte{}, [32]byte{}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) // bad diff --git a/beacon-chain/forkchoice/doubly-linked-tree/optimistic_sync.go b/beacon-chain/forkchoice/doubly-linked-tree/optimistic_sync.go index e1199c76e4c5..a85ca88a18b7 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/optimistic_sync.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/optimistic_sync.go @@ -7,42 +7,79 @@ import ( "github.com/prysmaticlabs/prysm/v5/config/params" ) +func (s *Store) removeNodeIfSynced(ctx context.Context, node *Node) ([][32]byte, error) { + invalidRoots := make([][32]byte, 0) + if node == nil { + return invalidRoots, nil + } + fullNode := s.fullNodeByPayload[node.block.payloadHash] + if fullNode == nil { + return invalidRoots, nil + } + return s.removeNode(ctx, fullNode) +} + func (s *Store) setOptimisticToInvalid(ctx context.Context, root, parentRoot, lastValidHash [32]byte) ([][32]byte, error) { invalidRoots := make([][32]byte, 0) - node, ok := s.nodeByRoot[root] - if !ok { - node, ok = s.nodeByRoot[parentRoot] - if !ok || node == nil { - return invalidRoots, errors.Wrap(ErrNilNode, "could not set node to invalid") + node, ok := s.emptyNodeByRoot[root] + // Check if we have a full node for this root + if ok { + fullNode, ok := s.fullNodeByPayload[node.block.payloadHash] + if ok { + node = fullNode } - // return early if the parent is LVH - if node.payloadHash == lastValidHash { - return invalidRoots, nil - } - } else { - if node == nil { - return invalidRoots, errors.Wrap(ErrNilNode, "could not set node to invalid") - } - if node.parent.root != parentRoot { + // check consistency of the input + parent := node.block.parent + if parent.block.root != parentRoot { return invalidRoots, errInvalidParentRoot } } - firstInvalid := node - for ; firstInvalid.parent != nil && firstInvalid.parent.payloadHash != lastValidHash; firstInvalid = firstInvalid.parent { - if ctx.Err() != nil { - return invalidRoots, ctx.Err() + // if the last valid hash is not known or null, prune only the incoming + // block. + lastValid, ok := s.fullNodeByPayload[lastValidHash] + if !ok || lastValidHash == [32]byte{} { + return s.removeNodeIfSynced(ctx, node) + } + // We have a valid hash, find if it's in the same fork as the last valid + // root. + ancestor, err := s.ancestorRoot(ctx, parentRoot, lastValid.block.slot) + if err != nil { + return invalidRoots, errors.Wrap(err, "could not set block as invalid") + } + if ancestor != lastValid.block.root { + return s.removeNodeIfSynced(ctx, node) + } + // we go up we find a child of the last valid that is full. We find + // first the starting node for the loop + if node == nil { + node = s.emptyNodeByRoot[parentRoot] + fullParent, ok := s.fullNodeByPayload[node.block.payloadHash] + if ok { + // return early if the parent is the LVH + if fullParent.block.payloadHash == lastValidHash { + return invalidRoots, nil + } + node = fullParent + } + } else { + fullNode, ok := s.fullNodeByPayload[node.block.payloadHash] + if ok { + node = fullNode } } - // Deal with the case that the last valid payload is in a different fork - // This means we are dealing with an EE that does not follow the spec - if firstInvalid.parent == nil { - // return early if the invalid node was not imported - if node.root == parentRoot { - return invalidRoots, nil + var lastFullNode *Node + for ; node.block.fullParent != nil; node = node.block.fullParent { + if node.full { + lastFullNode = node + } + if node.block.fullParent.block.payloadHash == lastValidHash { + break } - firstInvalid = node } - return s.removeNode(ctx, firstInvalid) + if lastFullNode == nil { + return invalidRoots, nil + } + return s.removeNode(ctx, lastFullNode) } // removeNode removes the node with the given root and all of its children @@ -53,20 +90,20 @@ func (s *Store) removeNode(ctx context.Context, node *Node) ([][32]byte, error) if node == nil { return invalidRoots, errors.Wrap(ErrNilNode, "could not remove node") } - if !node.optimistic || node.parent == nil { + if !node.optimistic || node.block.parent == nil { return invalidRoots, errInvalidOptimisticStatus } - children := node.parent.children + children := node.block.parent.children if len(children) == 1 { - node.parent.children = []*Node{} + node.block.parent.children = []*Node{} } else { for i, n := range children { if n == node { if i != len(children)-1 { children[i] = children[len(children)-1] } - node.parent.children = children[:len(children)-1] + node.block.parent.children = children[:len(children)-1] break } } @@ -85,15 +122,20 @@ func (s *Store) removeNodeAndChildren(ctx context.Context, node *Node, invalidRo return invalidRoots, err } } - invalidRoots = append(invalidRoots, node.root) - if node.root == s.proposerBoostRoot { + // Only remove the current node's root when removing the empty node as well + if node.full { + delete(s.fullNodeByPayload, node.block.payloadHash) + return invalidRoots, nil + } + + invalidRoots = append(invalidRoots, node.block.root) + if node.block.root == s.proposerBoostRoot { s.proposerBoostRoot = [32]byte{} } - if node.root == s.previousProposerBoostRoot { + if node.block.root == s.previousProposerBoostRoot { s.previousProposerBoostRoot = params.BeaconConfig().ZeroHash s.previousProposerBoostScore = 0 } - delete(s.nodeByRoot, node.root) - delete(s.nodeByPayload, node.payloadHash) + delete(s.emptyNodeByRoot, node.block.root) return invalidRoots, nil } diff --git a/beacon-chain/forkchoice/doubly-linked-tree/optimistic_sync_test.go b/beacon-chain/forkchoice/doubly-linked-tree/optimistic_sync_test.go index 6a5fcee6fe35..cdce1ecf820e 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/optimistic_sync_test.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/optimistic_sync_test.go @@ -6,10 +6,31 @@ import ( "testing" "github.com/prysmaticlabs/prysm/v5/config/params" - "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" "github.com/prysmaticlabs/prysm/v5/testing/require" ) +func sortRoots(roots [][32]uint8) { + sort.Slice(roots, func(i, j int) bool { + return roots[i][0] < roots[j][0] + }) +} + +func deduplicateRoots(roots [][32]uint8) [][32]uint8 { + if len(roots) == 0 { + return roots + } + unique := make(map[[32]uint8]struct{}) + var result [][32]uint8 + + for _, root := range roots { + if _, exists := unique[root]; !exists { + unique[root] = struct{}{} + result = append(result, root) + } + } + return result +} + // We test the algorithm to update a node from SYNCING to INVALID // We start with the same diagram as above: // @@ -175,47 +196,50 @@ func TestPruneInvalid(t *testing.T) { ctx := context.Background() f := setup(1, 1) - state, blkRoot, err := prepareForkchoiceState(ctx, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 102, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 102, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 102, [32]byte{'j'}, [32]byte{'b'}, [32]byte{'J'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 102, [32]byte{'j'}, [32]byte{'b'}, [32]byte{'J'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 103, [32]byte{'d'}, [32]byte{'c'}, [32]byte{'D'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 103, [32]byte{'d'}, [32]byte{'c'}, [32]byte{'D'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 104, [32]byte{'e'}, [32]byte{'d'}, [32]byte{'E'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 104, [32]byte{'e'}, [32]byte{'d'}, [32]byte{'E'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 104, [32]byte{'g'}, [32]byte{'d'}, [32]byte{'G'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 104, [32]byte{'g'}, [32]byte{'d'}, [32]byte{'G'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 105, [32]byte{'f'}, [32]byte{'e'}, [32]byte{'F'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 105, [32]byte{'f'}, [32]byte{'e'}, [32]byte{'F'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 105, [32]byte{'h'}, [32]byte{'g'}, [32]byte{'H'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 105, [32]byte{'h'}, [32]byte{'g'}, [32]byte{'H'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 105, [32]byte{'k'}, [32]byte{'g'}, [32]byte{'K'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 105, [32]byte{'k'}, [32]byte{'g'}, [32]byte{'K'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 106, [32]byte{'i'}, [32]byte{'h'}, [32]byte{'I'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 106, [32]byte{'i'}, [32]byte{'h'}, [32]byte{'I'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 106, [32]byte{'l'}, [32]byte{'k'}, [32]byte{'L'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 106, [32]byte{'l'}, [32]byte{'k'}, [32]byte{'L'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) roots, err := f.store.setOptimisticToInvalid(context.Background(), tc.root, tc.parentRoot, tc.payload) + deduped := deduplicateRoots(roots) if tc.wantedErr == nil { require.NoError(t, err) - require.DeepEqual(t, tc.wantedRoots, roots) + sortRoots(tc.wantedRoots) + sortRoots(deduped) + require.DeepEqual(t, tc.wantedRoots, deduped) require.Equal(t, tc.wantedNodeNumber, f.NodeCount()) } else { require.ErrorIs(t, tc.wantedErr, err) @@ -228,13 +252,13 @@ func TestSetOptimisticToInvalid_ProposerBoost(t *testing.T) { ctx := context.Background() f := setup(1, 1) - state, blkRoot, err := prepareForkchoiceState(ctx, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 101, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 101, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) f.store.proposerBoostRoot = [32]byte{'c'} @@ -243,7 +267,7 @@ func TestSetOptimisticToInvalid_ProposerBoost(t *testing.T) { _, err = f.SetOptimisticToInvalid(ctx, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'A'}) require.NoError(t, err) - require.Equal(t, uint64(0), f.store.previousProposerBoostScore) + require.Equal(t, uint64(10), f.store.previousProposerBoostScore) require.DeepEqual(t, [32]byte{}, f.store.proposerBoostRoot) require.DeepEqual(t, params.BeaconConfig().ZeroHash, f.store.previousProposerBoostRoot) } @@ -260,129 +284,25 @@ func TestSetOptimisticToInvalid_CorrectChildren(t *testing.T) { ctx := context.Background() f := setup(1, 1) - state, blkRoot, err := prepareForkchoiceState(ctx, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 102, [32]byte{'c'}, [32]byte{'a'}, [32]byte{'C'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 102, [32]byte{'c'}, [32]byte{'a'}, [32]byte{'C'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 103, [32]byte{'d'}, [32]byte{'a'}, [32]byte{'D'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 103, [32]byte{'d'}, [32]byte{'a'}, [32]byte{'D'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) _, err = f.store.setOptimisticToInvalid(ctx, [32]byte{'d'}, [32]byte{'a'}, [32]byte{'A'}) require.NoError(t, err) - require.Equal(t, 2, len(f.store.nodeByRoot[[32]byte{'a'}].children)) - -} - -// Pow | Pos -// -// CA -- A -- B -- C-----D -// \ \--------------E -// \ -// ----------------------F -- G -// -// B is INVALID -func TestSetOptimisticToInvalid_ForkAtMerge(t *testing.T) { - ctx := context.Background() - f := setup(1, 1) - - st, root, err := prepareForkchoiceState(ctx, 100, [32]byte{'r'}, [32]byte{}, [32]byte{}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 101, [32]byte{'a'}, [32]byte{'r'}, [32]byte{}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 102, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 103, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 104, [32]byte{'d'}, [32]byte{'c'}, [32]byte{'D'}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 105, [32]byte{'e'}, [32]byte{'b'}, [32]byte{'E'}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 106, [32]byte{'f'}, [32]byte{'r'}, [32]byte{'F'}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) + // There are 5 valid children of A, two for B and C and one for D (the + // empty D block is valid) + require.Equal(t, 5, len(f.store.fullNodeByPayload[[32]byte{'A'}].children)) - st, root, err = prepareForkchoiceState(ctx, 107, [32]byte{'g'}, [32]byte{'f'}, [32]byte{'G'}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - roots, err := f.SetOptimisticToInvalid(ctx, [32]byte{'x'}, [32]byte{'d'}, [32]byte{}) - require.NoError(t, err) - require.Equal(t, 4, len(roots)) - sort.Slice(roots, func(i, j int) bool { - return bytesutil.BytesToUint64BigEndian(roots[i][:]) < bytesutil.BytesToUint64BigEndian(roots[j][:]) - }) - require.DeepEqual(t, roots, [][32]byte{{'b'}, {'c'}, {'d'}, {'e'}}) -} - -// Pow | Pos -// -// CA -------- B -- C-----D -// \ \--------------E -// \ -// --A -------------------------F -- G -// -// B is INVALID -func TestSetOptimisticToInvalid_ForkAtMerge_bis(t *testing.T) { - ctx := context.Background() - f := setup(1, 1) - - st, root, err := prepareForkchoiceState(ctx, 100, [32]byte{'r'}, [32]byte{}, [32]byte{}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 101, [32]byte{'a'}, [32]byte{'r'}, [32]byte{}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 102, [32]byte{'b'}, [32]byte{}, [32]byte{'B'}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 103, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 104, [32]byte{'d'}, [32]byte{'c'}, [32]byte{'D'}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 105, [32]byte{'e'}, [32]byte{'b'}, [32]byte{'E'}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 106, [32]byte{'f'}, [32]byte{'a'}, [32]byte{'F'}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - st, root, err = prepareForkchoiceState(ctx, 107, [32]byte{'g'}, [32]byte{'f'}, [32]byte{'G'}, 1, 1) - require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, st, root)) - - roots, err := f.SetOptimisticToInvalid(ctx, [32]byte{'x'}, [32]byte{'d'}, [32]byte{}) - require.NoError(t, err) - require.Equal(t, 4, len(roots)) - sort.Slice(roots, func(i, j int) bool { - return bytesutil.BytesToUint64BigEndian(roots[i][:]) < bytesutil.BytesToUint64BigEndian(roots[j][:]) - }) - require.DeepEqual(t, roots, [][32]byte{{'b'}, {'c'}, {'d'}, {'e'}}) } func TestSetOptimisticToValid(t *testing.T) { diff --git a/beacon-chain/forkchoice/doubly-linked-tree/proposer_boost.go b/beacon-chain/forkchoice/doubly-linked-tree/proposer_boost.go index 0ebbd83de857..0c01b439c214 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/proposer_boost.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/proposer_boost.go @@ -13,21 +13,21 @@ func (f *ForkChoice) applyProposerBoostScore() error { s := f.store proposerScore := uint64(0) if s.previousProposerBoostRoot != params.BeaconConfig().ZeroHash { - previousNode, ok := s.nodeByRoot[s.previousProposerBoostRoot] + previousNode, ok := s.emptyNodeByRoot[s.previousProposerBoostRoot] if !ok || previousNode == nil { log.WithError(errInvalidProposerBoostRoot).Errorf(fmt.Sprintf("invalid prev root %#x", s.previousProposerBoostRoot)) } else { - previousNode.balance -= s.previousProposerBoostScore + previousNode.block.balance -= s.previousProposerBoostScore } } if s.proposerBoostRoot != params.BeaconConfig().ZeroHash { - currentNode, ok := s.nodeByRoot[s.proposerBoostRoot] + currentNode, ok := s.emptyNodeByRoot[s.proposerBoostRoot] if !ok || currentNode == nil { log.WithError(errInvalidProposerBoostRoot).Errorf(fmt.Sprintf("invalid current root %#x", s.proposerBoostRoot)) } else { proposerScore = (s.committeeWeight * params.BeaconConfig().ProposerScoreBoost) / 100 - currentNode.balance += proposerScore + currentNode.block.balance += proposerScore } } s.previousProposerBoostRoot = s.proposerBoostRoot diff --git a/beacon-chain/forkchoice/doubly-linked-tree/proposer_boost_test.go b/beacon-chain/forkchoice/doubly-linked-tree/proposer_boost_test.go index a4f79edbf3a1..f61f6bb4a632 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/proposer_boost_test.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/proposer_boost_test.go @@ -9,6 +9,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" "github.com/prysmaticlabs/prysm/v5/testing/assert" "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/time/slots" ) // Helper function to simulate the block being on time or delayed for proposer @@ -52,6 +53,7 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { f.store.proposerBoostRoot = [32]byte{} state, blkRoot, err := prepareForkchoiceState( ctx, + f, slot, newRoot, headRoot, @@ -61,7 +63,9 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { ) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - f.ProcessAttestation(ctx, []uint64{0}, newRoot, fEpoch) + fSlot, err := slots.EpochStart(fEpoch) + require.NoError(t, err) + f.ProcessAttestation(ctx, []uint64{0}, newRoot, fSlot) headRoot, err = f.Head(ctx) require.NoError(t, err) assert.Equal(t, newRoot, headRoot, "Incorrect head for justified epoch at slot 1") @@ -78,6 +82,7 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { f.store.proposerBoostRoot = [32]byte{} state, blkRoot, err = prepareForkchoiceState( ctx, + f, slot, newRoot, headRoot, @@ -87,7 +92,9 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { ) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - f.ProcessAttestation(ctx, []uint64{1}, newRoot, fEpoch) + fSlot, err = slots.EpochStart(fEpoch) + require.NoError(t, err) + f.ProcessAttestation(ctx, []uint64{1}, newRoot, fSlot) headRoot, err = f.Head(ctx) require.NoError(t, err) assert.Equal(t, newRoot, headRoot, "Incorrect head for justified epoch at slot 2") @@ -106,6 +113,7 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { f.store.proposerBoostRoot = [32]byte{} state, blkRoot, err = prepareForkchoiceState( ctx, + f, slot, newRoot, headRoot, @@ -115,7 +123,9 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { ) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - f.ProcessAttestation(ctx, []uint64{2}, newRoot, fEpoch) + fSlot, err = slots.EpochStart(fEpoch) + require.NoError(t, err) + f.ProcessAttestation(ctx, []uint64{2}, newRoot, fSlot) headRoot, err = f.Head(ctx) require.NoError(t, err) assert.Equal(t, newRoot, headRoot, "Incorrect head for justified epoch at slot 3") @@ -135,6 +145,7 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { f.store.proposerBoostRoot = [32]byte{} state, blkRoot, err = prepareForkchoiceState( ctx, + f, slot, newRoot, indexToHash(2), @@ -144,7 +155,9 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { ) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - f.ProcessAttestation(ctx, []uint64{3}, newRoot, fEpoch) + fSlot, err = slots.EpochStart(fEpoch) + require.NoError(t, err) + f.ProcessAttestation(ctx, []uint64{3}, newRoot, fSlot) headRoot, err = f.Head(ctx) require.NoError(t, err) assert.Equal(t, newRoot, headRoot, "Incorrect head for justified epoch at slot 3") @@ -163,18 +176,20 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { // (1: 48) -> (2: 38) -> (3: 10) // \--------------->(4: 18) // - node1 := f.store.nodeByRoot[indexToHash(1)] + node1 := f.store.emptyNodeByRoot[indexToHash(1)] require.Equal(t, node1.weight, uint64(48)) - node2 := f.store.nodeByRoot[indexToHash(2)] + node2 := f.store.emptyNodeByRoot[indexToHash(2)] require.Equal(t, node2.weight, uint64(38)) - node3 := f.store.nodeByRoot[indexToHash(3)] + node3 := f.store.emptyNodeByRoot[indexToHash(3)] require.Equal(t, node3.weight, uint64(10)) - node4 := f.store.nodeByRoot[indexToHash(4)] + node4 := f.store.emptyNodeByRoot[indexToHash(4)] require.Equal(t, node4.weight, uint64(18)) // Regression: process attestations for C, check that it // becomes head, we need two attestations to have C.weight = 30 > 24 = D.weight - f.ProcessAttestation(ctx, []uint64{4, 5}, indexToHash(3), fEpoch) + fSlot, err = slots.EpochStart(fEpoch) + require.NoError(t, err) + f.ProcessAttestation(ctx, []uint64{4, 5}, indexToHash(3), fSlot) headRoot, err = f.Head(ctx) require.NoError(t, err) assert.Equal(t, indexToHash(3), headRoot, "Incorrect head for justified epoch at slot 4") @@ -201,6 +216,7 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { honestBlock := indexToHash(2) state, blkRoot, err := prepareForkchoiceState( ctx, + f, honestBlockSlot, honestBlock, zeroHash, @@ -218,6 +234,7 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { maliciouslyWithheldBlock := indexToHash(1) state, blkRoot, err = prepareForkchoiceState( ctx, + f, maliciouslyWithheldBlockSlot, maliciouslyWithheldBlock, zeroHash, @@ -235,10 +252,14 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { // The maliciously withheld block has one vote. votes := []uint64{1} - f.ProcessAttestation(ctx, votes, maliciouslyWithheldBlock, fEpoch) + fSlot, err := slots.EpochStart(fEpoch) + require.NoError(t, err) + f.ProcessAttestation(ctx, votes, maliciouslyWithheldBlock, fSlot) // The honest block has one vote. votes = []uint64{2} - f.ProcessAttestation(ctx, votes, honestBlock, fEpoch) + fSlot, err = slots.EpochStart(fEpoch) + require.NoError(t, err) + f.ProcessAttestation(ctx, votes, honestBlock, fSlot) // Ensure the head is STILL C, the honest block, as the honest block had proposer boost. r, err = f.Head(ctx) @@ -267,6 +288,7 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { honestBlock := indexToHash(2) state, blkRoot, err := prepareForkchoiceState( ctx, + f, honestBlockSlot, honestBlock, zeroHash, @@ -286,6 +308,7 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { maliciouslyWithheldBlock := indexToHash(1) state, blkRoot, err = prepareForkchoiceState( ctx, + f, maliciouslyWithheldBlockSlot, maliciouslyWithheldBlock, zeroHash, @@ -304,7 +327,9 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { // An attestation is received for B that has more voting power than C with the proposer boost, // allowing B to then become the head if their attestation has enough adversarial votes. votes := []uint64{1, 2} - f.ProcessAttestation(ctx, votes, maliciouslyWithheldBlock, fEpoch) + fSlot, err := slots.EpochStart(fEpoch) + require.NoError(t, err) + f.ProcessAttestation(ctx, votes, maliciouslyWithheldBlock, fSlot) // Expect the head to have switched to B. r, err = f.Head(ctx) @@ -342,6 +367,7 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { f.store.proposerBoostRoot = [32]byte{} state, blkRoot, err := prepareForkchoiceState( ctx, + f, cSlot, c, a, // parent @@ -362,6 +388,7 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { f.store.proposerBoostRoot = [32]byte{} state, blkRoot, err = prepareForkchoiceState( ctx, + f, bSlot, b, a, // parent @@ -379,7 +406,9 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { // An attestation for C is received at slot N+3. votes := []uint64{1} - f.ProcessAttestation(ctx, votes, c, fEpoch) + fSlot, err := slots.EpochStart(fEpoch) + require.NoError(t, err) + f.ProcessAttestation(ctx, votes, c, fSlot) // A block D, building on B, is received at slot N+3. It should not be able to win without boosting. dSlot := primitives.Slot(3) @@ -387,6 +416,7 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { f.store.proposerBoostRoot = [32]byte{} state, blkRoot, err = prepareForkchoiceState( ctx, + f, dSlot, d, b, // parent @@ -408,6 +438,7 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { f.store.proposerBoostRoot = [32]byte{} state, blkRoot, err = prepareForkchoiceState( ctx, + f, dSlot, d2, b, // parent @@ -419,7 +450,9 @@ func TestForkChoice_BoostProposerRoot_PreventsExAnteAttack(t *testing.T) { require.NoError(t, f.InsertNode(ctx, state, blkRoot)) votes = []uint64{2} - f.ProcessAttestation(ctx, votes, d2, fEpoch) + fSlot, err = slots.EpochStart(fEpoch) + require.NoError(t, err) + f.ProcessAttestation(ctx, votes, d2, fSlot) // Ensure D becomes the head thanks to boosting. r, err = f.Head(ctx) require.NoError(t, err) @@ -437,7 +470,7 @@ func TestForkChoice_BoostProposerRoot(t *testing.T) { slot := primitives.Slot(0) currentSlot := primitives.Slot(1) driftGenesisTime(f, currentSlot, 0) - state, blkRoot, err := prepareForkchoiceState(ctx, slot, root, zeroHash, zeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, slot, root, zeroHash, zeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.Equal(t, [32]byte{}, f.store.proposerBoostRoot) @@ -447,7 +480,7 @@ func TestForkChoice_BoostProposerRoot(t *testing.T) { slot := primitives.Slot(1) currentSlot := primitives.Slot(1) driftGenesisTime(f, currentSlot, params.BeaconConfig().SecondsPerSlot-1) - state, blkRoot, err := prepareForkchoiceState(ctx, slot, root, zeroHash, zeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, slot, root, zeroHash, zeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.Equal(t, [32]byte{}, f.store.proposerBoostRoot) @@ -457,7 +490,7 @@ func TestForkChoice_BoostProposerRoot(t *testing.T) { slot := primitives.Slot(1) currentSlot := primitives.Slot(1) driftGenesisTime(f, currentSlot, 0) - state, blkRoot, err := prepareForkchoiceState(ctx, slot, root, zeroHash, zeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, slot, root, zeroHash, zeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.Equal(t, root, f.store.proposerBoostRoot) @@ -467,7 +500,7 @@ func TestForkChoice_BoostProposerRoot(t *testing.T) { slot := primitives.Slot(1) currentSlot := primitives.Slot(1) driftGenesisTime(f, currentSlot, 1) - state, blkRoot, err := prepareForkchoiceState(ctx, slot, root, zeroHash, zeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, slot, root, zeroHash, zeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.Equal(t, root, f.store.proposerBoostRoot) @@ -484,7 +517,7 @@ func TestForkChoice_missingProposerBoostRoots(t *testing.T) { } f.justifiedBalances = balances driftGenesisTime(f, 1, 0) - st, blk, err := prepareForkchoiceState(ctx, 1, [32]byte{'r'}, [32]byte{}, [32]byte{}, 1, 1) + st, blk, err := prepareForkchoiceState(ctx, f, 1, [32]byte{'r'}, [32]byte{}, [32]byte{}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, blk)) @@ -496,7 +529,7 @@ func TestForkChoice_missingProposerBoostRoots(t *testing.T) { f.store.proposerBoostRoot = [32]byte{'p'} driftGenesisTime(f, 3, 0) - st, blk, err = prepareForkchoiceState(ctx, 2, [32]byte{'a'}, [32]byte{'r'}, [32]byte{}, 1, 1) + st, blk, err = prepareForkchoiceState(ctx, f, 2, [32]byte{'a'}, [32]byte{'r'}, [32]byte{}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, blk)) headRoot, err = f.Head(ctx) diff --git a/beacon-chain/forkchoice/doubly-linked-tree/reorg_late_blocks.go b/beacon-chain/forkchoice/doubly-linked-tree/reorg_late_blocks.go index 8bc717802fae..91627428ffa1 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/reorg_late_blocks.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/reorg_late_blocks.go @@ -42,16 +42,16 @@ func (f *ForkChoice) ShouldOverrideFCU() (override bool) { return } - if head.slot != slots.CurrentSlot(f.store.genesisTime) { + if head.block.slot != slots.CurrentSlot(f.store.genesisTime) { return } // Do not reorg on epoch boundaries - if (head.slot+1)%params.BeaconConfig().SlotsPerEpoch == 0 { + if (head.block.slot+1)%params.BeaconConfig().SlotsPerEpoch == 0 { return } // Only reorg blocks that arrive late - early, err := head.arrivedEarly(f.store.genesisTime) + early, err := head.block.arrivedEarly(f.store.genesisTime) if err != nil { log.WithError(err).Error("could not check if block arrived early") return @@ -61,15 +61,15 @@ func (f *ForkChoice) ShouldOverrideFCU() (override bool) { } // Only reorg if we have been finalizing finalizedEpoch := f.store.finalizedCheckpoint.Epoch - if slots.ToEpoch(head.slot+1) > finalizedEpoch+params.BeaconConfig().ReorgMaxEpochsSinceFinalization { + if slots.ToEpoch(head.block.slot+1) > finalizedEpoch+params.BeaconConfig().ReorgMaxEpochsSinceFinalization { return } // Only orphan a single block - parent := head.parent + parent := head.block.parent if parent == nil { return } - if head.slot > parent.slot+1 { + if head.block.slot > parent.block.slot+1 { return } // Do not orphan a block that has higher justification than the parent @@ -83,7 +83,7 @@ func (f *ForkChoice) ShouldOverrideFCU() (override bool) { } // Return early if we are checking before 10 seconds into the slot - secs, err := slots.SecondsSinceSlotStart(head.slot, f.store.genesisTime, uint64(time.Now().Unix())) + secs, err := slots.SecondsSinceSlotStart(head.block.slot, f.store.genesisTime, uint64(time.Now().Unix())) if err != nil { log.WithError(err).Error("could not check current slot") return true @@ -112,54 +112,54 @@ func (f *ForkChoice) GetProposerHead() [32]byte { } // Only reorg blocks from the previous slot. - if head.slot+1 != slots.CurrentSlot(f.store.genesisTime) { - return head.root + if head.block.slot+1 != slots.CurrentSlot(f.store.genesisTime) { + return head.block.root } // Do not reorg on epoch boundaries - if (head.slot+1)%params.BeaconConfig().SlotsPerEpoch == 0 { - return head.root + if (head.block.slot+1)%params.BeaconConfig().SlotsPerEpoch == 0 { + return head.block.root } // Only reorg blocks that arrive late - early, err := head.arrivedEarly(f.store.genesisTime) + early, err := head.block.arrivedEarly(f.store.genesisTime) if err != nil { log.WithError(err).Error("could not check if block arrived early") - return head.root + return head.block.root } if early { - return head.root + return head.block.root } // Only reorg if we have been finalizing finalizedEpoch := f.store.finalizedCheckpoint.Epoch - if slots.ToEpoch(head.slot+1) > finalizedEpoch+params.BeaconConfig().ReorgMaxEpochsSinceFinalization { - return head.root + if slots.ToEpoch(head.block.slot+1) > finalizedEpoch+params.BeaconConfig().ReorgMaxEpochsSinceFinalization { + return head.block.root } // Only orphan a single block - parent := head.parent + parent := head.block.parent if parent == nil { - return head.root + return head.block.root } - if head.slot > parent.slot+1 { - return head.root + if head.block.slot > parent.block.slot+1 { + return head.block.root } // Only orphan a block if the head LMD vote is weak if head.weight*100 > f.store.committeeWeight*params.BeaconConfig().ReorgWeightThreshold { - return head.root + return head.block.root } // Only orphan a block if the parent LMD vote is strong if parent.weight*100 < f.store.committeeWeight*params.BeaconConfig().ReorgParentWeightThreshold { - return head.root + return head.block.root } // Only reorg if we are proposing early - secs, err := slots.SecondsSinceSlotStart(head.slot+1, f.store.genesisTime, uint64(time.Now().Unix())) + secs, err := slots.SecondsSinceSlotStart(head.block.slot+1, f.store.genesisTime, uint64(time.Now().Unix())) if err != nil { log.WithError(err).Error("could not check if proposing early") - return head.root + return head.block.root } if secs >= orphanLateBlockProposingEarly { - return head.root + return head.block.root } - return parent.root + return parent.block.root } diff --git a/beacon-chain/forkchoice/doubly-linked-tree/reorg_late_blocks_test.go b/beacon-chain/forkchoice/doubly-linked-tree/reorg_late_blocks_test.go index 990a8105a445..57e6ceb5cb09 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/reorg_late_blocks_test.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/reorg_late_blocks_test.go @@ -19,7 +19,7 @@ func TestForkChoice_ShouldOverrideFCU(t *testing.T) { f.store.committeeWeight /= uint64(params.BeaconConfig().SlotsPerEpoch) ctx := context.Background() driftGenesisTime(f, 1, 0) - st, blk, err := prepareForkchoiceState(ctx, 1, [32]byte{'a'}, [32]byte{}, [32]byte{'A'}, 0, 0) + st, blk, err := prepareForkchoiceState(ctx, f, 1, [32]byte{'a'}, [32]byte{}, [32]byte{'A'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, blk)) attesters := make([]uint64, f.numActiveValidators-64) @@ -30,7 +30,7 @@ func TestForkChoice_ShouldOverrideFCU(t *testing.T) { orphanLateBlockFirstThreshold := params.BeaconConfig().SecondsPerSlot / params.BeaconConfig().IntervalsPerSlot driftGenesisTime(f, 2, orphanLateBlockFirstThreshold+1) - st, blk, err = prepareForkchoiceState(ctx, 2, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 0, 0) + st, blk, err = prepareForkchoiceState(ctx, f, 2, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, blk)) headRoot, err := f.Head(ctx) @@ -52,51 +52,51 @@ func TestForkChoice_ShouldOverrideFCU(t *testing.T) { driftGenesisTime(f, 2, orphanLateBlockFirstThreshold+1) }) t.Run("head is from epoch boundary", func(t *testing.T) { - saved := f.store.headNode.slot + saved := f.store.headNode.block.slot driftGenesisTime(f, params.BeaconConfig().SlotsPerEpoch-1, 0) - f.store.headNode.slot = params.BeaconConfig().SlotsPerEpoch - 1 + f.store.headNode.block.slot = params.BeaconConfig().SlotsPerEpoch - 1 require.Equal(t, false, f.ShouldOverrideFCU()) driftGenesisTime(f, 2, orphanLateBlockFirstThreshold+1) - f.store.headNode.slot = saved + f.store.headNode.block.slot = saved }) t.Run("head is early", func(t *testing.T) { - saved := f.store.headNode.timestamp - f.store.headNode.timestamp = saved - 2 + saved := f.store.headNode.block.timestamp + f.store.headNode.block.timestamp = saved - 2 require.Equal(t, false, f.ShouldOverrideFCU()) - f.store.headNode.timestamp = saved + f.store.headNode.block.timestamp = saved }) t.Run("chain not finalizing", func(t *testing.T) { - saved := f.store.headNode.slot - f.store.headNode.slot = 97 + saved := f.store.headNode.block.slot + f.store.headNode.block.slot = 97 driftGenesisTime(f, 97, orphanLateBlockFirstThreshold+1) require.Equal(t, false, f.ShouldOverrideFCU()) - f.store.headNode.slot = saved + f.store.headNode.block.slot = saved driftGenesisTime(f, 2, orphanLateBlockFirstThreshold+1) }) t.Run("Not single block reorg", func(t *testing.T) { - saved := f.store.headNode.parent.slot - f.store.headNode.parent.slot = 0 + saved := f.store.headNode.block.parent.block.slot + f.store.headNode.block.parent.block.slot = 0 require.Equal(t, false, f.ShouldOverrideFCU()) - f.store.headNode.parent.slot = saved + f.store.headNode.block.parent.block.slot = saved }) t.Run("parent is nil", func(t *testing.T) { - saved := f.store.headNode.parent - f.store.headNode.parent = nil + saved := f.store.headNode.block.parent + f.store.headNode.block.parent = nil require.Equal(t, false, f.ShouldOverrideFCU()) - f.store.headNode.parent = saved + f.store.headNode.block.parent = saved }) t.Run("parent is weak early call", func(t *testing.T) { - saved := f.store.headNode.parent.weight - f.store.headNode.parent.weight = 0 + saved := f.store.headNode.block.parent.weight + f.store.headNode.block.parent.weight = 0 require.Equal(t, true, f.ShouldOverrideFCU()) - f.store.headNode.parent.weight = saved + f.store.headNode.block.parent.weight = saved }) t.Run("parent is weak late call", func(t *testing.T) { - saved := f.store.headNode.parent.weight + saved := f.store.headNode.block.parent.weight driftGenesisTime(f, 2, 11) - f.store.headNode.parent.weight = 0 + f.store.headNode.block.parent.weight = 0 require.Equal(t, false, f.ShouldOverrideFCU()) - f.store.headNode.parent.weight = saved + f.store.headNode.block.parent.weight = saved driftGenesisTime(f, 2, orphanLateBlockFirstThreshold+1) }) t.Run("Head is strong", func(t *testing.T) { @@ -117,7 +117,7 @@ func TestForkChoice_GetProposerHead(t *testing.T) { ctx := context.Background() driftGenesisTime(f, 1, 0) parentRoot := [32]byte{'a'} - st, blk, err := prepareForkchoiceState(ctx, 1, parentRoot, [32]byte{}, [32]byte{'A'}, 0, 0) + st, blk, err := prepareForkchoiceState(ctx, f, 1, parentRoot, [32]byte{}, [32]byte{'A'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, blk)) attesters := make([]uint64, f.numActiveValidators-64) @@ -128,14 +128,14 @@ func TestForkChoice_GetProposerHead(t *testing.T) { driftGenesisTime(f, 3, 1) childRoot := [32]byte{'b'} - st, blk, err = prepareForkchoiceState(ctx, 2, childRoot, [32]byte{'a'}, [32]byte{'B'}, 0, 0) + st, blk, err = prepareForkchoiceState(ctx, f, 2, childRoot, [32]byte{'a'}, [32]byte{'B'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, st, blk)) headRoot, err := f.Head(ctx) require.NoError(t, err) require.Equal(t, blk.Root(), headRoot) orphanLateBlockFirstThreshold := params.BeaconConfig().SecondsPerSlot / params.BeaconConfig().IntervalsPerSlot - f.store.headNode.timestamp -= params.BeaconConfig().SecondsPerSlot - orphanLateBlockFirstThreshold + f.store.headNode.block.timestamp -= params.BeaconConfig().SecondsPerSlot - orphanLateBlockFirstThreshold t.Run("head is weak", func(t *testing.T) { require.Equal(t, parentRoot, f.GetProposerHead()) @@ -152,44 +152,44 @@ func TestForkChoice_GetProposerHead(t *testing.T) { driftGenesisTime(f, 3, 1) }) t.Run("head is from epoch boundary", func(t *testing.T) { - saved := f.store.headNode.slot + saved := f.store.headNode.block.slot driftGenesisTime(f, params.BeaconConfig().SlotsPerEpoch, 0) - f.store.headNode.slot = params.BeaconConfig().SlotsPerEpoch - 1 + f.store.headNode.block.slot = params.BeaconConfig().SlotsPerEpoch - 1 require.Equal(t, childRoot, f.GetProposerHead()) driftGenesisTime(f, 3, 1) - f.store.headNode.slot = saved + f.store.headNode.block.slot = saved }) t.Run("head is early", func(t *testing.T) { - saved := f.store.headNode.timestamp - f.store.headNode.timestamp = saved - 2 + saved := f.store.headNode.block.timestamp + f.store.headNode.block.timestamp = saved - 2 require.Equal(t, childRoot, f.GetProposerHead()) - f.store.headNode.timestamp = saved + f.store.headNode.block.timestamp = saved }) t.Run("chain not finalizing", func(t *testing.T) { - saved := f.store.headNode.slot - f.store.headNode.slot = 97 + saved := f.store.headNode.block.slot + f.store.headNode.block.slot = 97 driftGenesisTime(f, 98, 0) require.Equal(t, childRoot, f.GetProposerHead()) - f.store.headNode.slot = saved + f.store.headNode.block.slot = saved driftGenesisTime(f, 3, 1) }) t.Run("Not single block reorg", func(t *testing.T) { - saved := f.store.headNode.parent.slot - f.store.headNode.parent.slot = 0 + saved := f.store.headNode.block.parent.block.slot + f.store.headNode.block.parent.block.slot = 0 require.Equal(t, childRoot, f.GetProposerHead()) - f.store.headNode.parent.slot = saved + f.store.headNode.block.parent.block.slot = saved }) t.Run("parent is nil", func(t *testing.T) { - saved := f.store.headNode.parent - f.store.headNode.parent = nil + saved := f.store.headNode.block.parent + f.store.headNode.block.parent = nil require.Equal(t, childRoot, f.GetProposerHead()) - f.store.headNode.parent = saved + f.store.headNode.block.parent = saved }) t.Run("parent is weak", func(t *testing.T) { - saved := f.store.headNode.parent.weight - f.store.headNode.parent.weight = 0 + saved := f.store.headNode.block.parent.weight + f.store.headNode.block.parent.weight = 0 require.Equal(t, false, f.ShouldOverrideFCU()) - f.store.headNode.parent.weight = saved + f.store.headNode.block.parent.weight = saved }) t.Run("Head is strong", func(t *testing.T) { f.store.headNode.weight = f.store.committeeWeight diff --git a/beacon-chain/forkchoice/doubly-linked-tree/store.go b/beacon-chain/forkchoice/doubly-linked-tree/store.go index 68b99a1584dc..8b7a313b0ff8 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/store.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/store.go @@ -26,7 +26,7 @@ func (s *Store) head(ctx context.Context) ([32]byte, error) { } // JustifiedRoot has to be known - justifiedNode, ok := s.nodeByRoot[s.justifiedCheckpoint.Root] + justifiedNode, ok := s.emptyNodeByRoot[s.justifiedCheckpoint.Root] if !ok || justifiedNode == nil { // If the justifiedCheckpoint is from genesis, then the root is // zeroHash. In this case it should be the root of forkchoice @@ -37,6 +37,11 @@ func (s *Store) head(ctx context.Context) ([32]byte, error) { return [32]byte{}, errors.WithMessage(errUnknownJustifiedRoot, fmt.Sprintf("%#x", s.justifiedCheckpoint.Root)) } } + // We need to consider descendants of the full justified checkpoint too + fullJustifiedNode, ok := s.fullNodeByPayload[justifiedNode.block.payloadHash] + if ok && fullJustifiedNode.weight >= justifiedNode.weight { + justifiedNode = fullJustifiedNode + } // If the justified node doesn't have a best descendant, // the best node is itself. @@ -44,29 +49,72 @@ func (s *Store) head(ctx context.Context) ([32]byte, error) { if bestDescendant == nil { bestDescendant = justifiedNode } + currentEpoch := slots.EpochsSinceGenesis(time.Unix(int64(s.genesisTime), 0)) if !bestDescendant.viableForHead(s.justifiedCheckpoint.Epoch, currentEpoch) { s.allTipsAreInvalid = true return [32]byte{}, fmt.Errorf("head at slot %d with weight %d is not eligible, finalizedEpoch, justified Epoch %d, %d != %d, %d", - bestDescendant.slot, bestDescendant.weight/10e9, bestDescendant.finalizedEpoch, bestDescendant.justifiedEpoch, s.finalizedCheckpoint.Epoch, s.justifiedCheckpoint.Epoch) + bestDescendant.block.slot, bestDescendant.weight/10e9, bestDescendant.block.finalizedEpoch, bestDescendant.block.justifiedEpoch, s.finalizedCheckpoint.Epoch, s.justifiedCheckpoint.Epoch) } s.allTipsAreInvalid = false // Update metrics. if bestDescendant != s.headNode { headChangesCount.Inc() - headSlotNumber.Set(float64(bestDescendant.slot)) + headSlotNumber.Set(float64(bestDescendant.block.slot)) s.headNode = bestDescendant } - return bestDescendant.root, nil + return bestDescendant.block.root, nil +} + +// checkProposerBoost checks if the incoming block should receive proposer boost and applies it. +func (s *Store) checkProposerBoost(block *BlockNode) { + timeNow := uint64(time.Now().Unix()) + if timeNow < s.genesisTime { + return + } + secondsIntoSlot := (timeNow - s.genesisTime) % params.BeaconConfig().SecondsPerSlot + currentSlot := slots.CurrentSlot(s.genesisTime) + boostThreshold := params.BeaconConfig().SecondsPerSlot / params.BeaconConfig().IntervalsPerSlot + isFirstBlock := s.proposerBoostRoot == [32]byte{} + if currentSlot == block.slot && secondsIntoSlot < boostThreshold && isFirstBlock { + s.proposerBoostRoot = block.root + } +} + +// insertChild perform the insertion tasks when the parent node was already in +// forkchoice, this is +// - add a child to the parent +// - apply proposer boost +// - update best descendants. +func (s *Store) insertChild(ctx context.Context, parent *Node, child *Node) error { + if parent == nil { + return nil + } + parent.children = append(parent.children, child) + if !child.full { + s.checkProposerBoost(child.block) + } + // Update best descendants + jEpoch := s.justifiedCheckpoint.Epoch + fEpoch := s.finalizedCheckpoint.Epoch + currentSlot := slots.CurrentSlot(s.genesisTime) + if err := s.treeRootNode.updateBestDescendant(ctx, jEpoch, fEpoch, slots.ToEpoch(currentSlot)); err != nil { + _, remErr := s.removeNode(ctx, child) + if remErr != nil { + log.WithError(remErr).Error("could not remove node") + } + return errors.Wrap(err, "could not update best descendants") + } + return nil } // insert registers a new block node to the fork choice store's node list. // It then updates the new node's parent with the best child and descendant node. func (s *Store) insert(ctx context.Context, roblock consensus_blocks.ROBlock, - justifiedEpoch, finalizedEpoch primitives.Epoch) (*Node, error) { + justifiedEpoch, finalizedEpoch primitives.Epoch) (*BlockNode, error) { ctx, span := trace.StartSpan(ctx, "doublyLinkedForkchoice.insert") defer span.End() @@ -74,97 +122,99 @@ func (s *Store) insert(ctx context.Context, block := roblock.Block() slot := block.Slot() parentRoot := block.ParentRoot() - var payloadHash [32]byte - if block.Version() >= version.Bellatrix { + var parentHash, payloadHash [32]byte + if block.Version() >= version.EPBS { + execution, err := block.Body().SignedExecutionPayloadHeader() + if err != nil { + return nil, err + } + header, err := execution.Header() + if err != nil { + return nil, err + } + payloadHash = header.BlockHash() + parentHash = header.ParentBlockHash() + } else if block.Version() >= version.Bellatrix { execution, err := block.Body().Execution() if err != nil { return nil, err } copy(payloadHash[:], execution.BlockHash()) + copy(parentHash[:], execution.ParentHash()) + // Before ePBS, if the parent is known and the parent hash is not, then + // set the parent hash to zero + _, ok := s.fullNodeByPayload[parentHash] + if !ok { + parentHash = [32]byte{} + } } - // Return if the block has been inserted into Store before. - if n, ok := s.nodeByRoot[root]; ok { - return n, nil + n, rootPresent := s.emptyNodeByRoot[root] + if rootPresent { + return n.block, nil } - - parent := s.nodeByRoot[parentRoot] - n := &Node{ + parent := s.emptyNodeByRoot[parentRoot] + fullParent := s.fullNodeByPayload[parentHash] + if fullParent != nil && parent != nil && fullParent.block == parent.block { + parent = fullParent + } + innerBlock := &BlockNode{ slot: slot, root: root, + payloadHash: payloadHash, parent: parent, + fullParent: fullParent, justifiedEpoch: justifiedEpoch, unrealizedJustifiedEpoch: justifiedEpoch, finalizedEpoch: finalizedEpoch, unrealizedFinalizedEpoch: finalizedEpoch, - optimistic: true, - payloadHash: payloadHash, timestamp: uint64(time.Now().Unix()), } - + emptyNode := &Node{ + block: innerBlock, + optimistic: true, + children: make([]*Node, 0), + full: false, + } // Set the node's target checkpoint if slot%params.BeaconConfig().SlotsPerEpoch == 0 { - n.target = n + innerBlock.target = innerBlock } else if parent != nil { - if slots.ToEpoch(slot) == slots.ToEpoch(parent.slot) { - n.target = parent.target + if slots.ToEpoch(slot) == slots.ToEpoch(parent.block.slot) { + innerBlock.target = parent.block.target } else { - n.target = parent + innerBlock.target = parent.block } } - s.nodeByPayload[payloadHash] = n - s.nodeByRoot[root] = n if parent == nil { if s.treeRootNode == nil { - s.treeRootNode = n - s.headNode = n - s.highestReceivedNode = n + s.treeRootNode = emptyNode + s.headNode = emptyNode + s.highestReceivedNode = emptyNode } else { - delete(s.nodeByRoot, root) - delete(s.nodeByPayload, payloadHash) - return nil, errInvalidParentRoot - } - } else { - parent.children = append(parent.children, n) - // Apply proposer boost - timeNow := uint64(time.Now().Unix()) - if timeNow < s.genesisTime { - return n, nil - } - secondsIntoSlot := (timeNow - s.genesisTime) % params.BeaconConfig().SecondsPerSlot - currentSlot := slots.CurrentSlot(s.genesisTime) - boostThreshold := params.BeaconConfig().SecondsPerSlot / params.BeaconConfig().IntervalsPerSlot - isFirstBlock := s.proposerBoostRoot == [32]byte{} - if currentSlot == slot && secondsIntoSlot < boostThreshold && isFirstBlock { - s.proposerBoostRoot = root - } - - // Update best descendants - jEpoch := s.justifiedCheckpoint.Epoch - fEpoch := s.finalizedCheckpoint.Epoch - if err := s.treeRootNode.updateBestDescendant(ctx, jEpoch, fEpoch, slots.ToEpoch(currentSlot)); err != nil { - _, remErr := s.removeNode(ctx, n) - if remErr != nil { - log.WithError(remErr).Error("could not remove node") - } - return nil, errors.Wrap(err, "could not update best descendants") + delete(s.emptyNodeByRoot, root) + return innerBlock, errInvalidParentRoot } } + s.emptyNodeByRoot[root] = emptyNode + if err := s.insertChild(ctx, parent, emptyNode); err != nil { + return nil, err + } + // Update metrics. processedBlockCount.Inc() - nodeCount.Set(float64(len(s.nodeByRoot))) + nodeCount.Set(float64(len(s.emptyNodeByRoot))) // Only update received block slot if it's within epoch from current time. if slot+params.BeaconConfig().SlotsPerEpoch > slots.CurrentSlot(s.genesisTime) { s.receivedBlocksLastEpoch[slot%params.BeaconConfig().SlotsPerEpoch] = slot } // Update highest slot tracking. - if slot > s.highestReceivedNode.slot { - s.highestReceivedNode = n + if s.highestReceivedNode == nil || slot > s.highestReceivedNode.block.slot { + s.highestReceivedNode = emptyNode } - - return n, nil + return innerBlock, nil } // pruneFinalizedNodeByRootMap prunes the `nodeByRoot` map @@ -174,10 +224,12 @@ func (s *Store) pruneFinalizedNodeByRootMap(ctx context.Context, node, finalized if ctx.Err() != nil { return ctx.Err() } - if node == finalizedNode { - if node.target != node { - node.target = nil + if node.block == finalizedNode.block { + if node.block.target != node.block { + node.block.target = nil } + node.block.parent = nil + node.block.fullParent = nil return nil } for _, child := range node.children { @@ -187,8 +239,8 @@ func (s *Store) pruneFinalizedNodeByRootMap(ctx context.Context, node, finalized } node.children = nil - delete(s.nodeByRoot, node.root) - delete(s.nodeByPayload, node.payloadHash) + delete(s.emptyNodeByRoot, node.block.root) + delete(s.fullNodeByPayload, node.block.payloadHash) return nil } @@ -200,40 +252,45 @@ func (s *Store) prune(ctx context.Context) error { finalizedRoot := s.finalizedCheckpoint.Root finalizedEpoch := s.finalizedCheckpoint.Epoch - finalizedNode, ok := s.nodeByRoot[finalizedRoot] + finalizedNode, ok := s.emptyNodeByRoot[finalizedRoot] if !ok || finalizedNode == nil { return errors.WithMessage(errUnknownFinalizedRoot, fmt.Sprintf("%#x", finalizedRoot)) } // return early if we haven't changed the finalized checkpoint - if finalizedNode.parent == nil { + if finalizedNode.block.parent == nil { return nil } - // Prune nodeByRoot starting from root if err := s.pruneFinalizedNodeByRootMap(ctx, s.treeRootNode, finalizedNode); err != nil { return err } - - finalizedNode.parent = nil - s.treeRootNode = finalizedNode - - prunedCount.Inc() - // Prune all children of the finalized checkpoint block that are incompatible with it checkpointMaxSlot, err := slots.EpochStart(finalizedEpoch) if err != nil { return errors.Wrap(err, "could not compute epoch start") } - if finalizedNode.slot == checkpointMaxSlot { - return nil + if finalizedNode.bestDescendant != s.headNode { + fullFinalized, ok := s.fullNodeByPayload[finalizedNode.block.payloadHash] + if !ok { + return errors.New("can't find full finalized node") + } + if fullFinalized.bestDescendant != s.headNode { + return errors.New("head does not descend from finalized node") + } + s.treeRootNode = fullFinalized + finalizedNode = fullFinalized } - + prunedCount.Inc() + // Prune all children of the finalized checkpoint block that are incompatible with it for _, child := range finalizedNode.children { - if child != nil && child.slot <= checkpointMaxSlot { + if child != nil && child.block.slot <= checkpointMaxSlot { if err := s.pruneFinalizedNodeByRootMap(ctx, child, finalizedNode); err != nil { return errors.Wrap(err, "could not prune incompatible finalized child") } } } + if finalizedNode.block.slot == checkpointMaxSlot { + return nil + } return nil } @@ -243,21 +300,21 @@ func (s *Store) tips() ([][32]byte, []primitives.Slot) { var roots [][32]byte var slots []primitives.Slot - for root, node := range s.nodeByRoot { + for _, node := range s.fullNodeByPayload { if len(node.children) == 0 { - roots = append(roots, root) - slots = append(slots, node.slot) + roots = append(roots, node.block.root) + slots = append(slots, node.block.slot) } } return roots, slots } -// HighestReceivedBlockSlot returns the highest slot received by the forkchoice -func (f *ForkChoice) HighestReceivedBlockSlot() primitives.Slot { +// HighestReceivedBlockSlotRoot returns the highest slot and root received by the forkchoice +func (f *ForkChoice) HighestReceivedBlockSlotRoot() (primitives.Slot, [32]byte) { if f.store.highestReceivedNode == nil { - return 0 + return 0, [32]byte{} } - return f.store.highestReceivedNode.slot + return f.store.highestReceivedNode.block.slot, f.store.highestReceivedNode.block.root } // HighestReceivedBlockSlotDelay returns the number of slots that the highest @@ -267,7 +324,7 @@ func (f *ForkChoice) HighestReceivedBlockDelay() primitives.Slot { if n == nil { return 0 } - secs, err := slots.SecondsSinceSlotStart(n.slot, f.store.genesisTime, n.timestamp) + secs, err := slots.SecondsSinceSlotStart(n.block.slot, f.store.genesisTime, n.block.timestamp) if err != nil { return 0 } diff --git a/beacon-chain/forkchoice/doubly-linked-tree/store_test.go b/beacon-chain/forkchoice/doubly-linked-tree/store_test.go index 383d377ad67e..407c276a8134 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/store_test.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/store_test.go @@ -26,7 +26,7 @@ func TestStore_FinalizedEpoch(t *testing.T) { func TestStore_NodeCount(t *testing.T) { f := setup(0, 0) - state, blk, err := prepareForkchoiceState(context.Background(), 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blk, err := prepareForkchoiceState(context.Background(), f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(context.Background(), state, blk)) require.Equal(t, 2, f.NodeCount()) @@ -35,34 +35,50 @@ func TestStore_NodeCount(t *testing.T) { func TestStore_NodeByRoot(t *testing.T) { f := setup(0, 0) ctx := context.Background() - state, blkRoot, err := prepareForkchoiceState(context.Background(), 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blk, err := prepareForkchoiceState(context.Background(), f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, indexToHash(101), 0, 0) require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) + require.NoError(t, f.InsertNode(ctx, state, blk)) + state, blk, err = prepareForkchoiceState(context.Background(), f, 2, indexToHash(2), indexToHash(1), indexToHash(102), 0, 0) require.NoError(t, err) - require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - node0 := f.store.treeRootNode - node1 := node0.children[0] - node2 := node1.children[0] + require.NoError(t, f.InsertNode(ctx, state, blk)) + emptyNode0 := f.store.emptyNodeByRoot[[32]byte{}] + fullNode0 := f.store.treeRootNode + emptyNode1 := fullNode0.children[0] + fullNode1 := fullNode0.children[1] + emptyNode2 := fullNode1.children[0] + fullNode2 := fullNode1.children[1] expectedRoots := map[[32]byte]*Node{ - params.BeaconConfig().ZeroHash: node0, - indexToHash(1): node1, - indexToHash(2): node2, + params.BeaconConfig().ZeroHash: emptyNode0, + indexToHash(1): emptyNode1, + indexToHash(2): emptyNode2, } require.Equal(t, 3, f.NodeCount()) - for root, node := range f.store.nodeByRoot { + for root, node := range f.store.emptyNodeByRoot { v, ok := expectedRoots[root] require.Equal(t, ok, true) require.Equal(t, v, node) } + + require.Equal(t, 3, len(f.store.fullNodeByPayload)) + expectedPayloads := map[[32]byte]*Node{ + [32]byte{}: fullNode0, + indexToHash(101): fullNode1, + indexToHash(102): fullNode2, + } + + for payloadHash, node := range f.store.fullNodeByPayload { + v, ok := expectedPayloads[payloadHash] + require.Equal(t, true, ok) + require.Equal(t, v, node) + } } func TestForkChoice_HasNode(t *testing.T) { f := setup(0, 0) ctx := context.Background() - state, blkRoot, err := prepareForkchoiceState(context.Background(), 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(context.Background(), f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.Equal(t, true, f.HasNode(indexToHash(1))) @@ -78,7 +94,7 @@ func TestStore_Head_UnknownJustifiedRoot(t *testing.T) { func TestStore_Head_Itself(t *testing.T) { f := setup(0, 0) - state, blkRoot, err := prepareForkchoiceState(context.Background(), 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(context.Background(), f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(context.Background(), state, blkRoot)) @@ -93,16 +109,16 @@ func TestStore_Head_Itself(t *testing.T) { func TestStore_Head_BestDescendant(t *testing.T) { f := setup(0, 0) ctx := context.Background() - state, blkRoot, err := prepareForkchoiceState(context.Background(), 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(context.Background(), f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 3, indexToHash(3), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 3, indexToHash(3), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 4, indexToHash(4), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 4, indexToHash(4), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) f.store.justifiedCheckpoint = &forkchoicetypes.Checkpoint{Epoch: 0, Root: indexToHash(1)} @@ -114,11 +130,11 @@ func TestStore_Head_BestDescendant(t *testing.T) { func TestStore_UpdateBestDescendant_ContextCancelled(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) f := setup(0, 0) - state, blkRoot, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) cancel() - state, blkRoot, err = prepareForkchoiceState(ctx, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), indexToHash(1), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) err = f.InsertNode(ctx, state, blkRoot) require.ErrorContains(t, "context canceled", err) @@ -126,26 +142,28 @@ func TestStore_UpdateBestDescendant_ContextCancelled(t *testing.T) { func TestStore_Insert(t *testing.T) { // The new node does not have a parent. - treeRootNode := &Node{slot: 0, root: indexToHash(0)} + treeRootNode := &Node{block: &BlockNode{slot: 0, root: indexToHash(0)}} nodeByRoot := map[[32]byte]*Node{indexToHash(0): treeRootNode} nodeByPayload := map[[32]byte]*Node{indexToHash(0): treeRootNode} jc := &forkchoicetypes.Checkpoint{Epoch: 0} fc := &forkchoicetypes.Checkpoint{Epoch: 0} - s := &Store{nodeByRoot: nodeByRoot, treeRootNode: treeRootNode, nodeByPayload: nodeByPayload, justifiedCheckpoint: jc, finalizedCheckpoint: fc, highestReceivedNode: &Node{}} + fcs := setup(0, 0) + s := &Store{emptyNodeByRoot: nodeByRoot, treeRootNode: treeRootNode, fullNodeByPayload: nodeByPayload, justifiedCheckpoint: jc, finalizedCheckpoint: fc} + fcs.store = s payloadHash := [32]byte{'a'} ctx := context.Background() - _, blk, err := prepareForkchoiceState(ctx, 100, indexToHash(100), indexToHash(0), payloadHash, 1, 1) + _, blk, err := prepareForkchoiceState(ctx, fcs, 100, indexToHash(100), indexToHash(0), payloadHash, 1, 1) require.NoError(t, err) _, err = s.insert(ctx, blk, 1, 1) require.NoError(t, err) - assert.Equal(t, 2, len(s.nodeByRoot), "Did not insert block") - assert.Equal(t, (*Node)(nil), treeRootNode.parent, "Incorrect parent") + assert.Equal(t, 2, len(s.emptyNodeByRoot), "Did not insert block") + assert.Equal(t, (*Node)(nil), treeRootNode.block.parent, "Incorrect parent") assert.Equal(t, 1, len(treeRootNode.children), "Incorrect children number") - assert.Equal(t, payloadHash, treeRootNode.children[0].payloadHash, "Incorrect payload hash") + assert.Equal(t, payloadHash, treeRootNode.children[0].block.payloadHash, "Incorrect payload hash") child := treeRootNode.children[0] - assert.Equal(t, primitives.Epoch(1), child.justifiedEpoch, "Incorrect justification") - assert.Equal(t, primitives.Epoch(1), child.finalizedEpoch, "Incorrect finalization") - assert.Equal(t, indexToHash(100), child.root, "Incorrect root") + assert.Equal(t, primitives.Epoch(1), child.block.justifiedEpoch, "Incorrect justification") + assert.Equal(t, primitives.Epoch(1), child.block.finalizedEpoch, "Incorrect finalization") + assert.Equal(t, indexToHash(100), child.block.root, "Incorrect root") } func TestStore_Prune_MoreThanThreshold(t *testing.T) { @@ -153,11 +171,11 @@ func TestStore_Prune_MoreThanThreshold(t *testing.T) { numOfNodes := uint64(100) f := setup(0, 0) ctx := context.Background() - state, blkRoot, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, indexToHash(1001), 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) for i := uint64(2); i < numOfNodes; i++ { - state, blkRoot, err = prepareForkchoiceState(ctx, primitives.Slot(i), indexToHash(i), indexToHash(i-1), params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, primitives.Slot(i), indexToHash(i), indexToHash(i-1), indexToHash(1000+i), 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) } @@ -167,7 +185,7 @@ func TestStore_Prune_MoreThanThreshold(t *testing.T) { // Finalized root is at index 99 so everything before 99 should be pruned. s.finalizedCheckpoint.Root = indexToHash(99) require.NoError(t, s.prune(context.Background())) - assert.Equal(t, 1, len(s.nodeByRoot), "Incorrect nodes count") + assert.Equal(t, 1, len(s.emptyNodeByRoot), "Incorrect nodes count") } func TestStore_Prune_MoreThanOnce(t *testing.T) { @@ -175,11 +193,11 @@ func TestStore_Prune_MoreThanOnce(t *testing.T) { numOfNodes := uint64(100) f := setup(0, 0) ctx := context.Background() - state, blkRoot, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) for i := uint64(2); i < numOfNodes; i++ { - state, blkRoot, err = prepareForkchoiceState(ctx, primitives.Slot(i), indexToHash(i), indexToHash(i-1), params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, primitives.Slot(i), indexToHash(i), indexToHash(i-1), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) } @@ -189,12 +207,12 @@ func TestStore_Prune_MoreThanOnce(t *testing.T) { // Finalized root is at index 11 so everything before 11 should be pruned. s.finalizedCheckpoint.Root = indexToHash(10) require.NoError(t, s.prune(context.Background())) - assert.Equal(t, 90, len(s.nodeByRoot), "Incorrect nodes count") + assert.Equal(t, 90, len(s.emptyNodeByRoot), "Incorrect nodes count") // One more time. s.finalizedCheckpoint.Root = indexToHash(20) require.NoError(t, s.prune(context.Background())) - assert.Equal(t, 80, len(s.nodeByRoot), "Incorrect nodes count") + assert.Equal(t, 80, len(s.emptyNodeByRoot), "Incorrect nodes count") } func TestStore_Prune_ReturnEarly(t *testing.T) { @@ -202,11 +220,11 @@ func TestStore_Prune_ReturnEarly(t *testing.T) { numOfNodes := uint64(100) f := setup(0, 0) ctx := context.Background() - state, blkRoot, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) for i := uint64(2); i < numOfNodes; i++ { - state, blkRoot, err = prepareForkchoiceState(ctx, primitives.Slot(i), indexToHash(i), indexToHash(i-1), params.BeaconConfig().ZeroHash, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, primitives.Slot(i), indexToHash(i), indexToHash(i-1), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) } @@ -227,18 +245,18 @@ func TestStore_Prune_ReturnEarly(t *testing.T) { func TestStore_Prune_NoDanglingBranch(t *testing.T) { f := setup(0, 0) ctx := context.Background() - state, blkRoot, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, [32]byte{'1'}, 0, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, [32]byte{'1'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 2, indexToHash(2), params.BeaconConfig().ZeroHash, [32]byte{'2'}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), params.BeaconConfig().ZeroHash, [32]byte{'2'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) s := f.store s.finalizedCheckpoint.Root = indexToHash(1) require.NoError(t, s.prune(context.Background())) - require.Equal(t, len(s.nodeByRoot), 1) - require.Equal(t, len(s.nodeByPayload), 1) + require.Equal(t, len(s.emptyNodeByRoot), 1) + require.Equal(t, len(s.fullNodeByPayload), 1) } // This test starts with the following branching diagram @@ -255,40 +273,40 @@ func TestStore_tips(t *testing.T) { ctx := context.Background() f := setup(1, 1) - state, blkRoot, err := prepareForkchoiceState(ctx, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 101, [32]byte{'b'}, [32]byte{'a'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 102, [32]byte{'c'}, [32]byte{'b'}, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 102, [32]byte{'c'}, [32]byte{'b'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 102, [32]byte{'j'}, [32]byte{'b'}, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 102, [32]byte{'j'}, [32]byte{'b'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 103, [32]byte{'d'}, [32]byte{'c'}, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 103, [32]byte{'d'}, [32]byte{'c'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 104, [32]byte{'e'}, [32]byte{'d'}, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 104, [32]byte{'e'}, [32]byte{'d'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 104, [32]byte{'g'}, [32]byte{'d'}, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 104, [32]byte{'g'}, [32]byte{'d'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 105, [32]byte{'f'}, [32]byte{'e'}, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 105, [32]byte{'f'}, [32]byte{'e'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 105, [32]byte{'h'}, [32]byte{'g'}, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 105, [32]byte{'h'}, [32]byte{'g'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 105, [32]byte{'k'}, [32]byte{'g'}, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 105, [32]byte{'k'}, [32]byte{'g'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 106, [32]byte{'i'}, [32]byte{'h'}, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 106, [32]byte{'i'}, [32]byte{'h'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 106, [32]byte{'l'}, [32]byte{'k'}, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 106, [32]byte{'l'}, [32]byte{'k'}, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) expectedMap := map[[32]byte]primitives.Slot{ @@ -308,18 +326,20 @@ func TestStore_tips(t *testing.T) { func TestStore_PruneMapsNodes(t *testing.T) { f := setup(0, 0) ctx := context.Background() - state, blkRoot, err := prepareForkchoiceState(ctx, 1, indexToHash(1), params.BeaconConfig().ZeroHash, [32]byte{'1'}, 0, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), params.BeaconConfig().ZeroHash, [32]byte{'1'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 2, indexToHash(2), params.BeaconConfig().ZeroHash, [32]byte{'2'}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 2, indexToHash(2), params.BeaconConfig().ZeroHash, [32]byte{'2'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) s := f.store s.finalizedCheckpoint.Root = indexToHash(1) + require.Equal(t, 3, len(s.emptyNodeByRoot)) + require.Equal(t, 3, len(s.fullNodeByPayload)) require.NoError(t, s.prune(context.Background())) - require.Equal(t, len(s.nodeByRoot), 1) - require.Equal(t, len(s.nodeByPayload), 1) + require.Equal(t, len(s.emptyNodeByRoot), 1) + require.Equal(t, len(s.fullNodeByPayload), 1) } @@ -331,19 +351,20 @@ func TestForkChoice_ReceivedBlocksLastEpoch(t *testing.T) { // Make sure it doesn't underflow s.genesisTime = uint64(time.Now().Add(time.Duration(-1*int64(params.BeaconConfig().SecondsPerSlot)) * time.Second).Unix()) ctx := context.Background() - _, blk, err := prepareForkchoiceState(ctx, 1, [32]byte{'a'}, b, b, 1, 1) + _, blk, err := prepareForkchoiceState(ctx, f, 1, [32]byte{'a'}, b, b, 1, 1) require.NoError(t, err) _, err = s.insert(ctx, blk, 1, 1) require.NoError(t, err) count, err := f.ReceivedBlocksLastEpoch() require.NoError(t, err) require.Equal(t, uint64(1), count) - require.Equal(t, primitives.Slot(1), f.HighestReceivedBlockSlot()) + slot, _ := f.HighestReceivedBlockSlotRoot() + require.Equal(t, primitives.Slot(1), slot) require.Equal(t, primitives.Slot(0), f.HighestReceivedBlockDelay()) // 64 // Received block last epoch is 1 - _, blk, err = prepareForkchoiceState(ctx, 64, [32]byte{'A'}, b, b, 1, 1) + _, blk, err = prepareForkchoiceState(ctx, f, 64, [32]byte{'A'}, b, b, 1, 1) require.NoError(t, err) _, err = s.insert(ctx, blk, 1, 1) require.NoError(t, err) @@ -351,12 +372,13 @@ func TestForkChoice_ReceivedBlocksLastEpoch(t *testing.T) { count, err = f.ReceivedBlocksLastEpoch() require.NoError(t, err) require.Equal(t, uint64(1), count) - require.Equal(t, primitives.Slot(64), f.HighestReceivedBlockSlot()) + slot, _ = f.HighestReceivedBlockSlotRoot() + require.Equal(t, primitives.Slot(64), slot) require.Equal(t, primitives.Slot(0), f.HighestReceivedBlockDelay()) // 64 65 // Received block last epoch is 2 - _, blk, err = prepareForkchoiceState(ctx, 65, [32]byte{'B'}, b, b, 1, 1) + _, blk, err = prepareForkchoiceState(ctx, f, 65, [32]byte{'B'}, b, b, 1, 1) require.NoError(t, err) _, err = s.insert(ctx, blk, 1, 1) require.NoError(t, err) @@ -364,12 +386,13 @@ func TestForkChoice_ReceivedBlocksLastEpoch(t *testing.T) { count, err = f.ReceivedBlocksLastEpoch() require.NoError(t, err) require.Equal(t, uint64(2), count) - require.Equal(t, primitives.Slot(65), f.HighestReceivedBlockSlot()) + slot, _ = f.HighestReceivedBlockSlotRoot() + require.Equal(t, primitives.Slot(65), slot) require.Equal(t, primitives.Slot(1), f.HighestReceivedBlockDelay()) // 64 65 66 // Received block last epoch is 3 - _, blk, err = prepareForkchoiceState(ctx, 66, [32]byte{'C'}, b, b, 1, 1) + _, blk, err = prepareForkchoiceState(ctx, f, 66, [32]byte{'C'}, b, b, 1, 1) require.NoError(t, err) _, err = s.insert(ctx, blk, 1, 1) require.NoError(t, err) @@ -377,12 +400,13 @@ func TestForkChoice_ReceivedBlocksLastEpoch(t *testing.T) { count, err = f.ReceivedBlocksLastEpoch() require.NoError(t, err) require.Equal(t, uint64(3), count) - require.Equal(t, primitives.Slot(66), f.HighestReceivedBlockSlot()) + slot, _ = f.HighestReceivedBlockSlotRoot() + require.Equal(t, primitives.Slot(66), slot) // 64 65 66 // 98 // Received block last epoch is 1 - _, blk, err = prepareForkchoiceState(ctx, 98, [32]byte{'D'}, b, b, 1, 1) + _, blk, err = prepareForkchoiceState(ctx, f, 98, [32]byte{'D'}, b, b, 1, 1) require.NoError(t, err) _, err = s.insert(ctx, blk, 1, 1) require.NoError(t, err) @@ -390,13 +414,14 @@ func TestForkChoice_ReceivedBlocksLastEpoch(t *testing.T) { count, err = f.ReceivedBlocksLastEpoch() require.NoError(t, err) require.Equal(t, uint64(1), count) - require.Equal(t, primitives.Slot(98), f.HighestReceivedBlockSlot()) + slot, _ = f.HighestReceivedBlockSlotRoot() + require.Equal(t, primitives.Slot(98), slot) // 64 65 66 // 98 // 132 // Received block last epoch is 1 - _, blk, err = prepareForkchoiceState(ctx, 132, [32]byte{'E'}, b, b, 1, 1) + _, blk, err = prepareForkchoiceState(ctx, f, 132, [32]byte{'E'}, b, b, 1, 1) require.NoError(t, err) _, err = s.insert(ctx, blk, 1, 1) require.NoError(t, err) @@ -404,14 +429,15 @@ func TestForkChoice_ReceivedBlocksLastEpoch(t *testing.T) { count, err = f.ReceivedBlocksLastEpoch() require.NoError(t, err) require.Equal(t, uint64(1), count) - require.Equal(t, primitives.Slot(132), f.HighestReceivedBlockSlot()) + slot, _ = f.HighestReceivedBlockSlotRoot() + require.Equal(t, primitives.Slot(132), slot) // 64 65 66 // 98 // 132 // 99 // Received block last epoch is still 1. 99 is outside the window - _, blk, err = prepareForkchoiceState(ctx, 99, [32]byte{'F'}, b, b, 1, 1) + _, blk, err = prepareForkchoiceState(ctx, f, 99, [32]byte{'F'}, b, b, 1, 1) require.NoError(t, err) _, err = s.insert(ctx, blk, 1, 1) require.NoError(t, err) @@ -419,14 +445,15 @@ func TestForkChoice_ReceivedBlocksLastEpoch(t *testing.T) { count, err = f.ReceivedBlocksLastEpoch() require.NoError(t, err) require.Equal(t, uint64(1), count) - require.Equal(t, primitives.Slot(132), f.HighestReceivedBlockSlot()) + slot, _ = f.HighestReceivedBlockSlotRoot() + require.Equal(t, primitives.Slot(132), slot) // 64 65 66 // 98 // 132 // 99 100 // Received block last epoch is still 1. 100 is at the same position as 132 - _, blk, err = prepareForkchoiceState(ctx, 100, [32]byte{'G'}, b, b, 1, 1) + _, blk, err = prepareForkchoiceState(ctx, f, 100, [32]byte{'G'}, b, b, 1, 1) require.NoError(t, err) _, err = s.insert(ctx, blk, 1, 1) require.NoError(t, err) @@ -434,14 +461,15 @@ func TestForkChoice_ReceivedBlocksLastEpoch(t *testing.T) { count, err = f.ReceivedBlocksLastEpoch() require.NoError(t, err) require.Equal(t, uint64(1), count) - require.Equal(t, primitives.Slot(132), f.HighestReceivedBlockSlot()) + slot, _ = f.HighestReceivedBlockSlotRoot() + require.Equal(t, primitives.Slot(132), slot) // 64 65 66 // 98 // 132 // 99 100 101 // Received block last epoch is 2. 101 is within the window - _, blk, err = prepareForkchoiceState(ctx, 101, [32]byte{'H'}, b, b, 1, 1) + _, blk, err = prepareForkchoiceState(ctx, f, 101, [32]byte{'H'}, b, b, 1, 1) require.NoError(t, err) _, err = s.insert(ctx, blk, 1, 1) require.NoError(t, err) @@ -449,7 +477,8 @@ func TestForkChoice_ReceivedBlocksLastEpoch(t *testing.T) { count, err = f.ReceivedBlocksLastEpoch() require.NoError(t, err) require.Equal(t, uint64(2), count) - require.Equal(t, primitives.Slot(132), f.HighestReceivedBlockSlot()) + slot, _ = f.HighestReceivedBlockSlotRoot() + require.Equal(t, primitives.Slot(132), slot) s.genesisTime = uint64(time.Now().Add(time.Duration(-134*int64(params.BeaconConfig().SecondsPerSlot)) * time.Second).Unix()) count, err = f.ReceivedBlocksLastEpoch() @@ -465,14 +494,14 @@ func TestStore_TargetRootForEpoch(t *testing.T) { ctx := context.Background() f := setup(1, 1) - state, blk, err := prepareForkchoiceState(ctx, params.BeaconConfig().SlotsPerEpoch, [32]byte{'a'}, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blk, err := prepareForkchoiceState(ctx, f, params.BeaconConfig().SlotsPerEpoch, [32]byte{'a'}, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk)) target, err := f.TargetRootForEpoch(blk.Root(), 1) require.NoError(t, err) require.Equal(t, target, blk.Root()) - state, blk1, err := prepareForkchoiceState(ctx, params.BeaconConfig().SlotsPerEpoch+1, [32]byte{'b'}, blk.Root(), params.BeaconConfig().ZeroHash, 1, 1) + state, blk1, err := prepareForkchoiceState(ctx, f, params.BeaconConfig().SlotsPerEpoch+1, [32]byte{'b'}, blk.Root(), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk1)) target, err = f.TargetRootForEpoch(blk1.Root(), 1) @@ -481,14 +510,14 @@ func TestStore_TargetRootForEpoch(t *testing.T) { // Insert a block for the next epoch (missed slot 0) - state, blk2, err := prepareForkchoiceState(ctx, 2*params.BeaconConfig().SlotsPerEpoch+1, [32]byte{'c'}, blk1.Root(), params.BeaconConfig().ZeroHash, 1, 1) + state, blk2, err := prepareForkchoiceState(ctx, f, 2*params.BeaconConfig().SlotsPerEpoch+1, [32]byte{'c'}, blk1.Root(), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk2)) target, err = f.TargetRootForEpoch(blk2.Root(), 2) require.NoError(t, err) require.Equal(t, target, blk1.Root()) - state, blk3, err := prepareForkchoiceState(ctx, 2*params.BeaconConfig().SlotsPerEpoch+2, [32]byte{'d'}, blk2.Root(), params.BeaconConfig().ZeroHash, 1, 1) + state, blk3, err := prepareForkchoiceState(ctx, f, 2*params.BeaconConfig().SlotsPerEpoch+2, [32]byte{'d'}, blk2.Root(), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk3)) target, err = f.TargetRootForEpoch(blk2.Root(), 2) @@ -505,14 +534,14 @@ func TestStore_TargetRootForEpoch(t *testing.T) { // Insert a block for next epoch (slot 0 present) - state, blk4, err := prepareForkchoiceState(ctx, 3*params.BeaconConfig().SlotsPerEpoch, [32]byte{'e'}, blk1.Root(), params.BeaconConfig().ZeroHash, 1, 1) + state, blk4, err := prepareForkchoiceState(ctx, f, 3*params.BeaconConfig().SlotsPerEpoch, [32]byte{'e'}, blk1.Root(), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk4)) target, err = f.TargetRootForEpoch(blk4.Root(), 3) require.NoError(t, err) require.Equal(t, target, blk4.Root()) - state, blk5, err := prepareForkchoiceState(ctx, 3*params.BeaconConfig().SlotsPerEpoch+1, [32]byte{'f'}, blk4.Root(), params.BeaconConfig().ZeroHash, 1, 1) + state, blk5, err := prepareForkchoiceState(ctx, f, 3*params.BeaconConfig().SlotsPerEpoch+1, [32]byte{'f'}, blk4.Root(), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk5)) target, err = f.TargetRootForEpoch(blk5.Root(), 3) @@ -530,7 +559,7 @@ func TestStore_TargetRootForEpoch(t *testing.T) { require.Equal(t, blk1.Root(), target) // the parent of root4 in epoch 3 is root 1 in epoch 1 // Target root where the target is two epochs ago, slot 0 was missed - state, blk6, err := prepareForkchoiceState(ctx, 4*params.BeaconConfig().SlotsPerEpoch+1, [32]byte{'g'}, blk5.Root(), params.BeaconConfig().ZeroHash, 1, 1) + state, blk6, err := prepareForkchoiceState(ctx, f, 4*params.BeaconConfig().SlotsPerEpoch+1, [32]byte{'g'}, blk5.Root(), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blk6)) target, err = f.TargetRootForEpoch(blk6.Root(), 4) @@ -551,7 +580,7 @@ func TestStore_TargetRootForEpoch(t *testing.T) { func TestStore_CleanupInserting(t *testing.T) { f := setup(0, 0) ctx := context.Background() - st, blk, err := prepareForkchoiceState(ctx, 1, indexToHash(1), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) + st, blk, err := prepareForkchoiceState(ctx, f, 1, indexToHash(1), indexToHash(2), params.BeaconConfig().ZeroHash, 0, 0) require.NoError(t, err) require.NotNil(t, f.InsertNode(ctx, st, blk)) require.Equal(t, false, f.HasNode(blk.Root())) diff --git a/beacon-chain/forkchoice/doubly-linked-tree/types.go b/beacon-chain/forkchoice/doubly-linked-tree/types.go index ad5bffa79d4c..971acbda5d49 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/types.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/types.go @@ -33,8 +33,8 @@ type Store struct { committeeWeight uint64 // tracks the total active validator balance divided by the number of slots per Epoch. treeRootNode *Node // the root node of the store tree. headNode *Node // last head Node - nodeByRoot map[[fieldparams.RootLength]byte]*Node // nodes indexed by roots. - nodeByPayload map[[fieldparams.RootLength]byte]*Node // nodes indexed by payload Hash + emptyNodeByRoot map[[fieldparams.RootLength]byte]*Node // nodes indexed by roots. + fullNodeByPayload map[[fieldparams.RootLength]byte]*Node // nodes indexed by payload Hash slashedIndices map[primitives.ValidatorIndex]bool // the list of equivocating validator indices originRoot [fieldparams.RootLength]byte // The genesis block root genesisTime uint64 @@ -43,29 +43,38 @@ type Store struct { allTipsAreInvalid bool // tracks if all tips are not viable for head } -// Node defines the individual block which includes its block parent, ancestor and how much weight accounted for it. +// BlockNode defines the individual block which includes its block parent, ancestor and how much weight accounted for it. // This is used as an array based stateful DAG for efficient fork choice look up. -type Node struct { +type BlockNode struct { slot primitives.Slot // slot of the block converted to the node. root [fieldparams.RootLength]byte // root of the block converted to the node. - payloadHash [fieldparams.RootLength]byte // payloadHash of the block converted to the node. - parent *Node // parent index of this node. - target *Node // target checkpoint for - children []*Node // the list of direct children of this Node + payloadHash [fieldparams.RootLength]byte // payloadHash of the block committed to the node. + parent *Node // parent node of this block + fullParent *Node // full parent of this block + balance uint64 // the balance that voted for this node directly + target *BlockNode // target checkpoint for justifiedEpoch primitives.Epoch // justifiedEpoch of this node. unrealizedJustifiedEpoch primitives.Epoch // the epoch that would be justified if the block would be advanced to the next epoch. finalizedEpoch primitives.Epoch // finalizedEpoch of this node. unrealizedFinalizedEpoch primitives.Epoch // the epoch that would be finalized if the block would be advanced to the next epoch. - balance uint64 // the balance that voted for this node directly - weight uint64 // weight of this node: the total balance including children - bestDescendant *Node // bestDescendant node of this node. - optimistic bool // whether the block has been fully validated or not timestamp uint64 // The timestamp when the node was inserted. } +// Node is a type that encapsulates a blocknode and whether the payload is +// present or not, to share resources between the full and empty forkchoice +// nodes. +type Node struct { + block *BlockNode + children []*Node // the list of direct children of this Node + weight uint64 // weight of this node: the total balance including children + bestDescendant *Node // bestDescendant node of this node. + full bool // wether the node represents full or empty forkchoice node + optimistic bool // whether the payload has been fully validated or not +} + // Vote defines an individual validator's vote. type Vote struct { currentRoot [fieldparams.RootLength]byte // current voting root. nextRoot [fieldparams.RootLength]byte // next voting root. - nextEpoch primitives.Epoch // epoch of next voting period. + slot primitives.Slot // slot of the last vote by this validator } diff --git a/beacon-chain/forkchoice/doubly-linked-tree/unrealized_justification.go b/beacon-chain/forkchoice/doubly-linked-tree/unrealized_justification.go index 78d5d724e768..2ed3aeb65fb6 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/unrealized_justification.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/unrealized_justification.go @@ -15,63 +15,63 @@ import ( ) func (s *Store) setUnrealizedJustifiedEpoch(root [32]byte, epoch primitives.Epoch) error { - node, ok := s.nodeByRoot[root] + node, ok := s.emptyNodeByRoot[root] if !ok || node == nil { return errors.Wrap(ErrNilNode, "could not set unrealized justified epoch") } - if epoch < node.unrealizedJustifiedEpoch { + if epoch < node.block.unrealizedJustifiedEpoch { return errInvalidUnrealizedJustifiedEpoch } - node.unrealizedJustifiedEpoch = epoch + node.block.unrealizedJustifiedEpoch = epoch return nil } func (s *Store) setUnrealizedFinalizedEpoch(root [32]byte, epoch primitives.Epoch) error { - node, ok := s.nodeByRoot[root] + node, ok := s.emptyNodeByRoot[root] if !ok || node == nil { return errors.Wrap(ErrNilNode, "could not set unrealized finalized epoch") } - if epoch < node.unrealizedFinalizedEpoch { + if epoch < node.block.unrealizedFinalizedEpoch { return errInvalidUnrealizedFinalizedEpoch } - node.unrealizedFinalizedEpoch = epoch + node.block.unrealizedFinalizedEpoch = epoch return nil } // updateUnrealizedCheckpoints "realizes" the unrealized justified and finalized // epochs stored within nodes. It should be called at the beginning of each epoch. func (f *ForkChoice) updateUnrealizedCheckpoints(ctx context.Context) error { - for _, node := range f.store.nodeByRoot { - node.justifiedEpoch = node.unrealizedJustifiedEpoch - node.finalizedEpoch = node.unrealizedFinalizedEpoch - if node.justifiedEpoch > f.store.justifiedCheckpoint.Epoch { + for _, node := range f.store.emptyNodeByRoot { + node.block.justifiedEpoch = node.block.unrealizedJustifiedEpoch + node.block.finalizedEpoch = node.block.unrealizedFinalizedEpoch + if node.block.justifiedEpoch > f.store.justifiedCheckpoint.Epoch { f.store.prevJustifiedCheckpoint = f.store.justifiedCheckpoint f.store.justifiedCheckpoint = f.store.unrealizedJustifiedCheckpoint if err := f.updateJustifiedBalances(ctx, f.store.justifiedCheckpoint.Root); err != nil { return errors.Wrap(err, "could not update justified balances") } } - if node.finalizedEpoch > f.store.finalizedCheckpoint.Epoch { + if node.block.finalizedEpoch > f.store.finalizedCheckpoint.Epoch { f.store.finalizedCheckpoint = f.store.unrealizedFinalizedCheckpoint } } return nil } -func (s *Store) pullTips(state state.BeaconState, node *Node, jc, fc *ethpb.Checkpoint) (*ethpb.Checkpoint, *ethpb.Checkpoint) { +func (s *Store) pullTips(state state.BeaconState, node *BlockNode, jc, fc *ethpb.Checkpoint) (*ethpb.Checkpoint, *ethpb.Checkpoint) { if node.parent == nil { // Nothing to do if the parent is nil. return jc, fc } currentEpoch := slots.ToEpoch(slots.CurrentSlot(s.genesisTime)) stateSlot := state.Slot() stateEpoch := slots.ToEpoch(stateSlot) - currJustified := node.parent.unrealizedJustifiedEpoch == currentEpoch - prevJustified := node.parent.unrealizedJustifiedEpoch+1 == currentEpoch + currJustified := node.parent.block.unrealizedJustifiedEpoch == currentEpoch + prevJustified := node.parent.block.unrealizedJustifiedEpoch+1 == currentEpoch tooEarlyForCurr := slots.SinceEpochStarts(stateSlot)*3 < params.BeaconConfig().SlotsPerEpoch*2 // Exit early if it's justified or too early to be justified. if currJustified || (stateEpoch == currentEpoch && prevJustified && tooEarlyForCurr) { - node.unrealizedJustifiedEpoch = node.parent.unrealizedJustifiedEpoch - node.unrealizedFinalizedEpoch = node.parent.unrealizedFinalizedEpoch + node.unrealizedJustifiedEpoch = node.parent.block.unrealizedJustifiedEpoch + node.unrealizedFinalizedEpoch = node.parent.block.unrealizedFinalizedEpoch return jc, fc } diff --git a/beacon-chain/forkchoice/doubly-linked-tree/unrealized_justification_test.go b/beacon-chain/forkchoice/doubly-linked-tree/unrealized_justification_test.go index bddf0fe7c13e..8f9130a0821a 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/unrealized_justification_test.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/unrealized_justification_test.go @@ -14,21 +14,21 @@ import ( func TestStore_SetUnrealizedEpochs(t *testing.T) { f := setup(1, 1) ctx := context.Background() - state, blkRoot, err := prepareForkchoiceState(ctx, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 102, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 102, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - require.Equal(t, primitives.Epoch(1), f.store.nodeByRoot[[32]byte{'b'}].unrealizedJustifiedEpoch) - require.Equal(t, primitives.Epoch(1), f.store.nodeByRoot[[32]byte{'b'}].unrealizedFinalizedEpoch) + require.Equal(t, primitives.Epoch(1), f.store.emptyNodeByRoot[[32]byte{'b'}].block.unrealizedJustifiedEpoch) + require.Equal(t, primitives.Epoch(1), f.store.emptyNodeByRoot[[32]byte{'b'}].block.unrealizedFinalizedEpoch) require.NoError(t, f.store.setUnrealizedJustifiedEpoch([32]byte{'b'}, 2)) require.NoError(t, f.store.setUnrealizedFinalizedEpoch([32]byte{'b'}, 2)) - require.Equal(t, primitives.Epoch(2), f.store.nodeByRoot[[32]byte{'b'}].unrealizedJustifiedEpoch) - require.Equal(t, primitives.Epoch(2), f.store.nodeByRoot[[32]byte{'b'}].unrealizedFinalizedEpoch) + require.Equal(t, primitives.Epoch(2), f.store.emptyNodeByRoot[[32]byte{'b'}].block.unrealizedJustifiedEpoch) + require.Equal(t, primitives.Epoch(2), f.store.emptyNodeByRoot[[32]byte{'b'}].block.unrealizedFinalizedEpoch) require.ErrorIs(t, errInvalidUnrealizedJustifiedEpoch, f.store.setUnrealizedJustifiedEpoch([32]byte{'b'}, 0)) require.ErrorIs(t, errInvalidUnrealizedFinalizedEpoch, f.store.setUnrealizedFinalizedEpoch([32]byte{'b'}, 0)) @@ -37,13 +37,13 @@ func TestStore_SetUnrealizedEpochs(t *testing.T) { func TestStore_UpdateUnrealizedCheckpoints(t *testing.T) { f := setup(1, 1) ctx := context.Background() - state, blkRoot, err := prepareForkchoiceState(ctx, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 102, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 102, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) @@ -64,14 +64,14 @@ func TestStore_UpdateUnrealizedCheckpoints(t *testing.T) { func TestStore_LongFork(t *testing.T) { f := setup(1, 1) ctx := context.Background() - state, blkRoot, err := prepareForkchoiceState(ctx, 75, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 75, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 80, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 80, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.NoError(t, f.store.setUnrealizedJustifiedEpoch([32]byte{'b'}, 2)) - state, blkRoot, err = prepareForkchoiceState(ctx, 95, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 95, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.NoError(t, f.store.setUnrealizedJustifiedEpoch([32]byte{'c'}, 2)) @@ -79,28 +79,28 @@ func TestStore_LongFork(t *testing.T) { // Add an attestation to c, it is head f.ProcessAttestation(ctx, []uint64{0}, [32]byte{'c'}, 1) f.justifiedBalances = []uint64{100} - c := f.store.nodeByRoot[[32]byte{'c'}] - require.Equal(t, primitives.Epoch(2), slots.ToEpoch(c.slot)) - driftGenesisTime(f, c.slot, 0) + c := f.store.emptyNodeByRoot[[32]byte{'c'}] + require.Equal(t, primitives.Epoch(2), slots.ToEpoch(c.block.slot)) + driftGenesisTime(f, c.block.slot, 0) headRoot, err := f.Head(ctx) require.NoError(t, err) require.Equal(t, [32]byte{'c'}, headRoot) // c remains the head even if a block d with higher realized justification is seen ha := [32]byte{'a'} - state, blkRoot, err = prepareForkchoiceState(ctx, 103, [32]byte{'d'}, [32]byte{'b'}, [32]byte{'D'}, 2, 1) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 103, [32]byte{'d'}, [32]byte{'b'}, [32]byte{'D'}, 2, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.NoError(t, f.UpdateJustifiedCheckpoint(ctx, &forkchoicetypes.Checkpoint{Epoch: 2, Root: ha})) - d := f.store.nodeByRoot[[32]byte{'d'}] - require.Equal(t, primitives.Epoch(3), slots.ToEpoch(d.slot)) - driftGenesisTime(f, d.slot, 0) - require.Equal(t, true, d.viableForHead(f.store.justifiedCheckpoint.Epoch, slots.ToEpoch(d.slot))) + d := f.store.emptyNodeByRoot[[32]byte{'d'}] + require.Equal(t, primitives.Epoch(3), slots.ToEpoch(d.block.slot)) + driftGenesisTime(f, d.block.slot, 0) + require.Equal(t, true, d.viableForHead(f.store.justifiedCheckpoint.Epoch, slots.ToEpoch(d.block.slot))) headRoot, err = f.Head(ctx) require.NoError(t, err) require.Equal(t, [32]byte{'c'}, headRoot) - require.Equal(t, uint64(0), f.store.nodeByRoot[[32]byte{'d'}].weight) - require.Equal(t, uint64(100), f.store.nodeByRoot[[32]byte{'c'}].weight) + require.Equal(t, uint64(0), f.store.emptyNodeByRoot[[32]byte{'d'}].weight) + require.Equal(t, uint64(100), f.store.emptyNodeByRoot[[32]byte{'c'}].weight) } // Epoch 1 Epoch 2 Epoch 3 @@ -119,36 +119,36 @@ func TestStore_NoDeadLock(t *testing.T) { ctx := context.Background() // Epoch 1 blocks - state, blkRoot, err := prepareForkchoiceState(ctx, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 0, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 100, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 101, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 102, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 102, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 103, [32]byte{'d'}, [32]byte{'c'}, [32]byte{'D'}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 103, [32]byte{'d'}, [32]byte{'c'}, [32]byte{'D'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) // Epoch 2 Blocks - state, blkRoot, err = prepareForkchoiceState(ctx, 104, [32]byte{'e'}, [32]byte{'d'}, [32]byte{'E'}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 104, [32]byte{'e'}, [32]byte{'d'}, [32]byte{'E'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.NoError(t, f.store.setUnrealizedJustifiedEpoch([32]byte{'e'}, 1)) - state, blkRoot, err = prepareForkchoiceState(ctx, 105, [32]byte{'f'}, [32]byte{'e'}, [32]byte{'F'}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 105, [32]byte{'f'}, [32]byte{'e'}, [32]byte{'F'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.NoError(t, f.store.setUnrealizedJustifiedEpoch([32]byte{'f'}, 1)) - state, blkRoot, err = prepareForkchoiceState(ctx, 106, [32]byte{'g'}, [32]byte{'f'}, [32]byte{'G'}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 106, [32]byte{'g'}, [32]byte{'f'}, [32]byte{'G'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.NoError(t, f.store.setUnrealizedJustifiedEpoch([32]byte{'g'}, 2)) require.NoError(t, f.store.setUnrealizedFinalizedEpoch([32]byte{'g'}, 1)) f.store.unrealizedJustifiedCheckpoint = &forkchoicetypes.Checkpoint{Epoch: 2} f.store.unrealizedFinalizedCheckpoint = &forkchoicetypes.Checkpoint{Epoch: 1} - state, blkRoot, err = prepareForkchoiceState(ctx, 107, [32]byte{'h'}, [32]byte{'g'}, [32]byte{'H'}, 0, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 107, [32]byte{'h'}, [32]byte{'g'}, [32]byte{'H'}, 0, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.NoError(t, f.store.setUnrealizedJustifiedEpoch([32]byte{'h'}, 2)) @@ -166,7 +166,7 @@ func TestStore_NoDeadLock(t *testing.T) { // Insert Block I, it becomes Head hr := [32]byte{'i'} - state, blkRoot, err = prepareForkchoiceState(ctx, 108, hr, [32]byte{'f'}, [32]byte{'I'}, 1, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 108, hr, [32]byte{'f'}, [32]byte{'I'}, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) ha := [32]byte{'a'} @@ -201,27 +201,27 @@ func TestStore_ForkNextEpoch(t *testing.T) { ctx := context.Background() // Epoch 1 blocks (D does not arrive) - state, blkRoot, err := prepareForkchoiceState(ctx, 92, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 0) + state, blkRoot, err := prepareForkchoiceState(ctx, f, 92, [32]byte{'a'}, params.BeaconConfig().ZeroHash, [32]byte{'A'}, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 93, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 93, [32]byte{'b'}, [32]byte{'a'}, [32]byte{'B'}, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 94, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 94, [32]byte{'c'}, [32]byte{'b'}, [32]byte{'C'}, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) // Epoch 2 blocks - state, blkRoot, err = prepareForkchoiceState(ctx, 96, [32]byte{'e'}, [32]byte{'c'}, [32]byte{'E'}, 1, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 96, [32]byte{'e'}, [32]byte{'c'}, [32]byte{'E'}, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 97, [32]byte{'f'}, [32]byte{'e'}, [32]byte{'F'}, 1, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 97, [32]byte{'f'}, [32]byte{'e'}, [32]byte{'F'}, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 98, [32]byte{'g'}, [32]byte{'f'}, [32]byte{'G'}, 1, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 98, [32]byte{'g'}, [32]byte{'f'}, [32]byte{'G'}, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(ctx, 99, [32]byte{'h'}, [32]byte{'g'}, [32]byte{'H'}, 1, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 99, [32]byte{'h'}, [32]byte{'g'}, [32]byte{'H'}, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) @@ -234,7 +234,7 @@ func TestStore_ForkNextEpoch(t *testing.T) { require.Equal(t, primitives.Epoch(1), f.JustifiedCheckpoint().Epoch) // D arrives late, D is head - state, blkRoot, err = prepareForkchoiceState(ctx, 95, [32]byte{'d'}, [32]byte{'c'}, [32]byte{'D'}, 1, 0) + state, blkRoot, err = prepareForkchoiceState(ctx, f, 95, [32]byte{'d'}, [32]byte{'c'}, [32]byte{'D'}, 1, 0) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) require.NoError(t, f.store.setUnrealizedJustifiedEpoch([32]byte{'d'}, 2)) @@ -244,8 +244,8 @@ func TestStore_ForkNextEpoch(t *testing.T) { require.NoError(t, err) require.Equal(t, [32]byte{'d'}, headRoot) require.Equal(t, primitives.Epoch(2), f.JustifiedCheckpoint().Epoch) - require.Equal(t, uint64(0), f.store.nodeByRoot[[32]byte{'d'}].weight) - require.Equal(t, uint64(100), f.store.nodeByRoot[[32]byte{'h'}].weight) + require.Equal(t, uint64(0), f.store.emptyNodeByRoot[[32]byte{'d'}].weight) + require.Equal(t, uint64(100), f.store.emptyNodeByRoot[[32]byte{'h'}].weight) // Set current epoch to 3, and H's unrealized checkpoint. Check it's head driftGenesisTime(f, 99, 0) require.NoError(t, f.store.setUnrealizedJustifiedEpoch([32]byte{'h'}, 2)) @@ -253,89 +253,89 @@ func TestStore_ForkNextEpoch(t *testing.T) { require.NoError(t, err) require.Equal(t, [32]byte{'h'}, headRoot) require.Equal(t, primitives.Epoch(2), f.JustifiedCheckpoint().Epoch) - require.Equal(t, uint64(0), f.store.nodeByRoot[[32]byte{'d'}].weight) - require.Equal(t, uint64(100), f.store.nodeByRoot[[32]byte{'h'}].weight) + require.Equal(t, uint64(0), f.store.emptyNodeByRoot[[32]byte{'d'}].weight) + require.Equal(t, uint64(100), f.store.emptyNodeByRoot[[32]byte{'h'}].weight) } func TestStore_PullTips_Heuristics(t *testing.T) { ctx := context.Background() t.Run("Current epoch is justified", func(tt *testing.T) { f := setup(1, 1) - st, root, err := prepareForkchoiceState(ctx, 65, [32]byte{'p'}, [32]byte{}, [32]byte{}, 1, 1) + st, root, err := prepareForkchoiceState(ctx, f, 65, [32]byte{'p'}, [32]byte{}, [32]byte{}, 1, 1) require.NoError(tt, err) require.NoError(tt, f.InsertNode(ctx, st, root)) - f.store.nodeByRoot[[32]byte{'p'}].unrealizedJustifiedEpoch = primitives.Epoch(2) + f.store.emptyNodeByRoot[[32]byte{'p'}].block.unrealizedJustifiedEpoch = primitives.Epoch(2) driftGenesisTime(f, 66, 0) - st, root, err = prepareForkchoiceState(ctx, 66, [32]byte{'h'}, [32]byte{'p'}, [32]byte{}, 1, 1) + st, root, err = prepareForkchoiceState(ctx, f, 66, [32]byte{'h'}, [32]byte{'p'}, [32]byte{}, 1, 1) require.NoError(tt, err) require.NoError(tt, f.InsertNode(ctx, st, root)) - require.Equal(tt, primitives.Epoch(2), f.store.nodeByRoot[[32]byte{'h'}].unrealizedJustifiedEpoch) - require.Equal(tt, primitives.Epoch(1), f.store.nodeByRoot[[32]byte{'h'}].unrealizedFinalizedEpoch) + require.Equal(tt, primitives.Epoch(2), f.store.emptyNodeByRoot[[32]byte{'h'}].block.unrealizedJustifiedEpoch) + require.Equal(tt, primitives.Epoch(1), f.store.emptyNodeByRoot[[32]byte{'h'}].block.unrealizedFinalizedEpoch) }) t.Run("Previous Epoch is justified and too early for current", func(tt *testing.T) { f := setup(1, 1) - st, root, err := prepareForkchoiceState(ctx, 95, [32]byte{'p'}, [32]byte{}, [32]byte{}, 1, 1) + st, root, err := prepareForkchoiceState(ctx, f, 95, [32]byte{'p'}, [32]byte{}, [32]byte{}, 1, 1) require.NoError(tt, err) require.NoError(tt, f.InsertNode(ctx, st, root)) - f.store.nodeByRoot[[32]byte{'p'}].unrealizedJustifiedEpoch = primitives.Epoch(2) + f.store.emptyNodeByRoot[[32]byte{'p'}].block.unrealizedJustifiedEpoch = primitives.Epoch(2) driftGenesisTime(f, 96, 0) - st, root, err = prepareForkchoiceState(ctx, 96, [32]byte{'h'}, [32]byte{'p'}, [32]byte{}, 1, 1) + st, root, err = prepareForkchoiceState(ctx, f, 96, [32]byte{'h'}, [32]byte{'p'}, [32]byte{}, 1, 1) require.NoError(tt, err) require.NoError(tt, f.InsertNode(ctx, st, root)) - require.Equal(tt, primitives.Epoch(2), f.store.nodeByRoot[[32]byte{'h'}].unrealizedJustifiedEpoch) - require.Equal(tt, primitives.Epoch(1), f.store.nodeByRoot[[32]byte{'h'}].unrealizedFinalizedEpoch) + require.Equal(tt, primitives.Epoch(2), f.store.emptyNodeByRoot[[32]byte{'h'}].block.unrealizedJustifiedEpoch) + require.Equal(tt, primitives.Epoch(1), f.store.emptyNodeByRoot[[32]byte{'h'}].block.unrealizedFinalizedEpoch) }) t.Run("Previous Epoch is justified and not too early for current", func(tt *testing.T) { f := setup(1, 1) - st, root, err := prepareForkchoiceState(ctx, 95, [32]byte{'p'}, [32]byte{}, [32]byte{}, 1, 1) + st, root, err := prepareForkchoiceState(ctx, f, 95, [32]byte{'p'}, [32]byte{}, [32]byte{}, 1, 1) require.NoError(tt, err) require.NoError(tt, f.InsertNode(ctx, st, root)) - f.store.nodeByRoot[[32]byte{'p'}].unrealizedJustifiedEpoch = primitives.Epoch(2) + f.store.emptyNodeByRoot[[32]byte{'p'}].block.unrealizedJustifiedEpoch = primitives.Epoch(2) driftGenesisTime(f, 127, 0) - st, root, err = prepareForkchoiceState(ctx, 127, [32]byte{'h'}, [32]byte{'p'}, [32]byte{}, 1, 1) + st, root, err = prepareForkchoiceState(ctx, f, 127, [32]byte{'h'}, [32]byte{'p'}, [32]byte{}, 1, 1) require.NoError(tt, err) require.NoError(tt, f.InsertNode(ctx, st, root)) // Check that the justification point is not the parent's. // This test checks that the heuristics in pullTips did not apply and // the test continues to compute a bogus unrealized // justification - require.Equal(tt, primitives.Epoch(1), f.store.nodeByRoot[[32]byte{'h'}].unrealizedJustifiedEpoch) + require.Equal(tt, primitives.Epoch(1), f.store.emptyNodeByRoot[[32]byte{'h'}].block.unrealizedJustifiedEpoch) }) t.Run("Block from previous Epoch", func(tt *testing.T) { f := setup(1, 1) - st, root, err := prepareForkchoiceState(ctx, 94, [32]byte{'p'}, [32]byte{}, [32]byte{}, 1, 1) + st, root, err := prepareForkchoiceState(ctx, f, 94, [32]byte{'p'}, [32]byte{}, [32]byte{}, 1, 1) require.NoError(tt, err) require.NoError(tt, f.InsertNode(ctx, st, root)) - f.store.nodeByRoot[[32]byte{'p'}].unrealizedJustifiedEpoch = primitives.Epoch(2) + f.store.emptyNodeByRoot[[32]byte{'p'}].block.unrealizedJustifiedEpoch = primitives.Epoch(2) driftGenesisTime(f, 96, 0) - st, root, err = prepareForkchoiceState(ctx, 95, [32]byte{'h'}, [32]byte{'p'}, [32]byte{}, 1, 1) + st, root, err = prepareForkchoiceState(ctx, f, 95, [32]byte{'h'}, [32]byte{'p'}, [32]byte{}, 1, 1) require.NoError(tt, err) require.NoError(tt, f.InsertNode(ctx, st, root)) // Check that the justification point is not the parent's. // This test checks that the heuristics in pullTips did not apply and // the test continues to compute a bogus unrealized // justification - require.Equal(tt, primitives.Epoch(1), f.store.nodeByRoot[[32]byte{'h'}].unrealizedJustifiedEpoch) + require.Equal(tt, primitives.Epoch(1), f.store.emptyNodeByRoot[[32]byte{'h'}].block.unrealizedJustifiedEpoch) }) t.Run("Previous Epoch is not justified", func(tt *testing.T) { f := setup(1, 1) - st, root, err := prepareForkchoiceState(ctx, 128, [32]byte{'p'}, [32]byte{}, [32]byte{}, 2, 1) + st, root, err := prepareForkchoiceState(ctx, f, 128, [32]byte{'p'}, [32]byte{}, [32]byte{}, 2, 1) require.NoError(tt, err) require.NoError(tt, f.InsertNode(ctx, st, root)) driftGenesisTime(f, 129, 0) - st, root, err = prepareForkchoiceState(ctx, 129, [32]byte{'h'}, [32]byte{'p'}, [32]byte{}, 2, 1) + st, root, err = prepareForkchoiceState(ctx, f, 129, [32]byte{'h'}, [32]byte{'p'}, [32]byte{}, 2, 1) require.NoError(tt, err) require.NoError(tt, f.InsertNode(ctx, st, root)) // Check that the justification point is not the parent's. // This test checks that the heuristics in pullTips did not apply and // the test continues to compute a bogus unrealized // justification - require.Equal(tt, primitives.Epoch(2), f.store.nodeByRoot[[32]byte{'h'}].unrealizedJustifiedEpoch) + require.Equal(tt, primitives.Epoch(2), f.store.emptyNodeByRoot[[32]byte{'h'}].block.unrealizedJustifiedEpoch) }) } diff --git a/beacon-chain/forkchoice/doubly-linked-tree/vote_test.go b/beacon-chain/forkchoice/doubly-linked-tree/vote_test.go index ba744168ba0c..52ebb11a7aaf 100644 --- a/beacon-chain/forkchoice/doubly-linked-tree/vote_test.go +++ b/beacon-chain/forkchoice/doubly-linked-tree/vote_test.go @@ -23,7 +23,7 @@ func TestVotes_CanFindHead(t *testing.T) { // 0 // / // 2 <- head - state, blkRoot, err := prepareForkchoiceState(context.Background(), 0, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err := prepareForkchoiceState(context.Background(), f, 0, indexToHash(2), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) @@ -35,7 +35,7 @@ func TestVotes_CanFindHead(t *testing.T) { // 0 // / \ // head -> 2 1 - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(1), params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) @@ -67,7 +67,7 @@ func TestVotes_CanFindHead(t *testing.T) { // head -> 2 1 // | // 3 - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(3), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(3), indexToHash(1), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) @@ -105,7 +105,7 @@ func TestVotes_CanFindHead(t *testing.T) { // 3 // | // 4 <- head - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(4), indexToHash(3), params.BeaconConfig().ZeroHash, 1, 1) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(4), indexToHash(3), params.BeaconConfig().ZeroHash, 1, 1) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) @@ -125,7 +125,7 @@ func TestVotes_CanFindHead(t *testing.T) { // 5 <- head, justified epoch = 2 // // We set this node's slot to be 64 so that when pruning below we do not prune its child - state, blkRoot, err = prepareForkchoiceState(context.Background(), 2*params.BeaconConfig().SlotsPerEpoch, indexToHash(5), indexToHash(4), params.BeaconConfig().ZeroHash, 2, 2) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 2*params.BeaconConfig().SlotsPerEpoch, indexToHash(5), indexToHash(4), params.BeaconConfig().ZeroHash, 2, 2) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) @@ -143,7 +143,7 @@ func TestVotes_CanFindHead(t *testing.T) { // 4 // / \ // 5 6 <- head, justified epoch = 3 - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(6), indexToHash(4), params.BeaconConfig().ZeroHash, 3, 2) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(6), indexToHash(4), params.BeaconConfig().ZeroHash, 3, 2) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) r, err = f.Head(context.Background()) @@ -168,10 +168,10 @@ func TestVotes_CanFindHead(t *testing.T) { // 7 // | // 8 - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(7), indexToHash(5), params.BeaconConfig().ZeroHash, 2, 2) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(7), indexToHash(5), params.BeaconConfig().ZeroHash, 2, 2) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(8), indexToHash(7), params.BeaconConfig().ZeroHash, 2, 2) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(8), indexToHash(7), params.BeaconConfig().ZeroHash, 2, 2) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) r, err = f.Head(context.Background()) @@ -195,7 +195,7 @@ func TestVotes_CanFindHead(t *testing.T) { // 8 // | // 10 <- head - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(10), indexToHash(8), params.BeaconConfig().ZeroHash, 3, 2) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(10), indexToHash(8), params.BeaconConfig().ZeroHash, 3, 2) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) r, err = f.Head(context.Background()) @@ -218,7 +218,7 @@ func TestVotes_CanFindHead(t *testing.T) { // 8 // / \ // 9 10 - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(9), indexToHash(8), params.BeaconConfig().ZeroHash, 3, 2) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(9), indexToHash(8), params.BeaconConfig().ZeroHash, 3, 2) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) @@ -285,7 +285,7 @@ func TestVotes_CanFindHead(t *testing.T) { // 9 10 f.store.finalizedCheckpoint.Root = indexToHash(5) require.NoError(t, f.store.prune(context.Background())) - assert.Equal(t, 5, len(f.store.nodeByRoot), "Incorrect nodes length after prune") + assert.Equal(t, 5, len(f.store.emptyNodeByRoot), "Incorrect nodes length after prune") // we pruned artificially the justified root. f.store.justifiedCheckpoint.Root = indexToHash(5) @@ -303,7 +303,7 @@ func TestVotes_CanFindHead(t *testing.T) { // 10 9 // | // head-> 11 - state, blkRoot, err = prepareForkchoiceState(context.Background(), 0, indexToHash(11), indexToHash(10), params.BeaconConfig().ZeroHash, 3, 2) + state, blkRoot, err = prepareForkchoiceState(context.Background(), f, 0, indexToHash(11), indexToHash(10), params.BeaconConfig().ZeroHash, 3, 2) require.NoError(t, err) require.NoError(t, f.InsertNode(ctx, state, blkRoot)) diff --git a/beacon-chain/forkchoice/interfaces.go b/beacon-chain/forkchoice/interfaces.go index 08a84d5ea425..be7d3e1be355 100644 --- a/beacon-chain/forkchoice/interfaces.go +++ b/beacon-chain/forkchoice/interfaces.go @@ -8,6 +8,7 @@ import ( fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" consensus_blocks "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" forkchoice2 "github.com/prysmaticlabs/prysm/v5/consensus-types/forkchoice" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" ) @@ -22,6 +23,7 @@ type ForkChoicer interface { Unlock() HeadRetriever // to compute head. BlockProcessor // to track new block for fork choice. + PayloadProcessor // to track new execution payload envelopes for forkchoice AttestationProcessor // to track new attestation for fork choice. Getter // to retrieve fork choice information. Setter // to set fork choice information. @@ -46,9 +48,13 @@ type BlockProcessor interface { InsertChain(context.Context, []*forkchoicetypes.BlockAndCheckpoints) error } +type PayloadProcessor interface { + InsertPayloadEnvelope(interfaces.ROExecutionPayloadEnvelope) error +} + // AttestationProcessor processes the attestation that's used for accounting fork choice. type AttestationProcessor interface { - ProcessAttestation(context.Context, []uint64, [32]byte, primitives.Epoch) + ProcessAttestation(context.Context, []uint64, [32]byte, primitives.Slot) } // Getter returns fork choice related information. @@ -64,7 +70,9 @@ type FastGetter interface { FinalizedCheckpoint() *forkchoicetypes.Checkpoint FinalizedPayloadBlockHash() [32]byte HasNode([32]byte) bool - HighestReceivedBlockSlot() primitives.Slot + HasHash([32]byte) bool + HashForBlockRoot([32]byte) [32]byte + HighestReceivedBlockSlotRoot() (primitives.Slot, [32]byte) HighestReceivedBlockDelay() primitives.Slot IsCanonical(root [32]byte) bool IsOptimistic(root [32]byte) (bool, error) @@ -82,6 +90,7 @@ type FastGetter interface { UnrealizedJustifiedPayloadBlockHash() [32]byte Weight(root [32]byte) (uint64, error) ParentRoot(root [32]byte) ([32]byte, error) + GetPTCVote() primitives.PTCStatus } // Setter allows to set forkchoice information diff --git a/beacon-chain/forkchoice/ro.go b/beacon-chain/forkchoice/ro.go index 196deed84180..000694236b3c 100644 --- a/beacon-chain/forkchoice/ro.go +++ b/beacon-chain/forkchoice/ro.go @@ -37,6 +37,13 @@ func (ro *ROForkChoice) HasNode(root [32]byte) bool { return ro.getter.HasNode(root) } +// HasHash delegates to the underlying forkchoice call, under a lock. +func (ro *ROForkChoice) HasHash(root [32]byte) bool { + ro.l.RLock() + defer ro.l.RUnlock() + return ro.getter.HasHash(root) +} + // ProposerBoost delegates to the underlying forkchoice call, under a lock. func (ro *ROForkChoice) ProposerBoost() [fieldparams.RootLength]byte { ro.l.RLock() @@ -107,11 +114,11 @@ func (ro *ROForkChoice) NodeCount() int { return ro.getter.NodeCount() } -// HighestReceivedBlockSlot delegates to the underlying forkchoice call, under a lock. -func (ro *ROForkChoice) HighestReceivedBlockSlot() primitives.Slot { +// HighestReceivedBlockSlotRoot delegates to the underlying forkchoice call, under a lock. +func (ro *ROForkChoice) HighestReceivedBlockSlotRoot() (primitives.Slot, [32]byte) { ro.l.RLock() defer ro.l.RUnlock() - return ro.getter.HighestReceivedBlockSlot() + return ro.getter.HighestReceivedBlockSlotRoot() } // HighestReceivedBlockDelay delegates to the underlying forkchoice call, under a lock. @@ -176,3 +183,16 @@ func (ro *ROForkChoice) ParentRoot(root [32]byte) ([32]byte, error) { defer ro.l.RUnlock() return ro.getter.ParentRoot(root) } + +// GetPTCVote delegates to the underlying forkchoice call, under a lock. +func (ro *ROForkChoice) GetPTCVote() primitives.PTCStatus { + ro.l.RLock() + defer ro.l.RUnlock() + return ro.getter.GetPTCVote() +} + +func (ro *ROForkChoice) HashForBlockRoot(root [32]byte) [32]byte { + ro.l.RLock() + defer ro.l.RUnlock() + return ro.getter.HashForBlockRoot(root) +} diff --git a/beacon-chain/forkchoice/ro_test.go b/beacon-chain/forkchoice/ro_test.go index cca8aa1d1534..9dc0c367cca0 100644 --- a/beacon-chain/forkchoice/ro_test.go +++ b/beacon-chain/forkchoice/ro_test.go @@ -18,6 +18,7 @@ const ( rlockCalled runlockCalled hasNodeCalled + hasHashCalled proposerBoostCalled isCanonicalCalled finalizedCheckpointCalled @@ -28,7 +29,7 @@ const ( justifiedPayloadBlockHashCalled unrealizedJustifiedPayloadBlockHashCalled nodeCountCalled - highestReceivedBlockSlotCalled + highestReceivedBlockSlotRootCalled highestReceivedBlockDelayCalled receivedBlocksLastEpochCalled weightCalled @@ -38,6 +39,7 @@ const ( lastRootCalled targetRootForEpochCalled parentRootCalled + getPTCVoteCalled ) func _discard(t *testing.T, e error) { @@ -111,9 +113,9 @@ func TestROLocking(t *testing.T) { cb: func(g FastGetter) { g.NodeCount() }, }, { - name: "highestReceivedBlockSlotCalled", - call: highestReceivedBlockSlotCalled, - cb: func(g FastGetter) { g.HighestReceivedBlockSlot() }, + name: "highestReceivedBlockSlotRootCalled", + call: highestReceivedBlockSlotRootCalled, + cb: func(g FastGetter) { g.HighestReceivedBlockSlotRoot() }, }, { name: "highestReceivedBlockDelayCalled", @@ -197,6 +199,11 @@ func (ro *mockROForkchoice) HasNode(_ [32]byte) bool { return false } +func (ro *mockROForkchoice) HasHash(_ [32]byte) bool { + ro.calls = append(ro.calls, hasHashCalled) + return false +} + func (ro *mockROForkchoice) ProposerBoost() [fieldparams.RootLength]byte { ro.calls = append(ro.calls, proposerBoostCalled) return [fieldparams.RootLength]byte{} @@ -247,9 +254,9 @@ func (ro *mockROForkchoice) NodeCount() int { return 0 } -func (ro *mockROForkchoice) HighestReceivedBlockSlot() primitives.Slot { - ro.calls = append(ro.calls, highestReceivedBlockSlotCalled) - return 0 +func (ro *mockROForkchoice) HighestReceivedBlockSlotRoot() (primitives.Slot, [32]byte) { + ro.calls = append(ro.calls, highestReceivedBlockSlotRootCalled) + return 0, [32]byte{} } func (ro *mockROForkchoice) HighestReceivedBlockDelay() primitives.Slot { @@ -297,3 +304,8 @@ func (ro *mockROForkchoice) ParentRoot(_ [32]byte) ([32]byte, error) { ro.calls = append(ro.calls, parentRootCalled) return [32]byte{}, nil } + +func (ro *mockROForkchoice) GetPTCVote() primitives.PTCStatus { + ro.calls = append(ro.calls, getPTCVoteCalled) + return primitives.PAYLOAD_ABSENT +} diff --git a/beacon-chain/node/node.go b/beacon-chain/node/node.go index fce4a4e56afd..204e627043fa 100644 --- a/beacon-chain/node/node.go +++ b/beacon-chain/node/node.go @@ -101,6 +101,9 @@ type BeaconNode struct { blsToExecPool blstoexec.PoolManager depositCache cache.DepositCache trackedValidatorsCache *cache.TrackedValidatorsCache + payloadAttestationCache *cache.PayloadAttestationCache + payloadEnvelopeCache *sync.Map + executionHeaderCache *cache.ExecutionPayloadHeaders payloadIDCache *cache.PayloadIDCache stateFeed *event.Feed blockFeed *event.Feed @@ -151,6 +154,9 @@ func New(cliCtx *cli.Context, cancel context.CancelFunc, opts ...Option) (*Beaco syncCommitteePool: synccommittee.NewPool(), blsToExecPool: blstoexec.NewPool(), trackedValidatorsCache: cache.NewTrackedValidatorsCache(), + payloadAttestationCache: &cache.PayloadAttestationCache{}, + payloadEnvelopeCache: &sync.Map{}, + executionHeaderCache: cache.NewExecutionPayloadHeaders(), payloadIDCache: cache.NewPayloadIDCache(), slasherBlockHeadersFeed: new(event.Feed), slasherAttestationsFeed: new(event.Feed), @@ -761,6 +767,8 @@ func (b *BeaconNode) registerBlockchainService(fc forkchoice.ForkChoicer, gs *st blockchain.WithSyncComplete(syncComplete), blockchain.WithBlobStorage(b.BlobStorage), blockchain.WithTrackedValidatorsCache(b.trackedValidatorsCache), + blockchain.WithPayloadAttestationCache(b.payloadAttestationCache), + blockchain.WithPayloadEnvelopeCache(b.payloadEnvelopeCache), blockchain.WithPayloadIDCache(b.payloadIDCache), blockchain.WithSyncChecker(b.syncChecker), ) @@ -839,6 +847,9 @@ func (b *BeaconNode) registerSyncService(initialSyncComplete chan struct{}, bFil regularsync.WithStateGen(b.stateGen), regularsync.WithSlasherAttestationsFeed(b.slasherAttestationsFeed), regularsync.WithSlasherBlockHeadersFeed(b.slasherBlockHeadersFeed), + regularsync.WithPayloadAttestationCache(b.payloadAttestationCache), + regularsync.WithExecutionPayloadHeaderCache(b.executionHeaderCache), + regularsync.WithPayloadEnvelopeCache(b.payloadEnvelopeCache), regularsync.WithReconstructor(web3Service), regularsync.WithClockWaiter(b.clockWaiter), regularsync.WithInitialSyncComplete(initialSyncComplete), @@ -954,55 +965,57 @@ func (b *BeaconNode) registerRPCService(router *http.ServeMux) error { p2pService := b.fetchP2P() rpcService := rpc.NewService(b.ctx, &rpc.Config{ - ExecutionEngineCaller: web3Service, - ExecutionReconstructor: web3Service, - Host: host, - Port: port, - BeaconMonitoringHost: beaconMonitoringHost, - BeaconMonitoringPort: beaconMonitoringPort, - CertFlag: cert, - KeyFlag: key, - BeaconDB: b.db, - Broadcaster: p2pService, - PeersFetcher: p2pService, - PeerManager: p2pService, - MetadataProvider: p2pService, - ChainInfoFetcher: chainService, - HeadFetcher: chainService, - CanonicalFetcher: chainService, - ForkFetcher: chainService, - ForkchoiceFetcher: chainService, - FinalizationFetcher: chainService, - BlockReceiver: chainService, - BlobReceiver: chainService, - AttestationReceiver: chainService, - GenesisTimeFetcher: chainService, - GenesisFetcher: chainService, - OptimisticModeFetcher: chainService, - AttestationsPool: b.attestationPool, - ExitPool: b.exitPool, - SlashingsPool: b.slashingsPool, - BLSChangesPool: b.blsToExecPool, - SyncCommitteeObjectPool: b.syncCommitteePool, - ExecutionChainService: web3Service, - ExecutionChainInfoFetcher: web3Service, - ChainStartFetcher: chainStartFetcher, - MockEth1Votes: mockEth1DataVotes, - SyncService: syncService, - DepositFetcher: depositFetcher, - PendingDepositFetcher: b.depositCache, - BlockNotifier: b, - StateNotifier: b, - OperationNotifier: b, - StateGen: b.stateGen, - EnableDebugRPCEndpoints: enableDebugRPCEndpoints, - MaxMsgSize: maxMsgSize, - BlockBuilder: b.fetchBuilderService(), - Router: router, - ClockWaiter: b.clockWaiter, - BlobStorage: b.BlobStorage, - TrackedValidatorsCache: b.trackedValidatorsCache, - PayloadIDCache: b.payloadIDCache, + ExecutionEngineCaller: web3Service, + ExecutionReconstructor: web3Service, + Host: host, + Port: port, + BeaconMonitoringHost: beaconMonitoringHost, + BeaconMonitoringPort: beaconMonitoringPort, + CertFlag: cert, + KeyFlag: key, + BeaconDB: b.db, + Broadcaster: p2pService, + PeersFetcher: p2pService, + PeerManager: p2pService, + MetadataProvider: p2pService, + ChainInfoFetcher: chainService, + HeadFetcher: chainService, + CanonicalFetcher: chainService, + ForkFetcher: chainService, + ForkchoiceFetcher: chainService, + FinalizationFetcher: chainService, + BlockReceiver: chainService, + BlobReceiver: chainService, + PayloadAttestationReceiver: chainService, + ExecutionPayloadReceiver: chainService, + AttestationReceiver: chainService, + GenesisTimeFetcher: chainService, + GenesisFetcher: chainService, + OptimisticModeFetcher: chainService, + AttestationsPool: b.attestationPool, + ExitPool: b.exitPool, + SlashingsPool: b.slashingsPool, + BLSChangesPool: b.blsToExecPool, + SyncCommitteeObjectPool: b.syncCommitteePool, + ExecutionChainService: web3Service, + ExecutionChainInfoFetcher: web3Service, + ChainStartFetcher: chainStartFetcher, + MockEth1Votes: mockEth1DataVotes, + SyncService: syncService, + DepositFetcher: depositFetcher, + PendingDepositFetcher: b.depositCache, + BlockNotifier: b, + StateNotifier: b, + OperationNotifier: b, + StateGen: b.stateGen, + EnableDebugRPCEndpoints: enableDebugRPCEndpoints, + MaxMsgSize: maxMsgSize, + BlockBuilder: b.fetchBuilderService(), + Router: router, + ClockWaiter: b.clockWaiter, + BlobStorage: b.BlobStorage, + TrackedValidatorsCache: b.trackedValidatorsCache, + PayloadIDCache: b.payloadIDCache, }) return b.services.RegisterService(rpcService) diff --git a/beacon-chain/p2p/BUILD.bazel b/beacon-chain/p2p/BUILD.bazel index 7cb7e5227117..14b7ee6303b8 100644 --- a/beacon-chain/p2p/BUILD.bazel +++ b/beacon-chain/p2p/BUILD.bazel @@ -30,6 +30,7 @@ go_library( "service.go", "subnets.go", "topics.go", + "topics_epbs.go", "utils.go", "watch_peers.go", ], @@ -69,6 +70,7 @@ go_library( "//monitoring/tracing/trace:go_default_library", "//network:go_default_library", "//network/forks:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/metadata:go_default_library", "//runtime:go_default_library", @@ -159,6 +161,7 @@ go_test( "//encoding/bytesutil:go_default_library", "//network:go_default_library", "//network/forks:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/eth/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//proto/testing:go_default_library", @@ -166,6 +169,7 @@ go_test( "//testing/assert:go_default_library", "//testing/require:go_default_library", "//testing/util:go_default_library", + "//testing/util/random:go_default_library", "//time:go_default_library", "//time/slots:go_default_library", "@com_github_ethereum_go_ethereum//crypto:go_default_library", @@ -184,9 +188,11 @@ go_test( "@com_github_libp2p_go_libp2p_pubsub//pb:go_default_library", "@com_github_multiformats_go_multiaddr//:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_fastssz//:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", "@org_golang_google_protobuf//proto:go_default_library", + "@org_golang_google_protobuf//reflect/protoreflect:go_default_library", ], ) diff --git a/beacon-chain/p2p/broadcaster_test.go b/beacon-chain/p2p/broadcaster_test.go index c538c1bd05a8..643fef093952 100644 --- a/beacon-chain/p2p/broadcaster_test.go +++ b/beacon-chain/p2p/broadcaster_test.go @@ -11,6 +11,7 @@ import ( pubsub "github.com/libp2p/go-libp2p-pubsub" "github.com/libp2p/go-libp2p/core/host" + ssz "github.com/prysmaticlabs/fastssz" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/v5/beacon-chain/p2p/peers" @@ -24,7 +25,9 @@ import ( "github.com/prysmaticlabs/prysm/v5/testing/assert" "github.com/prysmaticlabs/prysm/v5/testing/require" "github.com/prysmaticlabs/prysm/v5/testing/util" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" ) func TestService_Broadcast(t *testing.T) { @@ -519,3 +522,80 @@ func TestService_BroadcastBlob(t *testing.T) { require.NoError(t, p.BroadcastBlob(ctx, subnet, blobSidecar)) require.Equal(t, false, util.WaitTimeout(&wg, 1*time.Second), "Failed to receive pubsub within 1s") } + +func TestService_BroadcastExecutionPayloadHeader(t *testing.T) { + msg := random.SignedExecutionPayloadHeader(t) + testBroadcast(t, SignedExecutionPayloadHeaderTopicFormat, msg) +} + +func TestService_BroadcastExecutionPayloadEnvelope(t *testing.T) { + msg := random.SignedExecutionPayloadEnvelope(t) + testBroadcast(t, SignedExecutionPayloadEnvelopeTopicFormat, msg) +} + +func TestService_BroadcastPayloadAttestationMessage(t *testing.T) { + msg := random.PayloadAttestationMessage(t) + testBroadcast(t, PayloadAttestationMessageTopicFormat, msg) +} + +func testBroadcast(t *testing.T, topicFormat string, msg interface{}) { + // Create two peers and let them connect. + p1 := p2ptest.NewTestP2P(t) + p2 := p2ptest.NewTestP2P(t) + p1.Connect(p2) + + if len(p1.BHost.Network().Peers()) == 0 { + t.Fatal("No peers") + } + + // Create a `Service` for the first peer. + s1 := &Service{ + host: p1.BHost, + pubsub: p1.PubSub(), + joinedTopics: map[string]*pubsub.Topic{}, + cfg: &Config{}, + genesisTime: time.Now(), + genesisValidatorsRoot: bytesutil.PadTo([]byte{'A'}, 32), + peers: peers.NewStatus(context.Background(), &peers.StatusConfig{ + ScorerParams: &scorers.Config{}, + }), + } + + // The second peer subscribes to the topic. + digest, err := s1.currentForkDigest() + require.NoError(t, err) + topic := fmt.Sprintf(topicFormat, digest) + s1.Encoding().ProtocolSuffix() + subscription, err := p2.SubscribeToTopic(topic) + require.NoError(t, err) + + time.Sleep(50 * time.Millisecond) // Wait for libp2p to be set up. + + // Start a goroutine listening for a pubsub message. + var wg sync.WaitGroup + wg.Add(1) + go func() { + defer wg.Done() + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + defer cancel() + + incomingMessage, err := subscription.Next(ctx) + require.NoError(t, err) + + result, ok := msg.(ssz.Unmarshaler) + require.Equal(t, true, ok) + require.NoError(t, s1.Encoding().DecodeGossip(incomingMessage.Data, result)) + require.DeepEqual(t, result, msg) + }() + + // An attempt to broadcast a message unmapped to a topic should fail. + ctx := context.Background() + require.ErrorContains(t, "message type is not mapped to a PubSub topic", s1.Broadcast(ctx, nil)) + + // The first peer broadcasts the message to the second peer. + require.NoError(t, s1.Broadcast(ctx, msg.(protoreflect.ProtoMessage))) + + // Wait for one second for the message to be delivered and processed. + if util.WaitTimeout(&wg, 1*time.Second) { + t.Error("Failed to receive pubsub within 1s") + } +} diff --git a/beacon-chain/p2p/gossip_topic_mappings.go b/beacon-chain/p2p/gossip_topic_mappings.go index d88a4499ce2b..7c6e606bac8f 100644 --- a/beacon-chain/p2p/gossip_topic_mappings.go +++ b/beacon-chain/p2p/gossip_topic_mappings.go @@ -5,6 +5,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/config/params" "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" "google.golang.org/protobuf/proto" ) @@ -22,6 +23,9 @@ var gossipTopicMappings = map[string]func() proto.Message{ SyncCommitteeSubnetTopicFormat: func() proto.Message { return ðpb.SyncCommitteeMessage{} }, BlsToExecutionChangeSubnetTopicFormat: func() proto.Message { return ðpb.SignedBLSToExecutionChange{} }, BlobSubnetTopicFormat: func() proto.Message { return ðpb.BlobSidecar{} }, + SignedExecutionPayloadHeaderTopicFormat: func() proto.Message { return &enginev1.SignedExecutionPayloadHeader{} }, + SignedExecutionPayloadEnvelopeTopicFormat: func() proto.Message { return &enginev1.SignedExecutionPayloadEnvelope{} }, + PayloadAttestationMessageTopicFormat: func() proto.Message { return ðpb.PayloadAttestationMessage{} }, } // GossipTopicMappings is a function to return the assigned data type @@ -99,9 +103,14 @@ func init() { GossipTypeMapping[reflect.TypeOf(ðpb.SignedBeaconBlockCapella{})] = BlockSubnetTopicFormat // Specially handle Deneb objects. GossipTypeMapping[reflect.TypeOf(ðpb.SignedBeaconBlockDeneb{})] = BlockSubnetTopicFormat + GossipTypeMapping[reflect.TypeOf(ðpb.SignedBeaconBlockEpbs{})] = BlockSubnetTopicFormat // Specially handle Electra objects. GossipTypeMapping[reflect.TypeOf(ðpb.SignedBeaconBlockElectra{})] = BlockSubnetTopicFormat GossipTypeMapping[reflect.TypeOf(ðpb.AttestationElectra{})] = AttestationSubnetTopicFormat GossipTypeMapping[reflect.TypeOf(ðpb.AttesterSlashingElectra{})] = AttesterSlashingSubnetTopicFormat GossipTypeMapping[reflect.TypeOf(ðpb.SignedAggregateAttestationAndProofElectra{})] = AggregateAndProofSubnetTopicFormat + // Handle ePBS objects. + GossipTypeMapping[reflect.TypeOf(&enginev1.SignedExecutionPayloadHeader{})] = SignedExecutionPayloadHeaderTopicFormat + GossipTypeMapping[reflect.TypeOf(&enginev1.SignedExecutionPayloadEnvelope{})] = SignedExecutionPayloadEnvelopeTopicFormat + GossipTypeMapping[reflect.TypeOf(ðpb.PayloadAttestationMessage{})] = PayloadAttestationMessageTopicFormat } diff --git a/beacon-chain/p2p/gossip_topic_mappings_test.go b/beacon-chain/p2p/gossip_topic_mappings_test.go index 2c134f425fa6..d434b2b56c48 100644 --- a/beacon-chain/p2p/gossip_topic_mappings_test.go +++ b/beacon-chain/p2p/gossip_topic_mappings_test.go @@ -7,8 +7,10 @@ import ( "github.com/prysmaticlabs/prysm/v5/config/params" "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/v5/testing/assert" + "github.com/prysmaticlabs/prysm/v5/testing/require" ) func TestMappingHasNoDuplicates(t *testing.T) { @@ -30,17 +32,20 @@ func TestGossipTopicMappings_CorrectType(t *testing.T) { capellaForkEpoch := primitives.Epoch(300) denebForkEpoch := primitives.Epoch(400) electraForkEpoch := primitives.Epoch(500) + epbsForkEpoch := primitives.Epoch(600) bCfg.AltairForkEpoch = altairForkEpoch bCfg.BellatrixForkEpoch = bellatrixForkEpoch bCfg.CapellaForkEpoch = capellaForkEpoch bCfg.DenebForkEpoch = denebForkEpoch bCfg.ElectraForkEpoch = electraForkEpoch + bCfg.EPBSForkEpoch = epbsForkEpoch bCfg.ForkVersionSchedule[bytesutil.ToBytes4(bCfg.AltairForkVersion)] = primitives.Epoch(100) bCfg.ForkVersionSchedule[bytesutil.ToBytes4(bCfg.BellatrixForkVersion)] = primitives.Epoch(200) bCfg.ForkVersionSchedule[bytesutil.ToBytes4(bCfg.CapellaForkVersion)] = primitives.Epoch(300) bCfg.ForkVersionSchedule[bytesutil.ToBytes4(bCfg.DenebForkVersion)] = primitives.Epoch(400) bCfg.ForkVersionSchedule[bytesutil.ToBytes4(bCfg.ElectraForkVersion)] = primitives.Epoch(500) + bCfg.ForkVersionSchedule[bytesutil.ToBytes4(bCfg.EPBSForkVersion)] = primitives.Epoch(600) params.OverrideBeaconConfig(bCfg) // Phase 0 @@ -126,4 +131,15 @@ func TestGossipTopicMappings_CorrectType(t *testing.T) { pMessage = GossipTopicMappings(AggregateAndProofSubnetTopicFormat, electraForkEpoch) _, ok = pMessage.(*ethpb.SignedAggregateAttestationAndProofElectra) assert.Equal(t, true, ok) + + // Epbs fork + pMessage = GossipTopicMappings(SignedExecutionPayloadHeaderTopicFormat, epbsForkEpoch) + _, ok = pMessage.(*enginev1.SignedExecutionPayloadHeader) + require.Equal(t, true, ok) + pMessage = GossipTopicMappings(SignedExecutionPayloadEnvelopeTopicFormat, epbsForkEpoch) + _, ok = pMessage.(*enginev1.SignedExecutionPayloadEnvelope) + require.Equal(t, true, ok) + pMessage = GossipTopicMappings(PayloadAttestationMessageTopicFormat, epbsForkEpoch) + _, ok = pMessage.(*ethpb.PayloadAttestationMessage) + require.Equal(t, true, ok) } diff --git a/beacon-chain/p2p/topics_epbs.go b/beacon-chain/p2p/topics_epbs.go new file mode 100644 index 000000000000..75cb9be7fea1 --- /dev/null +++ b/beacon-chain/p2p/topics_epbs.go @@ -0,0 +1,11 @@ +package p2p + +const ( + GossipSignedExecutionPayloadHeader = "signed_execution_payload_header" + GossipSignedExecutionPayloadEnvelope = "signed_execution_payload_envelope" + GossipPayloadAttestationMessage = "payload_attestation_message" + + SignedExecutionPayloadHeaderTopicFormat = GossipProtocolAndDigest + GossipSignedExecutionPayloadHeader + SignedExecutionPayloadEnvelopeTopicFormat = GossipProtocolAndDigest + GossipSignedExecutionPayloadEnvelope + PayloadAttestationMessageTopicFormat = GossipProtocolAndDigest + GossipPayloadAttestationMessage +) diff --git a/beacon-chain/rpc/eth/beacon/handlers.go b/beacon-chain/rpc/eth/beacon/handlers.go index f6a8a3a273e0..c74cfc6006ec 100644 --- a/beacon-chain/rpc/eth/beacon/handlers.go +++ b/beacon-chain/rpc/eth/beacon/handlers.go @@ -1080,7 +1080,8 @@ func (s *Server) validateConsensus(ctx context.Context, blk interfaces.ReadOnlyS } func (s *Server) validateEquivocation(blk interfaces.ReadOnlyBeaconBlock) error { - if s.ForkchoiceFetcher.HighestReceivedBlockSlot() == blk.Slot() { + slot, _ := s.ForkchoiceFetcher.HighestReceivedBlockSlotRoot() + if slot == blk.Slot() { return errors.Wrapf(errEquivocatedBlock, "block for slot %d already exists in fork choice", blk.Slot()) } return nil diff --git a/beacon-chain/rpc/eth/config/handlers_test.go b/beacon-chain/rpc/eth/config/handlers_test.go index 8284e095bb4b..372fbc0a6162 100644 --- a/beacon-chain/rpc/eth/config/handlers_test.go +++ b/beacon-chain/rpc/eth/config/handlers_test.go @@ -20,6 +20,10 @@ import ( "github.com/prysmaticlabs/prysm/v5/testing/require" ) +// Variables defined in the placeholderFields will not be tested in `TestGetSpec`. +// These are variables that we don't use in Prysm. (i.e. future hardfork, light client... etc) +var placeholderFields = []string{"DOMAIN_BEACON_BUILDER", "DOMAIN_PTC_ATTESTER"} + func TestGetDepositContract(t *testing.T) { params.SetupTestConfigCleanup(t) config := params.BeaconConfig().Copy() @@ -79,6 +83,8 @@ func TestGetSpec(t *testing.T) { config.DenebForkEpoch = 105 config.ElectraForkVersion = []byte("ElectraForkVersion") config.ElectraForkEpoch = 107 + config.EPBSForkVersion = []byte("EPBSForkVersion") + config.EPBSForkEpoch = 109 config.BLSWithdrawalPrefixByte = byte('b') config.ETH1AddressWithdrawalPrefixByte = byte('c') config.GenesisDelay = 24 @@ -189,7 +195,7 @@ func TestGetSpec(t *testing.T) { data, ok := resp.Data.(map[string]interface{}) require.Equal(t, true, ok) - assert.Equal(t, 155, len(data)) + assert.Equal(t, 165, len(data)) for k, v := range data { t.Run(k, func(t *testing.T) { switch k { @@ -267,6 +273,10 @@ func TestGetSpec(t *testing.T) { assert.Equal(t, "0x"+hex.EncodeToString([]byte("ElectraForkVersion")), v) case "ELECTRA_FORK_EPOCH": assert.Equal(t, "107", v) + case "EPBS_FORK_VERSION": + assert.Equal(t, "0x"+hex.EncodeToString([]byte("EPBSForkVersion")), v) + case "EPBS_FORK_EPOCH": + assert.Equal(t, "109", v) case "MIN_ANCHOR_POW_BLOCK_DIFFICULTY": assert.Equal(t, "1000", v) case "BLS_WITHDRAWAL_PREFIX": @@ -526,7 +536,25 @@ func TestGetSpec(t *testing.T) { assert.Equal(t, "93", v) case "MAX_PENDING_DEPOSITS_PER_EPOCH": assert.Equal(t, "94", v) + case "PROPOSER_SCORE_BOOST_EPBS": + assert.Equal(t, "20", v) + case "PAYLOAD_REVEAL_BOOST": + assert.Equal(t, "40", v) + case "PAYLOAD_WITHHOLD_BOOST": + assert.Equal(t, "40", v) + case "PAYLOAD_TIMELY_THRESHOLD": + assert.Equal(t, "256", v) + case "INTERVALS_PER_SLOT_EPBS": + assert.Equal(t, "4", v) + case "MIN_BUILDER_BALANCE": + assert.Equal(t, "0", v) default: + for _, pf := range placeholderFields { + if k == pf { + t.Logf("Skipping placeholder field: %s", k) + return + } + } t.Errorf("Incorrect key: %s", k) } }) diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel b/beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel index 50acfb14486e..663b72f3a037 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/BUILD.bazel @@ -20,11 +20,13 @@ go_library( "proposer_deneb.go", "proposer_deposits.go", "proposer_empty_block.go", + "proposer_epbs.go", "proposer_eth1data.go", "proposer_execution_payload.go", "proposer_exits.go", "proposer_slashings.go", "proposer_sync_aggregate.go", + "ptc_attester.go", "server.go", "status.go", "sync_committee.go", @@ -40,6 +42,7 @@ go_library( "//beacon-chain/cache:go_default_library", "//beacon-chain/cache/depositsnapshot:go_default_library", "//beacon-chain/core/blocks:go_default_library", + "//beacon-chain/core/epbs:go_default_library", "//beacon-chain/core/feed:go_default_library", "//beacon-chain/core/feed/block:go_default_library", "//beacon-chain/core/feed/operation:go_default_library", @@ -82,14 +85,12 @@ go_library( "//monitoring/tracing/trace:go_default_library", "//network/forks:go_default_library", "//proto/engine/v1:go_default_library", - "//proto/eth/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/attestation:go_default_library", "//proto/prysm/v1alpha1/attestation/aggregation:go_default_library", "//proto/prysm/v1alpha1/attestation/aggregation/attestations:go_default_library", "//proto/prysm/v1alpha1/attestation/aggregation/sync_contribution:go_default_library", "//runtime/version:go_default_library", - "//time:go_default_library", "//time/slots:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", @@ -100,7 +101,6 @@ go_library( "@com_github_prysmaticlabs_fastssz//:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", - "@io_opencensus_go//trace:go_default_library", "@org_golang_google_grpc//codes:go_default_library", "@org_golang_google_grpc//status:go_default_library", "@org_golang_google_protobuf//proto:go_default_library", @@ -110,71 +110,78 @@ go_library( ) common_deps = [ - "//async/event:go_default_library", - "//beacon-chain/blockchain/testing:go_default_library", - "//beacon-chain/builder:go_default_library", - "//beacon-chain/builder/testing:go_default_library", - "//beacon-chain/cache:go_default_library", - "//beacon-chain/cache/depositsnapshot:go_default_library", - "//beacon-chain/core/altair:go_default_library", - "//beacon-chain/core/blocks:go_default_library", - "//beacon-chain/core/execution:go_default_library", - "//beacon-chain/core/feed:go_default_library", - "//beacon-chain/core/feed/block:go_default_library", - "//beacon-chain/core/feed/operation:go_default_library", - "//beacon-chain/core/feed/state:go_default_library", - "//beacon-chain/core/helpers:go_default_library", - "//beacon-chain/core/signing:go_default_library", - "//beacon-chain/core/time:go_default_library", - "//beacon-chain/core/transition:go_default_library", - "//beacon-chain/db/testing:go_default_library", - "//beacon-chain/execution/testing:go_default_library", - "//beacon-chain/forkchoice/doubly-linked-tree:go_default_library", - "//beacon-chain/operations/attestations:go_default_library", - "//beacon-chain/operations/slashings:go_default_library", - "//beacon-chain/operations/synccommittee:go_default_library", - "//beacon-chain/operations/voluntaryexits:go_default_library", - "//beacon-chain/p2p/testing:go_default_library", - "//beacon-chain/rpc/testutil:go_default_library", - "//beacon-chain/state:go_default_library", - "//beacon-chain/state/state-native:go_default_library", - "//beacon-chain/state/stategen:go_default_library", - "//beacon-chain/state/stategen/mock:go_default_library", - "//beacon-chain/sync/initial-sync/testing:go_default_library", - "//config/fieldparams:go_default_library", - "//config/params: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", - "//container/trie:go_default_library", - "//crypto/bls:go_default_library", - "//crypto/bls/blst:go_default_library", - "//encoding/bytesutil:go_default_library", - "//encoding/ssz:go_default_library", - "//proto/engine/v1:go_default_library", - "//proto/eth/v1:go_default_library", - "//proto/prysm/v1alpha1:go_default_library", - "//proto/prysm/v1alpha1/attestation:go_default_library", - "//proto/prysm/v1alpha1/attestation/aggregation/attestations:go_default_library", - "//testing/assert:go_default_library", - "//testing/mock:go_default_library", - "//testing/require:go_default_library", - "//testing/util:go_default_library", - "//time:go_default_library", - "//time/slots:go_default_library", - "@com_github_d4l3k_messagediff//:go_default_library", - "@com_github_ethereum_go_ethereum//common:go_default_library", - "@com_github_ethereum_go_ethereum//core/types:go_default_library", - "@org_uber_go_mock//gomock:go_default_library", - "@com_github_pkg_errors//:go_default_library", - "@com_github_prysmaticlabs_go_bitfield//:go_default_library", - "@com_github_sirupsen_logrus//:go_default_library", - "@com_github_sirupsen_logrus//hooks/test:go_default_library", - "@org_golang_google_grpc//codes:go_default_library", - "@org_golang_google_grpc//status:go_default_library", - "@org_golang_google_protobuf//proto:go_default_library", - "@org_golang_google_protobuf//types/known/emptypb:go_default_library", + "//api/client/builder:go_default_library", + "//async/event:go_default_library", + "//beacon-chain/blockchain/testing:go_default_library", + "//beacon-chain/builder:go_default_library", + "//beacon-chain/builder/testing:go_default_library", + "//beacon-chain/cache:go_default_library", + "//beacon-chain/cache/depositsnapshot:go_default_library", + "//beacon-chain/core/altair:go_default_library", + "//beacon-chain/core/blocks:go_default_library", + "//beacon-chain/core/execution:go_default_library", + "//beacon-chain/core/feed:go_default_library", + "//beacon-chain/core/feed/block:go_default_library", + "//beacon-chain/core/feed/operation:go_default_library", + "//beacon-chain/core/feed/state:go_default_library", + "//beacon-chain/core/helpers:go_default_library", + "//beacon-chain/core/signing:go_default_library", + "//beacon-chain/core/time:go_default_library", + "//beacon-chain/core/transition:go_default_library", + "//beacon-chain/db:go_default_library", + "//beacon-chain/db/testing:go_default_library", + "//beacon-chain/execution/testing:go_default_library", + "//beacon-chain/forkchoice/doubly-linked-tree:go_default_library", + "//beacon-chain/operations/attestations:go_default_library", + "//beacon-chain/operations/blstoexec:go_default_library", + "//beacon-chain/operations/slashings:go_default_library", + "//beacon-chain/operations/synccommittee:go_default_library", + "//beacon-chain/operations/voluntaryexits:go_default_library", + "//beacon-chain/p2p/testing:go_default_library", + "//beacon-chain/rpc/core:go_default_library", + "//beacon-chain/rpc/testutil:go_default_library", + "//beacon-chain/startup:go_default_library", + "//beacon-chain/state:go_default_library", + "//beacon-chain/state/state-native:go_default_library", + "//beacon-chain/state/stategen:go_default_library", + "//beacon-chain/state/stategen/mock:go_default_library", + "//beacon-chain/sync/initial-sync/testing:go_default_library", + "//config/features:go_default_library", + "//config/fieldparams:go_default_library", + "//config/params: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", + "//container/trie:go_default_library", + "//crypto/bls:go_default_library", + "//crypto/bls/blst:go_default_library", + "//encoding/bytesutil:go_default_library", + "//encoding/ssz:go_default_library", + "//proto/engine/v1:go_default_library", + "//proto/prysm/v1alpha1:go_default_library", + "//proto/prysm/v1alpha1/attestation:go_default_library", + "//proto/prysm/v1alpha1/attestation/aggregation/attestations:go_default_library", + "//runtime/version:go_default_library", + "//testing/assert:go_default_library", + "//testing/mock:go_default_library", + "//testing/require:go_default_library", + "//testing/util:go_default_library", + "//time:go_default_library", + "//time/slots:go_default_library", + "@com_github_d4l3k_messagediff//:go_default_library", + "@com_github_ethereum_go_ethereum//common:go_default_library", + "@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", + "@com_github_ethereum_go_ethereum//core/types:go_default_library", + "@com_github_pkg_errors//:go_default_library", + "@com_github_prysmaticlabs_go_bitfield//:go_default_library", + "@com_github_sirupsen_logrus//:go_default_library", + "@com_github_sirupsen_logrus//hooks/test:go_default_library", + "@org_golang_google_grpc//codes:go_default_library", + "@org_golang_google_grpc//status:go_default_library", + "@org_golang_google_protobuf//proto:go_default_library", + "@org_golang_google_protobuf//types/known/emptypb:go_default_library", + "@org_uber_go_mock//gomock:go_default_library", ] # gazelle:ignore @@ -196,11 +203,13 @@ go_test( "proposer_deneb_test.go", "proposer_deposits_test.go", "proposer_empty_block_test.go", + "proposer_epbs_test.go", "proposer_execution_payload_test.go", "proposer_exits_test.go", "proposer_slashings_test.go", "proposer_sync_aggregate_test.go", "proposer_test.go", + "ptc_attester_test.go", "server_mainnet_test.go", "server_test.go", "status_mainnet_test.go", diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/construct_generic_block.go b/beacon-chain/rpc/prysm/v1alpha1/validator/construct_generic_block.go index a4510e69eead..ead26c958953 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/construct_generic_block.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/construct_generic_block.go @@ -26,6 +26,8 @@ func (vs *Server) constructGenericBeaconBlock(sBlk interfaces.SignedBeaconBlock, bidStr := primitives.WeiToBigInt(winningBid).String() switch sBlk.Version() { + case version.EPBS: + return ðpb.GenericBeaconBlock{Block: ðpb.GenericBeaconBlock_Epbs{Epbs: blockProto.(*ethpb.BeaconBlockEpbs)}}, nil case version.Electra: return vs.constructElectraBlock(blockProto, isBlinded, bidStr, blobsBundle), nil case version.Deneb: diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/duties.go b/beacon-chain/rpc/prysm/v1alpha1/validator/duties.go index 4d4a6ad53b12..f614ae81d9b4 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/duties.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/duties.go @@ -108,6 +108,7 @@ func (vs *Server) duties(ctx context.Context, req *ethpb.DutiesRequest) (*ethpb. assignment.Committee = ca.Committee assignment.AttesterSlot = ca.AttesterSlot assignment.CommitteeIndex = ca.CommitteeIndex + assignment.PtcSlot = ca.PtcSlot } // Save the next epoch assignments. ca, ok = nextEpochAssignments[idx] @@ -115,6 +116,7 @@ func (vs *Server) duties(ctx context.Context, req *ethpb.DutiesRequest) (*ethpb. nextAssignment.Committee = ca.Committee nextAssignment.AttesterSlot = ca.AttesterSlot nextAssignment.CommitteeIndex = ca.CommitteeIndex + nextAssignment.PtcSlot = ca.PtcSlot } } else { // If the validator isn't in the beacon state, try finding their deposit to determine their status. diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go index 411428ef2b40..b0fcba23e202 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go @@ -107,6 +107,15 @@ func (vs *Server) GetBeaconBlock(ctx context.Context, req *ethpb.BlockRequest) ( if err != nil { return nil, errors.Wrap(err, "could not build block in parallel") } + + if sBlk.Version() >= version.EPBS { + beaconBlockRoot, err := sBlk.Block().HashTreeRoot() + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not hash tree root: %v", err) + } + vs.payloadEnvelope.BeaconBlockRoot = beaconBlockRoot[:] + } + return resp, nil } @@ -223,11 +232,24 @@ func (vs *Server) BuildBlockParallel(ctx context.Context, sBlk interfaces.Signed // Set bls to execution change. New in Capella. vs.setBlsToExecData(sBlk, head) + + // Set payload attestations to block. New in ePBS + if err := vs.setPayloadAttestations(sBlk, head); err != nil { + log.WithError(err).Error("Could not set payload attestations on block") + } }() winningBid := primitives.ZeroWei() var bundle *enginev1.BlobsBundle - if sBlk.Version() >= version.Bellatrix { + if sBlk.Version() >= version.EPBS { + if vs.signedExecutionPayloadHeader == nil { + log.Warn("Failed to retrieve the signed execution payload header, proposing a block without it") + } else { + if err := sBlk.SetSignedExecutionPayloadHeader(vs.signedExecutionPayloadHeader); err != nil { + log.Warn("Failed to set the signed execution payload header, proposing a block without it") + } + } + } else if sBlk.Version() >= version.Bellatrix { local, err := vs.getLocalPayload(ctx, sBlk.Block(), head) if err != nil { return nil, status.Errorf(codes.Internal, "Could not get local payload: %v", err) @@ -277,7 +299,7 @@ func (vs *Server) ProposeBeaconBlock(ctx context.Context, req *ethpb.GenericSign var sidecars []*ethpb.BlobSidecar if block.IsBlinded() { block, sidecars, err = vs.handleBlindedBlock(ctx, block) - } else if block.Version() >= version.Deneb { + } else if block.Version() >= version.Deneb && block.Version() < version.EPBS { sidecars, err = vs.blobSidecarsFromUnblindedBlock(block, req) } if err != nil { @@ -476,6 +498,27 @@ func (vs *Server) computeStateRoot(ctx context.Context, block interfaces.ReadOnl if err != nil { return nil, errors.Wrap(err, "could not retrieve beacon state") } + if block.Version() >= version.EPBS && beaconState.Version() >= version.EPBS { + // Check if the parent is full + parentHeader, err := beaconState.LatestExecutionPayloadHeaderEPBS() + if err != nil { + return nil, errors.Wrap(err, "could not retrieve latest execution payload header") + } + signed, err := block.Block().Body().SignedExecutionPayloadHeader() + if err != nil { + return nil, errors.Wrap(err, "could not retrieve signed execution payload header") + } + header, err := signed.Header() + if err != nil { + return nil, errors.Wrap(err, "could not retrieve execution payload header") + } + if header.ParentBlockHash() == [32]byte(parentHeader.BlockHash) { + beaconState, err = vs.StateGen.StateByRoot(ctx, [32]byte(parentHeader.BlockHash)) + if err != nil { + return nil, errors.Wrap(err, "could not retrieve beacon state by hash") + } + } + } root, err := transition.CalculateStateRoot( ctx, beaconState, diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_builder.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_builder.go index 660aea71425a..987b4cc961d1 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_builder.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_builder.go @@ -57,7 +57,7 @@ func (vs *Server) circuitBreakBuilder(s primitives.Slot) (bool, error) { } // Circuit breaker is active if the missing consecutive slots greater than `MaxBuilderConsecutiveMissedSlots`. - highestReceivedSlot := vs.ForkchoiceFetcher.HighestReceivedBlockSlot() + highestReceivedSlot, _ := vs.ForkchoiceFetcher.HighestReceivedBlockSlotRoot() maxConsecutiveSkipSlotsAllowed := params.BeaconConfig().MaxBuilderConsecutiveMissedSlots diff, err := s.SafeSubSlot(highestReceivedSlot) if err != nil { diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_empty_block.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_empty_block.go index 01ea1d46df18..b88c66edc4fe 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_empty_block.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_empty_block.go @@ -16,6 +16,11 @@ func getEmptyBlock(slot primitives.Slot) (interfaces.SignedBeaconBlock, error) { var err error epoch := slots.ToEpoch(slot) switch { + case epoch >= params.BeaconConfig().EPBSForkEpoch: + sBlk, err = blocks.NewSignedBeaconBlock(ðpb.SignedBeaconBlockEpbs{Block: ðpb.BeaconBlockEpbs{Body: ðpb.BeaconBlockBodyEpbs{}}}) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not initialize block for proposal: %v", err) + } case epoch >= params.BeaconConfig().ElectraForkEpoch: sBlk, err = blocks.NewSignedBeaconBlock(ðpb.SignedBeaconBlockElectra{Block: ðpb.BeaconBlockElectra{Body: ðpb.BeaconBlockBodyElectra{}}}) if err != nil { diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs.go new file mode 100644 index 000000000000..f4e0806ecbe9 --- /dev/null +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs.go @@ -0,0 +1,228 @@ +package validator + +import ( + "context" + "fmt" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/epbs" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/encoding/ssz" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "github.com/prysmaticlabs/prysm/v5/time/slots" + "github.com/sirupsen/logrus" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/emptypb" +) + +// SubmitSignedExecutionPayloadEnvelope submits a signed execution payload envelope to the validator client. +func (vs *Server) SubmitSignedExecutionPayloadEnvelope(ctx context.Context, env *enginev1.SignedExecutionPayloadEnvelope) (*emptypb.Empty, error) { + if err := vs.P2P.Broadcast(ctx, env); err != nil { + return nil, status.Errorf(codes.Internal, "failed to broadcast signed execution payload envelope: %v", err) + } + + env.Message.BlobKzgCommitments = [][]byte{} + m, err := blocks.WrappedROSignedExecutionPayloadEnvelope(env) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "failed to wrap execution payload envelope: %v", err) + } + + if err := vs.ExecutionPayloadReceiver.ReceiveExecutionPayloadEnvelope(ctx, m, nil); err != nil { + return nil, status.Errorf(codes.Internal, "failed to receive execution payload envelope: %v", err) + } + + return nil, nil +} + +// GetExecutionPayloadEnvelope returns the execution payload envelope for a given slot. +func (vs *Server) GetExecutionPayloadEnvelope(ctx context.Context, req *eth.PayloadEnvelopeRequest) (*enginev1.ExecutionPayloadEnvelope, error) { + if vs.payloadEnvelope == nil { + return nil, status.Error(codes.NotFound, "No execution payload response available") + } + if req.ProposerIndex != vs.payloadEnvelope.BuilderIndex { + return nil, status.Errorf(codes.InvalidArgument, "proposer index mismatch: expected %d, got %d", vs.payloadEnvelope.BuilderIndex, req.ProposerIndex) + } + if req.Slot != vs.TimeFetcher.CurrentSlot() { + return nil, status.Errorf(codes.InvalidArgument, "current slot mismatch: expected %d, got %d", vs.TimeFetcher.CurrentSlot(), req.Slot) + } + + vs.payloadEnvelope.StateRoot = make([]byte, 32) + p, err := blocks.WrappedROExecutionPayloadEnvelope(vs.payloadEnvelope) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to wrap execution payload envelope: %v", err) + } + stateRoot, err := vs.computePostPayloadStateRoot(ctx, p) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to compute post payload state root: %v", err) + } + vs.payloadEnvelope.StateRoot = stateRoot + + log.WithField("stateRoot", fmt.Sprintf("%#x", stateRoot)).Debugf("Computed state root at execution stage") + + return vs.payloadEnvelope, nil +} + +func (vs *Server) SubmitSignedExecutionPayloadHeader(ctx context.Context, h *enginev1.SignedExecutionPayloadHeader) (*emptypb.Empty, error) { + if vs.TimeFetcher.CurrentSlot() != h.Message.Slot { + return nil, status.Errorf(codes.InvalidArgument, "current slot mismatch: expected %d, got %d", vs.TimeFetcher.CurrentSlot(), h.Message.Slot) + } + + vs.signedExecutionPayloadHeader = h + log.WithFields(logrus.Fields{ + "slot": h.Message.Slot, + "builderIndex": h.Message.BuilderIndex, + "blockHash": fmt.Sprintf("%#x", h.Message.BlockHash), + "parentHash": fmt.Sprintf("%#x", h.Message.ParentBlockHash), + "parentRoot": fmt.Sprintf("%#x", h.Message.ParentBlockRoot), + }).Info("Cached signed execution payload header") + + headState, _, err := vs.getParentState(ctx, h.Message.Slot) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to retrieve head state: %v", err) + } + + proposerIndex, err := helpers.BeaconProposerIndexAtSlot(ctx, headState, h.Message.Slot) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to retrieve proposer index: %v", err) + } + if proposerIndex != h.Message.BuilderIndex { + if err := vs.P2P.Broadcast(ctx, h); err != nil { + return nil, status.Errorf(codes.Internal, "failed to broadcast signed execution payload header: %v", err) + } + } + + return nil, nil +} + +// computePostPayloadStateRoot computes the state root after an execution +// payload envelope has been processed through a state transition and +// returns it to the validator client. +func (vs *Server) computePostPayloadStateRoot(ctx context.Context, envelope interfaces.ROExecutionPayloadEnvelope) ([]byte, error) { + beaconState, err := vs.StateGen.StateByRoot(ctx, envelope.BeaconBlockRoot()) + if err != nil { + return nil, errors.Wrap(err, "could not retrieve beacon state") + } + beaconState = beaconState.Copy() + if err := epbs.UpdateHeaderAndVerify(ctx, beaconState, envelope); err != nil { + return nil, err + } + err = epbs.ProcessPayloadStateTransition( + ctx, + beaconState, + envelope, + ) + if err != nil { + return nil, errors.Wrapf(err, "could not calculate post payload state root at slot %d", beaconState.Slot()) + } + + root, err := beaconState.HashTreeRoot(ctx) + if err != nil { + return nil, errors.Wrapf(err, "could not calculate post payload state root at slot %d", beaconState.Slot()) + } + + return root[:], nil +} + +// GetLocalHeader returns the local header for a given slot and proposer index. +func (vs *Server) GetLocalHeader(ctx context.Context, req *eth.HeaderRequest) (*enginev1.ExecutionPayloadHeaderEPBS, error) { + if vs.SyncChecker.Syncing() { + return nil, status.Error(codes.FailedPrecondition, "Syncing to latest head, not ready to respond") + } + + if err := vs.optimisticStatus(ctx); err != nil { + return nil, status.Errorf(codes.FailedPrecondition, "Validator is not ready to propose: %v", err) + } + + slot := req.Slot + epoch := slots.ToEpoch(slot) + if params.BeaconConfig().EPBSForkEpoch > epoch { + return nil, status.Errorf(codes.FailedPrecondition, "EPBS fork has not occurred yet") + } + if slot != vs.TimeFetcher.CurrentSlot() { + return nil, status.Errorf(codes.InvalidArgument, "current slot mismatch: expected %d, got %d", vs.TimeFetcher.CurrentSlot(), slot) + } + + st, parentRoot, err := vs.getParentState(ctx, slot) + if err != nil { + return nil, err + } + + proposerIndex := req.ProposerIndex + localPayload, err := vs.getLocalPayloadFromEngine(ctx, st, parentRoot, slot, proposerIndex) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not get local payload: %v", err) + } + electraPayload, ok := localPayload.ExecutionData.Proto().(*enginev1.ExecutionPayloadElectra) + if !ok { + return nil, status.Error(codes.Internal, "Could not get electra payload") + } + vs.payloadEnvelope = &enginev1.ExecutionPayloadEnvelope{ + Payload: electraPayload, + ExecutionRequests: localPayload.ExecutionRequests, + BuilderIndex: proposerIndex, + BlobKzgCommitments: localPayload.BlobsBundle.KzgCommitments, + } + vs.blobsBundle = localPayload.BlobsBundle + + kzgRoot, err := ssz.KzgCommitmentsRoot(localPayload.BlobsBundle.KzgCommitments) + if err != nil { + return nil, status.Errorf(codes.Internal, "Could not get kzg commitments root: %v", err) + } + + return &enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: localPayload.ExecutionData.ParentHash(), + ParentBlockRoot: parentRoot[:], + BlockHash: localPayload.ExecutionData.BlockHash(), + GasLimit: localPayload.ExecutionData.GasLimit(), + BuilderIndex: proposerIndex, + Slot: slot, + Value: 0, + BlobKzgCommitmentsRoot: kzgRoot[:], + }, nil +} + +// Set payload attestations for the block if it meets the following conditions: +// - Block version is ePBS or higher +// - Parent block's slot is exactly one less than the current block's slot +// - Local chain view is respected to determine whether the parent slot is full or empty: +// - If the parent slot is empty, pack a "WITHHELD" status +// - If the parent slot is full, pack a "PRESENT" status +func (vs *Server) setPayloadAttestations(block interfaces.SignedBeaconBlock, state state.BeaconState) error { + if block.Version() < version.EPBS { + return nil + } + + parentRoot := block.Block().ParentRoot() + parentSlot, err := vs.ForkchoiceFetcher.RecentBlockSlot(parentRoot) + if err != nil { + return err + } + + if parentSlot+1 != block.Block().Slot() { + return nil + } + + lastFullSlot, err := state.LatestFullSlot() + if err != nil { + return err + } + payloadIsPresent := lastFullSlot+1 == block.Block().Slot() + status := primitives.PAYLOAD_WITHHELD + if payloadIsPresent { + status = primitives.PAYLOAD_PRESENT + } + + payloadAttestation := vs.PayloadAttestationCache.Get(parentRoot, status) + if payloadAttestation == nil { + return nil + } + return block.SetPayloadAttestations([]*eth.PayloadAttestation{payloadAttestation}) +} diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs_test.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs_test.go new file mode 100644 index 000000000000..b263d84ea8eb --- /dev/null +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_epbs_test.go @@ -0,0 +1,109 @@ +package validator + +import ( + "context" + "testing" + + "github.com/pkg/errors" + mockChain "github.com/prysmaticlabs/prysm/v5/beacon-chain/blockchain/testing" + dbutil "github.com/prysmaticlabs/prysm/v5/beacon-chain/db/testing" + mockExecution "github.com/prysmaticlabs/prysm/v5/beacon-chain/execution/testing" + doublylinkedtree "github.com/prysmaticlabs/prysm/v5/beacon-chain/forkchoice/doubly-linked-tree" + p2ptest "github.com/prysmaticlabs/prysm/v5/beacon-chain/p2p/testing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/stategen" + "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util" +) + +func TestServer_SubmitSignedExecutionPayloadEnvelope(t *testing.T) { + env := &enginev1.SignedExecutionPayloadEnvelope{ + Message: &enginev1.ExecutionPayloadEnvelope{ + Payload: &enginev1.ExecutionPayloadElectra{}, + BeaconBlockRoot: make([]byte, 32), + BlobKzgCommitments: [][]byte{}, + StateRoot: make([]byte, 32), + }, + Signature: make([]byte, 96), + } + t.Run("Happy case", func(t *testing.T) { + st, _ := util.DeterministicGenesisStateEpbs(t, 1) + s := &Server{ + P2P: p2ptest.NewTestP2P(t), + ExecutionPayloadReceiver: &mockChain.ChainService{State: st}, + } + _, err := s.SubmitSignedExecutionPayloadEnvelope(context.Background(), env) + require.NoError(t, err) + }) + + t.Run("Receive failed", func(t *testing.T) { + s := &Server{ + P2P: p2ptest.NewTestP2P(t), + ExecutionPayloadReceiver: &mockChain.ChainService{ReceiveBlockMockErr: errors.New("receive failed")}, + } + _, err := s.SubmitSignedExecutionPayloadEnvelope(context.Background(), env) + require.ErrorContains(t, "failed to receive execution payload envelope: receive failed", err) + }) +} + +func TestServer_SubmitSignedExecutionPayloadHeader(t *testing.T) { + st, _ := util.DeterministicGenesisStateEpbs(t, 1) + h := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 1, + }, + } + slot := primitives.Slot(1) + server := &Server{ + TimeFetcher: &mockChain.ChainService{Slot: &slot}, + HeadFetcher: &mockChain.ChainService{State: st}, + P2P: p2ptest.NewTestP2P(t), + } + + t.Run("Happy case", func(t *testing.T) { + h.Message.BuilderIndex = 1 + _, err := server.SubmitSignedExecutionPayloadHeader(context.Background(), h) + require.NoError(t, err) + require.DeepEqual(t, server.signedExecutionPayloadHeader, h) + }) + + t.Run("Incorrect slot", func(t *testing.T) { + h.Message.Slot = 3 + _, err := server.SubmitSignedExecutionPayloadHeader(context.Background(), h) + require.ErrorContains(t, "invalid slot: current slot 1, got 3", err) + }) +} + +func TestProposer_ComputePostPayloadStateRoot(t *testing.T) { + db := dbutil.SetupDB(t) + ctx := context.Background() + + proposerServer := &Server{ + ChainStartFetcher: &mockExecution.Chain{}, + Eth1InfoFetcher: &mockExecution.Chain{}, + Eth1BlockFetcher: &mockExecution.Chain{}, + StateGen: stategen.New(db, doublylinkedtree.New()), + } + + bh := [32]byte{'h'} + root := [32]byte{'r'} + expectedStateRoot := [32]byte{22, 85, 188, 95, 44, 156, 240, 10, 30, 106, 216, 244, 24, 39, 130, 196, 151, 118, 200, 94, 28, 42, 13, 170, 109, 206, 33, 83, 97, 154, 53, 251} + p := &enginev1.ExecutionPayloadEnvelope{ + Payload: &enginev1.ExecutionPayloadElectra{}, + ExecutionRequests: &enginev1.ExecutionRequests{}, + BeaconBlockRoot: root[:], + BlobKzgCommitments: make([][]byte, 0), + StateRoot: expectedStateRoot[:], + } + p.Payload.BlockHash = bh[:] + e, err := blocks.WrappedROExecutionPayloadEnvelope(p) + require.NoError(t, err) + + st, _ := util.DeterministicGenesisStateEpbs(t, 64) + require.NoError(t, db.SaveState(ctx, st, e.BeaconBlockRoot())) + stateRoot, err := proposerServer.computePostPayloadStateRoot(ctx, e) + require.NoError(t, err) + require.DeepEqual(t, expectedStateRoot[:], stateRoot) +} diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_execution_payload.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_execution_payload.go index 56ba2798efcc..6b4c7968617b 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_execution_payload.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_execution_payload.go @@ -137,7 +137,7 @@ func (vs *Server) getLocalPayloadFromEngine( } var attr payloadattribute.Attributer switch st.Version() { - case version.Deneb, version.Electra: + case version.Deneb, version.Electra, version.EPBS: withdrawals, _, err := st.ExpectedWithdrawals() if err != nil { return nil, err @@ -273,6 +273,9 @@ var errNoTerminalBlockHash = errors.New("no terminal block hash") // // Otherwise, the terminal block hash is fetched based on the slot's time, and an error is returned if it doesn't exist. func (vs *Server) getParentBlockHash(ctx context.Context, st state.BeaconState, slot primitives.Slot) ([]byte, error) { + if st.Version() >= version.EPBS { + return st.LatestBlockHash() + } if st.Version() >= version.Capella { return getParentBlockHashPostCapella(st) } diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/ptc_attester.go b/beacon-chain/rpc/prysm/v1alpha1/validator/ptc_attester.go new file mode 100644 index 000000000000..c8f985466459 --- /dev/null +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/ptc_attester.go @@ -0,0 +1,50 @@ +package validator + +import ( + "context" + + "github.com/golang/protobuf/ptypes/empty" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// GetPayloadAttestationData returns the payload attestation data for a given slot. +// The request slot must be the current slot and there must exist a block from the current slot or the request will fail. +func (vs *Server) GetPayloadAttestationData(ctx context.Context, req *ethpb.GetPayloadAttestationDataRequest) (*ethpb.PayloadAttestationData, error) { + reqSlot := req.Slot + currentSlot := vs.TimeFetcher.CurrentSlot() + if reqSlot != currentSlot { + return nil, status.Errorf(codes.InvalidArgument, "Payload attestation request slot %d != current slot %d", reqSlot, currentSlot) + } + + highestSlot, root := vs.ForkchoiceFetcher.HighestReceivedBlockSlotRoot() + if reqSlot != highestSlot { + return nil, status.Errorf(codes.Unavailable, "Did not receive current slot %d block ", reqSlot) + } + + payloadStatus := vs.ForkchoiceFetcher.GetPTCVote(root) + + return ðpb.PayloadAttestationData{ + BeaconBlockRoot: root[:], + Slot: highestSlot, + PayloadStatus: payloadStatus, + }, nil +} + +// SubmitPayloadAttestation broadcasts a payload attestation message to the network and saves the payload attestation to the cache. +// This handler does not validate the payload attestation message before broadcasting and saving it to the cache. +// The caller should be responsible for validating the message, as it assumes a trusted relationship between the caller and the server. +func (vs *Server) SubmitPayloadAttestation(ctx context.Context, a *ethpb.PayloadAttestationMessage) (*empty.Empty, error) { + // Broadcast the payload attestation message to the network. + if err := vs.P2P.Broadcast(ctx, a); err != nil { + return nil, status.Errorf(codes.Internal, "Could not broadcast payload attestation message: %v", err) + } + + // Save the payload attestation to the cache. + if err := vs.PayloadAttestationReceiver.ReceivePayloadAttestationMessage(ctx, a); err != nil { + return nil, status.Errorf(codes.Internal, "Could not save payload attestation to cache: %v", err) + } + + return &empty.Empty{}, nil +} diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/ptc_attester_test.go b/beacon-chain/rpc/prysm/v1alpha1/validator/ptc_attester_test.go new file mode 100644 index 000000000000..97c87bae66f8 --- /dev/null +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/ptc_attester_test.go @@ -0,0 +1,107 @@ +package validator + +import ( + "context" + "testing" + "time" + + "github.com/pkg/errors" + mock "github.com/prysmaticlabs/prysm/v5/beacon-chain/blockchain/testing" + p2ptest "github.com/prysmaticlabs/prysm/v5/beacon-chain/p2p/testing" + + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" +) + +func TestServer_SubmitPayloadAttestation(t *testing.T) { + ctx := context.Background() + t.Run("Error", func(t *testing.T) { + s := &Server{ + P2P: p2ptest.NewTestP2P(t), + PayloadAttestationReceiver: &mock.ChainService{ReceivePayloadAttestationMessageErr: errors.New("error")}, + } + _, err := s.SubmitPayloadAttestation(ctx, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + Slot: 1, + }, + }) + require.ErrorContains(t, "error", err) + }) + + t.Run("Happy case", func(t *testing.T) { + s := &Server{ + P2P: p2ptest.NewTestP2P(t), + PayloadAttestationReceiver: &mock.ChainService{}, + } + _, err := s.SubmitPayloadAttestation(ctx, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + Slot: 1, + }, + }) + require.NoError(t, err) + }) +} + +func TestServer_GetPayloadAttestationData(t *testing.T) { + ctx := context.Background() + t.Run("Not current slot", func(t *testing.T) { + s := &Server{ + TimeFetcher: &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(params.BeaconConfig().SecondsPerSlot), 0)}, + } + _, err := s.GetPayloadAttestationData(ctx, ðpb.GetPayloadAttestationDataRequest{Slot: 2}) + require.ErrorContains(t, "Payload attestation request slot 2 != current slot 1", err) + }) + + t.Run("Last received block is not from current slot", func(t *testing.T) { + s := &Server{ + TimeFetcher: &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(2*params.BeaconConfig().SecondsPerSlot), 0)}, + ForkchoiceFetcher: &mock.ChainService{HighestReceivedSlot: 1}, + } + _, err := s.GetPayloadAttestationData(ctx, ðpb.GetPayloadAttestationDataRequest{Slot: 2}) + require.ErrorContains(t, "Did not receive current slot 2 block ", err) + }) + + t.Run("Payload is absent", func(t *testing.T) { + slot := primitives.Slot(2) + root := [32]byte{1} + s := &Server{ + TimeFetcher: &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(2*params.BeaconConfig().SecondsPerSlot), 0)}, + ForkchoiceFetcher: &mock.ChainService{HighestReceivedSlot: slot, HighestReceivedRoot: root, PayloadStatus: primitives.PAYLOAD_ABSENT}, + } + d, err := s.GetPayloadAttestationData(ctx, ðpb.GetPayloadAttestationDataRequest{Slot: slot}) + require.NoError(t, err) + require.DeepEqual(t, root[:], d.BeaconBlockRoot) + require.Equal(t, slot, d.Slot) + require.Equal(t, primitives.PAYLOAD_ABSENT, d.PayloadStatus) + }) + + t.Run("Payload is present", func(t *testing.T) { + slot := primitives.Slot(2) + root := [32]byte{1} + s := &Server{ + TimeFetcher: &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(2*params.BeaconConfig().SecondsPerSlot), 0)}, + ForkchoiceFetcher: &mock.ChainService{HighestReceivedSlot: slot, HighestReceivedRoot: root, PayloadStatus: primitives.PAYLOAD_PRESENT}, + } + d, err := s.GetPayloadAttestationData(ctx, ðpb.GetPayloadAttestationDataRequest{Slot: slot}) + require.NoError(t, err) + require.DeepEqual(t, root[:], d.BeaconBlockRoot) + require.Equal(t, slot, d.Slot) + require.Equal(t, primitives.PAYLOAD_PRESENT, d.PayloadStatus) + }) + + t.Run("Payload is withheld", func(t *testing.T) { + slot := primitives.Slot(2) + root := [32]byte{1} + s := &Server{ + TimeFetcher: &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(2*params.BeaconConfig().SecondsPerSlot), 0)}, + ForkchoiceFetcher: &mock.ChainService{HighestReceivedSlot: slot, HighestReceivedRoot: root, PayloadStatus: primitives.PAYLOAD_WITHHELD}, + } + d, err := s.GetPayloadAttestationData(ctx, ðpb.GetPayloadAttestationDataRequest{Slot: slot}) + require.NoError(t, err) + require.DeepEqual(t, root[:], d.BeaconBlockRoot) + require.Equal(t, slot, d.Slot) + require.Equal(t, primitives.PAYLOAD_WITHHELD, d.PayloadStatus) + }) +} diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/server.go b/beacon-chain/rpc/prysm/v1alpha1/validator/server.go index 34256c733a5c..a9f96be7c11c 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/server.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/server.go @@ -30,6 +30,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/config/params" "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" "github.com/prysmaticlabs/prysm/v5/network/forks" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/v5/runtime/version" "google.golang.org/grpc/codes" @@ -42,42 +43,48 @@ import ( // and committees in which particular validators need to perform their responsibilities, // and more. type Server struct { - Ctx context.Context - PayloadIDCache *cache.PayloadIDCache - TrackedValidatorsCache *cache.TrackedValidatorsCache - HeadFetcher blockchain.HeadFetcher - ForkFetcher blockchain.ForkFetcher - ForkchoiceFetcher blockchain.ForkchoiceFetcher - GenesisFetcher blockchain.GenesisFetcher - FinalizationFetcher blockchain.FinalizationFetcher - TimeFetcher blockchain.TimeFetcher - BlockFetcher execution.POWBlockFetcher - DepositFetcher cache.DepositFetcher - ChainStartFetcher execution.ChainStartFetcher - Eth1InfoFetcher execution.ChainInfoFetcher - OptimisticModeFetcher blockchain.OptimisticModeFetcher - SyncChecker sync.Checker - StateNotifier statefeed.Notifier - BlockNotifier blockfeed.Notifier - P2P p2p.Broadcaster - AttPool attestations.Pool - SlashingsPool slashings.PoolManager - ExitPool voluntaryexits.PoolManager - SyncCommitteePool synccommittee.Pool - BlockReceiver blockchain.BlockReceiver - BlobReceiver blockchain.BlobReceiver - MockEth1Votes bool - Eth1BlockFetcher execution.POWBlockFetcher - PendingDepositsFetcher depositsnapshot.PendingDepositsFetcher - OperationNotifier opfeed.Notifier - StateGen stategen.StateManager - ReplayerBuilder stategen.ReplayerBuilder - BeaconDB db.HeadAccessDatabase - ExecutionEngineCaller execution.EngineCaller - BlockBuilder builder.BlockBuilder - BLSChangesPool blstoexec.PoolManager - ClockWaiter startup.ClockWaiter - CoreService *core.Service + Ctx context.Context + PayloadIDCache *cache.PayloadIDCache + TrackedValidatorsCache *cache.TrackedValidatorsCache + HeadFetcher blockchain.HeadFetcher + ForkFetcher blockchain.ForkFetcher + ForkchoiceFetcher blockchain.ForkchoiceFetcher + GenesisFetcher blockchain.GenesisFetcher + FinalizationFetcher blockchain.FinalizationFetcher + TimeFetcher blockchain.TimeFetcher + BlockFetcher execution.POWBlockFetcher + DepositFetcher cache.DepositFetcher + PayloadAttestationCache cache.PayloadAttestationCache + ChainStartFetcher execution.ChainStartFetcher + Eth1InfoFetcher execution.ChainInfoFetcher + OptimisticModeFetcher blockchain.OptimisticModeFetcher + SyncChecker sync.Checker + StateNotifier statefeed.Notifier + BlockNotifier blockfeed.Notifier + P2P p2p.Broadcaster + AttPool attestations.Pool + SlashingsPool slashings.PoolManager + ExitPool voluntaryexits.PoolManager + SyncCommitteePool synccommittee.Pool + BlockReceiver blockchain.BlockReceiver + BlobReceiver blockchain.BlobReceiver + PayloadAttestationReceiver blockchain.PayloadAttestationReceiver + ExecutionPayloadReceiver blockchain.ExecutionPayloadReceiver + MockEth1Votes bool + Eth1BlockFetcher execution.POWBlockFetcher + PendingDepositsFetcher depositsnapshot.PendingDepositsFetcher + OperationNotifier opfeed.Notifier + StateGen stategen.StateManager + ReplayerBuilder stategen.ReplayerBuilder + BeaconDB db.HeadAccessDatabase + ExecutionEngineCaller execution.EngineCaller + BlockBuilder builder.BlockBuilder + BLSChangesPool blstoexec.PoolManager + ClockWaiter startup.ClockWaiter + CoreService *core.Service + signedExecutionPayloadHeader *enginev1.SignedExecutionPayloadHeader + payloadEnvelope *enginev1.ExecutionPayloadEnvelope + blobsBundle *enginev1.BlobsBundle } // WaitForActivation checks if a validator public key exists in the active validator registry of the current diff --git a/beacon-chain/rpc/service.go b/beacon-chain/rpc/service.go index 4a56c0d4162e..eb8019f4e99e 100644 --- a/beacon-chain/rpc/service.go +++ b/beacon-chain/rpc/service.go @@ -91,55 +91,57 @@ type Service struct { // Config options for the beacon node RPC server. type Config struct { - ExecutionReconstructor execution.Reconstructor - Host string - Port string - CertFlag string - KeyFlag string - BeaconMonitoringHost string - BeaconMonitoringPort int - BeaconDB db.HeadAccessDatabase - ChainInfoFetcher blockchain.ChainInfoFetcher - HeadFetcher blockchain.HeadFetcher - CanonicalFetcher blockchain.CanonicalFetcher - ForkFetcher blockchain.ForkFetcher - ForkchoiceFetcher blockchain.ForkchoiceFetcher - FinalizationFetcher blockchain.FinalizationFetcher - AttestationReceiver blockchain.AttestationReceiver - BlockReceiver blockchain.BlockReceiver - BlobReceiver blockchain.BlobReceiver - ExecutionChainService execution.Chain - ChainStartFetcher execution.ChainStartFetcher - ExecutionChainInfoFetcher execution.ChainInfoFetcher - GenesisTimeFetcher blockchain.TimeFetcher - GenesisFetcher blockchain.GenesisFetcher - MockEth1Votes bool - EnableDebugRPCEndpoints bool - AttestationsPool attestations.Pool - ExitPool voluntaryexits.PoolManager - SlashingsPool slashings.PoolManager - SyncCommitteeObjectPool synccommittee.Pool - BLSChangesPool blstoexec.PoolManager - SyncService chainSync.Checker - Broadcaster p2p.Broadcaster - PeersFetcher p2p.PeersProvider - PeerManager p2p.PeerManager - MetadataProvider p2p.MetadataProvider - DepositFetcher cache.DepositFetcher - PendingDepositFetcher depositsnapshot.PendingDepositsFetcher - StateNotifier statefeed.Notifier - BlockNotifier blockfeed.Notifier - OperationNotifier opfeed.Notifier - StateGen *stategen.State - MaxMsgSize int - ExecutionEngineCaller execution.EngineCaller - OptimisticModeFetcher blockchain.OptimisticModeFetcher - BlockBuilder builder.BlockBuilder - Router *http.ServeMux - ClockWaiter startup.ClockWaiter - BlobStorage *filesystem.BlobStorage - TrackedValidatorsCache *cache.TrackedValidatorsCache - PayloadIDCache *cache.PayloadIDCache + ExecutionReconstructor execution.Reconstructor + Host string + Port string + CertFlag string + KeyFlag string + BeaconMonitoringHost string + BeaconMonitoringPort int + BeaconDB db.HeadAccessDatabase + ChainInfoFetcher blockchain.ChainInfoFetcher + HeadFetcher blockchain.HeadFetcher + CanonicalFetcher blockchain.CanonicalFetcher + ForkFetcher blockchain.ForkFetcher + ForkchoiceFetcher blockchain.ForkchoiceFetcher + FinalizationFetcher blockchain.FinalizationFetcher + AttestationReceiver blockchain.AttestationReceiver + BlockReceiver blockchain.BlockReceiver + BlobReceiver blockchain.BlobReceiver + PayloadAttestationReceiver blockchain.PayloadAttestationReceiver + ExecutionPayloadReceiver blockchain.ExecutionPayloadReceiver + ExecutionChainService execution.Chain + ChainStartFetcher execution.ChainStartFetcher + ExecutionChainInfoFetcher execution.ChainInfoFetcher + GenesisTimeFetcher blockchain.TimeFetcher + GenesisFetcher blockchain.GenesisFetcher + MockEth1Votes bool + EnableDebugRPCEndpoints bool + AttestationsPool attestations.Pool + ExitPool voluntaryexits.PoolManager + SlashingsPool slashings.PoolManager + SyncCommitteeObjectPool synccommittee.Pool + BLSChangesPool blstoexec.PoolManager + SyncService chainSync.Checker + Broadcaster p2p.Broadcaster + PeersFetcher p2p.PeersProvider + PeerManager p2p.PeerManager + MetadataProvider p2p.MetadataProvider + DepositFetcher cache.DepositFetcher + PendingDepositFetcher depositsnapshot.PendingDepositsFetcher + StateNotifier statefeed.Notifier + BlockNotifier blockfeed.Notifier + OperationNotifier opfeed.Notifier + StateGen *stategen.State + MaxMsgSize int + ExecutionEngineCaller execution.EngineCaller + OptimisticModeFetcher blockchain.OptimisticModeFetcher + BlockBuilder builder.BlockBuilder + Router *http.ServeMux + ClockWaiter startup.ClockWaiter + BlobStorage *filesystem.BlobStorage + TrackedValidatorsCache *cache.TrackedValidatorsCache + PayloadIDCache *cache.PayloadIDCache } // NewService instantiates a new RPC service instance that will @@ -231,42 +233,44 @@ func NewService(ctx context.Context, cfg *Config) *Service { OptimisticModeFetcher: s.cfg.OptimisticModeFetcher, } validatorServer := &validatorv1alpha1.Server{ - Ctx: s.ctx, - AttPool: s.cfg.AttestationsPool, - ExitPool: s.cfg.ExitPool, - HeadFetcher: s.cfg.HeadFetcher, - ForkFetcher: s.cfg.ForkFetcher, - ForkchoiceFetcher: s.cfg.ForkchoiceFetcher, - GenesisFetcher: s.cfg.GenesisFetcher, - FinalizationFetcher: s.cfg.FinalizationFetcher, - TimeFetcher: s.cfg.GenesisTimeFetcher, - BlockFetcher: s.cfg.ExecutionChainService, - DepositFetcher: s.cfg.DepositFetcher, - ChainStartFetcher: s.cfg.ChainStartFetcher, - Eth1InfoFetcher: s.cfg.ExecutionChainService, - OptimisticModeFetcher: s.cfg.OptimisticModeFetcher, - SyncChecker: s.cfg.SyncService, - StateNotifier: s.cfg.StateNotifier, - BlockNotifier: s.cfg.BlockNotifier, - OperationNotifier: s.cfg.OperationNotifier, - P2P: s.cfg.Broadcaster, - BlockReceiver: s.cfg.BlockReceiver, - BlobReceiver: s.cfg.BlobReceiver, - MockEth1Votes: s.cfg.MockEth1Votes, - Eth1BlockFetcher: s.cfg.ExecutionChainService, - PendingDepositsFetcher: s.cfg.PendingDepositFetcher, - SlashingsPool: s.cfg.SlashingsPool, - StateGen: s.cfg.StateGen, - SyncCommitteePool: s.cfg.SyncCommitteeObjectPool, - ReplayerBuilder: ch, - ExecutionEngineCaller: s.cfg.ExecutionEngineCaller, - BeaconDB: s.cfg.BeaconDB, - BlockBuilder: s.cfg.BlockBuilder, - BLSChangesPool: s.cfg.BLSChangesPool, - ClockWaiter: s.cfg.ClockWaiter, - CoreService: coreService, - TrackedValidatorsCache: s.cfg.TrackedValidatorsCache, - PayloadIDCache: s.cfg.PayloadIDCache, + Ctx: s.ctx, + AttPool: s.cfg.AttestationsPool, + ExitPool: s.cfg.ExitPool, + HeadFetcher: s.cfg.HeadFetcher, + ForkFetcher: s.cfg.ForkFetcher, + ForkchoiceFetcher: s.cfg.ForkchoiceFetcher, + GenesisFetcher: s.cfg.GenesisFetcher, + FinalizationFetcher: s.cfg.FinalizationFetcher, + TimeFetcher: s.cfg.GenesisTimeFetcher, + BlockFetcher: s.cfg.ExecutionChainService, + DepositFetcher: s.cfg.DepositFetcher, + ChainStartFetcher: s.cfg.ChainStartFetcher, + Eth1InfoFetcher: s.cfg.ExecutionChainService, + OptimisticModeFetcher: s.cfg.OptimisticModeFetcher, + SyncChecker: s.cfg.SyncService, + StateNotifier: s.cfg.StateNotifier, + BlockNotifier: s.cfg.BlockNotifier, + OperationNotifier: s.cfg.OperationNotifier, + P2P: s.cfg.Broadcaster, + BlockReceiver: s.cfg.BlockReceiver, + BlobReceiver: s.cfg.BlobReceiver, + PayloadAttestationReceiver: s.cfg.PayloadAttestationReceiver, + ExecutionPayloadReceiver: s.cfg.ExecutionPayloadReceiver, + MockEth1Votes: s.cfg.MockEth1Votes, + Eth1BlockFetcher: s.cfg.ExecutionChainService, + PendingDepositsFetcher: s.cfg.PendingDepositFetcher, + SlashingsPool: s.cfg.SlashingsPool, + StateGen: s.cfg.StateGen, + SyncCommitteePool: s.cfg.SyncCommitteeObjectPool, + ReplayerBuilder: ch, + ExecutionEngineCaller: s.cfg.ExecutionEngineCaller, + BeaconDB: s.cfg.BeaconDB, + BlockBuilder: s.cfg.BlockBuilder, + BLSChangesPool: s.cfg.BLSChangesPool, + ClockWaiter: s.cfg.ClockWaiter, + CoreService: coreService, + TrackedValidatorsCache: s.cfg.TrackedValidatorsCache, + PayloadIDCache: s.cfg.PayloadIDCache, } s.validatorServer = validatorServer nodeServer := &nodev1alpha1.Server{ diff --git a/beacon-chain/state/BUILD.bazel b/beacon-chain/state/BUILD.bazel index 295cfa2110d5..24bad8e86794 100644 --- a/beacon-chain/state/BUILD.bazel +++ b/beacon-chain/state/BUILD.bazel @@ -5,6 +5,7 @@ go_library( srcs = [ "error.go", "interfaces.go", + "interfaces_epbs.go", "prometheus.go", ], importpath = "github.com/prysmaticlabs/prysm/v5/beacon-chain/state", diff --git a/beacon-chain/state/interfaces.go b/beacon-chain/state/interfaces.go index 7422c8d6de25..a33bcce70bd6 100644 --- a/beacon-chain/state/interfaces.go +++ b/beacon-chain/state/interfaces.go @@ -60,6 +60,7 @@ type ReadOnlyBeaconState interface { ReadOnlySyncCommittee ReadOnlyDeposits ReadOnlyConsolidations + ReadOnlyEpbsFields ToProtoUnsafe() interface{} ToProto() interface{} GenesisTime() uint64 @@ -94,6 +95,7 @@ type WriteOnlyBeaconState interface { WriteOnlyConsolidations WriteOnlyWithdrawals WriteOnlyDeposits + WriteOnlyEpbsFields SetGenesisTime(val uint64) error SetGenesisValidatorsRoot(val []byte) error SetSlot(val primitives.Slot) error diff --git a/beacon-chain/state/interfaces_epbs.go b/beacon-chain/state/interfaces_epbs.go new file mode 100644 index 000000000000..160ac4bc5c94 --- /dev/null +++ b/beacon-chain/state/interfaces_epbs.go @@ -0,0 +1,21 @@ +package state + +import ( + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" +) + +type ReadOnlyEpbsFields interface { + IsParentBlockFull() (bool, error) + LatestExecutionPayloadHeaderEPBS() (*enginev1.ExecutionPayloadHeaderEPBS, error) + LatestBlockHash() ([]byte, error) + LatestFullSlot() (primitives.Slot, error) + LastWithdrawalsRoot() ([]byte, error) +} + +type WriteOnlyEpbsFields interface { + SetLatestExecutionPayloadHeaderEPBS(val *enginev1.ExecutionPayloadHeaderEPBS) error + SetLatestBlockHash(val []byte) error + SetLatestFullSlot(val primitives.Slot) error + SetLastWithdrawalsRoot(val []byte) error +} diff --git a/beacon-chain/state/state-native/BUILD.bazel b/beacon-chain/state/state-native/BUILD.bazel index 6d14d26723d6..044ca2cdf3d1 100644 --- a/beacon-chain/state/state-native/BUILD.bazel +++ b/beacon-chain/state/state-native/BUILD.bazel @@ -12,11 +12,13 @@ go_library( "getters_consolidation.go", "getters_deposit_requests.go", "getters_deposits.go", + "getters_epbs.go", "getters_eth1.go", "getters_exit.go", "getters_misc.go", "getters_participation.go", "getters_payload_header.go", + "getters_payload_header_epbs.go", "getters_randao.go", "getters_state.go", "getters_sync_committee.go", @@ -33,6 +35,7 @@ go_library( "setters_consolidation.go", "setters_deposit_requests.go", "setters_deposits.go", + "setters_epbs.go", "setters_eth1.go", "setters_misc.go", "setters_participation.go", @@ -45,6 +48,7 @@ go_library( "spec_parameters.go", "ssz.go", "state_trie.go", + "state_trie_epbs.go", "types.go", ], importpath = "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native", @@ -97,6 +101,7 @@ go_test( "getters_deposits_test.go", "getters_exit_test.go", "getters_participation_test.go", + "getters_setters_epbs_test.go", "getters_test.go", "getters_validator_test.go", "getters_withdrawal_test.go", @@ -118,6 +123,7 @@ go_test( "setters_withdrawal_test.go", "state_fuzz_test.go", "state_test.go", + "state_trie_epbs_test.go", "state_trie_test.go", "types_test.go", ], @@ -149,6 +155,7 @@ go_test( "//testing/assert:go_default_library", "//testing/require:go_default_library", "//testing/util:go_default_library", + "//testing/util/random:go_default_library", "//time/slots:go_default_library", "@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", "@com_github_golang_snappy//:go_default_library", diff --git a/beacon-chain/state/state-native/beacon_state.go b/beacon-chain/state/state-native/beacon_state.go index 576a6e2e7d06..d102d6428861 100644 --- a/beacon-chain/state/state-native/beacon_state.go +++ b/beacon-chain/state/state-native/beacon_state.go @@ -57,6 +57,11 @@ type BeaconState struct { latestExecutionPayloadHeaderDeneb *enginev1.ExecutionPayloadHeaderDeneb nextWithdrawalIndex uint64 nextWithdrawalValidatorIndex primitives.ValidatorIndex + // ePBS fields + latestBlockHash [32]byte + latestFullSlot primitives.Slot + latestExecutionPayloadHeaderEPBS *enginev1.ExecutionPayloadHeaderEPBS + lastWithdrawalsRoot [32]byte // Electra fields depositRequestsStartIndex uint64 diff --git a/beacon-chain/state/state-native/getters_epbs.go b/beacon-chain/state/state-native/getters_epbs.go new file mode 100644 index 000000000000..56c92268a9cd --- /dev/null +++ b/beacon-chain/state/state-native/getters_epbs.go @@ -0,0 +1,80 @@ +package state_native + +import ( + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" +) + +// LatestExecutionPayloadHeaderEPBS retrieves a copy of the execution payload header from epbs state. +// It returns an error if the operation is not supported for the beacon state's version. +func (b *BeaconState) LatestExecutionPayloadHeaderEPBS() (*enginev1.ExecutionPayloadHeaderEPBS, error) { + if b.version < version.EPBS { + return nil, errNotSupported("LatestExecutionPayloadHeaderEPBS", b.version) + } + b.lock.RLock() + defer b.lock.RUnlock() + + return b.executionPayloadHeaderVal(), nil +} + +// IsParentBlockFull checks if the last committed payload header was fulfilled. +// Returns true if both the beacon block and payload were present. +// Call this function on a beacon state before processing the execution payload header. +// It returns an error if the operation is not supported for the beacon state's version. +func (b *BeaconState) IsParentBlockFull() (bool, error) { + if b.version < version.EPBS { + return false, errNotSupported("IsParentBlockFull", b.version) + } + + b.lock.RLock() + defer b.lock.RUnlock() + + if b.slot == primitives.Slot(params.BeaconConfig().EPBSForkEpoch)*params.BeaconConfig().SlotsPerEpoch { + return true, nil + } + + headerBlockHash := bytesutil.ToBytes32(b.latestExecutionPayloadHeaderEPBS.BlockHash) + return headerBlockHash == b.latestBlockHash, nil +} + +// LatestBlockHash returns the latest block hash. +// It returns an error if the operation is not supported for the beacon state's version. +func (b *BeaconState) LatestBlockHash() ([]byte, error) { + if b.version < version.EPBS { + return nil, errNotSupported("LatestBlockHash", b.version) + } + + b.lock.RLock() + defer b.lock.RUnlock() + + return b.latestBlockHash[:], nil +} + +// LatestFullSlot returns the slot of the latest full block. +// It returns an error if the operation is not supported for the beacon state's version. +func (b *BeaconState) LatestFullSlot() (primitives.Slot, error) { + if b.version < version.EPBS { + return 0, errNotSupported("LatestFullSlot", b.version) + } + + b.lock.RLock() + defer b.lock.RUnlock() + + return b.latestFullSlot, nil +} + +// LastWithdrawalsRoot returns the latest withdrawal root. +// It returns an error if the operation is not supported for the beacon state's version. +func (b *BeaconState) LastWithdrawalsRoot() ([]byte, error) { + if b.version < version.EPBS { + return nil, errNotSupported("LastWithdrawalsRoot", b.version) + } + + b.lock.RLock() + defer b.lock.RUnlock() + + return b.lastWithdrawalsRoot[:], nil +} diff --git a/beacon-chain/state/state-native/getters_payload_header_epbs.go b/beacon-chain/state/state-native/getters_payload_header_epbs.go new file mode 100644 index 000000000000..49903fb6a220 --- /dev/null +++ b/beacon-chain/state/state-native/getters_payload_header_epbs.go @@ -0,0 +1,10 @@ +package state_native + +import ( + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" +) + +func (b *BeaconState) executionPayloadHeaderVal() *enginev1.ExecutionPayloadHeaderEPBS { + return eth.CopyExecutionPayloadHeaderEPBS(b.latestExecutionPayloadHeaderEPBS) +} diff --git a/beacon-chain/state/state-native/getters_setters_epbs_test.go b/beacon-chain/state/state-native/getters_setters_epbs_test.go new file mode 100644 index 000000000000..3906f5f40e58 --- /dev/null +++ b/beacon-chain/state/state-native/getters_setters_epbs_test.go @@ -0,0 +1,90 @@ +package state_native + +import ( + "crypto/rand" + "testing" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native/types" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" +) + +func Test_LatestExecutionPayloadHeaderEPBS(t *testing.T) { + s := &BeaconState{version: version.EPBS} + _, err := s.LatestExecutionPayloadHeader() + require.ErrorContains(t, "unsupported version (epbs) for latest execution payload header", err) +} + +func Test_SetLatestExecutionPayloadHeader(t *testing.T) { + s := &BeaconState{version: version.EPBS} + require.ErrorContains(t, "SetLatestExecutionPayloadHeader is not supported for epbs", s.SetLatestExecutionPayloadHeader(nil)) +} + +func Test_SetLatestExecutionPayloadHeaderEPBS(t *testing.T) { + s := &BeaconState{version: version.EPBS, dirtyFields: make(map[types.FieldIndex]bool)} + header := random.ExecutionPayloadHeader(t) + require.NoError(t, s.SetLatestExecutionPayloadHeaderEPBS(header)) + require.Equal(t, true, s.dirtyFields[types.ExecutionPayloadHeader]) + + got, err := s.LatestExecutionPayloadHeaderEPBS() + require.NoError(t, err) + require.DeepEqual(t, got, header) +} + +func Test_SetLatestBlockHash(t *testing.T) { + s := &BeaconState{version: version.EPBS, dirtyFields: make(map[types.FieldIndex]bool)} + b := make([]byte, fieldparams.RootLength) + _, err := rand.Read(b) + require.NoError(t, err) + require.NoError(t, s.SetLatestBlockHash(b)) + require.Equal(t, true, s.dirtyFields[types.LatestBlockHash]) + + got, err := s.LatestBlockHash() + require.NoError(t, err) + require.DeepEqual(t, got, b) +} + +func Test_SetLatestFullSlot(t *testing.T) { + s := &BeaconState{version: version.EPBS, dirtyFields: make(map[types.FieldIndex]bool)} + require.NoError(t, s.SetLatestFullSlot(primitives.Slot(3))) + require.Equal(t, true, s.dirtyFields[types.LatestFullSlot]) + + got, err := s.LatestFullSlot() + require.NoError(t, err) + require.Equal(t, primitives.Slot(3), got) +} + +func Test_SetLastWithdrawalsRoot(t *testing.T) { + s := &BeaconState{version: version.EPBS, dirtyFields: make(map[types.FieldIndex]bool)} + b := make([]byte, fieldparams.RootLength) + _, err := rand.Read(b) + require.NoError(t, err) + require.NoError(t, s.SetLastWithdrawalsRoot(b)) + require.Equal(t, true, s.dirtyFields[types.LastWithdrawalsRoot]) + + got, err := s.LastWithdrawalsRoot() + require.NoError(t, err) + require.DeepEqual(t, got, b) +} + +func Test_UnsupportedStateVersionEpbs(t *testing.T) { + s := &BeaconState{version: version.Electra} + _, err := s.IsParentBlockFull() + require.ErrorContains(t, "IsParentBlockFull is not supported for electra", err) + _, err = s.LatestBlockHash() + require.ErrorContains(t, "LatestBlockHash is not supported for electra", err) + _, err = s.LatestFullSlot() + require.ErrorContains(t, "LatestFullSlot is not supported for electra", err) + _, err = s.LastWithdrawalsRoot() + require.ErrorContains(t, "LastWithdrawalsRoot is not supported for electra", err) + _, err = s.LatestExecutionPayloadHeaderEPBS() + require.ErrorContains(t, "LatestExecutionPayloadHeaderEPBS is not supported for electra", err) + + require.ErrorContains(t, "LastWithdrawalsRoot is not supported for electra", s.SetLastWithdrawalsRoot(nil)) + require.ErrorContains(t, "SetLatestBlockHash is not supported for electra", s.SetLatestBlockHash(nil)) + require.ErrorContains(t, "SetLatestFullSlot is not supported for electra", s.SetLatestFullSlot(0)) + require.ErrorContains(t, "SetLatestExecutionPayloadHeaderEPBS is not supported for electra", s.SetLatestExecutionPayloadHeaderEPBS(nil)) +} diff --git a/beacon-chain/state/state-native/getters_state.go b/beacon-chain/state/state-native/getters_state.go index 29519afc7cee..c8b3224c9b87 100644 --- a/beacon-chain/state/state-native/getters_state.go +++ b/beacon-chain/state/state-native/getters_state.go @@ -212,6 +212,49 @@ func (b *BeaconState) ToProtoUnsafe() interface{} { PendingPartialWithdrawals: b.pendingPartialWithdrawals, PendingConsolidations: b.pendingConsolidations, } + case version.EPBS: + return ðpb.BeaconStateEPBS{ + GenesisTime: b.genesisTime, + GenesisValidatorsRoot: gvrCopy[:], + Slot: b.slot, + Fork: b.fork, + LatestBlockHeader: b.latestBlockHeader, + BlockRoots: br, + StateRoots: sr, + HistoricalRoots: b.historicalRoots.Slice(), + Eth1Data: b.eth1Data, + Eth1DataVotes: b.eth1DataVotes, + Eth1DepositIndex: b.eth1DepositIndex, + Validators: vals, + Balances: bals, + RandaoMixes: rm, + Slashings: b.slashings, + PreviousEpochParticipation: b.previousEpochParticipation, + CurrentEpochParticipation: b.currentEpochParticipation, + JustificationBits: b.justificationBits, + PreviousJustifiedCheckpoint: b.previousJustifiedCheckpoint, + CurrentJustifiedCheckpoint: b.currentJustifiedCheckpoint, + FinalizedCheckpoint: b.finalizedCheckpoint, + InactivityScores: b.inactivityScoresVal(), + CurrentSyncCommittee: b.currentSyncCommittee, + NextSyncCommittee: b.nextSyncCommittee, + NextWithdrawalIndex: b.nextWithdrawalIndex, + NextWithdrawalValidatorIndex: b.nextWithdrawalValidatorIndex, + HistoricalSummaries: b.historicalSummaries, + DepositRequestsStartIndex: b.depositRequestsStartIndex, + DepositBalanceToConsume: b.depositBalanceToConsume, + ExitBalanceToConsume: b.exitBalanceToConsume, + EarliestExitEpoch: b.earliestExitEpoch, + ConsolidationBalanceToConsume: b.consolidationBalanceToConsume, + EarliestConsolidationEpoch: b.earliestConsolidationEpoch, + PendingDeposits: b.pendingDeposits, + PendingPartialWithdrawals: b.pendingPartialWithdrawals, + PendingConsolidations: b.pendingConsolidations, + LatestBlockHash: b.latestBlockHash[:], + LatestFullSlot: b.latestFullSlot, + LatestExecutionPayloadHeader: b.latestExecutionPayloadHeaderEPBS, + LastWithdrawalsRoot: b.lastWithdrawalsRoot[:], + } default: return nil } @@ -236,6 +279,9 @@ func (b *BeaconState) ToProto() interface{} { inactivityScores = b.inactivityScoresVal() } + LatestBlockHashCopy := b.latestBlockHash + lastWithdrawalsRootCopy := b.lastWithdrawalsRoot + switch b.version { case version.Phase0: return ðpb.BeaconState{ @@ -418,6 +464,49 @@ func (b *BeaconState) ToProto() interface{} { PendingPartialWithdrawals: b.pendingPartialWithdrawalsVal(), PendingConsolidations: b.pendingConsolidationsVal(), } + case version.EPBS: + return ðpb.BeaconStateEPBS{ + GenesisTime: b.genesisTime, + GenesisValidatorsRoot: gvrCopy[:], + Slot: b.slot, + Fork: b.forkVal(), + LatestBlockHeader: b.latestBlockHeaderVal(), + BlockRoots: br, + StateRoots: sr, + HistoricalRoots: b.historicalRoots.Slice(), + Eth1Data: b.eth1DataVal(), + Eth1DataVotes: b.eth1DataVotesVal(), + Eth1DepositIndex: b.eth1DepositIndex, + Validators: b.validatorsVal(), + Balances: b.balancesVal(), + RandaoMixes: rm, + Slashings: b.slashingsVal(), + PreviousEpochParticipation: b.previousEpochParticipationVal(), + CurrentEpochParticipation: b.currentEpochParticipationVal(), + JustificationBits: b.justificationBitsVal(), + PreviousJustifiedCheckpoint: b.previousJustifiedCheckpointVal(), + CurrentJustifiedCheckpoint: b.currentJustifiedCheckpointVal(), + FinalizedCheckpoint: b.finalizedCheckpointVal(), + InactivityScores: b.inactivityScoresVal(), + CurrentSyncCommittee: b.currentSyncCommitteeVal(), + NextSyncCommittee: b.nextSyncCommitteeVal(), + NextWithdrawalIndex: b.nextWithdrawalIndex, + NextWithdrawalValidatorIndex: b.nextWithdrawalValidatorIndex, + HistoricalSummaries: b.historicalSummariesVal(), + DepositRequestsStartIndex: b.depositRequestsStartIndex, + DepositBalanceToConsume: b.depositBalanceToConsume, + ExitBalanceToConsume: b.exitBalanceToConsume, + EarliestExitEpoch: b.earliestExitEpoch, + ConsolidationBalanceToConsume: b.consolidationBalanceToConsume, + EarliestConsolidationEpoch: b.earliestConsolidationEpoch, + PendingDeposits: b.pendingDepositsVal(), + PendingPartialWithdrawals: b.pendingPartialWithdrawalsVal(), + PendingConsolidations: b.pendingConsolidationsVal(), + LatestBlockHash: LatestBlockHashCopy[:], + LatestFullSlot: b.latestFullSlot, + LatestExecutionPayloadHeader: b.executionPayloadHeaderVal(), + LastWithdrawalsRoot: lastWithdrawalsRootCopy[:], + } default: return nil } diff --git a/beacon-chain/state/state-native/hasher.go b/beacon-chain/state/state-native/hasher.go index 96303cde4fef..2146d2a1b7e4 100644 --- a/beacon-chain/state/state-native/hasher.go +++ b/beacon-chain/state/state-native/hasher.go @@ -41,6 +41,8 @@ func ComputeFieldRootsWithHasher(ctx context.Context, state *BeaconState) ([][]b fieldRoots = make([][]byte, params.BeaconConfig().BeaconStateDenebFieldCount) case version.Electra: fieldRoots = make([][]byte, params.BeaconConfig().BeaconStateElectraFieldCount) + case version.EPBS: + fieldRoots = make([][]byte, params.BeaconConfig().BeaconStateEpbsFieldCount) default: return nil, fmt.Errorf("unknown state version %s", version.String(state.version)) } @@ -243,7 +245,7 @@ func ComputeFieldRootsWithHasher(ctx context.Context, state *BeaconState) ([][]b fieldRoots[types.LatestExecutionPayloadHeaderCapella.RealPosition()] = executionPayloadRoot[:] } - if state.version >= version.Deneb { + if state.version == version.Deneb { // Execution payload root. executionPayloadRoot, err := state.latestExecutionPayloadHeaderDeneb.HashTreeRoot() if err != nil { @@ -252,6 +254,23 @@ func ComputeFieldRootsWithHasher(ctx context.Context, state *BeaconState) ([][]b fieldRoots[types.LatestExecutionPayloadHeaderDeneb.RealPosition()] = executionPayloadRoot[:] } + if state.version == version.Electra { + executionPayloadRoot, err := state.latestExecutionPayloadHeaderDeneb.HashTreeRoot() + if err != nil { + return nil, err + } + fieldRoots[types.LatestExecutionPayloadHeaderDeneb.RealPosition()] = executionPayloadRoot[:] + } + + if state.version == version.EPBS { + // Execution payload header root. + executionPayloadRoot, err := state.latestExecutionPayloadHeaderEPBS.HashTreeRoot() + if err != nil { + return nil, err + } + fieldRoots[types.ExecutionPayloadHeader.RealPosition()] = executionPayloadRoot[:] + } + if state.version >= version.Capella { // Next withdrawal index root. nextWithdrawalIndexRoot := make([]byte, 32) @@ -318,5 +337,19 @@ func ComputeFieldRootsWithHasher(ctx context.Context, state *BeaconState) ([][]b fieldRoots[types.PendingConsolidations.RealPosition()] = pcRoot[:] } + if state.version >= version.EPBS { + // Latest block hash root. + latestBlockHashRoot := state.latestBlockHash[:] + fieldRoots[types.LatestBlockHash.RealPosition()] = latestBlockHashRoot + + // Latest full slot root. + latestFullSlotRoot := ssz.Uint64Root(uint64(state.latestFullSlot)) + fieldRoots[types.LatestFullSlot.RealPosition()] = latestFullSlotRoot[:] + + // Last withdrawals root. + lastWithdrawalsRoot := state.lastWithdrawalsRoot[:] + fieldRoots[types.LastWithdrawalsRoot.RealPosition()] = lastWithdrawalsRoot + } + return fieldRoots, nil } diff --git a/beacon-chain/state/state-native/setters_epbs.go b/beacon-chain/state/state-native/setters_epbs.go new file mode 100644 index 000000000000..423076163893 --- /dev/null +++ b/beacon-chain/state/state-native/setters_epbs.go @@ -0,0 +1,69 @@ +package state_native + +import ( + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native/types" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" +) + +// SetLatestExecutionPayloadHeaderEPBS sets the latest execution payload header for the epbs beacon state. +func (b *BeaconState) SetLatestExecutionPayloadHeaderEPBS(h *enginev1.ExecutionPayloadHeaderEPBS) error { + if b.version < version.EPBS { + return errNotSupported("SetLatestExecutionPayloadHeaderEPBS", b.version) + } + + b.lock.Lock() + defer b.lock.Unlock() + + b.latestExecutionPayloadHeaderEPBS = h + b.markFieldAsDirty(types.ExecutionPayloadHeader) + + return nil +} + +// SetLatestBlockHash sets the latest block hash for the beacon state. +func (b *BeaconState) SetLatestBlockHash(h []byte) error { + if b.version < version.EPBS { + return errNotSupported("SetLatestBlockHash", b.version) + } + + b.lock.Lock() + defer b.lock.Unlock() + + b.latestBlockHash = bytesutil.ToBytes32(h) + b.markFieldAsDirty(types.LatestBlockHash) + + return nil +} + +// SetLatestFullSlot sets the latest full slot for the beacon state. +func (b *BeaconState) SetLatestFullSlot(s primitives.Slot) error { + if b.version < version.EPBS { + return errNotSupported("SetLatestFullSlot", b.version) + } + + b.lock.Lock() + defer b.lock.Unlock() + + b.latestFullSlot = s + b.markFieldAsDirty(types.LatestFullSlot) + + return nil +} + +// SetLastWithdrawalsRoot sets the latest withdrawals root for the beacon state. +func (b *BeaconState) SetLastWithdrawalsRoot(r []byte) error { + if b.version < version.EPBS { + return errNotSupported("SetLastWithdrawalsRoot", b.version) + } + + b.lock.Lock() + defer b.lock.Unlock() + + b.lastWithdrawalsRoot = bytesutil.ToBytes32(r) + b.markFieldAsDirty(types.LastWithdrawalsRoot) + + return nil +} diff --git a/beacon-chain/state/state-native/setters_payload_header.go b/beacon-chain/state/state-native/setters_payload_header.go index 5011cb674867..da1454d41e8a 100644 --- a/beacon-chain/state/state-native/setters_payload_header.go +++ b/beacon-chain/state/state-native/setters_payload_header.go @@ -17,7 +17,7 @@ func (b *BeaconState) SetLatestExecutionPayloadHeader(val interfaces.ExecutionDa b.lock.Lock() defer b.lock.Unlock() - if b.version < version.Bellatrix { + if b.version < version.Bellatrix || b.version >= version.EPBS { return errNotSupported("SetLatestExecutionPayloadHeader", b.version) } diff --git a/beacon-chain/state/state-native/spec_parameters.go b/beacon-chain/state/state-native/spec_parameters.go index 1612a71efbdf..d3436eac0267 100644 --- a/beacon-chain/state/state-native/spec_parameters.go +++ b/beacon-chain/state/state-native/spec_parameters.go @@ -7,7 +7,7 @@ import ( func (b *BeaconState) ProportionalSlashingMultiplier() (uint64, error) { switch b.version { - case version.Bellatrix, version.Capella, version.Deneb, version.Electra: + case version.Bellatrix, version.Capella, version.Deneb, version.Electra, version.EPBS: return params.BeaconConfig().ProportionalSlashingMultiplierBellatrix, nil case version.Altair: return params.BeaconConfig().ProportionalSlashingMultiplierAltair, nil @@ -19,7 +19,7 @@ func (b *BeaconState) ProportionalSlashingMultiplier() (uint64, error) { func (b *BeaconState) InactivityPenaltyQuotient() (uint64, error) { switch b.version { - case version.Bellatrix, version.Capella, version.Deneb, version.Electra: + case version.Bellatrix, version.Capella, version.Deneb, version.Electra, version.EPBS: return params.BeaconConfig().InactivityPenaltyQuotientBellatrix, nil case version.Altair: return params.BeaconConfig().InactivityPenaltyQuotientAltair, nil diff --git a/beacon-chain/state/state-native/state_trie.go b/beacon-chain/state/state-native/state_trie.go index a5270f533424..9de1aa5c259b 100644 --- a/beacon-chain/state/state-native/state_trie.go +++ b/beacon-chain/state/state-native/state_trie.go @@ -111,6 +111,27 @@ var electraFields = append( types.PendingConsolidations, ) +var epbsFields = append( + altairFields, + types.NextWithdrawalIndex, + types.NextWithdrawalValidatorIndex, + types.HistoricalSummaries, + types.ExecutionPayloadHeader, // new in ePBS + types.DepositRequestsStartIndex, // electra fields start here + types.DepositBalanceToConsume, + types.ExitBalanceToConsume, + types.EarliestExitEpoch, + types.ConsolidationBalanceToConsume, + types.EarliestConsolidationEpoch, + types.PendingDeposits, + types.PendingPartialWithdrawals, + types.PendingConsolidations, + types.LatestBlockHash, // ePBS fields start here + types.LatestFullSlot, + types.ExecutionPayloadHeader, + types.LastWithdrawalsRoot, +) + const ( phase0SharedFieldRefCount = 10 altairSharedFieldRefCount = 11 @@ -118,12 +139,14 @@ const ( capellaSharedFieldRefCount = 13 denebSharedFieldRefCount = 13 electraSharedFieldRefCount = 16 + epbsSharedFieldRefCount = 16 experimentalStatePhase0SharedFieldRefCount = 5 experimentalStateAltairSharedFieldRefCount = 5 experimentalStateBellatrixSharedFieldRefCount = 6 experimentalStateCapellaSharedFieldRefCount = 7 experimentalStateDenebSharedFieldRefCount = 7 experimentalStateElectraSharedFieldRefCount = 10 + experimentalStateEpbsSharedFieldRefCount = 10 ) // InitializeFromProtoPhase0 the beacon state from a protobuf representation. @@ -155,6 +178,11 @@ func InitializeFromProtoElectra(st *ethpb.BeaconStateElectra) (state.BeaconState return InitializeFromProtoUnsafeElectra(proto.Clone(st).(*ethpb.BeaconStateElectra)) } +// InitializeFromProtoEpbs initializes the beacon state from its protobuf representation. +func InitializeFromProtoEpbs(st *ethpb.BeaconStateEPBS) (state.BeaconState, error) { + return InitializeFromProtoUnsafeEpbs(proto.Clone(st).(*ethpb.BeaconStateEPBS)) +} + // InitializeFromProtoUnsafePhase0 directly uses the beacon state protobuf fields // and sets them as fields of the BeaconState type. func InitializeFromProtoUnsafePhase0(st *ethpb.BeaconState) (state.BeaconState, error) { @@ -851,6 +879,8 @@ func (b *BeaconState) Copy() state.BeaconState { fieldCount = params.BeaconConfig().BeaconStateDenebFieldCount case version.Electra: fieldCount = params.BeaconConfig().BeaconStateElectraFieldCount + case version.EPBS: + fieldCount = params.BeaconConfig().BeaconStateEpbsFieldCount } dst := &BeaconState{ @@ -868,6 +898,9 @@ func (b *BeaconState) Copy() state.BeaconState { earliestExitEpoch: b.earliestExitEpoch, consolidationBalanceToConsume: b.consolidationBalanceToConsume, earliestConsolidationEpoch: b.earliestConsolidationEpoch, + latestBlockHash: b.latestBlockHash, + latestFullSlot: b.latestFullSlot, + lastWithdrawalsRoot: b.lastWithdrawalsRoot, // Large arrays, infrequently changed, constant size. blockRoots: b.blockRoots, @@ -910,6 +943,7 @@ func (b *BeaconState) Copy() state.BeaconState { latestExecutionPayloadHeader: b.latestExecutionPayloadHeader.Copy(), latestExecutionPayloadHeaderCapella: b.latestExecutionPayloadHeaderCapella.Copy(), latestExecutionPayloadHeaderDeneb: b.latestExecutionPayloadHeaderDeneb.Copy(), + latestExecutionPayloadHeaderEPBS: b.executionPayloadHeaderVal(), id: types.Enumerator.Inc(), @@ -947,6 +981,8 @@ func (b *BeaconState) Copy() state.BeaconState { dst.sharedFieldReferences = make(map[types.FieldIndex]*stateutil.Reference, experimentalStateDenebSharedFieldRefCount) case version.Electra: dst.sharedFieldReferences = make(map[types.FieldIndex]*stateutil.Reference, experimentalStateElectraSharedFieldRefCount) + case version.EPBS: + dst.sharedFieldReferences = make(map[types.FieldIndex]*stateutil.Reference, experimentalStateEpbsSharedFieldRefCount) } } else { switch b.version { @@ -962,6 +998,8 @@ func (b *BeaconState) Copy() state.BeaconState { dst.sharedFieldReferences = make(map[types.FieldIndex]*stateutil.Reference, denebSharedFieldRefCount) case version.Electra: dst.sharedFieldReferences = make(map[types.FieldIndex]*stateutil.Reference, electraSharedFieldRefCount) + case version.EPBS: + dst.sharedFieldReferences = make(map[types.FieldIndex]*stateutil.Reference, epbsSharedFieldRefCount) } } @@ -1056,6 +1094,8 @@ func (b *BeaconState) initializeMerkleLayers(ctx context.Context) error { b.dirtyFields = make(map[types.FieldIndex]bool, params.BeaconConfig().BeaconStateDenebFieldCount) case version.Electra: b.dirtyFields = make(map[types.FieldIndex]bool, params.BeaconConfig().BeaconStateElectraFieldCount) + case version.EPBS: + b.dirtyFields = make(map[types.FieldIndex]bool, params.BeaconConfig().BeaconStateEpbsFieldCount) default: return fmt.Errorf("unknown state version (%s) when computing dirty fields in merklization", version.String(b.version)) } @@ -1300,6 +1340,14 @@ func (b *BeaconState) rootSelector(ctx context.Context, field types.FieldIndex) return stateutil.PendingPartialWithdrawalsRoot(b.pendingPartialWithdrawals) case types.PendingConsolidations: return stateutil.PendingConsolidationsRoot(b.pendingConsolidations) + case types.LatestBlockHash: + return b.latestBlockHash, nil + case types.LatestFullSlot: + return ssz.Uint64Root(uint64(b.latestFullSlot)), nil + case types.ExecutionPayloadHeader: + return b.latestExecutionPayloadHeaderEPBS.HashTreeRoot() + case types.LastWithdrawalsRoot: + return b.lastWithdrawalsRoot, nil } return [32]byte{}, errors.New("invalid field index provided") } diff --git a/beacon-chain/state/state-native/state_trie_epbs.go b/beacon-chain/state/state-native/state_trie_epbs.go new file mode 100644 index 000000000000..53297e9363cf --- /dev/null +++ b/beacon-chain/state/state-native/state_trie_epbs.go @@ -0,0 +1,147 @@ +package state_native + +import ( + "runtime" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/fieldtrie" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native/types" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/stateutil" + "github.com/prysmaticlabs/prysm/v5/config/features" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" +) + +// InitializeFromProtoUnsafeEpbs constructs a BeaconState from its protobuf representation. +func InitializeFromProtoUnsafeEpbs(st *ethpb.BeaconStateEPBS) (*BeaconState, error) { + if st == nil { + return nil, errors.New("received nil state") + } + + // Process historical roots. + hRoots := make([][32]byte, len(st.HistoricalRoots)) + for i, root := range st.HistoricalRoots { + hRoots[i] = bytesutil.ToBytes32(root) + } + + // Define the number of fields to track changes. + fieldCount := params.BeaconConfig().BeaconStateEpbsFieldCount + b := &BeaconState{ + version: version.EPBS, + genesisTime: st.GenesisTime, + genesisValidatorsRoot: bytesutil.ToBytes32(st.GenesisValidatorsRoot), + slot: st.Slot, + fork: st.Fork, + latestBlockHeader: st.LatestBlockHeader, + historicalRoots: hRoots, + eth1Data: st.Eth1Data, + eth1DataVotes: st.Eth1DataVotes, + eth1DepositIndex: st.Eth1DepositIndex, + slashings: st.Slashings, + previousEpochParticipation: st.PreviousEpochParticipation, + currentEpochParticipation: st.CurrentEpochParticipation, + justificationBits: st.JustificationBits, + previousJustifiedCheckpoint: st.PreviousJustifiedCheckpoint, + currentJustifiedCheckpoint: st.CurrentJustifiedCheckpoint, + finalizedCheckpoint: st.FinalizedCheckpoint, + currentSyncCommittee: st.CurrentSyncCommittee, + nextSyncCommittee: st.NextSyncCommittee, + nextWithdrawalIndex: st.NextWithdrawalIndex, + nextWithdrawalValidatorIndex: st.NextWithdrawalValidatorIndex, + historicalSummaries: st.HistoricalSummaries, + depositRequestsStartIndex: st.DepositRequestsStartIndex, + depositBalanceToConsume: st.DepositBalanceToConsume, + exitBalanceToConsume: st.ExitBalanceToConsume, + earliestExitEpoch: st.EarliestExitEpoch, + consolidationBalanceToConsume: st.ConsolidationBalanceToConsume, + earliestConsolidationEpoch: st.EarliestConsolidationEpoch, + pendingDeposits: st.PendingDeposits, + pendingPartialWithdrawals: st.PendingPartialWithdrawals, + pendingConsolidations: st.PendingConsolidations, + + // ePBS fields + latestBlockHash: bytesutil.ToBytes32(st.LatestBlockHash), + latestFullSlot: st.LatestFullSlot, + latestExecutionPayloadHeaderEPBS: st.LatestExecutionPayloadHeader, + lastWithdrawalsRoot: bytesutil.ToBytes32(st.LastWithdrawalsRoot), + + dirtyFields: make(map[types.FieldIndex]bool, fieldCount), + dirtyIndices: make(map[types.FieldIndex][]uint64, fieldCount), + stateFieldLeaves: make(map[types.FieldIndex]*fieldtrie.FieldTrie, fieldCount), + rebuildTrie: make(map[types.FieldIndex]bool, fieldCount), + valMapHandler: stateutil.NewValMapHandler(st.Validators), + } + + if features.Get().EnableExperimentalState { + b.blockRootsMultiValue = NewMultiValueBlockRoots(st.BlockRoots) + b.stateRootsMultiValue = NewMultiValueStateRoots(st.StateRoots) + b.randaoMixesMultiValue = NewMultiValueRandaoMixes(st.RandaoMixes) + b.balancesMultiValue = NewMultiValueBalances(st.Balances) + b.validatorsMultiValue = NewMultiValueValidators(st.Validators) + b.inactivityScoresMultiValue = NewMultiValueInactivityScores(st.InactivityScores) + b.sharedFieldReferences = make(map[types.FieldIndex]*stateutil.Reference, experimentalStateEpbsSharedFieldRefCount) + } else { + bRoots := make([][32]byte, fieldparams.BlockRootsLength) + for i, r := range st.BlockRoots { + bRoots[i] = bytesutil.ToBytes32(r) + } + b.blockRoots = bRoots + + sRoots := make([][32]byte, fieldparams.StateRootsLength) + for i, r := range st.StateRoots { + sRoots[i] = bytesutil.ToBytes32(r) + } + b.stateRoots = sRoots + + mixes := make([][32]byte, fieldparams.RandaoMixesLength) + for i, m := range st.RandaoMixes { + mixes[i] = bytesutil.ToBytes32(m) + } + b.randaoMixes = mixes + + b.balances = st.Balances + b.validators = st.Validators + b.inactivityScores = st.InactivityScores + + b.sharedFieldReferences = make(map[types.FieldIndex]*stateutil.Reference, epbsSharedFieldRefCount) + } + + for _, f := range epbsFields { + b.dirtyFields[f] = true + b.rebuildTrie[f] = true + b.dirtyIndices[f] = []uint64{} + trie, err := fieldtrie.NewFieldTrie(f, types.BasicArray, nil, 0) + if err != nil { + return nil, err + } + b.stateFieldLeaves[f] = trie + } + + // Initialize field reference tracking for shared data. + b.sharedFieldReferences[types.HistoricalRoots] = stateutil.NewRef(1) + b.sharedFieldReferences[types.Eth1DataVotes] = stateutil.NewRef(1) + b.sharedFieldReferences[types.Slashings] = stateutil.NewRef(1) + b.sharedFieldReferences[types.PreviousEpochParticipationBits] = stateutil.NewRef(1) + b.sharedFieldReferences[types.CurrentEpochParticipationBits] = stateutil.NewRef(1) + b.sharedFieldReferences[types.HistoricalSummaries] = stateutil.NewRef(1) + b.sharedFieldReferences[types.PendingDeposits] = stateutil.NewRef(1) + b.sharedFieldReferences[types.PendingPartialWithdrawals] = stateutil.NewRef(1) + b.sharedFieldReferences[types.PendingConsolidations] = stateutil.NewRef(1) + if !features.Get().EnableExperimentalState { + b.sharedFieldReferences[types.BlockRoots] = stateutil.NewRef(1) + b.sharedFieldReferences[types.StateRoots] = stateutil.NewRef(1) + b.sharedFieldReferences[types.RandaoMixes] = stateutil.NewRef(1) + b.sharedFieldReferences[types.Balances] = stateutil.NewRef(1) + b.sharedFieldReferences[types.Validators] = stateutil.NewRef(1) + b.sharedFieldReferences[types.InactivityScores] = stateutil.NewRef(1) + } + + state.Count.Inc() + // Finalizer runs when dst is being destroyed in garbage collection. + runtime.SetFinalizer(b, finalizerCleanup) + return b, nil +} diff --git a/beacon-chain/state/state-native/state_trie_epbs_test.go b/beacon-chain/state/state-native/state_trie_epbs_test.go new file mode 100644 index 000000000000..71b1635eb420 --- /dev/null +++ b/beacon-chain/state/state-native/state_trie_epbs_test.go @@ -0,0 +1,70 @@ +package state_native + +import ( + "context" + "testing" + + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" +) + +func Test_InitializeFromProtoEpbs(t *testing.T) { + st := random.BeaconState(t) + + // Cache initial values to check against after initialization. + latestBlockHash := st.LatestBlockHash + latestFullSlot := st.LatestFullSlot + header := st.LatestExecutionPayloadHeader + lastWithdrawalsRoot := st.LastWithdrawalsRoot + + s, err := InitializeFromProtoEpbs(st) + require.NoError(t, err) + + // Assert that initial values match those in the new state. + gotLatestBlockHash, err := s.LatestBlockHash() + require.NoError(t, err) + require.DeepEqual(t, latestBlockHash, gotLatestBlockHash) + gotLatestFullSlot, err := s.LatestFullSlot() + require.NoError(t, err) + require.Equal(t, latestFullSlot, gotLatestFullSlot) + gotHeader, err := s.LatestExecutionPayloadHeaderEPBS() + require.NoError(t, err) + require.DeepEqual(t, header, gotHeader) + gotLastWithdrawalsRoot, err := s.LastWithdrawalsRoot() + require.NoError(t, err) + require.DeepEqual(t, lastWithdrawalsRoot, gotLastWithdrawalsRoot) +} + +func Test_CopyEpbs(t *testing.T) { + st := random.BeaconState(t) + s, err := InitializeFromProtoUnsafeEpbs(st) + require.NoError(t, err) + + // Test shallow copy. + sNoCopy := s + require.DeepEqual(t, s.latestExecutionPayloadHeaderEPBS, sNoCopy.latestExecutionPayloadHeaderEPBS) + + // Modify a field to check if it reflects in the shallow copy. + s.latestExecutionPayloadHeaderEPBS.Slot = 100 + require.Equal(t, s.latestExecutionPayloadHeaderEPBS, sNoCopy.latestExecutionPayloadHeaderEPBS) + + // Copy the state + sCopy := s.Copy() + require.NoError(t, err) + header, err := sCopy.LatestExecutionPayloadHeaderEPBS() + require.NoError(t, err) + require.DeepEqual(t, s.latestExecutionPayloadHeaderEPBS, header) + + // Modify the original to check if the copied state is independent. + s.latestExecutionPayloadHeaderEPBS.Slot = 200 + require.DeepNotEqual(t, s.latestExecutionPayloadHeaderEPBS, header) +} + +func Test_HashTreeRootEpbs(t *testing.T) { + st := random.BeaconState(t) + s, err := InitializeFromProtoUnsafeEpbs(st) + require.NoError(t, err) + + _, err = s.HashTreeRoot(context.Background()) + require.NoError(t, err) +} diff --git a/beacon-chain/state/state-native/types/types.go b/beacon-chain/state/state-native/types/types.go index 1a93c58cb2e6..782bd56280a4 100644 --- a/beacon-chain/state/state-native/types/types.go +++ b/beacon-chain/state/state-native/types/types.go @@ -112,6 +112,14 @@ func (f FieldIndex) String() string { return "pendingPartialWithdrawals" case PendingConsolidations: return "pendingConsolidations" + case LatestBlockHash: // ePBS fields start here + return "LatestBlockHash" + case LatestFullSlot: + return "LatestFullSlot" + case ExecutionPayloadHeader: + return "ExecutionPayloadHeader" + case LastWithdrawalsRoot: + return "LastWithdrawalsRoot" default: return fmt.Sprintf("unknown field index number: %d", f) } @@ -169,7 +177,7 @@ func (f FieldIndex) RealPosition() int { return 22 case NextSyncCommittee: return 23 - case LatestExecutionPayloadHeader, LatestExecutionPayloadHeaderCapella, LatestExecutionPayloadHeaderDeneb: + case LatestExecutionPayloadHeader, LatestExecutionPayloadHeaderCapella, LatestExecutionPayloadHeaderDeneb, ExecutionPayloadHeader: return 24 case NextWithdrawalIndex: return 25 @@ -195,6 +203,12 @@ func (f FieldIndex) RealPosition() int { return 35 case PendingConsolidations: return 36 + case LatestBlockHash: // ePBS fields start here + return 41 + case LatestFullSlot: + return 42 + case LastWithdrawalsRoot: + return 43 default: return -1 } @@ -247,6 +261,7 @@ const ( LatestExecutionPayloadHeader LatestExecutionPayloadHeaderCapella LatestExecutionPayloadHeaderDeneb + ExecutionPayloadHeader NextWithdrawalIndex NextWithdrawalValidatorIndex HistoricalSummaries @@ -259,6 +274,9 @@ const ( PendingDeposits // Electra: EIP-7251 PendingPartialWithdrawals // Electra: EIP-7251 PendingConsolidations // Electra: EIP-7251 + LatestBlockHash // ePBS fields start here + LatestFullSlot + LastWithdrawalsRoot ) // Enumerator keeps track of the number of states created since the node's start. diff --git a/beacon-chain/state/stategen/getter.go b/beacon-chain/state/stategen/getter.go index c1033a5a7c0d..83068643d5f4 100644 --- a/beacon-chain/state/stategen/getter.go +++ b/beacon-chain/state/stategen/getter.go @@ -177,7 +177,24 @@ func (s *State) recoverStateSummary(ctx context.Context, blockRoot [32]byte) (*e } return summary, nil } - return nil, errors.New("could not find block in DB") + // check if we have a payload hash in db + if !s.beaconDB.HasBlindPayloadEnvelope(ctx, blockRoot) { + return nil, errors.New("could not find block nor payload in DB") + } + e, err := s.beaconDB.SignedBlindPayloadEnvelope(ctx, blockRoot[:]) + if err != nil { + return nil, err + } + // get the state summary from the beacon block + blockSummary, err := s.stateSummary(ctx, [32]byte(e.Message.BeaconBlockRoot)) + if err != nil { + return nil, err + } + summary := ðpb.StateSummary{Slot: blockSummary.Slot, Root: blockRoot[:]} + if err := s.beaconDB.SaveStateSummary(ctx, summary); err != nil { + return nil, err + } + return summary, nil } // DeleteStateFromCaches deletes the state from the caches. @@ -215,6 +232,7 @@ func (s *State) loadStateByRoot(ctx context.Context, blockRoot [32]byte) (state. if err != nil { return nil, errors.Wrap(err, "could not get state summary") } + //TODO: Fix the replayer to use the payload envelopes targetSlot := summary.Slot // Since the requested state is not in caches or DB, start replaying using the last diff --git a/beacon-chain/sync/BUILD.bazel b/beacon-chain/sync/BUILD.bazel index 1d83ac98ad6f..848518a6c099 100644 --- a/beacon-chain/sync/BUILD.bazel +++ b/beacon-chain/sync/BUILD.bazel @@ -11,11 +11,14 @@ go_library( "decode_pubsub.go", "doc.go", "error.go", + "execution_payload_envelope.go", + "execution_payload_header.go", "fork_watcher.go", "fuzz_exports.go", # keep "log.go", "metrics.go", "options.go", + "payload_attestations.go", "pending_attestations_queue.go", "pending_blocks_queue.go", "rate_limiter.go", @@ -101,6 +104,7 @@ go_library( "//config/fieldparams:go_default_library", "//config/params:go_default_library", "//consensus-types/blocks:go_default_library", + "//consensus-types/epbs/payload-attestation:go_default_library", "//consensus-types/interfaces:go_default_library", "//consensus-types/primitives:go_default_library", "//consensus-types/wrapper:go_default_library", @@ -114,6 +118,7 @@ go_library( "//monitoring/tracing:go_default_library", "//monitoring/tracing/trace:go_default_library", "//network/forks:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/attestation:go_default_library", "//proto/prysm/v1alpha1/metadata:go_default_library", @@ -155,7 +160,10 @@ go_test( "context_test.go", "decode_pubsub_test.go", "error_test.go", + "execution_payload_envelope_test.go", + "execution_payload_header_test.go", "fork_watcher_test.go", + "payload_attestations_test.go", "pending_attestations_queue_test.go", "pending_blocks_queue_test.go", "rate_limiter_test.go", @@ -229,6 +237,7 @@ go_test( "//config/fieldparams:go_default_library", "//config/params:go_default_library", "//consensus-types/blocks:go_default_library", + "//consensus-types/epbs/payload-attestation:go_default_library", "//consensus-types/interfaces:go_default_library", "//consensus-types/primitives:go_default_library", "//consensus-types/wrapper:go_default_library", @@ -247,6 +256,7 @@ go_test( "//testing/assert:go_default_library", "//testing/require:go_default_library", "//testing/util:go_default_library", + "//testing/util/random:go_default_library", "//time:go_default_library", "//time/slots:go_default_library", "@com_github_d4l3k_messagediff//:go_default_library", diff --git a/beacon-chain/sync/backfill/verify.go b/beacon-chain/sync/backfill/verify.go index 48c3b92ce0b2..3fd7eb2408d6 100644 --- a/beacon-chain/sync/backfill/verify.go +++ b/beacon-chain/sync/backfill/verify.go @@ -154,3 +154,15 @@ func (dc *domainCache) forEpoch(e primitives.Epoch) ([]byte, error) { } return d, nil } + +func (dc *domainCache) forName(n string) ([]byte, error) { + fork, err := dc.fsched.VersionForName(n) + if err != nil { + return nil, err + } + d, ok := dc.forkDomains[fork] + if !ok { + return nil, errors.Wrapf(errUnknownDomain, "fork version=%#x, name=%s", fork, n) + } + return d, nil +} diff --git a/beacon-chain/sync/backfill/verify_test.go b/beacon-chain/sync/backfill/verify_test.go index 19253ba7fcfe..acaeb88fdf58 100644 --- a/beacon-chain/sync/backfill/verify_test.go +++ b/beacon-chain/sync/backfill/verify_test.go @@ -30,8 +30,8 @@ func TestDomainCache(t *testing.T) { require.NoError(t, err) require.Equal(t, len(fsched), len(dc.forkDomains)) for i := range fsched { - e := fsched[i].Epoch - ad, err := dc.forEpoch(e) + n := fsched[i].Name + ad, err := dc.forName(n) require.NoError(t, err) ed, err := signing.ComputeDomain(dType, fsched[i].Version[:], vRoot) require.NoError(t, err) diff --git a/beacon-chain/sync/execution_payload_envelope.go b/beacon-chain/sync/execution_payload_envelope.go new file mode 100644 index 000000000000..cad635a293b8 --- /dev/null +++ b/beacon-chain/sync/execution_payload_envelope.go @@ -0,0 +1,102 @@ +package sync + +import ( + "context" + + pubsub "github.com/libp2p/go-libp2p-pubsub" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/verification" + "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/monitoring/tracing" + "github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace" + v1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + "google.golang.org/protobuf/proto" +) + +func (s *Service) validateExecutionPayloadEnvelope(ctx context.Context, pid peer.ID, msg *pubsub.Message) (pubsub.ValidationResult, error) { + if pid == s.cfg.p2p.PeerID() { + return pubsub.ValidationAccept, nil + } + if s.cfg.initialSync.Syncing() { + return pubsub.ValidationIgnore, nil + } + ctx, span := trace.StartSpan(ctx, "sync.validateExecutionPayloadEnvelope") + defer span.End() + if msg.Topic == nil { + return pubsub.ValidationReject, errInvalidTopic + } + m, err := s.decodePubsubMessage(msg) + if err != nil { + tracing.AnnotateError(span, err) + return pubsub.ValidationReject, err + } + signedEnvelope, ok := m.(*v1.SignedExecutionPayloadEnvelope) + if !ok { + return pubsub.ValidationReject, errWrongMessage + } + e, err := blocks.WrappedROSignedExecutionPayloadEnvelope(signedEnvelope) + if err != nil { + log.WithError(err).Error("failed to create read only signed payload execution envelope") + return pubsub.ValidationIgnore, err + } + v := s.newExecutionPayloadEnvelopeVerifier(e, verification.GossipExecutionPayloadEnvelopeRequirements) + + if err := v.VerifyBlockRootSeen(s.seenBlockRoot); err != nil { + return pubsub.ValidationIgnore, err + } + root := [32]byte(signedEnvelope.Message.BeaconBlockRoot) + _, seen := s.payloadEnvelopeCache.Load(root) + if seen { + return pubsub.ValidationIgnore, nil + } + if err := v.VerifyBlockRootValid(s.hasBadBlock); err != nil { + return pubsub.ValidationReject, err + } + signedHeader, err := s.cfg.beaconDB.SignedExecutionPayloadHeader(ctx, root) + if err != nil { + return pubsub.ValidationIgnore, err + } + res, err := verifyAgainstHeader(v, signedHeader) + if err != nil { + return res, err + } + st, err := s.cfg.stateGen.StateByRoot(ctx, root) + if err != nil { + return pubsub.ValidationIgnore, err + } + if err := v.VerifySignature(st); err != nil { + return pubsub.ValidationReject, err + } + s.payloadEnvelopeCache.Store(root, struct{}{}) + return pubsub.ValidationAccept, nil +} + +func verifyAgainstHeader(v verification.ExecutionPayloadEnvelopeVerifier, signed interfaces.ROSignedExecutionPayloadHeader) (pubsub.ValidationResult, error) { + header, err := signed.Header() + if err != nil { + return pubsub.ValidationIgnore, err + } + if err := v.SetSlot(header.Slot()); err != nil { + return pubsub.ValidationIgnore, err + } + if err := v.VerifyBuilderValid(header); err != nil { + return pubsub.ValidationReject, err + } + if err := v.VerifyPayloadHash(header); err != nil { + return pubsub.ValidationReject, err + } + return pubsub.ValidationAccept, nil +} + +func (s *Service) executionPayloadEnvelopeSubscriber(ctx context.Context, msg proto.Message) error { + e, ok := msg.(*v1.SignedExecutionPayloadEnvelope) + if !ok { + return errWrongMessage + } + env, err := blocks.WrappedROSignedExecutionPayloadEnvelope(e) + if err != nil { + return err + } + return s.cfg.chain.ReceiveExecutionPayloadEnvelope(ctx, env, nil) +} diff --git a/beacon-chain/sync/execution_payload_envelope_test.go b/beacon-chain/sync/execution_payload_envelope_test.go new file mode 100644 index 000000000000..96a0b21d47b3 --- /dev/null +++ b/beacon-chain/sync/execution_payload_envelope_test.go @@ -0,0 +1,177 @@ +package sync + +import ( + "bytes" + "context" + "reflect" + "sync" + "testing" + "time" + + pubsub "github.com/libp2p/go-libp2p-pubsub" + pb "github.com/libp2p/go-libp2p-pubsub/pb" + "github.com/pkg/errors" + mock "github.com/prysmaticlabs/prysm/v5/beacon-chain/blockchain/testing" + testDB "github.com/prysmaticlabs/prysm/v5/beacon-chain/db/testing" + doublylinkedtree "github.com/prysmaticlabs/prysm/v5/beacon-chain/forkchoice/doubly-linked-tree" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/p2p" + p2ptest "github.com/prysmaticlabs/prysm/v5/beacon-chain/p2p/testing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/startup" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/stategen" + mockSync "github.com/prysmaticlabs/prysm/v5/beacon-chain/sync/initial-sync/testing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/verification" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" +) + +func TestValidateExecutionPayloadEnvelope_ErrorPathsWithMock(t *testing.T) { + tests := []struct { + error error + verifier verification.NewExecutionPayloadEnvelopeVerifier + result pubsub.ValidationResult + }{ + { + error: errors.New("block root seen"), + verifier: func(e interfaces.ROSignedExecutionPayloadEnvelope, reqs []verification.Requirement) verification.ExecutionPayloadEnvelopeVerifier { + return &verification.MockExecutionPayloadEnvelope{ErrBlockRootNotSeen: errors.New("block root seen")} + }, + result: pubsub.ValidationIgnore, + }, + { + error: errors.New("block root invalid"), + verifier: func(e interfaces.ROSignedExecutionPayloadEnvelope, reqs []verification.Requirement) verification.ExecutionPayloadEnvelopeVerifier { + return &verification.MockExecutionPayloadEnvelope{ErrBlockRootInvalid: errors.New("block root invalid")} + }, + result: pubsub.ValidationReject, + }, + { + error: errors.New("invalid builder index"), + verifier: func(e interfaces.ROSignedExecutionPayloadEnvelope, reqs []verification.Requirement) verification.ExecutionPayloadEnvelopeVerifier { + return &verification.MockExecutionPayloadEnvelope{ErrBuilderIndexInvalid: errors.New("invalid builder index")} + }, + result: pubsub.ValidationReject, + }, + { + error: errors.New("invalid block hash"), + verifier: func(e interfaces.ROSignedExecutionPayloadEnvelope, reqs []verification.Requirement) verification.ExecutionPayloadEnvelopeVerifier { + return &verification.MockExecutionPayloadEnvelope{ErrBlockHashInvalid: errors.New("invalid block hash")} + }, + result: pubsub.ValidationReject, + }, + { + error: errors.New("incorrect signature"), + verifier: func(e interfaces.ROSignedExecutionPayloadEnvelope, reqs []verification.Requirement) verification.ExecutionPayloadEnvelopeVerifier { + return &verification.MockExecutionPayloadEnvelope{ErrSignatureInvalid: errors.New("incorrect signature")} + }, + result: pubsub.ValidationReject, + }, + } + for _, tt := range tests { + t.Run(tt.error.Error(), func(t *testing.T) { + ctx := context.Background() + db := testDB.SetupDB(t) + fcs := doublylinkedtree.New() + sg := stategen.New(db, fcs) + p := p2ptest.NewTestP2P(t) + chainService := &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(params.BeaconConfig().SecondsPerSlot), 0)} + + s := &Service{ + payloadEnvelopeCache: &sync.Map{}, + cfg: &config{ + chain: chainService, + p2p: p, + initialSync: &mockSync.Sync{}, + clock: startup.NewClock(chainService.Genesis, chainService.ValidatorsRoot), + beaconDB: db, + stateGen: sg, + }, + } + s.newExecutionPayloadEnvelopeVerifier = tt.verifier + + blk := random.SignedBeaconBlock(t) + blkRoot, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + msg := random.SignedExecutionPayloadEnvelope(t) + msg.Message.BeaconBlockRoot = blkRoot[:] + wblk, err := blocks.NewSignedBeaconBlock(blk) + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wblk)) + st, err := util.NewBeaconStateEpbs() + require.NoError(t, err) + require.NoError(t, sg.SaveState(ctx, blkRoot, st)) + buf := new(bytes.Buffer) + _, err = p.Encoding().EncodeGossip(buf, msg) + require.NoError(t, err) + + topic := p2p.GossipTypeMapping[reflect.TypeOf(msg)] + digest, err := s.currentForkDigest() + require.NoError(t, err) + topic = s.addDigestToTopic(topic, digest) + + result, err := s.validateExecutionPayloadEnvelope(ctx, "", &pubsub.Message{ + Message: &pb.Message{ + Data: buf.Bytes(), + Topic: &topic, + }}) + + require.ErrorContains(t, tt.error.Error(), err) + require.Equal(t, result, tt.result) + }) + } +} + +func TestValidateExecutionPayloadEnvelope_Accept(t *testing.T) { + ctx := context.Background() + p := p2ptest.NewTestP2P(t) + db := testDB.SetupDB(t) + fcs := doublylinkedtree.New() + sg := stategen.New(db, fcs) + chainService := &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(params.BeaconConfig().SecondsPerSlot), 0)} + s := &Service{ + payloadEnvelopeCache: &sync.Map{}, + cfg: &config{ + chain: chainService, + p2p: p, + initialSync: &mockSync.Sync{}, + clock: startup.NewClock(chainService.Genesis, chainService.ValidatorsRoot), + beaconDB: db, + stateGen: sg, + }, + } + s.newExecutionPayloadEnvelopeVerifier = func(e interfaces.ROSignedExecutionPayloadEnvelope, reqs []verification.Requirement) verification.ExecutionPayloadEnvelopeVerifier { + return &verification.MockExecutionPayloadEnvelope{} + } + + blk := random.SignedBeaconBlock(t) + blkRoot, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + msg := random.SignedExecutionPayloadEnvelope(t) + msg.Message.BeaconBlockRoot = blkRoot[:] + wblk, err := blocks.NewSignedBeaconBlock(blk) + require.NoError(t, err) + require.NoError(t, db.SaveBlock(ctx, wblk)) + st, err := util.NewBeaconStateEpbs() + require.NoError(t, err) + require.NoError(t, sg.SaveState(ctx, blkRoot, st)) + + buf := new(bytes.Buffer) + _, err = p.Encoding().EncodeGossip(buf, msg) + require.NoError(t, err) + + topic := p2p.GossipTypeMapping[reflect.TypeOf(msg)] + digest, err := s.currentForkDigest() + require.NoError(t, err) + topic = s.addDigestToTopic(topic, digest) + + result, err := s.validateExecutionPayloadEnvelope(ctx, "", &pubsub.Message{ + Message: &pb.Message{ + Data: buf.Bytes(), + Topic: &topic, + }}) + require.NoError(t, err) + require.Equal(t, result, pubsub.ValidationAccept) +} diff --git a/beacon-chain/sync/execution_payload_header.go b/beacon-chain/sync/execution_payload_header.go new file mode 100644 index 000000000000..19583ec9aa69 --- /dev/null +++ b/beacon-chain/sync/execution_payload_header.go @@ -0,0 +1,144 @@ +package sync + +import ( + "context" + "fmt" + "sync" + + pubsub "github.com/libp2p/go-libp2p-pubsub" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/verification" + "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/monitoring/tracing" + "github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace" + v1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + "google.golang.org/protobuf/proto" +) + +func (s *Service) validateExecutionPayloadHeader(ctx context.Context, pid peer.ID, msg *pubsub.Message) (pubsub.ValidationResult, error) { + if pid == s.cfg.p2p.PeerID() { + return pubsub.ValidationAccept, nil + } + + if s.cfg.initialSync.Syncing() { + return pubsub.ValidationIgnore, nil + } + + ctx, span := trace.StartSpan(ctx, "sync.validateExecutionPayloadHeader") + defer span.End() + + if msg.Topic == nil { + return pubsub.ValidationReject, errInvalidTopic + } + + m, err := s.decodePubsubMessage(msg) + if err != nil { + tracing.AnnotateError(span, err) + return pubsub.ValidationReject, err + } + + signedHeader, ok := m.(*v1.SignedExecutionPayloadHeader) + if !ok { + return pubsub.ValidationReject, errWrongMessage + } + shm := signedHeader.Message + slot := shm.Slot + builderIndex := shm.BuilderIndex + + if seenBuilderBySlot(slot, builderIndex) { + return pubsub.ValidationIgnore, fmt.Errorf("builder %d has already been seen in slot %d", builderIndex, slot) + } + + highestValueHeader := s.executionPayloadHeaderCache.SignedExecutionPayloadHeader(slot, shm.ParentBlockHash, shm.ParentBlockRoot) + if highestValueHeader != nil && highestValueHeader.Message.Value >= shm.Value { + return pubsub.ValidationIgnore, fmt.Errorf("received header has lower value than cached header") + } + + h, err := blocks.WrappedROSignedExecutionPayloadHeader(signedHeader) + if err != nil { + log.WithError(err).Error("failed to create read only signed execution payload header") + return pubsub.ValidationIgnore, err + } + + roState, err := s.cfg.chain.HeadStateReadOnly(ctx) + if err != nil { + log.WithError(err).Error("failed to get head state to validate execution payload header") + return pubsub.ValidationIgnore, err + } + v := s.newExecutionPayloadHeaderVerifier(h, roState, verification.GossipExecutionPayloadHeaderRequirements) + + if err := v.VerifyCurrentOrNextSlot(); err != nil { + return pubsub.ValidationIgnore, err + } + + if err := v.VerifyParentBlockRootSeen(s.seenBlockRoot); err != nil { + return pubsub.ValidationIgnore, err + } + + if err := v.VerifyParentBlockHashSeen(s.seenBlockHash); err != nil { + return pubsub.ValidationIgnore, err + } + + if err := v.VerifySignature(); err != nil { + return pubsub.ValidationReject, err + } + addBuilderBySlot(slot, builderIndex) + + if err := v.VerifyBuilderActiveNotSlashed(); err != nil { + return pubsub.ValidationReject, err + } + + if err := v.VerifyBuilderSufficientBalance(); err != nil { + return pubsub.ValidationReject, err + } + + return pubsub.ValidationAccept, nil +} + +func (s *Service) subscribeExecutionPayloadHeader(ctx context.Context, msg proto.Message) error { + e, ok := msg.(*v1.SignedExecutionPayloadHeader) + if !ok { + return errWrongMessage + } + + s.executionPayloadHeaderCache.SaveSignedExecutionPayloadHeader(e) + + return nil +} + +var ( + // builderBySlot is a map of slots to a set of builder that have been seen in that slot. + builderBySlot = make(map[primitives.Slot]map[primitives.ValidatorIndex]struct{}) + builderBySlotLock sync.RWMutex +) + +func addBuilderBySlot(slot primitives.Slot, index primitives.ValidatorIndex) { + builderBySlotLock.Lock() + defer builderBySlotLock.Unlock() + + // Remove old slots: p2p allows current and next slot, so we allow two slots to be seen + for k := range builderBySlot { + if k+1 < slot { + delete(builderBySlot, k) + } + } + + if _, ok := builderBySlot[slot]; !ok { + builderBySlot[slot] = make(map[primitives.ValidatorIndex]struct{}) + } + + builderBySlot[slot][index] = struct{}{} +} + +func seenBuilderBySlot(slot primitives.Slot, index primitives.ValidatorIndex) bool { + builderBySlotLock.RLock() + defer builderBySlotLock.RUnlock() + + if _, ok := builderBySlot[slot]; !ok { + return false + } + + _, ok := builderBySlot[slot][index] + return ok +} diff --git a/beacon-chain/sync/execution_payload_header_test.go b/beacon-chain/sync/execution_payload_header_test.go new file mode 100644 index 000000000000..cf2975824e2c --- /dev/null +++ b/beacon-chain/sync/execution_payload_header_test.go @@ -0,0 +1,289 @@ +package sync + +import ( + "bytes" + "context" + "fmt" + "reflect" + "testing" + "time" + + pubsub "github.com/libp2p/go-libp2p-pubsub" + pb "github.com/libp2p/go-libp2p-pubsub/pb" + "github.com/pkg/errors" + mock "github.com/prysmaticlabs/prysm/v5/beacon-chain/blockchain/testing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/cache" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/p2p" + p2ptest "github.com/prysmaticlabs/prysm/v5/beacon-chain/p2p/testing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/startup" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + mockSync "github.com/prysmaticlabs/prysm/v5/beacon-chain/sync/initial-sync/testing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/verification" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" +) + +func TestValidateExecutionPayloadHeader_IncorrectTopic(t *testing.T) { + ctx := context.Background() + p := p2ptest.NewTestP2P(t) + chainService := &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(params.BeaconConfig().SecondsPerSlot), 0)} + s := &Service{ + cfg: &config{chain: chainService, p2p: p, initialSync: &mockSync.Sync{}, clock: startup.NewClock(chainService.Genesis, chainService.ValidatorsRoot)}} + + msg := random.ExecutionPayloadHeader(t) + buf := new(bytes.Buffer) + _, err := p.Encoding().EncodeGossip(buf, msg) + require.NoError(t, err) + + topic := p2p.GossipTypeMapping[reflect.TypeOf(msg)] + digest, err := s.currentForkDigest() + require.NoError(t, err) + topic = s.addDigestToTopic(topic, digest) + + result, err := s.validateExecutionPayloadHeader(ctx, "", &pubsub.Message{ + Message: &pb.Message{ + Data: buf.Bytes(), + Topic: &topic, + }}) + require.ErrorContains(t, "extraction failed for topic", err) + require.Equal(t, result, pubsub.ValidationReject) +} + +func TestValidateExecutionPayloadHeader_MockErrorPath(t *testing.T) { + tests := []struct { + error error + verifier verification.NewExecutionPayloadHeaderVerifier + result pubsub.ValidationResult + }{ + { + error: errors.New("incorrect slot"), + verifier: func(e interfaces.ROSignedExecutionPayloadHeader, st state.ReadOnlyBeaconState, reqs []verification.Requirement) verification.ExecutionPayloadHeaderVerifier { + return &verification.MockExecutionPayloadHeader{ErrIncorrectSlot: errors.New("incorrect slot")} + }, + result: pubsub.ValidationIgnore, + }, + { + error: errors.New("unknown block root"), + verifier: func(e interfaces.ROSignedExecutionPayloadHeader, st state.ReadOnlyBeaconState, reqs []verification.Requirement) verification.ExecutionPayloadHeaderVerifier { + return &verification.MockExecutionPayloadHeader{ErrUnknownParentBlockRoot: errors.New("unknown block root")} + }, + result: pubsub.ValidationIgnore, + }, + { + error: errors.New("unknown block hash"), + verifier: func(e interfaces.ROSignedExecutionPayloadHeader, st state.ReadOnlyBeaconState, reqs []verification.Requirement) verification.ExecutionPayloadHeaderVerifier { + return &verification.MockExecutionPayloadHeader{ErrUnknownParentBlockHash: errors.New("unknown block hash")} + }, + result: pubsub.ValidationIgnore, + }, + { + error: errors.New("invalid signature"), + verifier: func(e interfaces.ROSignedExecutionPayloadHeader, st state.ReadOnlyBeaconState, reqs []verification.Requirement) verification.ExecutionPayloadHeaderVerifier { + return &verification.MockExecutionPayloadHeader{ErrInvalidSignature: errors.New("invalid signature")} + }, + result: pubsub.ValidationReject, + }, + { + error: errors.New("builder slashed"), + verifier: func(e interfaces.ROSignedExecutionPayloadHeader, st state.ReadOnlyBeaconState, reqs []verification.Requirement) verification.ExecutionPayloadHeaderVerifier { + return &verification.MockExecutionPayloadHeader{ErrBuilderSlashed: errors.New("builder slashed")} + }, + result: pubsub.ValidationReject, + }, + { + error: errors.New("insufficient balance"), + verifier: func(e interfaces.ROSignedExecutionPayloadHeader, st state.ReadOnlyBeaconState, reqs []verification.Requirement) verification.ExecutionPayloadHeaderVerifier { + return &verification.MockExecutionPayloadHeader{ErrBuilderInsufficientBalance: errors.New("insufficient balance")} + }, + result: pubsub.ValidationReject, + }, + } + for _, tt := range tests { + t.Run(tt.error.Error(), func(t *testing.T) { + ctx := context.Background() + p := p2ptest.NewTestP2P(t) + chainService := &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(params.BeaconConfig().SecondsPerSlot), 0)} + s := &Service{ + executionPayloadHeaderCache: cache.NewExecutionPayloadHeaders(), + cfg: &config{chain: chainService, p2p: p, initialSync: &mockSync.Sync{}, clock: startup.NewClock(chainService.Genesis, chainService.ValidatorsRoot)}} + s.newExecutionPayloadHeaderVerifier = tt.verifier + + msg := random.SignedExecutionPayloadHeader(t) + buf := new(bytes.Buffer) + _, err := p.Encoding().EncodeGossip(buf, msg) + require.NoError(t, err) + + topic := p2p.GossipTypeMapping[reflect.TypeOf(msg)] + digest, err := s.currentForkDigest() + require.NoError(t, err) + topic = s.addDigestToTopic(topic, digest) + + result, err := s.validateExecutionPayloadHeader(ctx, "", &pubsub.Message{ + Message: &pb.Message{ + Data: buf.Bytes(), + Topic: &topic, + }}) + + require.ErrorContains(t, tt.error.Error(), err) + require.Equal(t, result, tt.result) + }) + } +} + +func TestValidateExecutionPayloadHeader_Accept(t *testing.T) { + ctx := context.Background() + p := p2ptest.NewTestP2P(t) + chainService := &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(params.BeaconConfig().SecondsPerSlot), 0)} + s := &Service{ + executionPayloadHeaderCache: cache.NewExecutionPayloadHeaders(), + cfg: &config{chain: chainService, p2p: p, initialSync: &mockSync.Sync{}, clock: startup.NewClock(chainService.Genesis, chainService.ValidatorsRoot)}} + s.newExecutionPayloadHeaderVerifier = func(e interfaces.ROSignedExecutionPayloadHeader, st state.ReadOnlyBeaconState, reqs []verification.Requirement) verification.ExecutionPayloadHeaderVerifier { + return &verification.MockExecutionPayloadHeader{} + } + + msg := random.SignedExecutionPayloadHeader(t) + buf := new(bytes.Buffer) + _, err := p.Encoding().EncodeGossip(buf, msg) + require.NoError(t, err) + + topic := p2p.GossipTypeMapping[reflect.TypeOf(msg)] + digest, err := s.currentForkDigest() + require.NoError(t, err) + topic = s.addDigestToTopic(topic, digest) + + result, err := s.validateExecutionPayloadHeader(ctx, "", &pubsub.Message{ + Message: &pb.Message{ + Data: buf.Bytes(), + Topic: &topic, + }}) + require.NoError(t, err) + require.Equal(t, result, pubsub.ValidationAccept) +} + +func TestValidateExecutionPayloadHeader_MoreThanOneSameBuilder(t *testing.T) { + ctx := context.Background() + p := p2ptest.NewTestP2P(t) + chainService := &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(params.BeaconConfig().SecondsPerSlot), 0)} + s := &Service{ + executionPayloadHeaderCache: cache.NewExecutionPayloadHeaders(), + cfg: &config{chain: chainService, p2p: p, initialSync: &mockSync.Sync{}, clock: startup.NewClock(chainService.Genesis, chainService.ValidatorsRoot)}} + s.newExecutionPayloadHeaderVerifier = func(e interfaces.ROSignedExecutionPayloadHeader, st state.ReadOnlyBeaconState, reqs []verification.Requirement) verification.ExecutionPayloadHeaderVerifier { + return &verification.MockExecutionPayloadHeader{} + } + + msg := random.SignedExecutionPayloadHeader(t) + buf := new(bytes.Buffer) + _, err := p.Encoding().EncodeGossip(buf, msg) + require.NoError(t, err) + + topic := p2p.GossipTypeMapping[reflect.TypeOf(msg)] + digest, err := s.currentForkDigest() + require.NoError(t, err) + topic = s.addDigestToTopic(topic, digest) + + result, err := s.validateExecutionPayloadHeader(ctx, "", &pubsub.Message{ + Message: &pb.Message{ + Data: buf.Bytes(), + Topic: &topic, + }}) + require.NoError(t, err) + require.Equal(t, result, pubsub.ValidationAccept) + + result, err = s.validateExecutionPayloadHeader(ctx, "", &pubsub.Message{ + Message: &pb.Message{ + Data: buf.Bytes(), + Topic: &topic, + }}) + require.ErrorContains(t, fmt.Sprintf("builder %d has already been seen in slot %d", msg.Message.BuilderIndex, msg.Message.Slot), err) + require.Equal(t, result, pubsub.ValidationIgnore) +} + +func TestValidateExecutionPayloadHeader_LowerValue(t *testing.T) { + ctx := context.Background() + p := p2ptest.NewTestP2P(t) + chainService := &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(params.BeaconConfig().SecondsPerSlot), 0)} + s := &Service{ + executionPayloadHeaderCache: cache.NewExecutionPayloadHeaders(), + cfg: &config{chain: chainService, p2p: p, initialSync: &mockSync.Sync{}, clock: startup.NewClock(chainService.Genesis, chainService.ValidatorsRoot)}} + s.newExecutionPayloadHeaderVerifier = func(e interfaces.ROSignedExecutionPayloadHeader, st state.ReadOnlyBeaconState, reqs []verification.Requirement) verification.ExecutionPayloadHeaderVerifier { + return &verification.MockExecutionPayloadHeader{} + } + + msg := random.SignedExecutionPayloadHeader(t) + buf := new(bytes.Buffer) + _, err := p.Encoding().EncodeGossip(buf, msg) + require.NoError(t, err) + + topic := p2p.GossipTypeMapping[reflect.TypeOf(msg)] + digest, err := s.currentForkDigest() + require.NoError(t, err) + topic = s.addDigestToTopic(topic, digest) + + m := &pubsub.Message{ + Message: &pb.Message{ + Data: buf.Bytes(), + Topic: &topic, + }} + result, err := s.validateExecutionPayloadHeader(ctx, "", m) + require.NoError(t, err) + require.Equal(t, result, pubsub.ValidationAccept) + + require.NoError(t, s.subscribeExecutionPayloadHeader(ctx, msg)) + + // Different builder but lower value should fail + newMsg := eth.CopySignedExecutionPayloadHeader(msg) + newMsg.Message.BuilderIndex = newMsg.Message.BuilderIndex - 1 + newMsg.Message.Value = newMsg.Message.Value - 1 + newBuf := new(bytes.Buffer) + _, err = p.Encoding().EncodeGossip(newBuf, newMsg) + require.NoError(t, err) + + result, err = s.validateExecutionPayloadHeader(ctx, "", &pubsub.Message{ + Message: &pb.Message{ + Data: newBuf.Bytes(), + Topic: &topic, + }}) + require.ErrorContains(t, "received header has lower value than cached header", err) + require.Equal(t, result, pubsub.ValidationIgnore) +} + +func TestAddAndSeenBuilderBySlot(t *testing.T) { + resetBuilderBySlot() + + // Add builder to slot 1 + addBuilderBySlot(1, 100) + require.Equal(t, true, seenBuilderBySlot(1, 100), "Builder 100 should be seen in slot 1") + require.Equal(t, false, seenBuilderBySlot(1, 101), "Builder 101 should not be seen in slot 1") + + // Add builder to slot 2 + addBuilderBySlot(2, 200) + require.Equal(t, true, seenBuilderBySlot(2, 200), "Builder 200 should be seen in slot 2") + + // Slot 3 should not have any builders yet + require.Equal(t, false, seenBuilderBySlot(3, 300), "Builder 300 should not be seen in slot 3") + + // Add builder to slot 3 + addBuilderBySlot(3, 300) + require.Equal(t, true, seenBuilderBySlot(3, 300), "Builder 300 should be seen in slot 3") + + // Now slot 1 should be removed (assuming the current slot is 3) + require.Equal(t, false, seenBuilderBySlot(1, 100), "Builder 100 should no longer be seen in slot 1") + + // Slot 2 should still be valid + require.Equal(t, true, seenBuilderBySlot(2, 200), "Builder 200 should still be seen in slot 2") + + // Add builder to slot 4, slot 2 should now be removed + addBuilderBySlot(4, 400) + require.Equal(t, true, seenBuilderBySlot(4, 400), "Builder 400 should be seen in slot 4") + require.Equal(t, false, seenBuilderBySlot(2, 200), "Builder 200 should no longer be seen in slot 2") +} + +func resetBuilderBySlot() { + builderBySlotLock.Lock() + defer builderBySlotLock.Unlock() + builderBySlot = make(map[primitives.Slot]map[primitives.ValidatorIndex]struct{}) +} diff --git a/beacon-chain/sync/options.go b/beacon-chain/sync/options.go index ff20b8b81212..4d68760af052 100644 --- a/beacon-chain/sync/options.go +++ b/beacon-chain/sync/options.go @@ -1,7 +1,10 @@ package sync import ( + "sync" + "github.com/prysmaticlabs/prysm/v5/async/event" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/cache" blockfeed "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/feed/block" "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/feed/operation" statefeed "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/feed/state" @@ -127,6 +130,27 @@ func WithSlasherBlockHeadersFeed(slasherBlockHeadersFeed *event.Feed) Option { } } +func WithPayloadAttestationCache(r *cache.PayloadAttestationCache) Option { + return func(s *Service) error { + s.payloadAttestationCache = r + return nil + } +} + +func WithExecutionPayloadHeaderCache(r *cache.ExecutionPayloadHeaders) Option { + return func(s *Service) error { + s.executionPayloadHeaderCache = r + return nil + } +} + +func WithPayloadEnvelopeCache(r *sync.Map) Option { + return func(s *Service) error { + s.payloadEnvelopeCache = r + return nil + } +} + func WithReconstructor(r execution.Reconstructor) Option { return func(s *Service) error { s.cfg.executionReconstructor = r diff --git a/beacon-chain/sync/payload_attestations.go b/beacon-chain/sync/payload_attestations.go new file mode 100644 index 000000000000..370c7e577674 --- /dev/null +++ b/beacon-chain/sync/payload_attestations.go @@ -0,0 +1,91 @@ +package sync + +import ( + "context" + + pubsub "github.com/libp2p/go-libp2p-pubsub" + "github.com/libp2p/go-libp2p/core/peer" + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/verification" + payloadattestation "github.com/prysmaticlabs/prysm/v5/consensus-types/epbs/payload-attestation" + "github.com/prysmaticlabs/prysm/v5/monitoring/tracing" + "github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "google.golang.org/protobuf/proto" +) + +var ( + errAlreadySeenPayloadAttestation = errors.New("payload attestation already seen for validator index") +) + +func (s *Service) validatePayloadAttestation(ctx context.Context, pid peer.ID, msg *pubsub.Message) (pubsub.ValidationResult, error) { + if pid == s.cfg.p2p.PeerID() { + return pubsub.ValidationAccept, nil + } + if s.cfg.initialSync.Syncing() { + return pubsub.ValidationIgnore, nil + } + ctx, span := trace.StartSpan(ctx, "sync.validatePayloadAttestation") + defer span.End() + if msg.Topic == nil { + return pubsub.ValidationReject, errInvalidTopic + } + m, err := s.decodePubsubMessage(msg) + if err != nil { + tracing.AnnotateError(span, err) + return pubsub.ValidationReject, err + } + att, ok := m.(*eth.PayloadAttestationMessage) + if !ok { + return pubsub.ValidationReject, errWrongMessage + } + pa, err := payloadattestation.NewReadOnly(att) + if err != nil { + log.WithError(err).Error("failed to create read only payload attestation") + return pubsub.ValidationIgnore, err + } + v := s.newPayloadAttestationVerifier(pa, verification.GossipPayloadAttestationMessageRequirements) + + if err := v.VerifyCurrentSlot(); err != nil { + return pubsub.ValidationIgnore, err + } + + if err := v.VerifyPayloadStatus(); err != nil { + return pubsub.ValidationReject, err + } + + if err := v.VerifyBlockRootSeen(s.seenBlockRoot); err != nil { + return pubsub.ValidationIgnore, err + } + + if err := v.VerifyBlockRootValid(s.hasBadBlock); err != nil { + return pubsub.ValidationReject, err + } + + st, err := s.cfg.chain.HeadState(ctx) + if err != nil { + return pubsub.ValidationIgnore, err + } + + if err := v.VerifyValidatorInPTC(ctx, st); err != nil { + return pubsub.ValidationReject, err + } + + if err := v.VerifySignature(st); err != nil { + return pubsub.ValidationReject, err + } + + if s.payloadAttestationCache.Seen(pa.BeaconBlockRoot(), uint64(pa.ValidatorIndex())) { + return pubsub.ValidationIgnore, errAlreadySeenPayloadAttestation + } + + return pubsub.ValidationAccept, nil +} + +func (s *Service) payloadAttestationSubscriber(ctx context.Context, msg proto.Message) error { + a, ok := msg.(*eth.PayloadAttestationMessage) + if !ok { + return errWrongMessage + } + return s.cfg.chain.ReceivePayloadAttestationMessage(ctx, a) +} diff --git a/beacon-chain/sync/payload_attestations_test.go b/beacon-chain/sync/payload_attestations_test.go new file mode 100644 index 000000000000..1a3f52538eda --- /dev/null +++ b/beacon-chain/sync/payload_attestations_test.go @@ -0,0 +1,162 @@ +package sync + +import ( + "bytes" + "context" + "reflect" + "testing" + "time" + + pubsub "github.com/libp2p/go-libp2p-pubsub" + pb "github.com/libp2p/go-libp2p-pubsub/pb" + "github.com/pkg/errors" + mock "github.com/prysmaticlabs/prysm/v5/beacon-chain/blockchain/testing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/cache" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/p2p" + p2ptest "github.com/prysmaticlabs/prysm/v5/beacon-chain/p2p/testing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/startup" + mockSync "github.com/prysmaticlabs/prysm/v5/beacon-chain/sync/initial-sync/testing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/verification" + "github.com/prysmaticlabs/prysm/v5/config/params" + payloadattestation "github.com/prysmaticlabs/prysm/v5/consensus-types/epbs/payload-attestation" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" +) + +func TestValidatePayloadAttestationMessage_IncorrectTopic(t *testing.T) { + ctx := context.Background() + p := p2ptest.NewTestP2P(t) + chainService := &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(params.BeaconConfig().SecondsPerSlot), 0)} + s := &Service{ + payloadAttestationCache: &cache.PayloadAttestationCache{}, + cfg: &config{chain: chainService, p2p: p, initialSync: &mockSync.Sync{}, clock: startup.NewClock(chainService.Genesis, chainService.ValidatorsRoot)}} + + msg := random.PayloadAttestation(t) // Using payload attestation for message should fail. + buf := new(bytes.Buffer) + _, err := p.Encoding().EncodeGossip(buf, msg) + require.NoError(t, err) + + topic := p2p.GossipTypeMapping[reflect.TypeOf(msg)] + digest, err := s.currentForkDigest() + require.NoError(t, err) + topic = s.addDigestToTopic(topic, digest) + + result, err := s.validatePayloadAttestation(ctx, "", &pubsub.Message{ + Message: &pb.Message{ + Data: buf.Bytes(), + Topic: &topic, + }}) + require.ErrorContains(t, "extraction failed for topic", err) + require.Equal(t, result, pubsub.ValidationReject) +} + +func TestValidatePayloadAttestationMessage_ErrorPathsWithMock(t *testing.T) { + tests := []struct { + error error + verifier verification.NewPayloadAttestationMsgVerifier + result pubsub.ValidationResult + }{ + { + error: errors.New("incorrect slot"), + verifier: func(pa payloadattestation.ROMessage, reqs []verification.Requirement) verification.PayloadAttestationMsgVerifier { + return &verification.MockPayloadAttestation{ErrIncorrectPayloadAttSlot: errors.New("incorrect slot")} + }, + result: pubsub.ValidationIgnore, + }, + { + error: errors.New("incorrect status"), + verifier: func(pa payloadattestation.ROMessage, reqs []verification.Requirement) verification.PayloadAttestationMsgVerifier { + return &verification.MockPayloadAttestation{ErrIncorrectPayloadAttStatus: errors.New("incorrect status")} + }, + result: pubsub.ValidationReject, + }, + { + error: errors.New("block root seen"), + verifier: func(pa payloadattestation.ROMessage, reqs []verification.Requirement) verification.PayloadAttestationMsgVerifier { + return &verification.MockPayloadAttestation{ErrPayloadAttBlockRootNotSeen: errors.New("block root seen")} + }, + result: pubsub.ValidationIgnore, + }, + { + error: errors.New("block root invalid"), + verifier: func(pa payloadattestation.ROMessage, reqs []verification.Requirement) verification.PayloadAttestationMsgVerifier { + return &verification.MockPayloadAttestation{ErrPayloadAttBlockRootInvalid: errors.New("block root invalid")} + }, + result: pubsub.ValidationReject, + }, + { + error: errors.New("validator not in PTC"), + verifier: func(pa payloadattestation.ROMessage, reqs []verification.Requirement) verification.PayloadAttestationMsgVerifier { + return &verification.MockPayloadAttestation{ErrIncorrectPayloadAttValidator: errors.New("validator not in PTC")} + }, + result: pubsub.ValidationReject, + }, + { + error: errors.New("incorrect signature"), + verifier: func(pa payloadattestation.ROMessage, reqs []verification.Requirement) verification.PayloadAttestationMsgVerifier { + return &verification.MockPayloadAttestation{ErrInvalidMessageSignature: errors.New("incorrect signature")} + }, + result: pubsub.ValidationReject, + }, + } + for _, tt := range tests { + t.Run(tt.error.Error(), func(t *testing.T) { + ctx := context.Background() + p := p2ptest.NewTestP2P(t) + chainService := &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(params.BeaconConfig().SecondsPerSlot), 0)} + s := &Service{ + payloadAttestationCache: &cache.PayloadAttestationCache{}, + cfg: &config{chain: chainService, p2p: p, initialSync: &mockSync.Sync{}, clock: startup.NewClock(chainService.Genesis, chainService.ValidatorsRoot)}} + s.newPayloadAttestationVerifier = tt.verifier + + msg := random.PayloadAttestationMessage(t) + buf := new(bytes.Buffer) + _, err := p.Encoding().EncodeGossip(buf, msg) + require.NoError(t, err) + + topic := p2p.GossipTypeMapping[reflect.TypeOf(msg)] + digest, err := s.currentForkDigest() + require.NoError(t, err) + topic = s.addDigestToTopic(topic, digest) + + result, err := s.validatePayloadAttestation(ctx, "", &pubsub.Message{ + Message: &pb.Message{ + Data: buf.Bytes(), + Topic: &topic, + }}) + + require.ErrorContains(t, tt.error.Error(), err) + require.Equal(t, result, tt.result) + }) + } +} + +func TestValidatePayloadAttestationMessage_Accept(t *testing.T) { + ctx := context.Background() + p := p2ptest.NewTestP2P(t) + chainService := &mock.ChainService{Genesis: time.Unix(time.Now().Unix()-int64(params.BeaconConfig().SecondsPerSlot), 0)} + s := &Service{ + payloadAttestationCache: &cache.PayloadAttestationCache{}, + cfg: &config{chain: chainService, p2p: p, initialSync: &mockSync.Sync{}, clock: startup.NewClock(chainService.Genesis, chainService.ValidatorsRoot)}} + s.newPayloadAttestationVerifier = func(pa payloadattestation.ROMessage, reqs []verification.Requirement) verification.PayloadAttestationMsgVerifier { + return &verification.MockPayloadAttestation{} + } + + msg := random.PayloadAttestationMessage(t) + buf := new(bytes.Buffer) + _, err := p.Encoding().EncodeGossip(buf, msg) + require.NoError(t, err) + + topic := p2p.GossipTypeMapping[reflect.TypeOf(msg)] + digest, err := s.currentForkDigest() + require.NoError(t, err) + topic = s.addDigestToTopic(topic, digest) + + result, err := s.validatePayloadAttestation(ctx, "", &pubsub.Message{ + Message: &pb.Message{ + Data: buf.Bytes(), + Topic: &topic, + }}) + require.NoError(t, err) + require.Equal(t, result, pubsub.ValidationAccept) +} diff --git a/beacon-chain/sync/service.go b/beacon-chain/sync/service.go index 473d3d9709ff..c2a5a28867e5 100644 --- a/beacon-chain/sync/service.go +++ b/beacon-chain/sync/service.go @@ -19,6 +19,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/async/abool" "github.com/prysmaticlabs/prysm/v5/async/event" "github.com/prysmaticlabs/prysm/v5/beacon-chain/blockchain" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/cache" blockfeed "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/feed/block" "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/feed/operation" statefeed "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/feed/state" @@ -38,6 +39,7 @@ import ( lruwrpr "github.com/prysmaticlabs/prysm/v5/cache/lru" "github.com/prysmaticlabs/prysm/v5/config/params" "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + payloadattestation "github.com/prysmaticlabs/prysm/v5/consensus-types/epbs/payload-attestation" "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" leakybucket "github.com/prysmaticlabs/prysm/v5/container/leaky-bucket" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" @@ -101,6 +103,7 @@ type config struct { // This defines the interface for interacting with block chain service type blockchainService interface { blockchain.BlockReceiver + blockchain.PayloadAttestationReceiver blockchain.BlobReceiver blockchain.HeadFetcher blockchain.FinalizationFetcher @@ -112,52 +115,59 @@ type blockchainService interface { blockchain.OptimisticModeFetcher blockchain.SlashingReceiver blockchain.ForkchoiceFetcher + blockchain.ExecutionPayloadFetcher } // Service is responsible for handling all run time p2p related operations as the // main entry point for network messages. type Service struct { - cfg *config - ctx context.Context - cancel context.CancelFunc - slotToPendingBlocks *gcache.Cache - seenPendingBlocks map[[32]byte]bool - blkRootToPendingAtts map[[32]byte][]ethpb.SignedAggregateAttAndProof - subHandler *subTopicHandler - pendingAttsLock sync.RWMutex - pendingQueueLock sync.RWMutex - chainStarted *abool.AtomicBool - validateBlockLock sync.RWMutex - rateLimiter *limiter - seenBlockLock sync.RWMutex - seenBlockCache *lru.Cache - seenBlobLock sync.RWMutex - seenBlobCache *lru.Cache - seenAggregatedAttestationLock sync.RWMutex - seenAggregatedAttestationCache *lru.Cache - seenUnAggregatedAttestationLock sync.RWMutex - seenUnAggregatedAttestationCache *lru.Cache - seenExitLock sync.RWMutex - seenExitCache *lru.Cache - seenProposerSlashingLock sync.RWMutex - seenProposerSlashingCache *lru.Cache - seenAttesterSlashingLock sync.RWMutex - seenAttesterSlashingCache map[uint64]bool - seenSyncMessageLock sync.RWMutex - seenSyncMessageCache *lru.Cache - seenSyncContributionLock sync.RWMutex - seenSyncContributionCache *lru.Cache - badBlockCache *lru.Cache - badBlockLock sync.RWMutex - syncContributionBitsOverlapLock sync.RWMutex - syncContributionBitsOverlapCache *lru.Cache - signatureChan chan *signatureVerifier - clockWaiter startup.ClockWaiter - initialSyncComplete chan struct{} - verifierWaiter *verification.InitializerWaiter - newBlobVerifier verification.NewBlobVerifier - availableBlocker coverage.AvailableBlocker - ctxMap ContextByteVersions + cfg *config + ctx context.Context + cancel context.CancelFunc + slotToPendingBlocks *gcache.Cache + seenPendingBlocks map[[32]byte]bool + blkRootToPendingAtts map[[32]byte][]ethpb.SignedAggregateAttAndProof + subHandler *subTopicHandler + payloadAttestationCache *cache.PayloadAttestationCache + executionPayloadHeaderCache *cache.ExecutionPayloadHeaders + payloadEnvelopeCache *sync.Map + pendingAttsLock sync.RWMutex + pendingQueueLock sync.RWMutex + chainStarted *abool.AtomicBool + validateBlockLock sync.RWMutex + rateLimiter *limiter + seenBlockLock sync.RWMutex + seenBlockCache *lru.Cache + seenBlobLock sync.RWMutex + seenBlobCache *lru.Cache + seenAggregatedAttestationLock sync.RWMutex + seenAggregatedAttestationCache *lru.Cache + seenUnAggregatedAttestationLock sync.RWMutex + seenUnAggregatedAttestationCache *lru.Cache + seenExitLock sync.RWMutex + seenExitCache *lru.Cache + seenProposerSlashingLock sync.RWMutex + seenProposerSlashingCache *lru.Cache + seenAttesterSlashingLock sync.RWMutex + seenAttesterSlashingCache map[uint64]bool + seenSyncMessageLock sync.RWMutex + seenSyncMessageCache *lru.Cache + seenSyncContributionLock sync.RWMutex + seenSyncContributionCache *lru.Cache + badBlockCache *lru.Cache + badBlockLock sync.RWMutex + syncContributionBitsOverlapLock sync.RWMutex + syncContributionBitsOverlapCache *lru.Cache + signatureChan chan *signatureVerifier + clockWaiter startup.ClockWaiter + initialSyncComplete chan struct{} + verifierWaiter *verification.InitializerWaiter + newBlobVerifier verification.NewBlobVerifier + newPayloadAttestationVerifier verification.NewPayloadAttestationMsgVerifier + newExecutionPayloadEnvelopeVerifier verification.NewExecutionPayloadEnvelopeVerifier + newExecutionPayloadHeaderVerifier verification.NewExecutionPayloadHeaderVerifier + availableBlocker coverage.AvailableBlocker + ctxMap ContextByteVersions } // NewService initializes new regular sync service. @@ -214,6 +224,12 @@ func newBlobVerifierFromInitializer(ini *verification.Initializer) verification. } } +func newPayloadAttestationMessageFromInitializer(ini *verification.Initializer) verification.NewPayloadAttestationMsgVerifier { + return func(pa payloadattestation.ROMessage, reqs []verification.Requirement) verification.PayloadAttestationMsgVerifier { + return ini.NewPayloadAttestationMsgVerifier(pa, reqs) + } +} + // Start the regular sync service. func (s *Service) Start() { v, err := s.verifierWaiter.WaitForInitializer(s.ctx) @@ -222,6 +238,7 @@ func (s *Service) Start() { return } s.newBlobVerifier = newBlobVerifierFromInitializer(v) + s.newPayloadAttestationVerifier = newPayloadAttestationMessageFromInitializer(v) go s.verifierRoutine() go s.registerHandlers() diff --git a/beacon-chain/sync/subscriber.go b/beacon-chain/sync/subscriber.go index 5d2f054b83d6..0000ba3a72a1 100644 --- a/beacon-chain/sync/subscriber.go +++ b/beacon-chain/sync/subscriber.go @@ -145,6 +145,28 @@ func (s *Service) registerSubscribers(epoch primitives.Epoch, digest [4]byte) { params.BeaconConfig().BlobsidecarSubnetCount, ) } + + // New Gossip Topic for ePBS + if epoch >= params.BeaconConfig().EPBSForkEpoch { + s.subscribe( + p2p.PayloadAttestationMessageTopicFormat, + s.validatePayloadAttestation, + s.payloadAttestationSubscriber, + digest, + ) + s.subscribe( + p2p.SignedExecutionPayloadEnvelopeTopicFormat, + s.validateExecutionPayloadEnvelope, + s.executionPayloadEnvelopeSubscriber, + digest, + ) + s.subscribe( + p2p.SignedExecutionPayloadHeaderTopicFormat, + s.validateExecutionPayloadHeader, + s.subscribeExecutionPayloadHeader, + digest, + ) + } } // subscribe to a given topic with a given validator and subscription handler. diff --git a/beacon-chain/sync/validate_beacon_blocks.go b/beacon-chain/sync/validate_beacon_blocks.go index 42bd6e0aaa20..d930703b3b6c 100644 --- a/beacon-chain/sync/validate_beacon_blocks.go +++ b/beacon-chain/sync/validate_beacon_blocks.go @@ -405,6 +405,20 @@ func (s *Service) hasBadBlock(root [32]byte) bool { return seen } +// seenBlockRoot returns true if the block is marked as a bad block or if not, if the block is +// in forkchoice +func (s *Service) seenBlockRoot(root [32]byte) bool { + if s.hasBadBlock(root) { + return true + } + return s.cfg.chain.InForkchoice(root) +} + +// seenBlockHash returns true if the block hash is seen in the fork choice store. +func (s *Service) seenBlockHash(hash [32]byte) bool { + return s.cfg.chain.HashInForkchoice(hash) +} + // Set bad block in the cache. func (s *Service) setBadBlock(ctx context.Context, root [32]byte) { s.badBlockLock.Lock() diff --git a/beacon-chain/sync/validate_beacon_blocks_test.go b/beacon-chain/sync/validate_beacon_blocks_test.go index 353cf817b8d2..4bab10aa3a73 100644 --- a/beacon-chain/sync/validate_beacon_blocks_test.go +++ b/beacon-chain/sync/validate_beacon_blocks_test.go @@ -1495,3 +1495,28 @@ func Test_validateDenebBeaconBlock(t *testing.T) { require.NoError(t, err) require.ErrorIs(t, validateDenebBeaconBlock(bdb.Block()), errRejectCommitmentLen) } + +func Test_seenBlockRoot(t *testing.T) { + chainService := &mock.ChainService{ + NotFinalized: false, // InForkchoice returns true + } + s := Service{ + cfg: &config{ + chain: chainService, + }, + } + s.initCaches() + root := [32]byte{'b', 'a', 'd'} + ctx := context.Background() + + // Block is not bad but is in forkchoice + require.Equal(t, true, s.seenBlockRoot(root)) + + // Block is not bad and not in forkchoice + chainService.NotFinalized = true + require.Equal(t, false, s.seenBlockRoot(root)) + + // Block is bad + s.setBadBlock(ctx, root) + require.Equal(t, true, s.seenBlockRoot(root)) +} diff --git a/beacon-chain/verification/BUILD.bazel b/beacon-chain/verification/BUILD.bazel index fa95e5451e65..5822f4c51a88 100644 --- a/beacon-chain/verification/BUILD.bazel +++ b/beacon-chain/verification/BUILD.bazel @@ -6,18 +6,27 @@ go_library( "batch.go", "blob.go", "cache.go", + "epbs.go", "error.go", + "execution_payload_envelope.go", + "execution_payload_envelope_mock.go", + "execution_payload_header.go", + "execution_payload_header_mock.go", "fake.go", "initializer.go", + "initializer_epbs.go", "interface.go", "metrics.go", "mock.go", + "payload_attestation.go", + "payload_attestation_mock.go", "result.go", ], importpath = "github.com/prysmaticlabs/prysm/v5/beacon-chain/verification", visibility = ["//visibility:public"], deps = [ "//beacon-chain/blockchain/kzg:go_default_library", + "//beacon-chain/core/epbs:go_default_library", "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/core/signing:go_default_library", "//beacon-chain/core/transition:go_default_library", @@ -28,6 +37,8 @@ go_library( "//config/fieldparams:go_default_library", "//config/params:go_default_library", "//consensus-types/blocks:go_default_library", + "//consensus-types/epbs/payload-attestation:go_default_library", + "//consensus-types/interfaces:go_default_library", "//consensus-types/primitives:go_default_library", "//crypto/bls:go_default_library", "//encoding/bytesutil:go_default_library", @@ -49,26 +60,34 @@ go_test( "batch_test.go", "blob_test.go", "cache_test.go", + "execution_payload_envelope_test.go", + "execution_payload_header_test.go", "initializer_test.go", + "payload_attestation_test.go", "result_test.go", ], embed = [":go_default_library"], deps = [ + "//beacon-chain/core/helpers:go_default_library", "//beacon-chain/core/signing:go_default_library", "//beacon-chain/db:go_default_library", "//beacon-chain/forkchoice/types:go_default_library", "//beacon-chain/startup:go_default_library", "//beacon-chain/state:go_default_library", + "//beacon-chain/state/state-native:go_default_library", "//config/fieldparams:go_default_library", "//config/params:go_default_library", "//consensus-types/blocks:go_default_library", + "//consensus-types/epbs/payload-attestation:go_default_library", "//consensus-types/primitives:go_default_library", "//crypto/bls:go_default_library", "//encoding/bytesutil:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//runtime/interop:go_default_library", "//testing/require:go_default_library", "//testing/util:go_default_library", + "//testing/util/random:go_default_library", "//time/slots:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_stretchr_testify//require:go_default_library", diff --git a/beacon-chain/verification/epbs.go b/beacon-chain/verification/epbs.go new file mode 100644 index 000000000000..71ad88f752ce --- /dev/null +++ b/beacon-chain/verification/epbs.go @@ -0,0 +1,59 @@ +package verification + +import ( + "context" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + payloadattestation "github.com/prysmaticlabs/prysm/v5/consensus-types/epbs/payload-attestation" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" +) + +// PayloadAttestationMsgVerifier defines the methods implemented by the ROPayloadAttestation. +// It is similar to BlobVerifier, but for payload attestation messages. +type PayloadAttestationMsgVerifier interface { + VerifyCurrentSlot() error + VerifyPayloadStatus() error + VerifyBlockRootSeen(func([32]byte) bool) error + VerifyBlockRootValid(func([32]byte) bool) error + VerifyValidatorInPTC(context.Context, state.BeaconState) error + VerifySignature(state.BeaconState) error + VerifiedPayloadAttestation() (payloadattestation.VerifiedROMessage, error) + SatisfyRequirement(Requirement) +} + +// NewPayloadAttestationMsgVerifier is a function signature that can be used by code that needs to be +// able to mock Initializer.NewPayloadAttestationMsgVerifier without complex setup. +type NewPayloadAttestationMsgVerifier func(pa payloadattestation.ROMessage, reqs []Requirement) PayloadAttestationMsgVerifier + +// ExecutionPayloadEnvelopeVerifier defines the methods implemented by the ROSignedExecutionPayloadEnvelope. +// It is similar to BlobVerifier, but for signed execution payload envelope. +type ExecutionPayloadEnvelopeVerifier interface { + VerifyBlockRootSeen(func([32]byte) bool) error + VerifyBlockRootValid(func([32]byte) bool) error + VerifyBuilderValid(interfaces.ROExecutionPayloadHeaderEPBS) error + VerifyPayloadHash(interfaces.ROExecutionPayloadHeaderEPBS) error + VerifySignature(state.BeaconState) error + SetSlot(primitives.Slot) error + SatisfyRequirement(Requirement) +} + +// NewExecutionPayloadEnvelopeVerifier is a function signature that can be used by code that needs to be +// able to mock Initializer.NewExecutionPayloadEnvelopeVerifier without complex setup. +type NewExecutionPayloadEnvelopeVerifier func(e interfaces.ROSignedExecutionPayloadEnvelope, reqs []Requirement) ExecutionPayloadEnvelopeVerifier + +// ExecutionPayloadHeaderVerifier defines the methods implemented by the ROSignedExecutionPayloadHeader. +// It is similar to BlobVerifier, but for signed execution payload header. +type ExecutionPayloadHeaderVerifier interface { + VerifyBuilderActiveNotSlashed() error + VerifyBuilderSufficientBalance() error + VerifyParentBlockHashSeen(func([32]byte) bool) error + VerifyParentBlockRootSeen(seen func([32]byte) bool) (err error) + VerifyCurrentOrNextSlot() error + VerifySignature() error + SatisfyRequirement(Requirement) +} + +// NewExecutionPayloadHeaderVerifier is a function signature that can be used by code that needs to be +// able to mock Initializer.NewExecutionPayloadHeaderVerifier without complex setup. +type NewExecutionPayloadHeaderVerifier func(e interfaces.ROSignedExecutionPayloadHeader, st state.ReadOnlyBeaconState, reqs []Requirement) ExecutionPayloadHeaderVerifier diff --git a/beacon-chain/verification/execution_payload_envelope.go b/beacon-chain/verification/execution_payload_envelope.go new file mode 100644 index 000000000000..7721d90af3af --- /dev/null +++ b/beacon-chain/verification/execution_payload_envelope.go @@ -0,0 +1,203 @@ +package verification + +import ( + "fmt" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/time/slots" + log "github.com/sirupsen/logrus" +) + +const ( + RequireBuilderValid Requirement = iota + RequirePayloadHashValid +) + +// ExecutionPayloadEnvelopeGossipRequirements defines the list of requirements for gossip +// execution payload envelopes. +var ExecutionPayloadEnvelopeGossipRequirements = []Requirement{ + RequireBlockRootSeen, + RequireBlockRootValid, + RequireBuilderValid, + RequirePayloadHashValid, + RequireSignatureValid, +} + +// GossipExecutionPayloadEnvelopeRequirements is a requirement list for gossip execution payload envelopes. +var GossipExecutionPayloadEnvelopeRequirements = RequirementList(ExecutionPayloadEnvelopeGossipRequirements) + +var ( + ErrEnvelopeBlockRootNotSeen = errors.New("block root not seen") + ErrEnvelopeBlockRootInvalid = errors.New("block root invalid") + ErrIncorrectEnvelopeBuilder = errors.New("builder index does not match committed header") + ErrIncorrectEnvelopeBlockHash = errors.New("block hash does not match committed header") +) + +var _ ExecutionPayloadEnvelopeVerifier = &EnvelopeVerifier{} + +// EnvelopeVerifier is a read-only verifier for execution payload envelopes. +type EnvelopeVerifier struct { + results *results + e interfaces.ROSignedExecutionPayloadEnvelope +} + +// VerifyBlockRootSeen verifies if the block root has been seen before. +func (v *EnvelopeVerifier) VerifyBlockRootSeen(parentSeen func([32]byte) bool) (err error) { + defer v.record(RequireBlockRootSeen, &err) + env, err := v.e.Envelope() + if err != nil { + return err + } + if parentSeen != nil && parentSeen(env.BeaconBlockRoot()) { + return nil + } + log.WithFields(envelopeLogFields(env)).Error(ErrEnvelopeBlockRootNotSeen.Error()) + return ErrEnvelopeBlockRootNotSeen +} + +// VerifyBlockRootValid verifies if the block root is valid. +func (v *EnvelopeVerifier) VerifyBlockRootValid(badBlock func([32]byte) bool) (err error) { + defer v.record(RequireBlockRootValid, &err) + env, err := v.e.Envelope() + if err != nil { + return err + } + if badBlock != nil && badBlock(env.BeaconBlockRoot()) { + log.WithFields(envelopeLogFields(env)).Error(ErrEnvelopeBlockRootInvalid.Error()) + return ErrPayloadAttBlockRootInvalid + } + return nil +} + +// VerifyBuilderValid checks that the builder index matches the one in the +// payload header +func (v *EnvelopeVerifier) VerifyBuilderValid(header interfaces.ROExecutionPayloadHeaderEPBS) (err error) { + defer v.record(RequireBuilderValid, &err) + env, err := v.e.Envelope() + if err != nil { + return err + } + if header.BuilderIndex() != env.BuilderIndex() { + log.WithFields(envelopeLogFields(env)).Error(ErrIncorrectEnvelopeBuilder.Error()) + return ErrIncorrectEnvelopeBuilder + } + return nil +} + +// VerifyPayloadHash checks that the payload blockhash matches the one in the +// payload header +func (v *EnvelopeVerifier) VerifyPayloadHash(header interfaces.ROExecutionPayloadHeaderEPBS) (err error) { + defer v.record(RequirePayloadHashValid, &err) + env, err := v.e.Envelope() + if err != nil { + return err + } + if env.PayloadWithheld() { + return nil + } + payload, err := env.Execution() + if err != nil { + return err + } + if header.BlockHash() != [32]byte(payload.BlockHash()) { + log.WithFields(envelopeLogFields(env)).Error(ErrIncorrectEnvelopeBlockHash.Error()) + return ErrIncorrectEnvelopeBlockHash + } + return nil +} + +// VerifySignature verifies the signature of the execution payload envelope. +func (v *EnvelopeVerifier) VerifySignature(st state.BeaconState) (err error) { + defer v.record(RequireSignatureValid, &err) + + err = validatePayloadEnvelopeSignature(st, v.e) + if err != nil { + env, envErr := v.e.Envelope() + if envErr != nil { + return err + } + if errors.Is(err, signing.ErrSigFailedToVerify) { + log.WithFields(envelopeLogFields(env)).Error("signature failed to validate") + } else { + log.WithFields(envelopeLogFields(env)).WithError(err).Error("could not validate signature") + } + return err + } + return nil +} + +// SetSlot initializes the internal slot member of the execution payload +// envelope +func (v *EnvelopeVerifier) SetSlot(slot primitives.Slot) error { + env, err := v.e.Envelope() + if err != nil { + return err + } + env.SetSlot(slot) + return nil +} + +// SatisfyRequirement allows the caller to manually mark a requirement as satisfied. +func (v *EnvelopeVerifier) SatisfyRequirement(req Requirement) { + v.record(req, nil) +} + +// envelopeLogFields returns log fields for a ROExecutionPayloadEnvelope instance. +func envelopeLogFields(e interfaces.ROExecutionPayloadEnvelope) log.Fields { + return log.Fields{ + "builderIndex": e.BuilderIndex(), + "beaconBlockRoot": fmt.Sprintf("%#x", e.BeaconBlockRoot()), + "PayloadWithheld": e.PayloadWithheld(), + "stateRoot": fmt.Sprintf("%#x", e.StateRoot()), + } +} + +// record records the result of a requirement verification. +func (v *EnvelopeVerifier) record(req Requirement, err *error) { + if err == nil || *err == nil { + v.results.record(req, nil) + return + } + + v.results.record(req, *err) +} + +// validatePayloadEnvelopeSignature verifies the signature of a signed execution payload envelope +func validatePayloadEnvelopeSignature(st state.BeaconState, e interfaces.ROSignedExecutionPayloadEnvelope) error { + env, err := e.Envelope() + if err != nil { + return err + } + val, err := st.ValidatorAtIndex(env.BuilderIndex()) + if err != nil { + return err + } + pub, err := bls.PublicKeyFromBytes(val.PublicKey) + if err != nil { + return err + } + s := e.Signature() + sig, err := bls.SignatureFromBytes(s[:]) + if err != nil { + return err + } + currentEpoch := slots.ToEpoch(st.Slot()) + domain, err := signing.Domain(st.Fork(), currentEpoch, params.BeaconConfig().DomainBeaconBuilder, st.GenesisValidatorsRoot()) + if err != nil { + return err + } + root, err := e.SigningRoot(domain) + if err != nil { + return err + } + if !sig.Verify(pub, root[:]) { + return signing.ErrSigFailedToVerify + } + return nil +} diff --git a/beacon-chain/verification/execution_payload_envelope_mock.go b/beacon-chain/verification/execution_payload_envelope_mock.go new file mode 100644 index 000000000000..ab510eab917d --- /dev/null +++ b/beacon-chain/verification/execution_payload_envelope_mock.go @@ -0,0 +1,44 @@ +package verification + +import ( + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" +) + +type MockExecutionPayloadEnvelope struct { + ErrBlockRootNotSeen error + ErrBlockRootInvalid error + ErrBuilderIndexInvalid error + ErrBlockHashInvalid error + ErrSignatureInvalid error + ErrUnsatisfiedRequirement error +} + +var _ ExecutionPayloadEnvelopeVerifier = &MockExecutionPayloadEnvelope{} + +func (e *MockExecutionPayloadEnvelope) VerifyBlockRootSeen(_ func([32]byte) bool) error { + return e.ErrBlockRootNotSeen +} + +func (e *MockExecutionPayloadEnvelope) VerifyBlockRootValid(_ func([32]byte) bool) error { + return e.ErrBlockRootInvalid +} + +func (e *MockExecutionPayloadEnvelope) VerifyBuilderValid(_ interfaces.ROExecutionPayloadHeaderEPBS) error { + return e.ErrBuilderIndexInvalid +} + +func (e *MockExecutionPayloadEnvelope) VerifyPayloadHash(_ interfaces.ROExecutionPayloadHeaderEPBS) error { + return e.ErrBlockHashInvalid +} + +func (e *MockExecutionPayloadEnvelope) VerifySignature(_ state.BeaconState) error { + return e.ErrSignatureInvalid +} + +func (e *MockExecutionPayloadEnvelope) SetSlot(_ primitives.Slot) error { + return nil +} + +func (e *MockExecutionPayloadEnvelope) SatisfyRequirement(_ Requirement) {} diff --git a/beacon-chain/verification/execution_payload_envelope_test.go b/beacon-chain/verification/execution_payload_envelope_test.go new file mode 100644 index 000000000000..54a70cf7422a --- /dev/null +++ b/beacon-chain/verification/execution_payload_envelope_test.go @@ -0,0 +1,286 @@ +package verification + +import ( + "testing" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + state_native "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" +) + +func TestExecutionPayloadEnvelope_VerifyBlockRootSeen(t *testing.T) { + beaconBlockRoot := [32]byte{1, 2, 3} + verifier := newExecutionPayloadEnvelopeVerifier(t, &enginev1.SignedExecutionPayloadEnvelope{ + Message: &enginev1.ExecutionPayloadEnvelope{ + Payload: &enginev1.ExecutionPayloadElectra{}, + BeaconBlockRoot: beaconBlockRoot[:], + BlobKzgCommitments: [][]byte{make([]byte, 48), make([]byte, 48), make([]byte, 48)}, + StateRoot: make([]byte, 32), + }, + Signature: make([]byte, 96), + }) + + t.Run("parentSeen nil", func(t *testing.T) { + require.ErrorIs(t, verifier.VerifyBlockRootSeen(nil), ErrEnvelopeBlockRootNotSeen) + require.Equal(t, true, verifier.results.executed(RequireBlockRootSeen)) + require.Equal(t, ErrEnvelopeBlockRootNotSeen, verifier.results.result(RequireBlockRootSeen)) + }) + + t.Run("parentSeen true", func(t *testing.T) { + require.NoError(t, verifier.VerifyBlockRootSeen(badParentCb(t, beaconBlockRoot, true))) + require.Equal(t, true, verifier.results.executed(RequireBlockRootSeen)) + require.NoError(t, verifier.results.result(RequireBlockRootSeen)) + }) + + t.Run("parentSeen false", func(t *testing.T) { + require.ErrorIs(t, verifier.VerifyBlockRootSeen(badParentCb(t, beaconBlockRoot, false)), ErrEnvelopeBlockRootNotSeen) + require.Equal(t, true, verifier.results.executed(RequireBlockRootSeen)) + require.Equal(t, ErrEnvelopeBlockRootNotSeen, verifier.results.result(RequireBlockRootSeen)) + }) +} + +func TestExecutionPayloadEnvelope_VerifyBlockRootValid(t *testing.T) { + beaconBlockRoot := [32]byte{1, 2, 3} + verifier := newExecutionPayloadEnvelopeVerifier(t, &enginev1.SignedExecutionPayloadEnvelope{ + Message: &enginev1.ExecutionPayloadEnvelope{ + Payload: &enginev1.ExecutionPayloadElectra{}, + BeaconBlockRoot: beaconBlockRoot[:], + BlobKzgCommitments: [][]byte{make([]byte, 48), make([]byte, 48), make([]byte, 48)}, + StateRoot: make([]byte, 32), + }, + Signature: make([]byte, 96), + }) + + t.Run("badBlock true", func(t *testing.T) { + require.ErrorIs(t, verifier.VerifyBlockRootValid(badParentCb(t, beaconBlockRoot, true)), ErrPayloadAttBlockRootInvalid) + require.Equal(t, true, verifier.results.executed(RequireBlockRootValid)) + require.Equal(t, ErrPayloadAttBlockRootInvalid, verifier.results.result(RequireBlockRootValid)) + }) + + t.Run("badBlock false", func(t *testing.T) { + require.NoError(t, verifier.VerifyBlockRootValid(badParentCb(t, beaconBlockRoot, false))) + require.Equal(t, true, verifier.results.executed(RequireBlockRootValid)) + require.NoError(t, verifier.results.result(RequireBlockRootValid)) + }) +} + +func TestExecutionPayloadEnvelope_VerifyBuilderValid(t *testing.T) { + builderIndexWanted := primitives.ValidatorIndex(1) + builderIndexMatch := builderIndexWanted + builderIndexMismatch := primitives.ValidatorIndex(2) + verifier := newExecutionPayloadEnvelopeVerifier(t, &enginev1.SignedExecutionPayloadEnvelope{ + Message: &enginev1.ExecutionPayloadEnvelope{ + Payload: &enginev1.ExecutionPayloadElectra{}, + BuilderIndex: builderIndexWanted, + BeaconBlockRoot: make([]byte, 32), + BlobKzgCommitments: [][]byte{make([]byte, 48), make([]byte, 48), make([]byte, 48)}, + StateRoot: make([]byte, 32), + }, + Signature: make([]byte, 96), + }) + + t.Run("builder index match", func(t *testing.T) { + header, err := blocks.WrappedROExecutionPayloadHeaderEPBS(&enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: make([]byte, 32), + ParentBlockRoot: make([]byte, 32), + BlockHash: make([]byte, 32), + BuilderIndex: builderIndexMatch, + BlobKzgCommitmentsRoot: make([]byte, 32), + }) + require.NoError(t, err) + require.NoError(t, verifier.VerifyBuilderValid(header)) + require.Equal(t, true, verifier.results.executed(RequireBuilderValid)) + require.NoError(t, verifier.results.result(RequireBuilderValid)) + }) + + t.Run("builder index mismatch", func(t *testing.T) { + header, err := blocks.WrappedROExecutionPayloadHeaderEPBS(&enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: make([]byte, 32), + ParentBlockRoot: make([]byte, 32), + BlockHash: make([]byte, 32), + BuilderIndex: builderIndexMismatch, + BlobKzgCommitmentsRoot: make([]byte, 32), + }) + require.NoError(t, err) + require.ErrorIs(t, verifier.VerifyBuilderValid(header), ErrIncorrectEnvelopeBuilder) + require.Equal(t, true, verifier.results.executed(RequireBuilderValid)) + require.Equal(t, ErrIncorrectEnvelopeBuilder, verifier.results.result(RequireBuilderValid)) + }) +} + +func TestExecutionPayloadEnvelope_VerifyPayloadHash(t *testing.T) { + blockHashWanted := [32]byte{1, 2, 3} + blockHashMatch := blockHashWanted + blockHashMismatch := [32]byte{4, 5, 6} + verifier := newExecutionPayloadEnvelopeVerifier(t, &enginev1.SignedExecutionPayloadEnvelope{ + Message: &enginev1.ExecutionPayloadEnvelope{ + Payload: &enginev1.ExecutionPayloadElectra{ + BlockHash: blockHashWanted[:], + }, + BeaconBlockRoot: make([]byte, 32), + BlobKzgCommitments: [][]byte{make([]byte, 48), make([]byte, 48), make([]byte, 48)}, + StateRoot: make([]byte, 32), + }, + Signature: make([]byte, 96), + }) + + t.Run("payload hash match", func(t *testing.T) { + header, err := blocks.WrappedROExecutionPayloadHeaderEPBS(&enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: make([]byte, 32), + ParentBlockRoot: make([]byte, 32), + BlockHash: blockHashMatch[:], + BlobKzgCommitmentsRoot: make([]byte, 32), + }) + require.NoError(t, err) + require.NoError(t, verifier.VerifyPayloadHash(header)) + require.Equal(t, true, verifier.results.executed(RequirePayloadHashValid)) + require.NoError(t, verifier.results.result(RequirePayloadHashValid)) + }) + + t.Run("payload hash mismatch", func(t *testing.T) { + header, err := blocks.WrappedROExecutionPayloadHeaderEPBS(&enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: make([]byte, 32), + ParentBlockRoot: make([]byte, 32), + BlockHash: blockHashMismatch[:], + BlobKzgCommitmentsRoot: make([]byte, 32), + }) + require.NoError(t, err) + require.ErrorIs(t, verifier.VerifyPayloadHash(header), ErrIncorrectEnvelopeBlockHash) + require.Equal(t, true, verifier.results.executed(RequirePayloadHashValid)) + require.Equal(t, ErrIncorrectEnvelopeBlockHash, verifier.results.result(RequirePayloadHashValid)) + }) +} + +func TestExecutionPayloadEnvelope_VerifySignature(t *testing.T) { + _, secretKeys, err := util.DeterministicDepositsAndKeys(2) + require.NoError(t, err) + st, err := state_native.InitializeFromProtoEpbs(ðpb.BeaconStateEPBS{ + Validators: []*ethpb.Validator{ + {PublicKey: secretKeys[0].PublicKey().Marshal()}, + {PublicKey: secretKeys[1].PublicKey().Marshal()}, + }, + Fork: ðpb.Fork{ + CurrentVersion: params.BeaconConfig().EPBSForkVersion, + PreviousVersion: params.BeaconConfig().ElectraForkVersion, + }, + }) + require.NoError(t, err) + epoch := primitives.Epoch(1) + + builderIndexWanted := primitives.ValidatorIndex(0) + builderIndexMatch := builderIndexWanted + builderIndexMismatch := primitives.ValidatorIndex(1) + envelope := &enginev1.ExecutionPayloadEnvelope{ + Payload: &enginev1.ExecutionPayloadElectra{ + ParentHash: make([]byte, 32), + FeeRecipient: make([]byte, 20), + StateRoot: make([]byte, 32), + ReceiptsRoot: make([]byte, 32), + LogsBloom: make([]byte, 256), + PrevRandao: make([]byte, 32), + BaseFeePerGas: make([]byte, 32), + BlockHash: make([]byte, 32), + }, + ExecutionRequests: random.ExecutionRequests(t), + BuilderIndex: builderIndexWanted, + BeaconBlockRoot: make([]byte, 32), + BlobKzgCommitments: [][]byte{make([]byte, 48), make([]byte, 48), make([]byte, 48)}, + StateRoot: make([]byte, 32), + } + + t.Run("signature valid", func(t *testing.T) { + signedBytes, err := signing.ComputeDomainAndSign( + st, + epoch, + envelope, + params.BeaconConfig().DomainBeaconBuilder, + secretKeys[builderIndexMatch], + ) + require.NoError(t, err) + signature, err := bls.SignatureFromBytes(signedBytes) + require.NoError(t, err) + + verifier := newExecutionPayloadEnvelopeVerifier(t, &enginev1.SignedExecutionPayloadEnvelope{ + Message: envelope, + Signature: signature.Marshal(), + }) + require.NoError(t, verifier.VerifySignature(st)) + require.Equal(t, true, verifier.results.executed(RequireSignatureValid)) + require.NoError(t, verifier.results.result(RequireSignatureValid)) + }) + + t.Run("signature invalid", func(t *testing.T) { + signedBytes, err := signing.ComputeDomainAndSign( + st, + epoch, + envelope, + params.BeaconConfig().DomainBeaconBuilder, + secretKeys[builderIndexMismatch], + ) + require.NoError(t, err) + signature, err := bls.SignatureFromBytes(signedBytes) + require.NoError(t, err) + + verifier := newExecutionPayloadEnvelopeVerifier(t, &enginev1.SignedExecutionPayloadEnvelope{ + Message: envelope, + Signature: signature.Marshal(), + }) + require.ErrorIs(t, verifier.VerifySignature(st), signing.ErrSigFailedToVerify) + require.Equal(t, true, verifier.results.executed(RequireSignatureValid)) + require.Equal(t, signing.ErrSigFailedToVerify, verifier.results.result(RequireSignatureValid)) + }) +} + +func TestExecutionPayloadEnvelope_SatisfyRequirement(t *testing.T) { + t.Run("requirements satisfy", func(t *testing.T) { + verifier := newExecutionPayloadEnvelopeVerifier(t, &enginev1.SignedExecutionPayloadEnvelope{ + Message: &enginev1.ExecutionPayloadEnvelope{ + Payload: &enginev1.ExecutionPayloadElectra{}, + BeaconBlockRoot: make([]byte, 32), + BlobKzgCommitments: [][]byte{make([]byte, 48), make([]byte, 48), make([]byte, 48)}, + StateRoot: make([]byte, 32), + }, + Signature: make([]byte, 96), + }) + + for _, requirement := range GossipExecutionPayloadEnvelopeRequirements { + verifier.SatisfyRequirement(requirement) + } + require.Equal(t, true, verifier.results.allSatisfied()) + }) + + t.Run("requirements dissatisfy", func(t *testing.T) { + verifier := newExecutionPayloadEnvelopeVerifier(t, &enginev1.SignedExecutionPayloadEnvelope{ + Message: &enginev1.ExecutionPayloadEnvelope{ + Payload: &enginev1.ExecutionPayloadElectra{}, + BeaconBlockRoot: make([]byte, 32), + BlobKzgCommitments: [][]byte{make([]byte, 48), make([]byte, 48), make([]byte, 48)}, + StateRoot: make([]byte, 32), + }, + Signature: make([]byte, 96), + }) + + for _, requirement := range GossipExecutionPayloadEnvelopeRequirements[:len(GossipExecutionPayloadEnvelopeRequirements)-1] { + verifier.SatisfyRequirement(requirement) + } + require.Equal(t, false, verifier.results.allSatisfied()) + }) +} + +func newExecutionPayloadEnvelopeVerifier(t *testing.T, s *enginev1.SignedExecutionPayloadEnvelope) *EnvelopeVerifier { + e, err := blocks.WrappedROSignedExecutionPayloadEnvelope(s) + require.NoError(t, err) + + return &EnvelopeVerifier{ + results: newResults(GossipExecutionPayloadEnvelopeRequirements...), + e: e, + } +} diff --git a/beacon-chain/verification/execution_payload_header.go b/beacon-chain/verification/execution_payload_header.go new file mode 100644 index 000000000000..86eeb98533b6 --- /dev/null +++ b/beacon-chain/verification/execution_payload_header.go @@ -0,0 +1,202 @@ +package verification + +import ( + "fmt" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/epbs" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/time/slots" + log "github.com/sirupsen/logrus" +) + +const ( + RequireBuilderActiveNotSlashed Requirement = iota + RequireBuilderSufficientBalance + RequireKnownParentBlockHash + RequireKnownParentBlockRoot + RequireCurrentOrNextSlot +) + +// ExecutionPayloadHeaderGossipRequirements defines the list of requirements for gossip +// signed execution payload header. +var ExecutionPayloadHeaderGossipRequirements = []Requirement{ + RequireBuilderActiveNotSlashed, + RequireBuilderSufficientBalance, + RequireKnownParentBlockHash, + RequireBlockRootSeen, + RequireCurrentOrNextSlot, + RequireSignatureValid, +} + +// GossipExecutionPayloadHeaderRequirements is a requirement list for gossip execution payload header messages. +var GossipExecutionPayloadHeaderRequirements = RequirementList(PayloadAttGossipRequirements) + +var ( + ErrBuilderSlashed = errors.New("builder is slashed") + ErrBuilderInactive = errors.New("builder is inactive") + ErrBuilderInsufficientBalance = errors.New("insufficient builder balance") + ErrUnknownParentBlockHash = errors.New("unknown parent block hash") + ErrUnknownParentBlockRoot = errors.New("unknown parent block root") + ErrIncorrectPayloadHeaderSlot = errors.New("incorrect payload header slot") +) + +// HeaderVerifier is a verifier for execution payload headers. +type HeaderVerifier struct { + *sharedResources + results *results + h interfaces.ROSignedExecutionPayloadHeader + st state.ReadOnlyBeaconState +} + +var _ ExecutionPayloadHeaderVerifier = &HeaderVerifier{} + +// VerifyBuilderActiveNotSlashed verifies that the builder is active and not slashed. +func (v *HeaderVerifier) VerifyBuilderActiveNotSlashed() (err error) { + defer v.record(RequireBuilderActiveNotSlashed, &err) + + h, err := v.h.Header() + if err != nil { + return err + } + val, err := v.st.ValidatorAtIndexReadOnly(h.BuilderIndex()) + if err != nil { + return err + } + + if val.Slashed() { + log.WithFields(headerLogFields(h)).Error(ErrBuilderSlashed.Error()) + return ErrBuilderSlashed + } + + t := slots.ToEpoch(v.clock.CurrentSlot()) + if !helpers.IsActiveValidatorUsingTrie(val, t) { + log.WithFields(headerLogFields(h)).Error(ErrBuilderInactive.Error()) + return ErrBuilderInactive + } + + return nil +} + +// VerifyBuilderSufficientBalance verifies that the builder has a sufficient balance with respect to MinBuilderBalance. +func (v *HeaderVerifier) VerifyBuilderSufficientBalance() (err error) { + defer v.record(RequireBuilderSufficientBalance, &err) + + h, err := v.h.Header() + if err != nil { + return err + } + bal, err := v.st.BalanceAtIndex(h.BuilderIndex()) + if err != nil { + return err + } + + minBuilderBalance := params.BeaconConfig().MinBuilderBalance + if uint64(h.Value())+minBuilderBalance > bal { + log.WithFields(headerLogFields(h)).Errorf("insufficient builder balance %d - minimal builder balance %d", bal, minBuilderBalance) + return ErrBuilderInsufficientBalance + } + return nil +} + +// VerifyParentBlockHashSeen verifies that the parent block hash is known. +func (v *HeaderVerifier) VerifyParentBlockHashSeen(seen func([32]byte) bool) (err error) { + defer v.record(RequireKnownParentBlockHash, &err) + + h, err := v.h.Header() + if err != nil { + return err + } + + if seen != nil && seen(h.ParentBlockHash()) { + return nil + } + + log.WithFields(headerLogFields(h)).Error(ErrUnknownParentBlockHash.Error()) + return ErrUnknownParentBlockHash +} + +// VerifyParentBlockRootSeen verifies that the parent block root is known. +func (v *HeaderVerifier) VerifyParentBlockRootSeen(seen func([32]byte) bool) (err error) { + defer v.record(RequireKnownParentBlockRoot, &err) + + h, err := v.h.Header() + if err != nil { + return err + } + + if seen != nil && seen(h.ParentBlockRoot()) { + return nil + } + + log.WithFields(headerLogFields(h)).Error(ErrUnknownParentBlockRoot.Error()) + return ErrUnknownParentBlockRoot +} + +// VerifySignature verifies the signature of the execution payload header taking in validator and the genesis root. +// It uses header's slot for fork version. +func (v *HeaderVerifier) VerifySignature() (err error) { + defer v.record(RequireSignatureValid, &err) + + err = epbs.ValidatePayloadHeaderSignature(v.st, v.h) + if err != nil { + h, envErr := v.h.Header() + if envErr != nil { + return err + } + if errors.Is(err, signing.ErrSigFailedToVerify) { + log.WithFields(headerLogFields(h)).Error("signature failed to validate") + } else { + log.WithFields(headerLogFields(h)).WithError(err).Error("could not validate signature") + } + return err + } + return nil +} + +// VerifyCurrentOrNextSlot verifies that the header slot is either the current slot or the next slot. +func (v *HeaderVerifier) VerifyCurrentOrNextSlot() (err error) { + defer v.record(RequireCurrentOrNextSlot, &err) + + h, err := v.h.Header() + if err != nil { + return err + } + if h.Slot() == v.clock.CurrentSlot()+1 || h.Slot() == v.clock.CurrentSlot() { + return nil + } + + log.WithFields(headerLogFields(h)).Errorf("does not match current or next slot %d", v.clock.CurrentSlot()) + return ErrIncorrectPayloadHeaderSlot +} + +// SatisfyRequirement satisfies a requirement. +func (v *HeaderVerifier) SatisfyRequirement(req Requirement) { + v.record(req, nil) +} + +// record records the result of a requirement verification. +func (v *HeaderVerifier) record(req Requirement, err *error) { + if err == nil || *err == nil { + v.results.record(req, nil) + return + } + + v.results.record(req, *err) +} + +// headerLogFields returns log fields for a ROExecutionPayloadHeader instance. +func headerLogFields(h interfaces.ROExecutionPayloadHeaderEPBS) log.Fields { + return log.Fields{ + "builderIndex": h.BuilderIndex(), + "blockHash": fmt.Sprintf("%#x", h.BlockHash()), + "parentBlockHash": fmt.Sprintf("%#x", h.ParentBlockHash()), + "parentBlockRoot": fmt.Sprintf("%#x", h.ParentBlockRoot()), + "slot": h.Slot(), + "value": h.Value(), + } +} diff --git a/beacon-chain/verification/execution_payload_header_mock.go b/beacon-chain/verification/execution_payload_header_mock.go new file mode 100644 index 000000000000..46f46c061660 --- /dev/null +++ b/beacon-chain/verification/execution_payload_header_mock.go @@ -0,0 +1,40 @@ +package verification + +type MockExecutionPayloadHeader struct { + ErrBuilderSlashed error + ErrBuilderInsufficientBalance error + ErrUnknownParentBlockHash error + ErrUnknownParentBlockRoot error + ErrIncorrectSlot error + ErrInvalidSignature error +} + +var _ ExecutionPayloadHeaderVerifier = &MockExecutionPayloadHeader{} + +func (e *MockExecutionPayloadHeader) VerifyBuilderActiveNotSlashed() error { + return e.ErrBuilderSlashed +} + +func (e *MockExecutionPayloadHeader) VerifyBuilderSufficientBalance() error { + return e.ErrBuilderInsufficientBalance +} + +func (e *MockExecutionPayloadHeader) VerifyParentBlockHashSeen(func([32]byte) bool) error { + return e.ErrUnknownParentBlockHash +} + +func (e *MockExecutionPayloadHeader) VerifyParentBlockRootSeen(func([32]byte) bool) error { + return e.ErrUnknownParentBlockRoot +} + +func (e *MockExecutionPayloadHeader) VerifyCurrentOrNextSlot() error { + return e.ErrIncorrectSlot +} + +func (e *MockExecutionPayloadHeader) VerifySignature() error { + return e.ErrInvalidSignature +} + +func (e *MockExecutionPayloadHeader) SatisfyRequirement(requirement Requirement) { + +} diff --git a/beacon-chain/verification/execution_payload_header_test.go b/beacon-chain/verification/execution_payload_header_test.go new file mode 100644 index 000000000000..a210bd81ec09 --- /dev/null +++ b/beacon-chain/verification/execution_payload_header_test.go @@ -0,0 +1,266 @@ +package verification + +import ( + "testing" + "time" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/startup" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + state_native "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util" + "github.com/prysmaticlabs/prysm/v5/time/slots" +) + +func TestHeaderVerifier_VerifyBuilderNotSlashedInactive(t *testing.T) { + st, _ := util.DeterministicGenesisState(t, 3) + val, err := st.ValidatorAtIndex(1) + require.NoError(t, err) + val.Slashed = true + require.NoError(t, st.UpdateValidatorAtIndex(1, val)) + + val, err = st.ValidatorAtIndex(2) + require.NoError(t, err) + val.ExitEpoch = 0 + require.NoError(t, st.UpdateValidatorAtIndex(2, val)) + + now := time.Now() + genesis := now.Add(-1 * time.Duration(params.BeaconConfig().SecondsPerSlot) * time.Second) + clock := startup.NewClock(genesis, [32]byte{}, startup.WithNower(func() time.Time { return now })) + init := Initializer{shared: &sharedResources{clock: clock}} + + t.Run("not slashed and active", func(t *testing.T) { + h := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + BuilderIndex: 0, + }, + }, st, init) + require.NoError(t, h.VerifyBuilderActiveNotSlashed()) + require.Equal(t, true, h.results.executed(RequireBuilderActiveNotSlashed)) + require.NoError(t, h.results.result(RequireBuilderActiveNotSlashed)) + }) + + t.Run("slashed", func(t *testing.T) { + h := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + BuilderIndex: 1, + }, + }, st, init) + require.ErrorIs(t, h.VerifyBuilderActiveNotSlashed(), ErrBuilderSlashed) + require.Equal(t, true, h.results.executed(RequireBuilderActiveNotSlashed)) + require.Equal(t, ErrBuilderSlashed, h.results.result(RequireBuilderActiveNotSlashed)) + }) + + t.Run("inactive", func(t *testing.T) { + h := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + BuilderIndex: 2, + }, + }, st, init) + require.ErrorIs(t, h.VerifyBuilderActiveNotSlashed(), ErrBuilderInactive) + require.Equal(t, true, h.results.executed(RequireBuilderActiveNotSlashed)) + require.Equal(t, ErrBuilderInactive, h.results.result(RequireBuilderActiveNotSlashed)) + }) +} + +func TestHeaderVerifier_VerifyBuilderSufficientBalance(t *testing.T) { + st, _ := util.DeterministicGenesisState(t, 1) + mbb := params.BeaconConfig().MinBuilderBalance + require.NoError(t, st.SetBalances([]uint64{mbb, mbb + 1})) + + init := Initializer{shared: &sharedResources{}} + + t.Run("happy case", func(t *testing.T) { + h := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + BuilderIndex: 1, + Value: 1, + }, + }, st, init) + require.NoError(t, h.VerifyBuilderSufficientBalance()) + require.Equal(t, true, h.results.executed(RequireBuilderSufficientBalance)) + require.NoError(t, h.results.result(RequireBuilderSufficientBalance)) + }) + + t.Run("insufficient balance", func(t *testing.T) { + h := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + BuilderIndex: 0, + Value: 1, + }, + }, st, init) + require.ErrorIs(t, h.VerifyBuilderSufficientBalance(), ErrBuilderInsufficientBalance) + require.Equal(t, true, h.results.executed(RequireBuilderSufficientBalance)) + require.Equal(t, ErrBuilderInsufficientBalance, h.results.result(RequireBuilderSufficientBalance)) + }) +} + +func TestHeaderVerifier_VerifyCurrentOrNextSlot(t *testing.T) { + now := time.Now() + genesis := now.Add(-1 * time.Duration(params.BeaconConfig().SecondsPerSlot) * time.Second) + clock := startup.NewClock(genesis, [32]byte{}, startup.WithNower(func() time.Time { return now })) + + init := Initializer{shared: &sharedResources{clock: clock}} + + t.Run("current slot", func(t *testing.T) { + h := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 1, + }, + }, nil, init) + require.NoError(t, h.VerifyCurrentOrNextSlot()) + require.Equal(t, true, h.results.executed(RequireCurrentOrNextSlot)) + require.NoError(t, h.results.result(RequireCurrentOrNextSlot)) + }) + + t.Run("next slot", func(t *testing.T) { + h := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 2, + }, + }, nil, init) + require.NoError(t, h.VerifyCurrentOrNextSlot()) + require.Equal(t, true, h.results.executed(RequireCurrentOrNextSlot)) + require.NoError(t, h.results.result(RequireCurrentOrNextSlot)) + }) + + t.Run("incorrect slot", func(t *testing.T) { + h := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + Slot: 3, + }, + }, nil, init) + require.ErrorIs(t, h.VerifyCurrentOrNextSlot(), ErrIncorrectPayloadHeaderSlot) + require.Equal(t, true, h.results.executed(RequireCurrentOrNextSlot)) + require.Equal(t, ErrIncorrectPayloadHeaderSlot, h.results.result(RequireCurrentOrNextSlot)) + }) +} + +func TestHeaderVerifier_VerifyParentBlockHashSeen(t *testing.T) { + t.Run("happy path", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + h := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{}, nil, init) + require.NoError(t, h.VerifyParentBlockHashSeen( + func(_ [32]byte) bool { + return true + }, + )) + require.Equal(t, true, h.results.executed(RequireKnownParentBlockHash)) + require.NoError(t, h.results.result(RequireKnownParentBlockHash)) + }) + + t.Run("unknown parent hash", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + h := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{}, nil, init) + require.ErrorIs(t, h.VerifyParentBlockHashSeen( + func(_ [32]byte) bool { + return false + }, + ), ErrUnknownParentBlockHash) + require.Equal(t, true, h.results.executed(RequireKnownParentBlockHash)) + require.Equal(t, ErrUnknownParentBlockHash, h.results.result(RequireKnownParentBlockHash)) + }) +} + +func TestHeaderVerifier_VerifyParentBlockRootSeen(t *testing.T) { + t.Run("happy path", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + h := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{}, nil, init) + require.NoError(t, h.VerifyParentBlockRootSeen( + func(_ [32]byte) bool { + return true + }, + )) + require.Equal(t, true, h.results.executed(RequireKnownParentBlockRoot)) + require.NoError(t, h.results.result(RequireKnownParentBlockRoot)) + }) + + t.Run("unknown parent root", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + h := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{}, nil, init) + require.ErrorIs(t, h.VerifyParentBlockRootSeen( + func(_ [32]byte) bool { + return false + }, + ), ErrUnknownParentBlockRoot) + require.Equal(t, true, h.results.executed(RequireKnownParentBlockRoot)) + require.Equal(t, ErrUnknownParentBlockRoot, h.results.result(RequireKnownParentBlockRoot)) + }) +} + +func TestHeaderVerifier_VerifySignature(t *testing.T) { + _, secretKeys, err := util.DeterministicDepositsAndKeys(2) + require.NoError(t, err) + + st, err := state_native.InitializeFromProtoEpbs(ðpb.BeaconStateEPBS{ + Validators: []*ethpb.Validator{{PublicKey: secretKeys[0].PublicKey().Marshal()}, + {PublicKey: secretKeys[1].PublicKey().Marshal()}}, + Fork: ðpb.Fork{ + CurrentVersion: params.BeaconConfig().GenesisForkVersion, + PreviousVersion: params.BeaconConfig().GenesisForkVersion, + }, + }) + require.NoError(t, err) + + t.Run("valid signature", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + sh := util.HydrateSignedExecutionPayloadHeader(&enginev1.SignedExecutionPayloadHeader{}) + h := sh.Message + + signedBytes, err := signing.ComputeDomainAndSign( + st, + slots.ToEpoch(h.Slot), + h, + params.BeaconConfig().DomainBeaconBuilder, + secretKeys[0], + ) + require.NoError(t, err) + sig, err := bls.SignatureFromBytes(signedBytes) + require.NoError(t, err) + pa := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{ + Message: h, + Signature: sig.Marshal(), + }, st, init) + + require.NoError(t, pa.VerifySignature()) + require.Equal(t, true, pa.results.executed(RequireSignatureValid)) + require.NoError(t, pa.results.result(RequireSignatureValid)) + }) + + t.Run("invalid signature", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + sh := util.HydrateSignedExecutionPayloadHeader(&enginev1.SignedExecutionPayloadHeader{}) + h := sh.Message + signedBytes, err := signing.ComputeDomainAndSign( + st, + slots.ToEpoch(h.Slot), + h, + params.BeaconConfig().DomainBeaconBuilder, + secretKeys[1], + ) + require.NoError(t, err) + sig, err := bls.SignatureFromBytes(signedBytes) + require.NoError(t, err) + pa := newExecutionPayloadHeader(t, &enginev1.SignedExecutionPayloadHeader{ + Message: h, + Signature: sig.Marshal(), + }, st, init) + + require.ErrorIs(t, pa.VerifySignature(), signing.ErrSigFailedToVerify) + require.Equal(t, true, pa.results.executed(RequireSignatureValid)) + require.Equal(t, signing.ErrSigFailedToVerify, pa.results.result(RequireSignatureValid)) + }) +} + +func newExecutionPayloadHeader(t *testing.T, h *enginev1.SignedExecutionPayloadHeader, st state.ReadOnlyBeaconState, init Initializer) *HeaderVerifier { + h = util.HydrateSignedExecutionPayloadHeader(h) + ro, err := blocks.WrappedROSignedExecutionPayloadHeader(h) + require.NoError(t, err) + return init.NewHeaderVerifier(ro, st, GossipExecutionPayloadHeaderRequirements) +} diff --git a/beacon-chain/verification/initializer_epbs.go b/beacon-chain/verification/initializer_epbs.go new file mode 100644 index 000000000000..e1374b0e83a0 --- /dev/null +++ b/beacon-chain/verification/initializer_epbs.go @@ -0,0 +1,28 @@ +package verification + +import ( + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + payloadattestation "github.com/prysmaticlabs/prysm/v5/consensus-types/epbs/payload-attestation" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" +) + +// NewPayloadAttestationMsgVerifier creates a PayloadAttestationMsgVerifier for a single payload attestation message, +// with the given set of requirements. +func (ini *Initializer) NewPayloadAttestationMsgVerifier(pa payloadattestation.ROMessage, reqs []Requirement) *PayloadAttMsgVerifier { + return &PayloadAttMsgVerifier{ + sharedResources: ini.shared, + results: newResults(reqs...), + pa: pa, + } +} + +// NewHeaderVerifier creates a SignedExecutionPayloadHeaderVerifier for a single signed execution payload header, +// with the given set of requirements. +func (ini *Initializer) NewHeaderVerifier(eh interfaces.ROSignedExecutionPayloadHeader, st state.ReadOnlyBeaconState, reqs []Requirement) *HeaderVerifier { + return &HeaderVerifier{ + sharedResources: ini.shared, + results: newResults(reqs...), + h: eh, + st: st, + } +} diff --git a/beacon-chain/verification/payload_attestation.go b/beacon-chain/verification/payload_attestation.go new file mode 100644 index 000000000000..12a49823172a --- /dev/null +++ b/beacon-chain/verification/payload_attestation.go @@ -0,0 +1,225 @@ +package verification + +import ( + "context" + "fmt" + "slices" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v5/config/params" + payloadattestation "github.com/prysmaticlabs/prysm/v5/consensus-types/epbs/payload-attestation" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/time/slots" + log "github.com/sirupsen/logrus" +) + +// RequirementList defines a list of requirements. +type RequirementList []Requirement + +const ( + RequireCurrentSlot Requirement = iota + RequireMessageNotSeen + RequireKnownPayloadStatus + RequireValidatorInPTC + RequireBlockRootSeen + RequireBlockRootValid + RequireSignatureValid +) + +// PayloadAttGossipRequirements defines the list of requirements for gossip payload attestation messages. +var PayloadAttGossipRequirements = []Requirement{ + RequireCurrentSlot, + RequireMessageNotSeen, + RequireKnownPayloadStatus, + RequireValidatorInPTC, + RequireBlockRootSeen, + RequireBlockRootValid, + RequireSignatureValid, +} + +// GossipPayloadAttestationMessageRequirements is a requirement list for gossip payload attestation messages. +var GossipPayloadAttestationMessageRequirements = RequirementList(PayloadAttGossipRequirements) + +var ( + ErrIncorrectPayloadAttSlot = errors.New("payload att slot does not match the current slot") + ErrIncorrectPayloadAttStatus = errors.New("unknown payload att status") + ErrPayloadAttBlockRootNotSeen = errors.New("block root not seen") + ErrPayloadAttBlockRootInvalid = errors.New("block root invalid") + ErrIncorrectPayloadAttValidator = errors.New("validator not present in payload timeliness committee") + ErrInvalidPayloadAttMessage = errors.New("invalid payload attestation message") +) + +var _ PayloadAttestationMsgVerifier = &PayloadAttMsgVerifier{} + +// PayloadAttMsgVerifier is a read-only verifier for payload attestation messages. +type PayloadAttMsgVerifier struct { + *sharedResources + results *results + pa payloadattestation.ROMessage +} + +// VerifyCurrentSlot verifies if the current slot matches the expected slot. +// Represents the following spec verification: +// [IGNORE] data.slot is the current slot. +func (v *PayloadAttMsgVerifier) VerifyCurrentSlot() (err error) { + defer v.record(RequireCurrentSlot, &err) + + if v.pa.Slot() != v.clock.CurrentSlot() { + log.WithFields(logFields(v.pa)).Errorf("does not match current slot %d", v.clock.CurrentSlot()) + return ErrIncorrectPayloadAttSlot + } + + return nil +} + +// VerifyPayloadStatus verifies if the payload status is known. +// Represents the following spec verification: +// [REJECT] data.payload_status < PAYLOAD_INVALID_STATUS. +func (v *PayloadAttMsgVerifier) VerifyPayloadStatus() (err error) { + defer v.record(RequireKnownPayloadStatus, &err) + + if v.pa.PayloadStatus() >= primitives.PAYLOAD_INVALID_STATUS { + log.WithFields(logFields(v.pa)).Error(ErrIncorrectPayloadAttStatus.Error()) + return ErrIncorrectPayloadAttStatus + } + + return nil +} + +// VerifyBlockRootSeen verifies if the block root has been seen before. +// Represents the following spec verification: +// [IGNORE] The attestation's data.beacon_block_root has been seen (via both gossip and non-gossip sources). +func (v *PayloadAttMsgVerifier) VerifyBlockRootSeen(parentSeen func([32]byte) bool) (err error) { + defer v.record(RequireBlockRootSeen, &err) + if parentSeen != nil && parentSeen(v.pa.BeaconBlockRoot()) { + return nil + } + log.WithFields(logFields(v.pa)).Error(ErrPayloadAttBlockRootNotSeen.Error()) + return ErrPayloadAttBlockRootNotSeen +} + +// VerifyBlockRootValid verifies if the block root is valid. +// Represents the following spec verification: +// [REJECT] The beacon block with root data.beacon_block_root passes validation. +func (v *PayloadAttMsgVerifier) VerifyBlockRootValid(badBlock func([32]byte) bool) (err error) { + defer v.record(RequireBlockRootValid, &err) + + if badBlock != nil && badBlock(v.pa.BeaconBlockRoot()) { + log.WithFields(logFields(v.pa)).Error(ErrPayloadAttBlockRootInvalid.Error()) + return ErrPayloadAttBlockRootInvalid + } + + return nil +} + +// VerifyValidatorInPTC verifies if the validator is present. +// Represents the following spec verification: +// [REJECT] The validator index is within the payload committee in get_ptc(state, data.slot). For the current's slot head state. +func (v *PayloadAttMsgVerifier) VerifyValidatorInPTC(ctx context.Context, st state.BeaconState) (err error) { + defer v.record(RequireValidatorInPTC, &err) + + ptc, err := helpers.GetPayloadTimelinessCommittee(ctx, st, v.pa.Slot()) + if err != nil { + return err + } + + idx := slices.Index(ptc, v.pa.ValidatorIndex()) + if idx == -1 { + log.WithFields(logFields(v.pa)).Error(ErrIncorrectPayloadAttValidator.Error()) + return ErrIncorrectPayloadAttValidator + } + + return nil +} + +// VerifySignature verifies the signature of the payload attestation message. +// Represents the following spec verification: +// [REJECT] The signature of payload_attestation_message.signature is valid with respect to the validator index. +func (v *PayloadAttMsgVerifier) VerifySignature(st state.BeaconState) (err error) { + defer v.record(RequireSignatureValid, &err) + + err = validatePayloadAttestationMessageSignature(st, v.pa) + if err != nil { + if errors.Is(err, signing.ErrSigFailedToVerify) { + log.WithFields(logFields(v.pa)).Error("signature failed to validate") + } else { + log.WithFields(logFields(v.pa)).WithError(err).Error("could not validate signature") + } + return err + } + + return nil +} + +// VerifiedPayloadAttestation returns a verified payload attestation message by checking all requirements. +func (v *PayloadAttMsgVerifier) VerifiedPayloadAttestation() (payloadattestation.VerifiedROMessage, error) { + if v.results.allSatisfied() { + return payloadattestation.NewVerifiedROMessage(v.pa), nil + } + return payloadattestation.VerifiedROMessage{}, ErrInvalidPayloadAttMessage +} + +// SatisfyRequirement allows the caller to manually mark a requirement as satisfied. +func (v *PayloadAttMsgVerifier) SatisfyRequirement(req Requirement) { + v.record(req, nil) +} + +// ValidatePayloadAttestationMessageSignature verifies the signature of a payload attestation message. +func validatePayloadAttestationMessageSignature(st state.BeaconState, payloadAtt payloadattestation.ROMessage) error { + val, err := st.ValidatorAtIndex(payloadAtt.ValidatorIndex()) + if err != nil { + return err + } + + pub, err := bls.PublicKeyFromBytes(val.PublicKey) + if err != nil { + return err + } + + s := payloadAtt.Signature() + sig, err := bls.SignatureFromBytes(s[:]) + if err != nil { + return err + } + + currentEpoch := slots.ToEpoch(st.Slot()) + domain, err := signing.Domain(st.Fork(), currentEpoch, params.BeaconConfig().DomainPTCAttester, st.GenesisValidatorsRoot()) + if err != nil { + return err + } + + root, err := payloadAtt.SigningRoot(domain) + if err != nil { + return err + } + + if !sig.Verify(pub, root[:]) { + return signing.ErrSigFailedToVerify + } + return nil +} + +// record records the result of a requirement verification. +func (v *PayloadAttMsgVerifier) record(req Requirement, err *error) { + if err == nil || *err == nil { + v.results.record(req, nil) + return + } + + v.results.record(req, *err) +} + +// logFields returns log fields for a ROMessage instance. +func logFields(payload payloadattestation.ROMessage) log.Fields { + return log.Fields{ + "slot": payload.Slot(), + "validatorIndex": payload.ValidatorIndex(), + "signature": fmt.Sprintf("%#x", payload.Signature()), + "beaconBlockRoot": fmt.Sprintf("%#x", payload.BeaconBlockRoot()), + "payloadStatus": payload.PayloadStatus(), + } +} diff --git a/beacon-chain/verification/payload_attestation_mock.go b/beacon-chain/verification/payload_attestation_mock.go new file mode 100644 index 000000000000..8881879972be --- /dev/null +++ b/beacon-chain/verification/payload_attestation_mock.go @@ -0,0 +1,51 @@ +package verification + +import ( + "context" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + payloadattestation "github.com/prysmaticlabs/prysm/v5/consensus-types/epbs/payload-attestation" +) + +type MockPayloadAttestation struct { + ErrIncorrectPayloadAttSlot error + ErrIncorrectPayloadAttStatus error + ErrIncorrectPayloadAttValidator error + ErrPayloadAttBlockRootNotSeen error + ErrPayloadAttBlockRootInvalid error + ErrInvalidPayloadAttMessage error + ErrInvalidMessageSignature error + ErrUnsatisfiedRequirement error +} + +var _ PayloadAttestationMsgVerifier = &MockPayloadAttestation{} + +func (m *MockPayloadAttestation) VerifyCurrentSlot() error { + return m.ErrIncorrectPayloadAttSlot +} + +func (m *MockPayloadAttestation) VerifyPayloadStatus() error { + return m.ErrIncorrectPayloadAttStatus +} + +func (m *MockPayloadAttestation) VerifyValidatorInPTC(ctx context.Context, st state.BeaconState) error { + return m.ErrIncorrectPayloadAttValidator +} + +func (m *MockPayloadAttestation) VerifyBlockRootSeen(func([32]byte) bool) error { + return m.ErrPayloadAttBlockRootNotSeen +} + +func (m *MockPayloadAttestation) VerifyBlockRootValid(func([32]byte) bool) error { + return m.ErrPayloadAttBlockRootInvalid +} + +func (m *MockPayloadAttestation) VerifySignature(st state.BeaconState) (err error) { + return m.ErrInvalidMessageSignature +} + +func (m *MockPayloadAttestation) VerifiedPayloadAttestation() (payloadattestation.VerifiedROMessage, error) { + return payloadattestation.VerifiedROMessage{}, nil +} + +func (m *MockPayloadAttestation) SatisfyRequirement(req Requirement) {} diff --git a/beacon-chain/verification/payload_attestation_test.go b/beacon-chain/verification/payload_attestation_test.go new file mode 100644 index 000000000000..8922c607a7a2 --- /dev/null +++ b/beacon-chain/verification/payload_attestation_test.go @@ -0,0 +1,325 @@ +package verification + +import ( + "context" + "strconv" + "testing" + "time" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/startup" + state_native "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native" + "github.com/prysmaticlabs/prysm/v5/config/params" + payloadattestation "github.com/prysmaticlabs/prysm/v5/consensus-types/epbs/payload-attestation" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util" + "github.com/prysmaticlabs/prysm/v5/time/slots" +) + +func TestVerifyCurrentSlot(t *testing.T) { + now := time.Now() + // make genesis 1 slot in the past + genesis := now.Add(-1 * time.Duration(params.BeaconConfig().SecondsPerSlot) * time.Second) + clock := startup.NewClock(genesis, [32]byte{}, startup.WithNower(func() time.Time { return now })) + + init := Initializer{shared: &sharedResources{clock: clock}} + + t.Run("incorrect slot", func(t *testing.T) { + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{}, + Signature: make([]byte, 96), + }, init) + require.ErrorIs(t, pa.VerifyCurrentSlot(), ErrIncorrectPayloadAttSlot) + require.Equal(t, true, pa.results.executed(RequireCurrentSlot)) + require.Equal(t, ErrIncorrectPayloadAttSlot, pa.results.result(RequireCurrentSlot)) + }) + + t.Run("current slot", func(t *testing.T) { + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + Slot: 1, + }, + Signature: make([]byte, 96), + }, init) + require.NoError(t, pa.VerifyCurrentSlot()) + require.Equal(t, true, pa.results.executed(RequireCurrentSlot)) + require.NoError(t, pa.results.result(RequireCurrentSlot)) + }) +} + +func TestVerifyKnownPayloadStatus(t *testing.T) { + init := Initializer{shared: &sharedResources{clock: &startup.Clock{}}} + + t.Run("unknown status", func(t *testing.T) { + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + PayloadStatus: primitives.PAYLOAD_INVALID_STATUS, + }, + Signature: make([]byte, 96), + }, init) + require.ErrorIs(t, pa.VerifyPayloadStatus(), ErrIncorrectPayloadAttStatus) + require.Equal(t, true, pa.results.executed(RequireKnownPayloadStatus)) + require.Equal(t, ErrIncorrectPayloadAttStatus, pa.results.result(RequireKnownPayloadStatus)) + }) + + t.Run("known status", func(t *testing.T) { + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{}, + Signature: make([]byte, 96), + }, init) + require.NoError(t, pa.VerifyPayloadStatus()) + require.Equal(t, true, pa.results.executed(RequireKnownPayloadStatus)) + require.NoError(t, pa.results.result(RequireKnownPayloadStatus)) + }) +} + +func TestVerifyBlockRootSeen(t *testing.T) { + blockRoot := [32]byte{1} + + fc := &mockForkchoicer{ + HasNodeCB: func(parent [32]byte) bool { + return parent == blockRoot + }, + } + + t.Run("happy path", func(t *testing.T) { + init := Initializer{shared: &sharedResources{fc: fc}} + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + BeaconBlockRoot: blockRoot[:], + }, + Signature: make([]byte, 96), + }, init) + require.NoError(t, pa.VerifyBlockRootSeen( + func(_ [32]byte) bool { + return true + }, + )) + require.Equal(t, true, pa.results.executed(RequireBlockRootSeen)) + require.NoError(t, pa.results.result(RequireBlockRootSeen)) + }) + + t.Run("unknown block", func(t *testing.T) { + init := Initializer{shared: &sharedResources{fc: fc}} + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{}, + Signature: make([]byte, 96), + }, init) + require.ErrorIs(t, pa.VerifyBlockRootSeen(nil), ErrPayloadAttBlockRootNotSeen) + require.Equal(t, true, pa.results.executed(RequireBlockRootSeen)) + require.Equal(t, ErrPayloadAttBlockRootNotSeen, pa.results.result(RequireBlockRootSeen)) + }) + + t.Run("bad parent true", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + BeaconBlockRoot: blockRoot[:], + }, + Signature: make([]byte, 96), + }, init) + require.NoError(t, pa.VerifyBlockRootSeen(badParentCb(t, blockRoot, true))) + require.Equal(t, true, pa.results.executed(RequireBlockRootSeen)) + require.NoError(t, pa.results.result(RequireBlockRootSeen)) + }) + + t.Run("bad parent false, unknown block", func(t *testing.T) { + init := Initializer{shared: &sharedResources{fc: fc}} + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + BeaconBlockRoot: []byte{2}, + }, + Signature: make([]byte, 96), + }, init) + require.ErrorIs(t, pa.VerifyBlockRootSeen(badParentCb(t, [32]byte{2}, false)), ErrPayloadAttBlockRootNotSeen) + require.Equal(t, true, pa.results.executed(RequireBlockRootSeen)) + require.Equal(t, ErrPayloadAttBlockRootNotSeen, pa.results.result(RequireBlockRootSeen)) + }) +} + +func TestVerifyBlockRootValid(t *testing.T) { + blockRoot := [32]byte{1} + + t.Run("good block", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + BeaconBlockRoot: blockRoot[:], + }, + Signature: make([]byte, 96), + }, init) + require.NoError(t, pa.VerifyBlockRootValid(badParentCb(t, blockRoot, false))) + require.Equal(t, true, pa.results.executed(RequireBlockRootValid)) + require.NoError(t, pa.results.result(RequireBlockRootValid)) + }) + + t.Run("bad block", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + BeaconBlockRoot: blockRoot[:], + }, + Signature: make([]byte, 96), + }, init) + require.ErrorIs(t, pa.VerifyBlockRootValid(badParentCb(t, blockRoot, true)), ErrPayloadAttBlockRootInvalid) + require.Equal(t, true, pa.results.executed(RequireBlockRootValid)) + require.Equal(t, ErrPayloadAttBlockRootInvalid, pa.results.result(RequireBlockRootValid)) + }) +} + +func TestGetPayloadTimelinessCommittee(t *testing.T) { + validators := make([]*ethpb.Validator, 4*params.BeaconConfig().TargetCommitteeSize*uint64(params.BeaconConfig().SlotsPerEpoch)) + validatorIndices := make([]primitives.ValidatorIndex, len(validators)) + + for i := 0; i < len(validators); i++ { + k := make([]byte, 48) + copy(k, strconv.Itoa(i)) + validators[i] = ðpb.Validator{ + PublicKey: k, + WithdrawalCredentials: make([]byte, 32), + ExitEpoch: params.BeaconConfig().FarFutureEpoch, + } + validatorIndices[i] = primitives.ValidatorIndex(i) + } + + st, err := state_native.InitializeFromProtoEpbs(ðpb.BeaconStateEPBS{ + Validators: validators, + RandaoMixes: make([][]byte, params.BeaconConfig().EpochsPerHistoricalVector), + }) + require.NoError(t, err) + + slot := primitives.Slot(1) + ctx := context.Background() + ptc, err := helpers.GetPayloadTimelinessCommittee(ctx, st, slot) + require.NoError(t, err) + + t.Run("in committee", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + ValidatorIndex: ptc[0], + Data: ðpb.PayloadAttestationData{ + Slot: slot, + }, + Signature: make([]byte, 96), + }, init) + require.NoError(t, pa.VerifyValidatorInPTC(ctx, st)) + require.Equal(t, true, pa.results.executed(RequireValidatorInPTC)) + require.NoError(t, pa.results.result(RequireValidatorInPTC)) + }) + + t.Run("not in committee", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + Slot: slot, + }, + Signature: make([]byte, 96), + }, init) + require.ErrorIs(t, pa.VerifyValidatorInPTC(ctx, st), ErrIncorrectPayloadAttValidator) + require.Equal(t, true, pa.results.executed(RequireValidatorInPTC)) + require.Equal(t, ErrIncorrectPayloadAttValidator, pa.results.result(RequireValidatorInPTC)) + }) +} + +func TestPayloadAttestationVerifySignature(t *testing.T) { + _, secretKeys, err := util.DeterministicDepositsAndKeys(2) + require.NoError(t, err) + + st, err := state_native.InitializeFromProtoEpbs(ðpb.BeaconStateEPBS{ + Validators: []*ethpb.Validator{{PublicKey: secretKeys[0].PublicKey().Marshal()}, + {PublicKey: secretKeys[1].PublicKey().Marshal()}}, + Fork: ðpb.Fork{ + CurrentVersion: params.BeaconConfig().EPBSForkVersion, + PreviousVersion: params.BeaconConfig().ElectraForkVersion, + }, + }) + require.NoError(t, err) + + t.Run("valid signature", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + d := ðpb.PayloadAttestationData{ + BeaconBlockRoot: bytesutil.PadTo([]byte{'a'}, 32), + Slot: 1, + PayloadStatus: primitives.PAYLOAD_WITHHELD, + } + signedBytes, err := signing.ComputeDomainAndSign( + st, + slots.ToEpoch(d.Slot), + d, + params.BeaconConfig().DomainPTCAttester, + secretKeys[0], + ) + require.NoError(t, err) + sig, err := bls.SignatureFromBytes(signedBytes) + require.NoError(t, err) + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: d, + Signature: sig.Marshal(), + }, init) + require.NoError(t, pa.VerifySignature(st)) + require.Equal(t, true, pa.results.executed(RequireSignatureValid)) + require.NoError(t, pa.results.result(RequireSignatureValid)) + }) + + t.Run("invalid signature", func(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + d := ðpb.PayloadAttestationData{ + BeaconBlockRoot: bytesutil.PadTo([]byte{'a'}, 32), + Slot: 1, + PayloadStatus: primitives.PAYLOAD_WITHHELD, + } + signedBytes, err := signing.ComputeDomainAndSign( + st, + slots.ToEpoch(d.Slot), + d, + params.BeaconConfig().DomainPTCAttester, + secretKeys[0], + ) + require.NoError(t, err) + sig, err := bls.SignatureFromBytes(signedBytes) + require.NoError(t, err) + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + ValidatorIndex: 1, + Data: d, + Signature: sig.Marshal(), + }, init) + require.ErrorIs(t, pa.VerifySignature(st), signing.ErrSigFailedToVerify) + require.Equal(t, true, pa.results.executed(RequireSignatureValid)) + require.Equal(t, signing.ErrSigFailedToVerify, pa.results.result(RequireSignatureValid)) + }) +} + +func TestVerifiedPayloadAttestation(t *testing.T) { + init := Initializer{shared: &sharedResources{}} + pa := newPayloadAttestation(t, ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{}, + Signature: make([]byte, 96), + }, init) + + t.Run("missing last requirement", func(t *testing.T) { + for _, requirement := range GossipPayloadAttestationMessageRequirements[:len(GossipPayloadAttestationMessageRequirements)-1] { + pa.SatisfyRequirement(requirement) + } + _, err := pa.VerifiedPayloadAttestation() + require.ErrorIs(t, err, ErrInvalidPayloadAttMessage) + }) + + t.Run("satisfy all the requirements", func(t *testing.T) { + for _, requirement := range GossipPayloadAttestationMessageRequirements { + pa.SatisfyRequirement(requirement) + } + _, err := pa.VerifiedPayloadAttestation() + require.NoError(t, err) + }) +} + +func newPayloadAttestation(t *testing.T, m *ethpb.PayloadAttestationMessage, init Initializer) *PayloadAttMsgVerifier { + ro, err := payloadattestation.NewReadOnly(m) + require.NoError(t, err) + return init.NewPayloadAttestationMsgVerifier(ro, GossipPayloadAttestationMessageRequirements) +} diff --git a/config/fieldparams/mainnet.go b/config/fieldparams/mainnet.go index 3eb5e90b53ee..c47d3187b25a 100644 --- a/config/fieldparams/mainnet.go +++ b/config/fieldparams/mainnet.go @@ -14,6 +14,8 @@ const ( CurrentEpochAttestationsLength = 4096 // MAX_ATTESTATIONS * SLOTS_PER_EPOCH SlashingsLength = 8192 // EPOCHS_PER_SLASHINGS_VECTOR SyncCommitteeLength = 512 // SYNC_COMMITTEE_SIZE + PTCSize = 512 // PTC_SIZE [New in ePBS] + PayloadTimelyThreshold = 256 // PTC_SIZE / 2 [New in ePBS] RootLength = 32 // RootLength defines the byte length of a Merkle root. BLSSignatureLength = 96 // BLSSignatureLength defines the byte length of a BLSSignature. BLSPubkeyLength = 48 // BLSPubkeyLength defines the byte length of a BLSSignature. @@ -28,6 +30,7 @@ const ( MaxWithdrawalsPerPayload = 16 // MaxWithdrawalsPerPayloadLength defines the maximum number of withdrawals that can be included in a payload. MaxBlobsPerBlock = 6 // MaxBlobsPerBlock defines the maximum number of blobs with respect to consensus rule can be included in a block. MaxBlobCommitmentsPerBlock = 4096 // MaxBlobCommitmentsPerBlock defines the theoretical limit of blobs can be included in a block. + MaxPayloadAttestationsPerBlock = 4 // MAX_PAYLOAD_ATTESTATIONS [New in ePBS] LogMaxBlobCommitments = 12 // Log_2 of MaxBlobCommitmentsPerBlock BlobLength = 131072 // BlobLength defines the byte length of a blob. BlobSize = 131072 // defined to match blob.size in bazel ssz codegen diff --git a/config/fieldparams/minimal.go b/config/fieldparams/minimal.go index db99c2dd91b4..286541a9a673 100644 --- a/config/fieldparams/minimal.go +++ b/config/fieldparams/minimal.go @@ -14,6 +14,7 @@ const ( CurrentEpochAttestationsLength = 1024 // MAX_ATTESTATIONS * SLOTS_PER_EPOCH SlashingsLength = 64 // EPOCHS_PER_SLASHINGS_VECTOR SyncCommitteeLength = 32 // SYNC_COMMITTEE_SIZE + PTCSize = 32 // PTC_SIZE [New in ePBS] RootLength = 32 // RootLength defines the byte length of a Merkle root. BLSSignatureLength = 96 // BLSSignatureLength defines the byte length of a BLSSignature. BLSPubkeyLength = 48 // BLSPubkeyLength defines the byte length of a BLSSignature. @@ -28,6 +29,7 @@ const ( MaxWithdrawalsPerPayload = 4 // MaxWithdrawalsPerPayloadLength defines the maximum number of withdrawals that can be included in a payload. MaxBlobsPerBlock = 6 // MaxBlobsPerBlock defines the maximum number of blobs with respect to consensus rule can be included in a block. MaxBlobCommitmentsPerBlock = 16 // MaxBlobCommitmentsPerBlock defines the theoretical limit of blobs can be included in a block. + MaxPayloadAttestationsPerBlock = 4 // MAX_PAYLOAD_ATTESTATIONS [New in ePBS] LogMaxBlobCommitments = 4 // Log_2 of MaxBlobCommitmentsPerBlock BlobLength = 131072 // BlobLength defines the byte length of a blob. BlobSize = 131072 // defined to match blob.size in bazel ssz codegen diff --git a/config/params/config.go b/config/params/config.go index 69a20bb6fec8..972510d34985 100644 --- a/config/params/config.go +++ b/config/params/config.go @@ -70,10 +70,15 @@ type BeaconChainConfig struct { // Fork choice algorithm constants. ProposerScoreBoost uint64 `yaml:"PROPOSER_SCORE_BOOST" spec:"true"` // ProposerScoreBoost defines a value that is a % of the committee weight for fork-choice boosting. + ProposerScoreBoostEPBS uint64 `yaml:"PROPOSER_SCORE_BOOST_EPBS" spec:"true"` // ProposerScoreBoostEPBS defines a value that is a % of the committee weight for fork-choice boosting. ReorgWeightThreshold uint64 `yaml:"REORG_WEIGHT_THRESHOLD" spec:"true"` // ReorgWeightThreshold defines a value that is a % of the committee weight to consider a block weak and subject to being orphaned. ReorgParentWeightThreshold uint64 `yaml:"REORG_PARENT_WEIGHT_THRESHOLD" spec:"true"` // ReorgParentWeightThreshold defines a value that is a % of the committee weight to consider a parent block strong and subject its child to being orphaned. ReorgMaxEpochsSinceFinalization primitives.Epoch `yaml:"REORG_MAX_EPOCHS_SINCE_FINALIZATION" spec:"true"` // This defines a limit to consider safe to orphan a block if the network is finalizing IntervalsPerSlot uint64 `yaml:"INTERVALS_PER_SLOT" spec:"true"` // IntervalsPerSlot defines the number of fork choice intervals in a slot defined in the fork choice spec. + IntervalsPerSlotEPBS uint64 `yaml:"INTERVALS_PER_SLOT_EPBS" spec:"true"` // IntervalsPerSlotEPBS defines the number of fork choice intervals in a slot defined in the fork choice spec from EIP-7732. + PayloadWithholdBoost uint64 `yaml:"PAYLOAD_WITHHOLD_BOOST" spec:"true"` // PayloadWithholdBoost define a value that is the score boost given when a payload is withheld by the builder + PayloadRevealBoost uint64 `yaml:"PAYLOAD_REVEAL_BOOST" spec:"true"` // PayloadRevealBoost a value that is the score boost given when a payload is revealed by the builder + PayloadTimelyThreshold uint64 `yaml:"PAYLOAD_TIMELY_THRESHOLD" spec:"true"` // PayloadTimelyThreshold is the threshold for considering a payload timely. // Ethereum PoW parameters. DepositChainID uint64 `yaml:"DEPOSIT_CHAIN_ID" spec:"true"` // DepositChainID of the eth1 network. This used for replay protection. @@ -125,6 +130,8 @@ type BeaconChainConfig struct { DomainApplicationMask [4]byte `yaml:"DOMAIN_APPLICATION_MASK" spec:"true"` // DomainApplicationMask defines the BLS signature domain for application mask. DomainApplicationBuilder [4]byte `yaml:"DOMAIN_APPLICATION_BUILDER" spec:"true"` // DomainApplicationBuilder defines the BLS signature domain for application builder. DomainBLSToExecutionChange [4]byte `yaml:"DOMAIN_BLS_TO_EXECUTION_CHANGE" spec:"true"` // DomainBLSToExecutionChange defines the BLS signature domain to change withdrawal addresses to ETH1 prefix + DomainBeaconBuilder [4]byte `yaml:"DOMAIN_BEACON_BUILDER" spec:"false"` // DomainBeaconBuilder defines the BLS signature domain used by builders [New in ePBS] + DomainPTCAttester [4]byte `yaml:"DOMAIN_PTC_ATTESTER" spec:"false"` // DomainPTCAttester defines the BLS signature domain used by PTC members [New in ePBS] // Prysm constants. GenesisValidatorsRoot [32]byte // GenesisValidatorsRoot is the root hash of the genesis validators. @@ -146,6 +153,7 @@ type BeaconChainConfig struct { BeaconStateCapellaFieldCount int // BeaconStateCapellaFieldCount defines how many fields are in beacon state post upgrade to Capella. BeaconStateDenebFieldCount int // BeaconStateDenebFieldCount defines how many fields are in beacon state post upgrade to Deneb. BeaconStateElectraFieldCount int // BeaconStateElectraFieldCount defines how many fields are in beacon state post upgrade to Electra. + BeaconStateEpbsFieldCount int // BeaconStateEpbsFieldCount defines how many fields are in beacon state post upgrade to ePBS. // Slasher constants. WeakSubjectivityPeriod primitives.Epoch // WeakSubjectivityPeriod defines the time period expressed in number of epochs were proof of stake network should validate block headers and attestations for slashable events. @@ -166,6 +174,8 @@ type BeaconChainConfig struct { DenebForkEpoch primitives.Epoch `yaml:"DENEB_FORK_EPOCH" spec:"true"` // DenebForkEpoch is used to represent the assigned fork epoch for deneb. ElectraForkVersion []byte `yaml:"ELECTRA_FORK_VERSION" spec:"true"` // ElectraForkVersion is used to represent the fork version for electra. ElectraForkEpoch primitives.Epoch `yaml:"ELECTRA_FORK_EPOCH" spec:"true"` // ElectraForkEpoch is used to represent the assigned fork epoch for electra. + EPBSForkVersion []byte `yaml:"EPBS_FORK_VERSION" spec:"true"` // EPBSForkVersion is used to represent the fork version for ePBS. + EPBSForkEpoch primitives.Epoch `yaml:"EPBS_FORK_EPOCH" spec:"true"` // EPBSForkEpoch is used to represent the assigned fork epoch for ePBS. ForkVersionSchedule map[[fieldparams.VersionLength]byte]primitives.Epoch // Schedule of fork epochs by version. ForkVersionNames map[[fieldparams.VersionLength]byte]string // Human-readable names of fork versions. @@ -276,6 +286,9 @@ type BeaconChainConfig struct { // PeerDAS NumberOfColumns uint64 `yaml:"NUMBER_OF_COLUMNS" spec:"true"` // NumberOfColumns in the extended data matrix. MaxCellsInExtendedMatrix uint64 `yaml:"MAX_CELLS_IN_EXTENDED_MATRIX" spec:"true"` // MaxCellsInExtendedMatrix is the full data of one-dimensional erasure coding extended blobs (in row major format). + + // Builder + MinBuilderBalance uint64 `yaml:"MIN_BUILDER_BALANCE" spec:"true"` // MinBuilderBalance defines the minimal builder balance to accept bid from. } // InitializeForkSchedule initializes the schedules forks baked into the config. @@ -293,6 +306,7 @@ func configForkSchedule(b *BeaconChainConfig) map[[fieldparams.VersionLength]byt fvs[bytesutil.ToBytes4(b.CapellaForkVersion)] = b.CapellaForkEpoch fvs[bytesutil.ToBytes4(b.DenebForkVersion)] = b.DenebForkEpoch fvs[bytesutil.ToBytes4(b.ElectraForkVersion)] = b.ElectraForkEpoch + fvs[bytesutil.ToBytes4(b.EPBSForkVersion)] = b.EPBSForkEpoch return fvs } @@ -315,6 +329,7 @@ func ConfigForkVersions(b *BeaconChainConfig) map[[fieldparams.VersionLength]byt bytesutil.ToBytes4(b.CapellaForkVersion): version.Capella, bytesutil.ToBytes4(b.DenebForkVersion): version.Deneb, bytesutil.ToBytes4(b.ElectraForkVersion): version.Electra, + bytesutil.ToBytes4(b.EPBSForkVersion): version.EPBS, } } diff --git a/config/params/interop.go b/config/params/interop.go index 44c2c048aa50..a6f78ab76f9d 100644 --- a/config/params/interop.go +++ b/config/params/interop.go @@ -12,6 +12,7 @@ func InteropConfig() *BeaconChainConfig { c.CapellaForkVersion = []byte{3, 0, 0, 235} c.DenebForkVersion = []byte{4, 0, 0, 235} c.ElectraForkVersion = []byte{5, 0, 0, 235} + c.EPBSForkVersion = []byte{6, 0, 0, 235} c.InitializeForkSchedule() return c diff --git a/config/params/loader.go b/config/params/loader.go index 880c33e0f509..f44e0daf3509 100644 --- a/config/params/loader.go +++ b/config/params/loader.go @@ -217,6 +217,8 @@ func ConfigToYaml(cfg *BeaconChainConfig) []byte { fmt.Sprintf("DENEB_FORK_VERSION: %#x", cfg.DenebForkVersion), fmt.Sprintf("ELECTRA_FORK_EPOCH: %d", cfg.ElectraForkEpoch), fmt.Sprintf("ELECTRA_FORK_VERSION: %#x", cfg.ElectraForkVersion), + fmt.Sprintf("EPBS_FORK_EPOCH: %d", cfg.EPBSForkEpoch), + fmt.Sprintf("EPBS_FORK_VERSION: %#x", cfg.EPBSForkVersion), fmt.Sprintf("EPOCHS_PER_SUBNET_SUBSCRIPTION: %d", cfg.EpochsPerSubnetSubscription), fmt.Sprintf("ATTESTATION_SUBNET_EXTRA_BITS: %d", cfg.AttestationSubnetExtraBits), fmt.Sprintf("ATTESTATION_SUBNET_PREFIX_BITS: %d", cfg.AttestationSubnetPrefixBits), diff --git a/config/params/loader_test.go b/config/params/loader_test.go index 1760f0bf223a..62afbd2a1507 100644 --- a/config/params/loader_test.go +++ b/config/params/loader_test.go @@ -153,6 +153,7 @@ func assertEqualConfigs(t *testing.T, name string, fields []string, expected, ac assert.Equal(t, expected.CapellaForkEpoch, actual.CapellaForkEpoch, "%s: CapellaForkEpoch", name) assert.Equal(t, expected.DenebForkEpoch, actual.DenebForkEpoch, "%s: DenebForkEpoch", name) assert.Equal(t, expected.ElectraForkEpoch, actual.ElectraForkEpoch, "%s: ElectraForkEpoch", name) + assert.Equal(t, expected.EPBSForkEpoch, actual.EPBSForkEpoch, "%s: EPBSForkEpoch", name) assert.Equal(t, expected.SqrRootSlotsPerEpoch, actual.SqrRootSlotsPerEpoch, "%s: SqrRootSlotsPerEpoch", name) assert.DeepEqual(t, expected.GenesisForkVersion, actual.GenesisForkVersion, "%s: GenesisForkVersion", name) assert.DeepEqual(t, expected.AltairForkVersion, actual.AltairForkVersion, "%s: AltairForkVersion", name) @@ -160,6 +161,7 @@ func assertEqualConfigs(t *testing.T, name string, fields []string, expected, ac assert.DeepEqual(t, expected.CapellaForkVersion, actual.CapellaForkVersion, "%s: CapellaForkVersion", name) assert.DeepEqual(t, expected.DenebForkVersion, actual.DenebForkVersion, "%s: DenebForkVersion", name) assert.DeepEqual(t, expected.ElectraForkVersion, actual.ElectraForkVersion, "%s: ElectraForkVersion", name) + assert.DeepEqual(t, expected.EPBSForkVersion, actual.EPBSForkVersion, "%s: EPBSForkVersion", name) assertYamlFieldsMatch(t, name, fields, expected, actual) } diff --git a/config/params/mainnet_config.go b/config/params/mainnet_config.go index 39449260b83f..00b8658ea8f7 100644 --- a/config/params/mainnet_config.go +++ b/config/params/mainnet_config.go @@ -29,6 +29,8 @@ const ( mainnetDenebForkEpoch = 269568 // March 13, 2024, 13:55:35 UTC // Electra Fork Epoch for mainnet config mainnetElectraForkEpoch = math.MaxUint64 // Far future / to be defined + // ePBS Fork Epoch for mainnet config. + mainnetEPBSForkEpoch = math.MaxUint64 // Far future / to be defined ) var mainnetNetworkConfig = &NetworkConfig{ @@ -109,10 +111,15 @@ var mainnetBeaconConfig = &BeaconChainConfig{ // Fork choice algorithm constants. ProposerScoreBoost: 40, + ProposerScoreBoostEPBS: 20, ReorgWeightThreshold: 20, ReorgParentWeightThreshold: 160, ReorgMaxEpochsSinceFinalization: 2, IntervalsPerSlot: 3, + IntervalsPerSlotEPBS: 4, + PayloadWithholdBoost: 40, + PayloadRevealBoost: 40, + PayloadTimelyThreshold: 256, // PTC_SIZE / 2. // Ethereum PoW parameters. DepositChainID: 1, // Chain ID of eth1 mainnet. @@ -194,6 +201,7 @@ var mainnetBeaconConfig = &BeaconChainConfig{ BeaconStateCapellaFieldCount: 28, BeaconStateDenebFieldCount: 28, BeaconStateElectraFieldCount: 37, + BeaconStateEpbsFieldCount: 44, // Slasher related values. WeakSubjectivityPeriod: 54000, @@ -216,6 +224,8 @@ var mainnetBeaconConfig = &BeaconChainConfig{ DenebForkEpoch: mainnetDenebForkEpoch, ElectraForkVersion: []byte{5, 0, 0, 0}, ElectraForkEpoch: mainnetElectraForkEpoch, + EPBSForkVersion: []byte{6, 0, 0, 0}, + EPBSForkEpoch: mainnetEPBSForkEpoch, // New values introduced in Altair hard fork 1. // Participation flag indices. @@ -336,6 +346,7 @@ func FillTestVersions(c *BeaconChainConfig, b byte) { c.CapellaForkVersion = make([]byte, fieldparams.VersionLength) c.DenebForkVersion = make([]byte, fieldparams.VersionLength) c.ElectraForkVersion = make([]byte, fieldparams.VersionLength) + c.EPBSForkVersion = make([]byte, fieldparams.VersionLength) c.GenesisForkVersion[fieldparams.VersionLength-1] = b c.AltairForkVersion[fieldparams.VersionLength-1] = b @@ -343,6 +354,7 @@ func FillTestVersions(c *BeaconChainConfig, b byte) { c.CapellaForkVersion[fieldparams.VersionLength-1] = b c.DenebForkVersion[fieldparams.VersionLength-1] = b c.ElectraForkVersion[fieldparams.VersionLength-1] = b + c.EPBSForkVersion[fieldparams.VersionLength-1] = b c.GenesisForkVersion[0] = 0 c.AltairForkVersion[0] = 1 @@ -350,4 +362,5 @@ func FillTestVersions(c *BeaconChainConfig, b byte) { c.CapellaForkVersion[0] = 3 c.DenebForkVersion[0] = 4 c.ElectraForkVersion[0] = 5 + c.EPBSForkVersion[0] = 6 } diff --git a/config/params/minimal_config.go b/config/params/minimal_config.go index e4c33d220acc..32ff86018993 100644 --- a/config/params/minimal_config.go +++ b/config/params/minimal_config.go @@ -96,6 +96,8 @@ func MinimalSpecConfig() *BeaconChainConfig { minimalConfig.DenebForkEpoch = math.MaxUint64 minimalConfig.ElectraForkVersion = []byte{5, 0, 0, 1} minimalConfig.ElectraForkEpoch = math.MaxUint64 + minimalConfig.EPBSForkVersion = []byte{6, 0, 0, 1} + minimalConfig.EPBSForkEpoch = math.MaxUint64 minimalConfig.SyncCommitteeSize = 32 minimalConfig.InactivityScoreBias = 4 diff --git a/config/params/testdata/e2e_config.yaml b/config/params/testdata/e2e_config.yaml index d264fbb6188c..4641825ed307 100644 --- a/config/params/testdata/e2e_config.yaml +++ b/config/params/testdata/e2e_config.yaml @@ -47,7 +47,9 @@ DENEB_FORK_EPOCH: 12 # Electra ELECTRA_FORK_VERSION: 0x050000fd ELECTRA_FORK_EPOCH: 18446744073709551615 - +# EPBS +EPBS_FORK_VERSION: 0x060000fd +EPBS_FORK_EPOCH: 18446744073709551615 # Time parameters # --------------------------------------------------------------- diff --git a/config/params/testnet_e2e_config.go b/config/params/testnet_e2e_config.go index a82c02ec16b7..5c117e2264a8 100644 --- a/config/params/testnet_e2e_config.go +++ b/config/params/testnet_e2e_config.go @@ -8,6 +8,7 @@ const ( CapellaE2EForkEpoch = 10 DenebE2EForkEpoch = 12 ElectraE2EForkEpoch = math.MaxUint64 + EPBSE2EForkEpoch = math.MaxUint64 ) // E2ETestConfig retrieves the configurations made specifically for E2E testing. @@ -44,6 +45,7 @@ func E2ETestConfig() *BeaconChainConfig { e2eConfig.CapellaForkEpoch = CapellaE2EForkEpoch e2eConfig.DenebForkEpoch = DenebE2EForkEpoch e2eConfig.ElectraForkEpoch = ElectraE2EForkEpoch + e2eConfig.EPBSForkEpoch = EPBSE2EForkEpoch // Terminal Total Difficulty. e2eConfig.TerminalTotalDifficulty = "480" @@ -56,6 +58,7 @@ func E2ETestConfig() *BeaconChainConfig { e2eConfig.CapellaForkVersion = []byte{3, 0, 0, 253} e2eConfig.DenebForkVersion = []byte{4, 0, 0, 253} e2eConfig.ElectraForkVersion = []byte{5, 0, 0, 253} + e2eConfig.EPBSForkVersion = []byte{6, 0, 0, 253} e2eConfig.InitializeForkSchedule() return e2eConfig @@ -88,6 +91,7 @@ func E2EMainnetTestConfig() *BeaconChainConfig { e2eConfig.CapellaForkEpoch = CapellaE2EForkEpoch e2eConfig.DenebForkEpoch = DenebE2EForkEpoch e2eConfig.ElectraForkEpoch = ElectraE2EForkEpoch + e2eConfig.EPBSForkEpoch = EPBSE2EForkEpoch // Terminal Total Difficulty. e2eConfig.TerminalTotalDifficulty = "480" @@ -100,6 +104,7 @@ func E2EMainnetTestConfig() *BeaconChainConfig { e2eConfig.CapellaForkVersion = []byte{3, 0, 0, 254} e2eConfig.DenebForkVersion = []byte{4, 0, 0, 254} e2eConfig.ElectraForkVersion = []byte{5, 0, 0, 254} + e2eConfig.EPBSForkVersion = []byte{6, 0, 0, 254} // Deneb changes. e2eConfig.MinPerEpochChurnLimit = 2 diff --git a/config/params/testnet_holesky_config.go b/config/params/testnet_holesky_config.go index 03cefd8988fe..343f20a30813 100644 --- a/config/params/testnet_holesky_config.go +++ b/config/params/testnet_holesky_config.go @@ -41,6 +41,8 @@ func HoleskyConfig() *BeaconChainConfig { cfg.DenebForkVersion = []byte{0x05, 0x1, 0x70, 0x0} cfg.ElectraForkEpoch = math.MaxUint64 cfg.ElectraForkVersion = []byte{0x06, 0x1, 0x70, 0x0} // TODO: Define holesky fork version for electra. This is a placeholder value. + cfg.EPBSForkEpoch = math.MaxUint64 + cfg.EPBSForkVersion = []byte{0x07, 0x1, 0x70, 0x0} // TODO: Define holesky fork version for ePBS. This is a placeholder value. cfg.TerminalTotalDifficulty = "0" cfg.DepositContractAddress = "0x4242424242424242424242424242424242424242" cfg.EjectionBalance = 28000000000 diff --git a/config/params/testnet_sepolia_config.go b/config/params/testnet_sepolia_config.go index 80a00cc96178..ffc74d36bb8d 100644 --- a/config/params/testnet_sepolia_config.go +++ b/config/params/testnet_sepolia_config.go @@ -46,6 +46,8 @@ func SepoliaConfig() *BeaconChainConfig { cfg.DenebForkVersion = []byte{0x90, 0x00, 0x00, 0x73} cfg.ElectraForkEpoch = math.MaxUint64 cfg.ElectraForkVersion = []byte{0x90, 0x00, 0x00, 0x74} // TODO: Define sepolia fork version for electra. This is a placeholder value. + cfg.EPBSForkEpoch = math.MaxUint64 + cfg.EPBSForkVersion = []byte{0x90, 0x00, 0x00, 0x75} // TODO: Define sepolia fork version for ePBS. This is a placeholder value. cfg.TerminalTotalDifficulty = "17000000000000000" cfg.DepositContractAddress = "0x7f02C3E3c98b133055B8B348B2Ac625669Ed295D" cfg.InitializeForkSchedule() diff --git a/consensus-types/blocks/BUILD.bazel b/consensus-types/blocks/BUILD.bazel index 32ba9157fe49..f87d2ff3ff72 100644 --- a/consensus-types/blocks/BUILD.bazel +++ b/consensus-types/blocks/BUILD.bazel @@ -4,20 +4,25 @@ go_library( name = "go_default_library", srcs = [ "execution.go", + "execution_payload_envelope.go", "factory.go", "get_payload.go", "getters.go", + "getters_epbs.go", "kzg.go", "proofs.go", "proto.go", "roblob.go", "roblock.go", "setters.go", + "setters_epbs.go", + "signed_execution_payload_header.go", "types.go", ], importpath = "github.com/prysmaticlabs/prysm/v5/consensus-types/blocks", visibility = ["//visibility:public"], deps = [ + "//beacon-chain/core/signing:go_default_library", "//beacon-chain/state/stateutil:go_default_library", "//config/fieldparams:go_default_library", "//config/params:go_default_library", @@ -33,6 +38,7 @@ go_library( "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/validator-client:go_default_library", "//runtime/version:go_default_library", + "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_prysmaticlabs_fastssz//:go_default_library", "@com_github_prysmaticlabs_gohashtree//:go_default_library", @@ -45,12 +51,15 @@ go_test( srcs = [ "execution_test.go", "factory_test.go", + "getters_epbs_test.go", "getters_test.go", "kzg_test.go", "proofs_test.go", + "proto_epbs_test.go", "proto_test.go", "roblob_test.go", "roblock_test.go", + "setters_test.go", ], embed = [":go_default_library"], deps = [ @@ -66,6 +75,7 @@ go_test( "//runtime/version:go_default_library", "//testing/assert:go_default_library", "//testing/require:go_default_library", + "//testing/util/random:go_default_library", "@com_github_prysmaticlabs_fastssz//:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_prysmaticlabs_gohashtree//:go_default_library", diff --git a/consensus-types/blocks/execution_payload_envelope.go b/consensus-types/blocks/execution_payload_envelope.go new file mode 100644 index 000000000000..3fb8cf34d8c0 --- /dev/null +++ b/consensus-types/blocks/execution_payload_envelope.go @@ -0,0 +1,172 @@ +package blocks + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + field_params "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + consensus_types "github.com/prysmaticlabs/prysm/v5/consensus-types" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/encoding/ssz" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + "google.golang.org/protobuf/proto" +) + +type signedExecutionPayloadEnvelope struct { + s *enginev1.SignedExecutionPayloadEnvelope +} + +type executionPayloadEnvelope struct { + p *enginev1.ExecutionPayloadEnvelope + slot primitives.Slot +} + +// WrappedROSignedExecutionPayloadEnvelope is a constructor which wraps a +// protobuf signed execution payload envelope into an interface. +func WrappedROSignedExecutionPayloadEnvelope(s *enginev1.SignedExecutionPayloadEnvelope) (interfaces.ROSignedExecutionPayloadEnvelope, error) { + w := signedExecutionPayloadEnvelope{s: s} + if w.IsNil() { + return nil, consensus_types.ErrNilObjectWrapped + } + return w, nil +} + +// WrappedROExecutionPayloadEnvelope is a constructor which wraps a +// protobuf execution payload envelope into an interface. +func WrappedROExecutionPayloadEnvelope(p *enginev1.ExecutionPayloadEnvelope) (interfaces.ROExecutionPayloadEnvelope, error) { + w := &executionPayloadEnvelope{p: p} + if w.IsNil() { + return nil, consensus_types.ErrNilObjectWrapped + } + return w, nil +} + +// Envelope returns the wrapped object as an interface +func (s signedExecutionPayloadEnvelope) Envelope() (interfaces.ROExecutionPayloadEnvelope, error) { + return WrappedROExecutionPayloadEnvelope(s.s.Message) +} + +// Signature returns the wrapped value +func (s signedExecutionPayloadEnvelope) Signature() [field_params.BLSSignatureLength]byte { + return [field_params.BLSSignatureLength]byte(s.s.Signature) +} + +// IsNil returns whether the wrapped value is nil +func (s signedExecutionPayloadEnvelope) IsNil() bool { + if s.s == nil { + return true + } + if len(s.s.Signature) != field_params.BLSSignatureLength { + return true + } + w := executionPayloadEnvelope{p: s.s.Message} + return w.IsNil() +} + +// SigningRoot returns the signing root for the given domain +func (s signedExecutionPayloadEnvelope) SigningRoot(domain []byte) (root [32]byte, err error) { + return signing.ComputeSigningRoot(s.s.Message, domain) +} + +// Proto returns the underlying message +func (s signedExecutionPayloadEnvelope) Proto() proto.Message { + return s.s +} + +// IsNil returns whether the wrapped value is nil +func (p *executionPayloadEnvelope) IsNil() bool { + if p.p == nil { + return true + } + if p.p.Payload == nil { + return true + } + if len(p.p.BeaconBlockRoot) != field_params.RootLength { + return true + } + if p.p.BlobKzgCommitments == nil { + return true + } + if p.p.StateRoot == nil { + return true + } + return false +} + +// IsBlinded returns whether the wrapped value is blinded +func (p *executionPayloadEnvelope) IsBlinded() bool { + return !p.IsNil() && p.p.Payload == nil +} + +// Execution returns the wrapped payload as an interface +func (p *executionPayloadEnvelope) Execution() (interfaces.ExecutionData, error) { + if p.IsBlinded() { + return nil, consensus_types.ErrNilObjectWrapped + } + return WrappedExecutionPayloadElectra(p.p.Payload) +} + +// ExecutionRequests returns the execution requests in the payload envelope +func (p *executionPayloadEnvelope) ExecutionRequests() *enginev1.ExecutionRequests { + return p.p.ExecutionRequests +} + +// BuilderIndex returns the wrapped value +func (p *executionPayloadEnvelope) BuilderIndex() primitives.ValidatorIndex { + return p.p.BuilderIndex +} + +// BeaconBlockRoot returns the wrapped value +func (p *executionPayloadEnvelope) BeaconBlockRoot() [field_params.RootLength]byte { + return [field_params.RootLength]byte(p.p.BeaconBlockRoot) +} + +// BlobKzgCommitments returns the wrapped value +func (p *executionPayloadEnvelope) BlobKzgCommitments() [][]byte { + commitments := make([][]byte, len(p.p.BlobKzgCommitments)) + for i, commit := range p.p.BlobKzgCommitments { + commitments[i] = make([]byte, len(commit)) + copy(commitments[i], commit) + } + return commitments +} + +// PayloadWithheld returns the wrapped value +func (p *executionPayloadEnvelope) PayloadWithheld() bool { + return p.p.PayloadWithheld +} + +// StateRoot returns the wrapped value +func (p *executionPayloadEnvelope) StateRoot() [field_params.RootLength]byte { + return [field_params.RootLength]byte(p.p.StateRoot) +} + +// VersionedHashes returns the Versioned Hashes of the KZG commitments within +// the envelope +func (p *executionPayloadEnvelope) VersionedHashes() []common.Hash { + commitments := p.p.BlobKzgCommitments + versionedHashes := make([]common.Hash, len(commitments)) + for i, commitment := range commitments { + versionedHashes[i] = primitives.ConvertKzgCommitmentToVersionedHash(commitment) + } + return versionedHashes +} + +// BlobKzgCommitmentsRoot returns the HTR of the KZG commitments in the payload +func (p *executionPayloadEnvelope) BlobKzgCommitmentsRoot() ([field_params.RootLength]byte, error) { + if p.IsNil() || p.p.BlobKzgCommitments == nil { + return [field_params.RootLength]byte{}, consensus_types.ErrNilObjectWrapped + } + + return ssz.KzgCommitmentsRoot(p.p.BlobKzgCommitments) +} + +// SetSlot initializes the internal member variable +func (p *executionPayloadEnvelope) SetSlot(slot primitives.Slot) { + p.slot = slot +} + +// Slot returns the wrapped value +func (p *executionPayloadEnvelope) Slot() primitives.Slot { + return p.slot +} diff --git a/consensus-types/blocks/factory.go b/consensus-types/blocks/factory.go index 37aa22a410dc..f2eac0f1a580 100644 --- a/consensus-types/blocks/factory.go +++ b/consensus-types/blocks/factory.go @@ -74,6 +74,10 @@ func NewSignedBeaconBlock(i interface{}) (interfaces.SignedBeaconBlock, error) { return initBlindedSignedBlockFromProtoElectra(b) case *eth.GenericSignedBeaconBlock_BlindedElectra: return initBlindedSignedBlockFromProtoElectra(b.BlindedElectra) + case *eth.GenericSignedBeaconBlock_Epbs: + return initSignedBlockFromProtoEPBS(b.Epbs) + case *eth.SignedBeaconBlockEpbs: + return initSignedBlockFromProtoEPBS(b) default: return nil, errors.Wrapf(ErrUnsupportedSignedBeaconBlock, "unable to create block from type %T", i) } @@ -124,6 +128,10 @@ func NewBeaconBlock(i interface{}) (interfaces.ReadOnlyBeaconBlock, error) { return initBlindedBlockFromProtoElectra(b) case *eth.GenericBeaconBlock_BlindedElectra: return initBlindedBlockFromProtoElectra(b.BlindedElectra) + case *eth.GenericBeaconBlock_Epbs: + return initBlockFromProtoEpbs(b.Epbs) + case *eth.BeaconBlockEpbs: + return initBlockFromProtoEpbs(b) default: return nil, errors.Wrapf(errUnsupportedBeaconBlock, "unable to create block from type %T", i) } @@ -154,6 +162,8 @@ func NewBeaconBlockBody(i interface{}) (interfaces.ReadOnlyBeaconBlockBody, erro return initBlockBodyFromProtoElectra(b) case *eth.BlindedBeaconBlockBodyElectra: return initBlindedBlockBodyFromProtoElectra(b) + case *eth.BeaconBlockBodyEpbs: + return initBlockBodyFromProtoEpbs(b) default: return nil, errors.Wrapf(errUnsupportedBeaconBlockBody, "unable to create block body from type %T", i) } @@ -233,6 +243,12 @@ func BuildSignedBeaconBlock(blk interfaces.ReadOnlyBeaconBlock, signature []byte return nil, errIncorrectBlockVersion } return NewSignedBeaconBlock(ð.SignedBeaconBlockElectra{Block: pb, Signature: signature}) + case version.EPBS: + pb, ok := pb.(*eth.BeaconBlockEpbs) + if !ok { + return nil, errIncorrectBlockVersion + } + return NewSignedBeaconBlock(ð.SignedBeaconBlockEpbs{Block: pb, Signature: signature}) default: return nil, errUnsupportedBeaconBlock } @@ -287,6 +303,9 @@ func BuildSignedBeaconBlockFromExecutionPayload(blk interfaces.ReadOnlySignedBea if !blk.IsBlinded() { return nil, errNonBlindedSignedBeaconBlock } + if blk.Version() >= version.EPBS { + return nil, errors.Wrap(errUnsupportedBeaconBlock, "post epbs blocks no longer need to be unblind") + } b := blk.Block() payloadHeader, err := b.Body().Execution() if err != nil { diff --git a/consensus-types/blocks/factory_test.go b/consensus-types/blocks/factory_test.go index d2e9b7a870d0..4ccb24225432 100644 --- a/consensus-types/blocks/factory_test.go +++ b/consensus-types/blocks/factory_test.go @@ -161,6 +161,26 @@ func Test_NewSignedBeaconBlock(t *testing.T) { assert.Equal(t, version.Deneb, b.Version()) assert.Equal(t, true, b.IsBlinded()) }) + t.Run("GenericSignedBeaconBlock_Epbs", func(t *testing.T) { + pb := ð.GenericSignedBeaconBlock_Epbs{ + Epbs: ð.SignedBeaconBlockEpbs{ + Block: ð.BeaconBlockEpbs{ + Body: ð.BeaconBlockBodyEpbs{}, + }, + }, + } + b, err := NewSignedBeaconBlock(pb) + require.NoError(t, err) + assert.Equal(t, version.EPBS, b.Version()) + }) + t.Run("SignedBeaconBlockEpbs", func(t *testing.T) { + pb := ð.SignedBeaconBlockEpbs{ + Block: ð.BeaconBlockEpbs{ + Body: ð.BeaconBlockBodyEpbs{}}} + b, err := NewSignedBeaconBlock(pb) + require.NoError(t, err) + assert.Equal(t, version.EPBS, b.Version()) + }) t.Run("nil", func(t *testing.T) { _, err := NewSignedBeaconBlock(nil) assert.ErrorContains(t, "received nil object", err) @@ -276,6 +296,18 @@ func Test_NewBeaconBlock(t *testing.T) { assert.Equal(t, version.Deneb, b.Version()) assert.Equal(t, true, b.IsBlinded()) }) + t.Run("GenericBeaconBlock_Epbs", func(t *testing.T) { + pb := ð.GenericBeaconBlock_Epbs{Epbs: ð.BeaconBlockEpbs{Body: ð.BeaconBlockBodyEpbs{}}} + b, err := NewBeaconBlock(pb) + require.NoError(t, err) + assert.Equal(t, version.EPBS, b.Version()) + }) + t.Run("BeaconBlockEpbs", func(t *testing.T) { + pb := ð.BeaconBlockEpbs{Body: ð.BeaconBlockBodyEpbs{}} + b, err := NewBeaconBlock(pb) + require.NoError(t, err) + assert.Equal(t, version.EPBS, b.Version()) + }) t.Run("nil", func(t *testing.T) { _, err := NewBeaconBlock(nil) assert.ErrorContains(t, "received nil object", err) @@ -354,6 +386,14 @@ func Test_NewBeaconBlockBody(t *testing.T) { assert.Equal(t, version.Deneb, b.version) assert.Equal(t, true, b.IsBlinded()) }) + t.Run("BeaconBlockBodyEpbs", func(t *testing.T) { + pb := ð.BeaconBlockBodyEpbs{} + i, err := NewBeaconBlockBody(pb) + require.NoError(t, err) + b, ok := i.(*BeaconBlockBody) + require.Equal(t, true, ok) + assert.Equal(t, version.EPBS, b.version) + }) t.Run("nil", func(t *testing.T) { _, err := NewBeaconBlockBody(nil) assert.ErrorContains(t, "received nil object", err) @@ -425,6 +465,13 @@ func Test_BuildSignedBeaconBlock(t *testing.T) { assert.Equal(t, version.Deneb, sb.Version()) assert.Equal(t, true, sb.IsBlinded()) }) + t.Run("Epbs", func(t *testing.T) { + b := &BeaconBlock{version: version.EPBS, body: &BeaconBlockBody{version: version.EPBS}} + sb, err := BuildSignedBeaconBlock(b, sig[:]) + require.NoError(t, err) + assert.DeepEqual(t, sig, sb.Signature()) + assert.Equal(t, version.EPBS, sb.Version()) + }) } func TestBuildSignedBeaconBlockFromExecutionPayload(t *testing.T) { diff --git a/consensus-types/blocks/getters.go b/consensus-types/blocks/getters.go index 4aef3478baef..6ca52fc754f8 100644 --- a/consensus-types/blocks/getters.go +++ b/consensus-types/blocks/getters.go @@ -15,6 +15,11 @@ import ( "github.com/prysmaticlabs/prysm/v5/runtime/version" ) +var ( + // ErrAlreadyUnblinded is returned when trying to unblind a full block. + ErrAlreadyUnblinded = errors.New("cannot unblind if a full block") +) + // BeaconBlockIsNil checks if any composite field of input signed beacon block is nil. // Access to these nil fields will result in run time panic, // it is recommended to run these checks as first line of defense. @@ -75,6 +80,9 @@ func (b *SignedBeaconBlock) Copy() (interfaces.SignedBeaconBlock, error) { return initBlindedSignedBlockFromProtoElectra(pb.(*eth.SignedBlindedBeaconBlockElectra).Copy()) } return initSignedBlockFromProtoElectra(pb.(*eth.SignedBeaconBlockElectra).Copy()) + case version.EPBS: + cp := eth.CopySignedBeaconBlockEPBS(pb.(*eth.SignedBeaconBlockEpbs)) + return initSignedBlockFromProtoEPBS(cp) default: return nil, errIncorrectBlockVersion } @@ -131,6 +139,10 @@ func (b *SignedBeaconBlock) PbGenericBlock() (*eth.GenericSignedBeaconBlock, err return ð.GenericSignedBeaconBlock{ Block: ð.GenericSignedBeaconBlock_Electra{Electra: pb.(*eth.SignedBeaconBlockContentsElectra)}, }, nil + case version.EPBS: + return ð.GenericSignedBeaconBlock{ + Block: ð.GenericSignedBeaconBlock_Epbs{Epbs: pb.(*eth.SignedBeaconBlockEpbs)}, + }, nil default: return nil, errIncorrectBlockVersion } @@ -138,7 +150,7 @@ func (b *SignedBeaconBlock) PbGenericBlock() (*eth.GenericSignedBeaconBlock, err // ToBlinded converts a non-blinded block to its blinded equivalent. func (b *SignedBeaconBlock) ToBlinded() (interfaces.ReadOnlySignedBeaconBlock, error) { - if b.version < version.Bellatrix { + if b.version < version.Bellatrix || b.version >= version.EPBS { return nil, ErrUnsupportedVersion } if b.IsBlinded() { @@ -283,7 +295,7 @@ func (b *SignedBeaconBlock) Unblind(e interfaces.ExecutionData) error { return errors.New("cannot unblind with nil execution data") } if !b.IsBlinded() { - return errors.New("cannot unblind if the block is already unblinded") + return ErrAlreadyUnblinded } payloadRoot, err := e.HashTreeRoot() if err != nil { @@ -313,7 +325,8 @@ func (b *SignedBeaconBlock) Version() int { // IsBlinded metadata on whether a block is blinded func (b *SignedBeaconBlock) IsBlinded() bool { - return b.version >= version.Bellatrix && b.block.body.executionPayload == nil + preEPBS := b.version < version.EPBS + return preEPBS && b.version >= version.Bellatrix && b.block.body.executionPayload == nil } // Header converts the underlying protobuf object from blinded block to header format. @@ -369,6 +382,8 @@ func (b *SignedBeaconBlock) MarshalSSZ() ([]byte, error) { return pb.(*eth.SignedBlindedBeaconBlockElectra).MarshalSSZ() } return pb.(*eth.SignedBeaconBlockElectra).MarshalSSZ() + case version.EPBS: + return pb.(*eth.SignedBeaconBlockEpbs).MarshalSSZ() default: return []byte{}, errIncorrectBlockVersion } @@ -406,6 +421,8 @@ func (b *SignedBeaconBlock) MarshalSSZTo(dst []byte) ([]byte, error) { return pb.(*eth.SignedBlindedBeaconBlockElectra).MarshalSSZTo(dst) } return pb.(*eth.SignedBeaconBlockElectra).MarshalSSZTo(dst) + case version.EPBS: + return pb.(*eth.SignedBeaconBlockEpbs).MarshalSSZTo(dst) default: return []byte{}, errIncorrectBlockVersion } @@ -447,6 +464,8 @@ func (b *SignedBeaconBlock) SizeSSZ() int { return pb.(*eth.SignedBlindedBeaconBlockElectra).SizeSSZ() } return pb.(*eth.SignedBeaconBlockElectra).SizeSSZ() + case version.EPBS: + return pb.(*eth.SignedBeaconBlockEpbs).SizeSSZ() default: panic(incorrectBlockVersion) } @@ -564,6 +583,16 @@ func (b *SignedBeaconBlock) UnmarshalSSZ(buf []byte) error { return err } } + case version.EPBS: + pb := ð.SignedBeaconBlockEpbs{} + if err := pb.UnmarshalSSZ(buf); err != nil { + return err + } + var err error + newBlock, err = initSignedBlockFromProtoEPBS(pb) + if err != nil { + return err + } default: return errIncorrectBlockVersion } @@ -603,7 +632,8 @@ func (b *BeaconBlock) IsNil() bool { // IsBlinded checks if the beacon block is a blinded block. func (b *BeaconBlock) IsBlinded() bool { - return b.version >= version.Bellatrix && b.body.executionPayload == nil + preEPBS := b.version < version.EPBS + return preEPBS && b.version >= version.Bellatrix && b.body.executionPayload == nil } // Version of the underlying protobuf object. @@ -642,6 +672,8 @@ func (b *BeaconBlock) HashTreeRoot() ([field_params.RootLength]byte, error) { return pb.(*eth.BlindedBeaconBlockElectra).HashTreeRoot() } return pb.(*eth.BeaconBlockElectra).HashTreeRoot() + case version.EPBS: + return pb.(*eth.BeaconBlockEpbs).HashTreeRoot() default: return [field_params.RootLength]byte{}, errIncorrectBlockVersion } @@ -678,6 +710,8 @@ func (b *BeaconBlock) HashTreeRootWith(h *ssz.Hasher) error { return pb.(*eth.BlindedBeaconBlockElectra).HashTreeRootWith(h) } return pb.(*eth.BeaconBlockElectra).HashTreeRootWith(h) + case version.EPBS: + return pb.(*eth.BeaconBlockEpbs).HashTreeRootWith(h) default: return errIncorrectBlockVersion } @@ -715,6 +749,8 @@ func (b *BeaconBlock) MarshalSSZ() ([]byte, error) { return pb.(*eth.BlindedBeaconBlockElectra).MarshalSSZ() } return pb.(*eth.BeaconBlockElectra).MarshalSSZ() + case version.EPBS: + return pb.(*eth.BeaconBlockEpbs).MarshalSSZ() default: return []byte{}, errIncorrectBlockVersion } @@ -752,6 +788,8 @@ func (b *BeaconBlock) MarshalSSZTo(dst []byte) ([]byte, error) { return pb.(*eth.BlindedBeaconBlockElectra).MarshalSSZTo(dst) } return pb.(*eth.BeaconBlockElectra).MarshalSSZTo(dst) + case version.EPBS: + return pb.(*eth.BeaconBlockEpbs).MarshalSSZTo(dst) default: return []byte{}, errIncorrectBlockVersion } @@ -793,6 +831,8 @@ func (b *BeaconBlock) SizeSSZ() int { return pb.(*eth.BlindedBeaconBlockElectra).SizeSSZ() } return pb.(*eth.BeaconBlockElectra).SizeSSZ() + case version.EPBS: + return pb.(*eth.BeaconBlockEpbs).SizeSSZ() default: panic(incorrectBodyVersion) } @@ -910,6 +950,16 @@ func (b *BeaconBlock) UnmarshalSSZ(buf []byte) error { return err } } + case version.EPBS: + pb := ð.BeaconBlockEpbs{} + if err := pb.UnmarshalSSZ(buf); err != nil { + return err + } + var err error + newBlock, err = initBlockFromProtoEpbs(pb) + if err != nil { + return err + } default: return errIncorrectBlockVersion } @@ -948,6 +998,8 @@ func (b *BeaconBlock) AsSignRequestObject() (validatorpb.SignRequestObject, erro return &validatorpb.SignRequest_BlindedBlockElectra{BlindedBlockElectra: pb.(*eth.BlindedBeaconBlockElectra)}, nil } return &validatorpb.SignRequest_BlockElectra{BlockElectra: pb.(*eth.BeaconBlockElectra)}, nil + case version.EPBS: + return &validatorpb.SignRequest_BlockEpbs{BlockEpbs: pb.(*eth.BeaconBlockEpbs)}, nil default: return nil, errIncorrectBlockVersion } @@ -987,6 +1039,9 @@ func (b *BeaconBlock) Copy() (interfaces.ReadOnlyBeaconBlock, error) { return initBlindedBlockFromProtoElectra(pb.(*eth.BlindedBeaconBlockElectra).Copy()) } return initBlockFromProtoElectra(pb.(*eth.BeaconBlockElectra).Copy()) + case version.EPBS: + cp := eth.CopyBeaconBlockEPBS(pb.(*eth.BeaconBlockEpbs)) + return initBlockFromProtoEpbs(cp) default: return nil, errIncorrectBlockVersion } @@ -1084,7 +1139,7 @@ func (b *BeaconBlockBody) SyncAggregate() (*eth.SyncAggregate, error) { // Execution returns the execution payload of the block body. func (b *BeaconBlockBody) Execution() (interfaces.ExecutionData, error) { switch b.version { - case version.Phase0, version.Altair: + case version.Phase0, version.Altair, version.EPBS: return nil, consensus_types.ErrNotSupported("Execution", b.version) default: if b.IsBlinded() { @@ -1157,6 +1212,8 @@ func (b *BeaconBlockBody) HashTreeRoot() ([field_params.RootLength]byte, error) return pb.(*eth.BlindedBeaconBlockBodyElectra).HashTreeRoot() } return pb.(*eth.BeaconBlockBodyElectra).HashTreeRoot() + case version.EPBS: + return pb.(*eth.BeaconBlockBodyEpbs).HashTreeRoot() default: return [field_params.RootLength]byte{}, errIncorrectBodyVersion } @@ -1164,5 +1221,6 @@ func (b *BeaconBlockBody) HashTreeRoot() ([field_params.RootLength]byte, error) // IsBlinded checks if the beacon block body is a blinded block body. func (b *BeaconBlockBody) IsBlinded() bool { - return b.version >= version.Bellatrix && b.executionPayload == nil + preEPBS := b.version < version.EPBS + return preEPBS && b.version >= version.Bellatrix && b.executionPayload == nil } diff --git a/consensus-types/blocks/getters_epbs.go b/consensus-types/blocks/getters_epbs.go new file mode 100644 index 000000000000..3cc52bb583b1 --- /dev/null +++ b/consensus-types/blocks/getters_epbs.go @@ -0,0 +1,24 @@ +package blocks + +import ( + consensus_types "github.com/prysmaticlabs/prysm/v5/consensus-types" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" +) + +// PayloadAttestations returns the payload attestations in the block. +func (b *BeaconBlockBody) PayloadAttestations() ([]*ethpb.PayloadAttestation, error) { + if b.version < version.EPBS { + return nil, consensus_types.ErrNotSupported("PayloadAttestations", b.version) + } + return b.payloadAttestations, nil +} + +// SignedExecutionPayloadHeader returns the signed execution payload header in the block. +func (b *BeaconBlockBody) SignedExecutionPayloadHeader() (interfaces.ROSignedExecutionPayloadHeader, error) { + if b.version < version.EPBS { + return nil, consensus_types.ErrNotSupported("SignedExecutionPayloadHeader", b.version) + } + return WrappedROSignedExecutionPayloadHeader(b.signedExecutionPayloadHeader) +} diff --git a/consensus-types/blocks/getters_epbs_test.go b/consensus-types/blocks/getters_epbs_test.go new file mode 100644 index 000000000000..1e5fa54a34f8 --- /dev/null +++ b/consensus-types/blocks/getters_epbs_test.go @@ -0,0 +1,108 @@ +package blocks + +import ( + "testing" + + "github.com/prysmaticlabs/go-bitfield" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + pb "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "github.com/prysmaticlabs/prysm/v5/testing/require" +) + +func Test_EpbsBlock_Copy(t *testing.T) { + signedHeader := &pb.SignedExecutionPayloadHeader{ + Message: &pb.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: bytesutil.PadTo([]byte("parentblockhash"), fieldparams.RootLength), + ParentBlockRoot: bytesutil.PadTo([]byte("parentblockroot"), fieldparams.RootLength), + BlockHash: bytesutil.PadTo([]byte("blockhash"), fieldparams.RootLength), + BuilderIndex: 1, + Slot: 2, + Value: 3, + BlobKzgCommitmentsRoot: bytesutil.PadTo([]byte("blobkzgcommitmentsroot"), fieldparams.RootLength), + GasLimit: 4, + }, + Signature: bytesutil.PadTo([]byte("signature"), fieldparams.BLSSignatureLength), + } + aggregationBits := bitfield.NewBitvector512() + aggregationBits.SetBitAt(1, true) + aggregationBits.SetBitAt(2, true) + + payloadAttestations := []*eth.PayloadAttestation{ + { + AggregationBits: aggregationBits, + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: []byte("beaconblockroot"), + Slot: 1, + PayloadStatus: 2, + }, + Signature: []byte("signature"), + }, + { + AggregationBits: aggregationBits, + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: []byte("beaconblockroot"), + Slot: 1, + PayloadStatus: 1, + }, + Signature: []byte("signature"), + }, + } + + epbsBlockProto := ð.BeaconBlockEpbs{ + Body: ð.BeaconBlockBodyEpbs{ + SignedExecutionPayloadHeader: signedHeader, + PayloadAttestations: payloadAttestations, + }, + } + + epbsBlock, err := NewBeaconBlock(epbsBlockProto) + require.NoError(t, err) + copiedEpbsBlock, err := epbsBlock.Copy() + require.NoError(t, err) + copiedBody, ok := copiedEpbsBlock.Body().(interfaces.ReadOnlyBeaconBlockBody) + require.Equal(t, true, ok) + copiedHeader, err := copiedBody.SignedExecutionPayloadHeader() + require.NoError(t, err) + wh, err := WrappedROSignedExecutionPayloadHeader(signedHeader) + require.NoError(t, err) + require.DeepEqual(t, copiedHeader, wh) + + copiedPayloadAtts, err := copiedBody.PayloadAttestations() + require.NoError(t, err) + require.DeepEqual(t, copiedPayloadAtts, payloadAttestations) +} + +func Test_EpbsBlock_ToBlinded(t *testing.T) { + b := &SignedBeaconBlock{version: version.EPBS} + _, err := b.ToBlinded() + require.ErrorIs(t, err, ErrUnsupportedVersion) +} + +func Test_EpbsBlock_Unblind(t *testing.T) { + b := &SignedBeaconBlock{version: version.EPBS} + e, err := WrappedExecutionPayload(&pb.ExecutionPayload{}) + require.NoError(t, err) + err = b.Unblind(e) + require.ErrorIs(t, err, ErrAlreadyUnblinded) +} + +func Test_EpbsBlock_IsBlinded(t *testing.T) { + b := &SignedBeaconBlock{version: version.EPBS} + require.Equal(t, false, b.IsBlinded()) + bb := &BeaconBlock{version: version.EPBS} + require.Equal(t, false, bb.IsBlinded()) + bd := &BeaconBlockBody{version: version.EPBS} + require.Equal(t, false, bd.IsBlinded()) +} + +func Test_PreEPBS_Versions(t *testing.T) { + bb := &BeaconBlockBody{version: version.Electra} + _, err := bb.PayloadAttestations() + require.ErrorContains(t, "PayloadAttestations", err) + _, err = bb.SignedExecutionPayloadHeader() + require.ErrorContains(t, "SignedExecutionPayloadHeader", err) +} diff --git a/consensus-types/blocks/getters_test.go b/consensus-types/blocks/getters_test.go index 6be8940e7b6f..20b439005a52 100644 --- a/consensus-types/blocks/getters_test.go +++ b/consensus-types/blocks/getters_test.go @@ -464,6 +464,9 @@ func Test_BeaconBlockBody_Execution(t *testing.T) { gas, err = eDenebHeader.ExcessBlobGas() require.NoError(t, err) require.DeepEqual(t, gas, uint64(223)) + + bb = &SignedBeaconBlock{version: version.EPBS, block: &BeaconBlock{version: version.EPBS, body: &BeaconBlockBody{version: version.EPBS}}} + require.ErrorContains(t, "Execution is not supported for epbs: unsupported getter", bb.SetExecution(nil)) } func Test_BeaconBlockBody_HashTreeRoot(t *testing.T) { diff --git a/consensus-types/blocks/proto.go b/consensus-types/blocks/proto.go index 1cb29d535e2d..69077177ac0a 100644 --- a/consensus-types/blocks/proto.go +++ b/consensus-types/blocks/proto.go @@ -156,6 +156,16 @@ func (b *SignedBeaconBlock) Proto() (proto.Message, error) { // nolint:gocognit Block: block, Signature: b.signature[:], }, nil + case version.EPBS: + block, ok := blockMessage.(*eth.BeaconBlockEpbs) + if !ok { + return nil, errIncorrectBlockVersion + } + + return ð.SignedBeaconBlockEpbs{ + Block: block, + Signature: b.signature[:], + }, nil default: return nil, errors.New("unsupported signed beacon block version") } @@ -337,6 +347,18 @@ func (b *BeaconBlock) Proto() (proto.Message, error) { // nolint:gocognit StateRoot: b.stateRoot[:], Body: body, }, nil + case version.EPBS: + body, ok := bodyMessage.(*eth.BeaconBlockBodyEpbs) + if !ok { + return nil, errIncorrectBodyVersion + } + return ð.BeaconBlockEpbs{ + Slot: b.slot, + ProposerIndex: b.proposerIndex, + ParentRoot: b.parentRoot[:], + StateRoot: b.stateRoot[:], + Body: body, + }, nil default: return nil, errors.New("unsupported beacon block version") @@ -558,6 +580,21 @@ func (b *BeaconBlockBody) Proto() (proto.Message, error) { ExecutionRequests: b.executionRequests, }, nil + case version.EPBS: + return ð.BeaconBlockBodyEpbs{ + RandaoReveal: b.randaoReveal[:], + Eth1Data: b.eth1Data, + Graffiti: b.graffiti[:], + ProposerSlashings: b.proposerSlashings, + AttesterSlashings: b.attesterSlashingsElectra, + Attestations: b.attestationsElectra, + Deposits: b.deposits, + VoluntaryExits: b.voluntaryExits, + SyncAggregate: b.syncAggregate, + BlsToExecutionChanges: b.blsToExecutionChanges, + SignedExecutionPayloadHeader: b.signedExecutionPayloadHeader, + PayloadAttestations: b.payloadAttestations, + }, nil default: return nil, errors.New("unsupported beacon block body version") } @@ -665,6 +702,22 @@ func initSignedBlockFromProtoElectra(pb *eth.SignedBeaconBlockElectra) (*SignedB return b, nil } +func initSignedBlockFromProtoEPBS(pb *eth.SignedBeaconBlockEpbs) (*SignedBeaconBlock, error) { + if pb == nil { + return nil, errNilBlock + } + block, err := initBlockFromProtoEpbs(pb.Block) + if err != nil { + return nil, err + } + b := &SignedBeaconBlock{ + version: version.EPBS, + block: block, + signature: bytesutil.ToBytes96(pb.Signature), + } + return b, nil +} + func initBlindedSignedBlockFromProtoBellatrix(pb *eth.SignedBlindedBeaconBlockBellatrix) (*SignedBeaconBlock, error) { if pb == nil { return nil, errNilBlock @@ -857,7 +910,6 @@ func initBlockFromProtoElectra(pb *eth.BeaconBlockElectra) (*BeaconBlock, error) if pb == nil { return nil, errNilBlock } - body, err := initBlockBodyFromProtoElectra(pb.Body) if err != nil { return nil, err @@ -873,6 +925,25 @@ func initBlockFromProtoElectra(pb *eth.BeaconBlockElectra) (*BeaconBlock, error) return b, nil } +func initBlockFromProtoEpbs(pb *eth.BeaconBlockEpbs) (*BeaconBlock, error) { + if pb == nil { + return nil, errNilBlock + } + body, err := initBlockBodyFromProtoEpbs(pb.Body) + if err != nil { + return nil, err + } + b := &BeaconBlock{ + version: version.EPBS, + slot: pb.Slot, + proposerIndex: pb.ProposerIndex, + parentRoot: bytesutil.ToBytes32(pb.ParentRoot), + stateRoot: bytesutil.ToBytes32(pb.StateRoot), + body: body, + } + return b, nil +} + func initBlindedBlockFromProtoCapella(pb *eth.BlindedBeaconBlockCapella) (*BeaconBlock, error) { if pb == nil { return nil, errNilBlock @@ -1106,6 +1177,29 @@ func initBlockBodyFromProtoDeneb(pb *eth.BeaconBlockBodyDeneb) (*BeaconBlockBody return b, nil } +func initBlockBodyFromProtoEpbs(pb *eth.BeaconBlockBodyEpbs) (*BeaconBlockBody, error) { + if pb == nil { + return nil, errNilBlockBody + } + + b := &BeaconBlockBody{ + version: version.EPBS, + randaoReveal: bytesutil.ToBytes96(pb.RandaoReveal), + eth1Data: pb.Eth1Data, + graffiti: bytesutil.ToBytes32(pb.Graffiti), + proposerSlashings: pb.ProposerSlashings, + attesterSlashingsElectra: pb.AttesterSlashings, + attestationsElectra: pb.Attestations, + deposits: pb.Deposits, + voluntaryExits: pb.VoluntaryExits, + syncAggregate: pb.SyncAggregate, + blsToExecutionChanges: pb.BlsToExecutionChanges, + signedExecutionPayloadHeader: pb.SignedExecutionPayloadHeader, + payloadAttestations: pb.PayloadAttestations, + } + return b, nil +} + func initBlindedBlockBodyFromProtoDeneb(pb *eth.BlindedBeaconBlockBodyDeneb) (*BeaconBlockBody, error) { if pb == nil { return nil, errNilBlockBody diff --git a/consensus-types/blocks/proto_epbs_test.go b/consensus-types/blocks/proto_epbs_test.go new file mode 100644 index 000000000000..5fab09336ad1 --- /dev/null +++ b/consensus-types/blocks/proto_epbs_test.go @@ -0,0 +1,107 @@ +package blocks + +import ( + "testing" + + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "github.com/prysmaticlabs/prysm/v5/testing/assert" + "github.com/prysmaticlabs/prysm/v5/testing/require" +) + +func Test_initSignedBlockFromProtoEpbs(t *testing.T) { + f := getFields() + expectedBlock := ð.SignedBeaconBlockEpbs{ + Block: ð.BeaconBlockEpbs{ + Slot: 128, + ProposerIndex: 128, + ParentRoot: f.root[:], + StateRoot: f.root[:], + Body: bodyPbEpbs(), + }, + Signature: f.sig[:], + } + resultBlock, err := initSignedBlockFromProtoEPBS(expectedBlock) + require.NoError(t, err) + resultHTR, err := resultBlock.block.HashTreeRoot() + require.NoError(t, err) + expectedHTR, err := expectedBlock.Block.HashTreeRoot() + require.NoError(t, err) + assert.DeepEqual(t, expectedHTR, resultHTR) + assert.DeepEqual(t, expectedBlock.Signature, resultBlock.signature[:]) +} + +func Test_initBlockFromProtoEpbs(t *testing.T) { + f := getFields() + expectedBlock := ð.BeaconBlockEpbs{ + Slot: 128, + ProposerIndex: 128, + ParentRoot: f.root[:], + StateRoot: f.root[:], + Body: bodyPbEpbs(), + } + resultBlock, err := initBlockFromProtoEpbs(expectedBlock) + require.NoError(t, err) + resultHTR, err := resultBlock.HashTreeRoot() + require.NoError(t, err) + expectedHTR, err := expectedBlock.HashTreeRoot() + require.NoError(t, err) + assert.DeepEqual(t, expectedHTR, resultHTR) +} + +func Test_initBlockBodyFromProtoEpbs(t *testing.T) { + expectedBody := bodyPbEpbs() + resultBody, err := initBlockBodyFromProtoEpbs(expectedBody) + require.NoError(t, err) + resultHTR, err := resultBody.HashTreeRoot() + require.NoError(t, err) + expectedHTR, err := expectedBody.HashTreeRoot() + require.NoError(t, err) + assert.DeepEqual(t, expectedHTR, resultHTR) +} + +func bodyEpbs() *BeaconBlockBody { + f := getFields() + return &BeaconBlockBody{ + version: version.EPBS, + randaoReveal: f.sig, + eth1Data: ð.Eth1Data{ + DepositRoot: f.root[:], + DepositCount: 128, + BlockHash: f.root[:], + }, + graffiti: f.root, + proposerSlashings: f.proposerSlashings, + attesterSlashingsElectra: f.attesterSlashingsElectra, + attestationsElectra: f.attsElectra, + deposits: f.deposits, + voluntaryExits: f.voluntaryExits, + syncAggregate: f.syncAggregate, + signedExecutionPayloadHeader: f.signedPayloadHeader, + blsToExecutionChanges: f.blsToExecutionChanges, + blobKzgCommitments: f.kzgCommitments, + payloadAttestations: f.payloadAttestation, + } +} + +func bodyPbEpbs() *eth.BeaconBlockBodyEpbs { + f := getFields() + return ð.BeaconBlockBodyEpbs{ + RandaoReveal: f.sig[:], + Eth1Data: ð.Eth1Data{ + DepositRoot: f.root[:], + DepositCount: 128, + BlockHash: f.root[:], + }, + Graffiti: f.root[:], + ProposerSlashings: f.proposerSlashings, + AttesterSlashings: f.attesterSlashingsElectra, + Attestations: f.attsElectra, + Deposits: f.deposits, + VoluntaryExits: f.voluntaryExits, + SyncAggregate: f.syncAggregate, + BlsToExecutionChanges: f.blsToExecutionChanges, + SignedExecutionPayloadHeader: f.signedPayloadHeader, + PayloadAttestations: f.payloadAttestation, + } +} diff --git a/consensus-types/blocks/proto_test.go b/consensus-types/blocks/proto_test.go index 880edb63db99..e98da274abdc 100644 --- a/consensus-types/blocks/proto_test.go +++ b/consensus-types/blocks/proto_test.go @@ -4,6 +4,8 @@ import ( "testing" "github.com/prysmaticlabs/go-bitfield" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" @@ -17,8 +19,10 @@ type fields struct { sig [96]byte deposits []*eth.Deposit atts []*eth.Attestation + attsElectra []*eth.AttestationElectra proposerSlashings []*eth.ProposerSlashing attesterSlashings []*eth.AttesterSlashing + attesterSlashingsElectra []*eth.AttesterSlashingElectra voluntaryExits []*eth.SignedVoluntaryExit syncAggregate *eth.SyncAggregate execPayload *enginev1.ExecutionPayload @@ -27,8 +31,10 @@ type fields struct { execPayloadHeaderCapella *enginev1.ExecutionPayloadHeaderCapella execPayloadDeneb *enginev1.ExecutionPayloadDeneb execPayloadHeaderDeneb *enginev1.ExecutionPayloadHeaderDeneb + signedPayloadHeader *enginev1.SignedExecutionPayloadHeader blsToExecutionChanges []*eth.SignedBLSToExecutionChange kzgCommitments [][]byte + payloadAttestation []*eth.PayloadAttestation } func Test_SignedBeaconBlock_Proto(t *testing.T) { @@ -306,6 +312,42 @@ func Test_SignedBeaconBlock_Proto(t *testing.T) { require.NoError(t, err) assert.DeepEqual(t, expectedHTR, resultHTR) }) + t.Run("ePBS", func(t *testing.T) { + slot := primitives.Slot(12345) + proposerIndex := primitives.ValidatorIndex(23434) + expectedBlock := ð.SignedBeaconBlockEpbs{ + Block: ð.BeaconBlockEpbs{ + Slot: slot, + ProposerIndex: proposerIndex, + ParentRoot: f.root[:], + StateRoot: f.root[:], + Body: bodyPbEpbs(), + }, + Signature: f.sig[:], + } + block := &SignedBeaconBlock{ + version: version.EPBS, + block: &BeaconBlock{ + version: version.EPBS, + slot: slot, + proposerIndex: proposerIndex, + parentRoot: f.root, + stateRoot: f.root, + body: bodyEpbs(), + }, + signature: f.sig, + } + + result, err := block.Proto() + require.NoError(t, err) + resultBlock, ok := result.(*eth.SignedBeaconBlockEpbs) + require.Equal(t, true, ok) + resultHTR, err := resultBlock.HashTreeRoot() + require.NoError(t, err) + expectedHTR, err := expectedBlock.HashTreeRoot() + require.NoError(t, err) + assert.DeepEqual(t, expectedHTR, resultHTR) + }) } func Test_BeaconBlock_Proto(t *testing.T) { @@ -527,6 +569,34 @@ func Test_BeaconBlock_Proto(t *testing.T) { require.NoError(t, err) assert.DeepEqual(t, expectedHTR, resultHTR) }) + t.Run("ePBS", func(t *testing.T) { + expectedBlock := ð.BeaconBlockEpbs{ + Slot: 128, + ProposerIndex: 128, + ParentRoot: f.root[:], + StateRoot: f.root[:], + Body: bodyPbEpbs(), + } + block := &BeaconBlock{ + version: version.EPBS, + slot: 128, + proposerIndex: 128, + parentRoot: f.root, + stateRoot: f.root, + body: bodyEpbs(), + } + + result, err := block.Proto() + require.NoError(t, err) + resultBlock, ok := result.(*eth.BeaconBlockEpbs) + require.Equal(t, true, ok) + resultHTR, err := resultBlock.HashTreeRoot() + require.NoError(t, err) + expectedHTR, err := expectedBlock.HashTreeRoot() + require.NoError(t, err) + assert.DeepEqual(t, expectedHTR, resultHTR) + }) + } func Test_BeaconBlockBody_Proto(t *testing.T) { @@ -671,6 +741,19 @@ func Test_BeaconBlockBody_Proto(t *testing.T) { _, err := body.Proto() require.ErrorIs(t, err, errPayloadHeaderWrongType) }) + t.Run("epbs", func(t *testing.T) { + expectedBody := bodyPbEpbs() + body := bodyEpbs() + result, err := body.Proto() + require.NoError(t, err) + resultBlock, ok := result.(*eth.BeaconBlockBodyEpbs) + require.Equal(t, true, ok) + resultHTR, err := resultBlock.HashTreeRoot() + require.NoError(t, err) + expectedHTR, err := expectedBody.HashTreeRoot() + require.NoError(t, err) + assert.DeepEqual(t, expectedHTR, resultHTR) + }) } func Test_initSignedBlockFromProtoPhase0(t *testing.T) { @@ -1471,6 +1554,26 @@ func getFields() fields { }, } } + attsElectra := make([]*eth.AttestationElectra, 8) + for i := range attsElectra { + attsElectra[i] = ð.AttestationElectra{} + attsElectra[i].Signature = sig[:] + attsElectra[i].AggregationBits = bitfield.NewBitlist(1) + attsElectra[i].CommitteeBits = primitives.NewAttestationCommitteeBits() + attsElectra[i].Data = ð.AttestationData{ + Slot: 128, + CommitteeIndex: 128, + BeaconBlockRoot: root[:], + Source: ð.Checkpoint{ + Epoch: 128, + Root: root[:], + }, + Target: ð.Checkpoint{ + Epoch: 128, + Root: root[:], + }, + } + } proposerSlashing := ð.ProposerSlashing{ Header_1: ð.SignedBeaconBlockHeader{ Header: ð.BeaconBlockHeader{ @@ -1529,6 +1632,42 @@ func getFields() fields { Signature: sig[:], }, } + attesterSlashingElectra := ð.AttesterSlashingElectra{ + Attestation_1: ð.IndexedAttestationElectra{ + AttestingIndices: []uint64{1, 2, 8}, + Data: ð.AttestationData{ + Slot: 128, + CommitteeIndex: 128, + BeaconBlockRoot: root[:], + Source: ð.Checkpoint{ + Epoch: 128, + Root: root[:], + }, + Target: ð.Checkpoint{ + Epoch: 128, + Root: root[:], + }, + }, + Signature: sig[:], + }, + Attestation_2: ð.IndexedAttestationElectra{ + AttestingIndices: []uint64{1, 2, 8}, + Data: ð.AttestationData{ + Slot: 128, + CommitteeIndex: 128, + BeaconBlockRoot: root[:], + Source: ð.Checkpoint{ + Epoch: 128, + Root: root[:], + }, + Target: ð.Checkpoint{ + Epoch: 128, + Root: root[:], + }, + }, + Signature: sig[:], + }, + } voluntaryExit := ð.SignedVoluntaryExit{ Exit: ð.VoluntaryExit{ Epoch: 128, @@ -1681,6 +1820,19 @@ func getFields() fields { BlobGasUsed: 128, ExcessBlobGas: 128, } + signedExecutionPayloadHeader := &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: bytesutil.PadTo([]byte("parentblockhash"), fieldparams.RootLength), + ParentBlockRoot: bytesutil.PadTo([]byte("parentblockroot"), fieldparams.RootLength), + BlockHash: bytesutil.PadTo([]byte("blockhash"), fieldparams.RootLength), + BuilderIndex: 1, + Slot: 2, + Value: 3, + BlobKzgCommitmentsRoot: bytesutil.PadTo([]byte("blobkzgcommitmentsroot"), fieldparams.RootLength), + GasLimit: 4, + }, + Signature: bytesutil.PadTo([]byte("signature"), fieldparams.BLSSignatureLength), + } kzgCommitments := [][]byte{ bytesutil.PadTo([]byte{123}, 48), @@ -1689,13 +1841,27 @@ func getFields() fields { bytesutil.PadTo([]byte{143}, 48), } + payloadAttestation := []*eth.PayloadAttestation{ + { + AggregationBits: bitfield.NewBitvector512(), + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: bytesutil.PadTo([]byte{123}, 32), + Slot: 1, + PayloadStatus: 2, + }, + Signature: bytesutil.PadTo([]byte("signature"), fieldparams.BLSSignatureLength), + }, + } + return fields{ root: root, sig: sig, deposits: deposits, atts: atts, + attsElectra: attsElectra, proposerSlashings: []*eth.ProposerSlashing{proposerSlashing}, attesterSlashings: []*eth.AttesterSlashing{attesterSlashing}, + attesterSlashingsElectra: []*eth.AttesterSlashingElectra{attesterSlashingElectra}, voluntaryExits: []*eth.SignedVoluntaryExit{voluntaryExit}, syncAggregate: syncAggregate, execPayload: execPayload, @@ -1704,7 +1870,9 @@ func getFields() fields { execPayloadHeaderCapella: execPayloadHeaderCapella, execPayloadDeneb: execPayloadDeneb, execPayloadHeaderDeneb: execPayloadHeaderDeneb, + signedPayloadHeader: signedExecutionPayloadHeader, blsToExecutionChanges: blsToExecutionChanges, kzgCommitments: kzgCommitments, + payloadAttestation: payloadAttestation, } } diff --git a/consensus-types/blocks/setters.go b/consensus-types/blocks/setters.go index a2f376c76c0f..40facd399feb 100644 --- a/consensus-types/blocks/setters.go +++ b/consensus-types/blocks/setters.go @@ -144,7 +144,7 @@ func (b *SignedBeaconBlock) SetSyncAggregate(s *eth.SyncAggregate) error { // SetExecution sets the execution payload of the block body. // This function is not thread safe, it is only used during block creation. func (b *SignedBeaconBlock) SetExecution(e interfaces.ExecutionData) error { - if b.version == version.Phase0 || b.version == version.Altair { + if b.version >= version.EPBS || b.version < version.Bellatrix { return consensus_types.ErrNotSupported("Execution", b.version) } if e.IsBlinded() { diff --git a/consensus-types/blocks/setters_epbs.go b/consensus-types/blocks/setters_epbs.go new file mode 100644 index 000000000000..f304c2dd5272 --- /dev/null +++ b/consensus-types/blocks/setters_epbs.go @@ -0,0 +1,26 @@ +package blocks + +import ( + consensus_types "github.com/prysmaticlabs/prysm/v5/consensus-types" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" +) + +// SetPayloadAttestations sets the payload attestations in the block. +func (b *SignedBeaconBlock) SetPayloadAttestations(p []*eth.PayloadAttestation) error { + if b.version < version.EPBS { + return consensus_types.ErrNotSupported("PayloadAttestations", b.version) + } + b.block.body.payloadAttestations = p + return nil +} + +// SetSignedExecutionPayloadHeader sets the signed execution payload header of the block body. +func (b *SignedBeaconBlock) SetSignedExecutionPayloadHeader(h *enginev1.SignedExecutionPayloadHeader) error { + if b.version < version.EPBS { + return consensus_types.ErrNotSupported("SetSignedExecutionPayloadHeader", b.version) + } + b.block.body.signedExecutionPayloadHeader = h + return nil +} diff --git a/consensus-types/blocks/setters_test.go b/consensus-types/blocks/setters_test.go new file mode 100644 index 000000000000..40b3facdf5d2 --- /dev/null +++ b/consensus-types/blocks/setters_test.go @@ -0,0 +1,65 @@ +package blocks + +import ( + "testing" + + "github.com/prysmaticlabs/go-bitfield" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + consensus_types "github.com/prysmaticlabs/prysm/v5/consensus-types" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/runtime/version" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" +) + +func Test_EpbsBlock_SetPayloadAttestations(t *testing.T) { + b := &SignedBeaconBlock{version: version.Deneb} + require.ErrorIs(t, b.SetPayloadAttestations(nil), consensus_types.ErrUnsupportedField) + + b = &SignedBeaconBlock{version: version.EPBS, + block: &BeaconBlock{version: version.EPBS, + body: &BeaconBlockBody{version: version.EPBS}}} + aggregationBits := bitfield.NewBitvector512() + aggregationBits.SetBitAt(0, true) + payloadAttestation := []*eth.PayloadAttestation{ + { + AggregationBits: aggregationBits, + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: bytesutil.PadTo([]byte{123}, 32), + Slot: 1, + PayloadStatus: 2, + }, + Signature: bytesutil.PadTo([]byte("signature"), fieldparams.BLSSignatureLength), + }, + { + AggregationBits: aggregationBits, + Data: ð.PayloadAttestationData{ + BeaconBlockRoot: bytesutil.PadTo([]byte{123}, 32), + Slot: 1, + PayloadStatus: 3, + }, + }, + } + + require.NoError(t, b.SetPayloadAttestations(payloadAttestation)) + expectedPA, err := b.block.body.PayloadAttestations() + require.NoError(t, err) + require.DeepEqual(t, expectedPA, payloadAttestation) +} + +func Test_EpbsBlock_SetSignedExecutionPayloadHeader(t *testing.T) { + b := &SignedBeaconBlock{version: version.Deneb} + require.ErrorIs(t, b.SetSignedExecutionPayloadHeader(nil), consensus_types.ErrUnsupportedField) + + b = &SignedBeaconBlock{version: version.EPBS, + block: &BeaconBlock{version: version.EPBS, + body: &BeaconBlockBody{version: version.EPBS}}} + signedExecutionPayloadHeader := random.SignedExecutionPayloadHeader(t) + ws, err := WrappedROSignedExecutionPayloadHeader(signedExecutionPayloadHeader) + require.NoError(t, err) + require.NoError(t, b.SetSignedExecutionPayloadHeader(signedExecutionPayloadHeader)) + expectedHeader, err := b.block.body.SignedExecutionPayloadHeader() + require.NoError(t, err) + require.DeepEqual(t, expectedHeader, ws) +} diff --git a/consensus-types/blocks/signed_execution_payload_header.go b/consensus-types/blocks/signed_execution_payload_header.go new file mode 100644 index 000000000000..0fb7b4564193 --- /dev/null +++ b/consensus-types/blocks/signed_execution_payload_header.go @@ -0,0 +1,127 @@ +package blocks + +import ( + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + consensus_types "github.com/prysmaticlabs/prysm/v5/consensus-types" + "github.com/prysmaticlabs/prysm/v5/consensus-types/interfaces" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + "google.golang.org/protobuf/proto" +) + +type signedExecutionPayloadHeader struct { + s *enginev1.SignedExecutionPayloadHeader +} + +type executionPayloadHeaderEPBS struct { + p *enginev1.ExecutionPayloadHeaderEPBS +} + +// IsNil returns whether the wrapped value is nil +func (s signedExecutionPayloadHeader) IsNil() bool { + if s.s == nil { + return true + } + _, err := WrappedROExecutionPayloadHeaderEPBS(s.s.Message) + if err != nil { + return true + } + return len(s.s.Signature) != 96 +} + +// IsNil returns whether the wrapped value is nil +func (p executionPayloadHeaderEPBS) IsNil() bool { + if p.p == nil { + return true + } + if len(p.p.ParentBlockHash) != 32 { + return true + } + if len(p.p.ParentBlockRoot) != 32 { + return true + } + if len(p.p.BlockHash) != 32 { + return true + } + return len(p.p.BlobKzgCommitmentsRoot) != 32 +} + +// WrappedROSignedExecutionPayloadHeader is a constructor which wraps a +// protobuf signed execution payload header into an interface. +func WrappedROSignedExecutionPayloadHeader(s *enginev1.SignedExecutionPayloadHeader) (interfaces.ROSignedExecutionPayloadHeader, error) { + w := signedExecutionPayloadHeader{s: s} + if w.IsNil() { + return nil, consensus_types.ErrNilObjectWrapped + } + return w, nil +} + +// WrappedROExecutionPayloadHeaderEPBS is a constructor which wraps a +// protobuf execution payload header into an interface. +func WrappedROExecutionPayloadHeaderEPBS(p *enginev1.ExecutionPayloadHeaderEPBS) (interfaces.ROExecutionPayloadHeaderEPBS, error) { + w := executionPayloadHeaderEPBS{p: p} + if w.IsNil() { + return nil, consensus_types.ErrNilObjectWrapped + } + return w, nil +} + +// Header returns the wrapped object as an interface +func (s signedExecutionPayloadHeader) Header() (interfaces.ROExecutionPayloadHeaderEPBS, error) { + return WrappedROExecutionPayloadHeaderEPBS(s.s.Message) +} + +// SigningRoot returns the signing root for the given domain +func (s signedExecutionPayloadHeader) SigningRoot(domain []byte) (root [32]byte, err error) { + return signing.ComputeSigningRoot(s.s.Message, domain) +} + +// Signature returns the wrapped signature +func (s signedExecutionPayloadHeader) Signature() [96]byte { + return [96]byte(s.s.Signature) +} + +// ParentBlockHash returns the wrapped value +func (p executionPayloadHeaderEPBS) ParentBlockHash() [32]byte { + return [32]byte(p.p.ParentBlockHash) +} + +// ParentBlockRoot returns the wrapped value +func (p executionPayloadHeaderEPBS) ParentBlockRoot() [32]byte { + return [32]byte(p.p.ParentBlockRoot) +} + +// BlockHash returns the wrapped value +func (p executionPayloadHeaderEPBS) BlockHash() [32]byte { + return [32]byte(p.p.BlockHash) +} + +// GasLimit returns the wrapped value +func (p executionPayloadHeaderEPBS) GasLimit() uint64 { + return p.p.GasLimit +} + +// BuilderIndex returns the wrapped value +func (p executionPayloadHeaderEPBS) BuilderIndex() primitives.ValidatorIndex { + return p.p.BuilderIndex +} + +// Slot returns the wrapped value +func (p executionPayloadHeaderEPBS) Slot() primitives.Slot { + return p.p.Slot +} + +// Value returns the wrapped value +func (p executionPayloadHeaderEPBS) Value() primitives.Gwei { + return primitives.Gwei(p.p.Value) +} + +// BlobKzgCommitmentsRoot returns the wrapped value +func (p executionPayloadHeaderEPBS) BlobKzgCommitmentsRoot() [32]byte { + return [32]byte(p.p.BlobKzgCommitmentsRoot) +} + +// Proto() returns the message type +func (p executionPayloadHeaderEPBS) Proto() proto.Message { + return p.p +} diff --git a/consensus-types/blocks/types.go b/consensus-types/blocks/types.go index 350fbe915437..027fd0f24673 100644 --- a/consensus-types/blocks/types.go +++ b/consensus-types/blocks/types.go @@ -39,23 +39,25 @@ var ( // BeaconBlockBody is the main beacon block body structure. It can represent any block type. type BeaconBlockBody struct { - version int - randaoReveal [field_params.BLSSignatureLength]byte - eth1Data *eth.Eth1Data - graffiti [field_params.RootLength]byte - proposerSlashings []*eth.ProposerSlashing - attesterSlashings []*eth.AttesterSlashing - attesterSlashingsElectra []*eth.AttesterSlashingElectra - attestations []*eth.Attestation - attestationsElectra []*eth.AttestationElectra - deposits []*eth.Deposit - voluntaryExits []*eth.SignedVoluntaryExit - syncAggregate *eth.SyncAggregate - executionPayload interfaces.ExecutionData - executionPayloadHeader interfaces.ExecutionData - blsToExecutionChanges []*eth.SignedBLSToExecutionChange - blobKzgCommitments [][]byte - executionRequests *enginev1.ExecutionRequests + version int + randaoReveal [field_params.BLSSignatureLength]byte + eth1Data *eth.Eth1Data + graffiti [field_params.RootLength]byte + proposerSlashings []*eth.ProposerSlashing + attesterSlashings []*eth.AttesterSlashing + attesterSlashingsElectra []*eth.AttesterSlashingElectra + attestations []*eth.Attestation + attestationsElectra []*eth.AttestationElectra + deposits []*eth.Deposit + voluntaryExits []*eth.SignedVoluntaryExit + syncAggregate *eth.SyncAggregate + executionPayload interfaces.ExecutionData + executionPayloadHeader interfaces.ExecutionData + blsToExecutionChanges []*eth.SignedBLSToExecutionChange + blobKzgCommitments [][]byte + executionRequests *enginev1.ExecutionRequests + signedExecutionPayloadHeader *enginev1.SignedExecutionPayloadHeader + payloadAttestations []*eth.PayloadAttestation } var _ interfaces.ReadOnlyBeaconBlockBody = &BeaconBlockBody{} diff --git a/consensus-types/epbs/BUILD.bazel b/consensus-types/epbs/BUILD.bazel new file mode 100644 index 000000000000..48dbb2b4784d --- /dev/null +++ b/consensus-types/epbs/BUILD.bazel @@ -0,0 +1,23 @@ +load("@prysm//tools/go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["indexed_payload_attestation.go"], + importpath = "github.com/prysmaticlabs/prysm/v5/consensus-types/epbs", + visibility = ["//visibility:public"], + deps = [ + "//consensus-types/primitives:go_default_library", + "//proto/prysm/v1alpha1:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = ["indexed_payload_attestation_test.go"], + embed = [":go_default_library"], + deps = [ + "//consensus-types/primitives:go_default_library", + "//proto/prysm/v1alpha1:go_default_library", + "//testing/require:go_default_library", + ], +) diff --git a/consensus-types/epbs/indexed_payload_attestation.go b/consensus-types/epbs/indexed_payload_attestation.go new file mode 100644 index 000000000000..31c35fb53c6b --- /dev/null +++ b/consensus-types/epbs/indexed_payload_attestation.go @@ -0,0 +1,33 @@ +package epbs + +import ( + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" +) + +type IndexedPayloadAttestation struct { + AttestingIndices []primitives.ValidatorIndex + Data *eth.PayloadAttestationData + Signature []byte +} + +func (x *IndexedPayloadAttestation) GetAttestingIndices() []primitives.ValidatorIndex { + if x != nil { + return x.AttestingIndices + } + return []primitives.ValidatorIndex(nil) +} + +func (x *IndexedPayloadAttestation) GetData() *eth.PayloadAttestationData { + if x != nil { + return x.Data + } + return nil +} + +func (x *IndexedPayloadAttestation) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} diff --git a/consensus-types/epbs/indexed_payload_attestation_test.go b/consensus-types/epbs/indexed_payload_attestation_test.go new file mode 100644 index 000000000000..1b9c4e5c6d25 --- /dev/null +++ b/consensus-types/epbs/indexed_payload_attestation_test.go @@ -0,0 +1,114 @@ +package epbs + +import ( + "testing" + + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" +) + +func TestGetAttestingIndices(t *testing.T) { + testCases := []struct { + name string + attestingIndices []primitives.ValidatorIndex + }{ + { + name: "Test 1", + attestingIndices: []primitives.ValidatorIndex{1, 2, 3}, + }, + { + name: "Test 2", + attestingIndices: []primitives.ValidatorIndex{55, 66, 787}, + }, + { + name: "Empty AttestingIndices", + attestingIndices: []primitives.ValidatorIndex{}, + }, + { + name: "Nil AttestingIndices", + attestingIndices: []primitives.ValidatorIndex(nil), + }, + } + for _, tt := range testCases { + t.Run(tt.name, func(t *testing.T) { + pa := &IndexedPayloadAttestation{ + AttestingIndices: tt.attestingIndices, + } + got := pa.GetAttestingIndices() + require.DeepEqual(t, tt.attestingIndices, got) + }) + } +} + +func TestGetData(t *testing.T) { + testCases := []struct { + name string + data *eth.PayloadAttestationData + }{ + { + name: "Test 1", + data: ð.PayloadAttestationData{ + Slot: primitives.Slot(1), + }, + }, + { + name: "Test 2", + data: ð.PayloadAttestationData{ + Slot: primitives.Slot(100), + }, + }, + { + name: "Zero slot", + data: ð.PayloadAttestationData{ + Slot: primitives.Slot(0), + }, + }, + { + name: "Nil slot", + data: nil, + }, + } + for _, tt := range testCases { + t.Run(tt.name, func(t *testing.T) { + pa := &IndexedPayloadAttestation{ + Data: tt.data, + } + got := pa.GetData() + require.DeepEqual(t, tt.data, got) + }) + } +} + +func TestGetSignature(t *testing.T) { + testCases := []struct { + name string + sig []byte + }{ + { + name: "Test 1", + sig: []byte{1, 2}, + }, + { + name: "Test 2", + sig: []byte{29, 100}, + }, + { + name: "Zero signature", + sig: []byte{0}, + }, + { + name: "Nil signature", + sig: nil, + }, + } + for _, tt := range testCases { + t.Run(tt.name, func(t *testing.T) { + pa := &IndexedPayloadAttestation{ + Signature: tt.sig, + } + got := pa.GetSignature() + require.DeepEqual(t, tt.sig, got) + }) + } +} diff --git a/consensus-types/epbs/payload-attestation/BUILD.bazel b/consensus-types/epbs/payload-attestation/BUILD.bazel new file mode 100644 index 000000000000..85a897625478 --- /dev/null +++ b/consensus-types/epbs/payload-attestation/BUILD.bazel @@ -0,0 +1,27 @@ +load("@prysm//tools/go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["readonly_message.go"], + importpath = "github.com/prysmaticlabs/prysm/v5/consensus-types/epbs/payload-attestation", + visibility = ["//visibility:public"], + deps = [ + "//beacon-chain/core/signing:go_default_library", + "//consensus-types/primitives:go_default_library", + "//encoding/bytesutil:go_default_library", + "//proto/prysm/v1alpha1:go_default_library", + "@com_github_pkg_errors//:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = ["readonly_message_test.go"], + embed = [":go_default_library"], + deps = [ + "//config/fieldparams:go_default_library", + "//consensus-types/primitives:go_default_library", + "//proto/prysm/v1alpha1:go_default_library", + "//testing/require:go_default_library", + ], +) diff --git a/consensus-types/epbs/payload-attestation/readonly_message.go b/consensus-types/epbs/payload-attestation/readonly_message.go new file mode 100644 index 000000000000..9e9488cca062 --- /dev/null +++ b/consensus-types/epbs/payload-attestation/readonly_message.go @@ -0,0 +1,82 @@ +package payloadattestation + +import ( + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" +) + +var ( + errNilPayloadAttMessage = errors.New("received nil payload attestation message") + errNilPayloadAttData = errors.New("received nil payload attestation data") + errNilPayloadAttSignature = errors.New("received nil payload attestation signature") +) + +// ROMessage represents a read-only payload attestation message. +type ROMessage struct { + m *ethpb.PayloadAttestationMessage +} + +// validatePayloadAtt checks if the given payload attestation message is valid. +func validatePayloadAtt(m *ethpb.PayloadAttestationMessage) error { + if m == nil { + return errNilPayloadAttMessage + } + if m.Data == nil { + return errNilPayloadAttData + } + if len(m.Signature) == 0 { + return errNilPayloadAttSignature + } + return nil +} + +// NewReadOnly creates a new ReadOnly instance after validating the message. +func NewReadOnly(m *ethpb.PayloadAttestationMessage) (ROMessage, error) { + if err := validatePayloadAtt(m); err != nil { + return ROMessage{}, err + } + return ROMessage{m}, nil +} + +// ValidatorIndex returns the validator index from the payload attestation message. +func (r *ROMessage) ValidatorIndex() primitives.ValidatorIndex { + return r.m.ValidatorIndex +} + +// Signature returns the signature from the payload attestation message. +func (r *ROMessage) Signature() [96]byte { + return bytesutil.ToBytes96(r.m.Signature) +} + +// BeaconBlockRoot returns the beacon block root from the payload attestation message. +func (r *ROMessage) BeaconBlockRoot() [32]byte { + return bytesutil.ToBytes32(r.m.Data.BeaconBlockRoot) +} + +// Slot returns the slot from the payload attestation message. +func (r *ROMessage) Slot() primitives.Slot { + return r.m.Data.Slot +} + +// PayloadStatus returns the payload status from the payload attestation message. +func (r *ROMessage) PayloadStatus() primitives.PTCStatus { + return r.m.Data.PayloadStatus +} + +// SigningRoot returns the signing root from the payload attestation message. +func (r *ROMessage) SigningRoot(domain []byte) ([32]byte, error) { + return signing.ComputeSigningRoot(r.m.Data, domain) +} + +// VerifiedROMessage represents a verified read-only payload attestation message. +type VerifiedROMessage struct { + ROMessage +} + +// NewVerifiedROMessage creates a new VerifiedROMessage instance after validating the message. +func NewVerifiedROMessage(r ROMessage) VerifiedROMessage { + return VerifiedROMessage{r} +} diff --git a/consensus-types/epbs/payload-attestation/readonly_message_test.go b/consensus-types/epbs/payload-attestation/readonly_message_test.go new file mode 100644 index 000000000000..5ed817b29356 --- /dev/null +++ b/consensus-types/epbs/payload-attestation/readonly_message_test.go @@ -0,0 +1,132 @@ +package payloadattestation + +import ( + "testing" + + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" +) + +func TestValidatePayload(t *testing.T) { + tests := []struct { + name string + bfunc func(t *testing.T) *ethpb.PayloadAttestationMessage + wanterr error + }{ + { + name: "nil PayloadAttestationMessage", + bfunc: func(t *testing.T) *ethpb.PayloadAttestationMessage { + return nil + }, + wanterr: errNilPayloadAttMessage, + }, + { + name: "nil data", + bfunc: func(t *testing.T) *ethpb.PayloadAttestationMessage { + return ðpb.PayloadAttestationMessage{ + Data: nil, + } + }, + wanterr: errNilPayloadAttData, + }, + { + name: "nil signature", + bfunc: func(t *testing.T) *ethpb.PayloadAttestationMessage { + return ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + BeaconBlockRoot: make([]byte, fieldparams.RootLength), + }, + Signature: nil, + } + }, + wanterr: errNilPayloadAttSignature, + }, + { + name: "Correct PayloadAttestationMessage", + bfunc: func(t *testing.T) *ethpb.PayloadAttestationMessage { + return ðpb.PayloadAttestationMessage{ + Signature: make([]byte, fieldparams.BLSSignatureLength), + Data: ðpb.PayloadAttestationData{ + BeaconBlockRoot: make([]byte, fieldparams.RootLength), + }, + } + }, + wanterr: nil, + }, + } + for _, tt := range tests { + t.Run(tt.name+" ReadOnly", func(t *testing.T) { + m := tt.bfunc(t) + err := validatePayloadAtt(m) + if tt.wanterr != nil { + require.ErrorIs(t, err, tt.wanterr) + } else { + roMess, err := NewReadOnly(m) + require.NoError(t, err) + require.Equal(t, roMess.m.Data, m.Data) + require.DeepEqual(t, roMess.m.Signature, m.Signature) + } + }) + } +} + +func TestValidatorIndex(t *testing.T) { + valIdx := primitives.ValidatorIndex(1) + m := &ROMessage{ + m: ðpb.PayloadAttestationMessage{ + ValidatorIndex: valIdx, + }, + } + require.Equal(t, valIdx, m.ValidatorIndex()) +} + +func TestSignature(t *testing.T) { + sig := [96]byte{} + m := &ROMessage{ + m: ðpb.PayloadAttestationMessage{ + Signature: sig[:], + }, + } + require.Equal(t, sig, m.Signature()) +} + +func TestBeaconBlockRoot(t *testing.T) { + root := [32]byte{} + m := &ROMessage{ + m: ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + BeaconBlockRoot: root[:], + }, + }, + } + require.Equal(t, root, m.BeaconBlockRoot()) +} + +func TestSlot(t *testing.T) { + slot := primitives.Slot(1) + m := &ROMessage{ + m: ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + Slot: slot, + }, + }, + } + require.Equal(t, slot, m.Slot()) +} + +func TestPayloadStatus(t *testing.T) { + for status := primitives.PAYLOAD_ABSENT; status < primitives.PAYLOAD_INVALID_STATUS; status++ { + m := &ROMessage{ + m: ðpb.PayloadAttestationMessage{ + Data: ðpb.PayloadAttestationData{ + PayloadStatus: status, + }, + Signature: make([]byte, fieldparams.BLSSignatureLength), + }, + } + require.NoError(t, validatePayloadAtt(m.m)) + require.Equal(t, status, m.PayloadStatus()) + } +} diff --git a/consensus-types/interfaces/BUILD.bazel b/consensus-types/interfaces/BUILD.bazel index 51b9c89816c0..467182171af2 100644 --- a/consensus-types/interfaces/BUILD.bazel +++ b/consensus-types/interfaces/BUILD.bazel @@ -5,7 +5,9 @@ go_library( srcs = [ "beacon_block.go", "error.go", + "execution_payload_envelope.go", "light_client.go", + "signed_execution_payload_header.go", "utils.go", "validator.go", ], @@ -18,6 +20,7 @@ go_library( "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/validator-client:go_default_library", "//runtime/version:go_default_library", + "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_prysmaticlabs_fastssz//:go_default_library", "@org_golang_google_protobuf//proto:go_default_library", diff --git a/consensus-types/interfaces/beacon_block.go b/consensus-types/interfaces/beacon_block.go index 1e9c704d2e7c..04920bfc3b1d 100644 --- a/consensus-types/interfaces/beacon_block.go +++ b/consensus-types/interfaces/beacon_block.go @@ -70,6 +70,8 @@ type ReadOnlyBeaconBlockBody interface { BLSToExecutionChanges() ([]*ethpb.SignedBLSToExecutionChange, error) BlobKzgCommitments() ([][]byte, error) ExecutionRequests() (*enginev1.ExecutionRequests, error) + PayloadAttestations() ([]*ethpb.PayloadAttestation, error) + SignedExecutionPayloadHeader() (ROSignedExecutionPayloadHeader, error) } type SignedBeaconBlock interface { @@ -93,6 +95,8 @@ type SignedBeaconBlock interface { SetSignature(sig []byte) SetExecutionRequests(er *enginev1.ExecutionRequests) error Unblind(e ExecutionData) error + SetSignedExecutionPayloadHeader(h *enginev1.SignedExecutionPayloadHeader) error + SetPayloadAttestations([]*ethpb.PayloadAttestation) error } // ExecutionData represents execution layer information that is contained diff --git a/consensus-types/interfaces/execution_payload_envelope.go b/consensus-types/interfaces/execution_payload_envelope.go new file mode 100644 index 000000000000..661d1bc22d02 --- /dev/null +++ b/consensus-types/interfaces/execution_payload_envelope.go @@ -0,0 +1,33 @@ +package interfaces + +import ( + "github.com/ethereum/go-ethereum/common" + field_params "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + "google.golang.org/protobuf/proto" +) + +type ROSignedExecutionPayloadEnvelope interface { + Envelope() (ROExecutionPayloadEnvelope, error) + Signature() [field_params.BLSSignatureLength]byte + SigningRoot([]byte) ([32]byte, error) + IsNil() bool + Proto() proto.Message +} + +type ROExecutionPayloadEnvelope interface { + Execution() (ExecutionData, error) + ExecutionRequests() *enginev1.ExecutionRequests + BuilderIndex() primitives.ValidatorIndex + BeaconBlockRoot() [field_params.RootLength]byte + BlobKzgCommitments() [][]byte + BlobKzgCommitmentsRoot() ([field_params.RootLength]byte, error) + VersionedHashes() []common.Hash + PayloadWithheld() bool + StateRoot() [field_params.RootLength]byte + SetSlot(primitives.Slot) + Slot() primitives.Slot + IsBlinded() bool + IsNil() bool +} diff --git a/consensus-types/interfaces/signed_execution_payload_header.go b/consensus-types/interfaces/signed_execution_payload_header.go new file mode 100644 index 000000000000..ac17b8e73806 --- /dev/null +++ b/consensus-types/interfaces/signed_execution_payload_header.go @@ -0,0 +1,27 @@ +package interfaces + +import ( + field_params "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "google.golang.org/protobuf/proto" +) + +type ROSignedExecutionPayloadHeader interface { + Header() (ROExecutionPayloadHeaderEPBS, error) + Signature() [field_params.BLSSignatureLength]byte + SigningRoot([]byte) ([32]byte, error) + IsNil() bool +} + +type ROExecutionPayloadHeaderEPBS interface { + ParentBlockHash() [32]byte + ParentBlockRoot() [32]byte + BlockHash() [32]byte + GasLimit() uint64 + BuilderIndex() primitives.ValidatorIndex + Slot() primitives.Slot + Value() primitives.Gwei + BlobKzgCommitmentsRoot() [32]byte + IsNil() bool + Proto() proto.Message +} diff --git a/consensus-types/mock/block.go b/consensus-types/mock/block.go index 9b855644a6dc..935dc7233b87 100644 --- a/consensus-types/mock/block.go +++ b/consensus-types/mock/block.go @@ -285,6 +285,14 @@ func (b *BeaconBlockBody) Version() int { panic("implement me") } +func (b *BeaconBlockBody) PayloadAttestations() ([]*eth.PayloadAttestation, error) { + panic("implement me") +} + +func (b *BeaconBlockBody) SignedExecutionPayloadHeader() (interfaces.ROSignedExecutionPayloadHeader, error) { + panic("implement me") +} + var _ interfaces.ReadOnlySignedBeaconBlock = &SignedBeaconBlock{} var _ interfaces.ReadOnlyBeaconBlock = &BeaconBlock{} var _ interfaces.ReadOnlyBeaconBlockBody = &BeaconBlockBody{} diff --git a/consensus-types/payload-attribute/types.go b/consensus-types/payload-attribute/types.go index dbb9c49d38b0..44413eea3988 100644 --- a/consensus-types/payload-attribute/types.go +++ b/consensus-types/payload-attribute/types.go @@ -42,9 +42,9 @@ func New(i interface{}) (Attributer, error) { } // EmptyWithVersion returns an empty payload attribute with the given version. -func EmptyWithVersion(version int) Attributer { +func EmptyWithVersion(ver int) Attributer { return &data{ - version: version, + version: ver, } } diff --git a/consensus-types/primitives/BUILD.bazel b/consensus-types/primitives/BUILD.bazel index f9258a41145c..ee0ca128a436 100644 --- a/consensus-types/primitives/BUILD.bazel +++ b/consensus-types/primitives/BUILD.bazel @@ -10,7 +10,10 @@ go_library( "epoch.go", "execution_address.go", "kzg.go", + "payload_attestations_mainnet.go", + "payload_attestations_minimal.go", #keep "payload_id.go", + "ptc_status.go", "randao.go", "slot.go", "sszbytes.go", diff --git a/consensus-types/primitives/payload_attestations_mainnet.go b/consensus-types/primitives/payload_attestations_mainnet.go new file mode 100644 index 000000000000..badba898e724 --- /dev/null +++ b/consensus-types/primitives/payload_attestations_mainnet.go @@ -0,0 +1,9 @@ +//go:build !minimal + +package primitives + +import bitfield "github.com/prysmaticlabs/go-bitfield" + +func NewPayloadAttestationAggregationBits() bitfield.Bitvector512 { + return bitfield.NewBitvector512() +} diff --git a/consensus-types/primitives/payload_attestations_minimal.go b/consensus-types/primitives/payload_attestations_minimal.go new file mode 100644 index 000000000000..3174669b087e --- /dev/null +++ b/consensus-types/primitives/payload_attestations_minimal.go @@ -0,0 +1,9 @@ +//go:build minimal + +package primitives + +import bitfield "github.com/prysmaticlabs/go-bitfield" + +func NewPayloadAttestationAggregationBits() bitfield.Bitvector32 { + return bitfield.NewBitvector32() +} diff --git a/consensus-types/primitives/ptc_status.go b/consensus-types/primitives/ptc_status.go new file mode 100644 index 000000000000..c1b802bca289 --- /dev/null +++ b/consensus-types/primitives/ptc_status.go @@ -0,0 +1,71 @@ +package primitives + +import ( + "fmt" + "math" + + fssz "github.com/prysmaticlabs/fastssz" +) + +var _ fssz.HashRoot = (PTCStatus)(0) +var _ fssz.Marshaler = (*PTCStatus)(nil) +var _ fssz.Unmarshaler = (*PTCStatus)(nil) + +// PTCStatus represents a single payload status. These are the +// possible votes that the Payload Timeliness Committee can cast +// in ePBS when attesting for an execution payload. +type PTCStatus uint64 + +// Defined constants +const ( + PAYLOAD_ABSENT PTCStatus = 0 + PAYLOAD_PRESENT PTCStatus = 1 + PAYLOAD_WITHHELD PTCStatus = 2 + PAYLOAD_INVALID_STATUS PTCStatus = 3 +) + +// HashTreeRoot -- +func (s PTCStatus) HashTreeRoot() ([32]byte, error) { + return fssz.HashWithDefaultHasher(s) +} + +// HashTreeRootWith -- +func (s PTCStatus) HashTreeRootWith(hh *fssz.Hasher) error { + if s > math.MaxUint8 { + return fmt.Errorf("expected uint8 value, received %d", uint64(s)) + } + hh.PutUint8(uint8(s)) + return nil +} + +// UnmarshalSSZ -- +func (s *PTCStatus) UnmarshalSSZ(buf []byte) error { + if len(buf) != s.SizeSSZ() { + return fmt.Errorf("expected buffer of length %d received %d", s.SizeSSZ(), len(buf)) + } + *s = PTCStatus(fssz.UnmarshallUint8(buf)) + return nil +} + +// MarshalSSZTo -- +func (s *PTCStatus) MarshalSSZTo(dst []byte) ([]byte, error) { + marshalled, err := s.MarshalSSZ() + if err != nil { + return nil, err + } + return append(dst, marshalled...), nil +} + +// MarshalSSZ -- +func (s *PTCStatus) MarshalSSZ() ([]byte, error) { + if *s > math.MaxUint8 { + return nil, fmt.Errorf("expected uint8 value, received %d", uint64(*s)) + } + marshalled := fssz.MarshalUint8([]byte{}, uint8(*s)) + return marshalled, nil +} + +// SizeSSZ -- +func (s *PTCStatus) SizeSSZ() int { + return 1 +} diff --git a/encoding/ssz/htrutils.go b/encoding/ssz/htrutils.go index d0581d47e809..d3a6c5e4a4a0 100644 --- a/encoding/ssz/htrutils.go +++ b/encoding/ssz/htrutils.go @@ -5,6 +5,7 @@ import ( "encoding/binary" "github.com/pkg/errors" + "github.com/prysmaticlabs/gohashtree" fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" @@ -116,6 +117,31 @@ func TransactionsRoot(txs [][]byte) ([32]byte, error) { return MixInLength(bytesRoot, bytesRootBufRoot), nil } +// KzgCommitmentsRoot computes the HTR for a list of KZG commitments +func KzgCommitmentsRoot(commitments [][]byte) ([32]byte, error) { + hash := [32]byte{} + leaves := make([][32]byte, 2*len(commitments)) + for i, kzg := range commitments { + copy(leaves[2*i][:], kzg[:32]) + copy(leaves[2*i+1][:], kzg[32:]) + } + if err := gohashtree.Hash(leaves, leaves); err != nil { + return hash, err + } + + bytesRoot, err := BitwiseMerkleize(leaves[:len(commitments)], uint64(len(commitments)), fieldparams.MaxBlobCommitmentsPerBlock) + if err != nil { + return [32]byte{}, errors.Wrap(err, "could not compute merkleization") + } + chunks := make([][32]byte, 2) + chunks[0] = bytesRoot + binary.LittleEndian.PutUint64(chunks[1][24:], uint64(len(commitments))) + if err := gohashtree.Hash(chunks, chunks); err != nil { + return hash, err + } + return chunks[0], nil +} + // WithdrawalSliceRoot computes the HTR of a slice of withdrawals. // The limit parameter is used as input to the bitwise merkleization algorithm. func WithdrawalSliceRoot(withdrawals []*enginev1.Withdrawal, limit uint64) ([32]byte, error) { diff --git a/math/math_helper.go b/math/math_helper.go index e4a59e21d6f0..9e9555159cb9 100644 --- a/math/math_helper.go +++ b/math/math_helper.go @@ -116,6 +116,21 @@ func PowerOf2(n uint64) uint64 { return 1 << n } +// LargestPowerOfTwo returns the largest power of 2 that is lower or equal than +// the parameter +func LargestPowerOfTwo(n uint64) uint64 { + if n == 0 { + return 0 + } + n |= n >> 1 + n |= n >> 2 + n |= n >> 4 + n |= n >> 8 + n |= n >> 16 + n |= n >> 32 + return n - (n >> 1) +} + // Max returns the larger integer of the two // given ones.This is used over the Max function // in the standard math library because that max function diff --git a/math/math_helper_test.go b/math/math_helper_test.go index 8ee06bbd2ed2..efe2b0f40fd8 100644 --- a/math/math_helper_test.go +++ b/math/math_helper_test.go @@ -549,3 +549,27 @@ func TestAddInt(t *testing.T) { }) } } + +func TestLargestPowerOfTwo(t *testing.T) { + testCases := []struct { + name string + input uint64 + expected uint64 + }{ + {"Zero", 0, 0}, + {"One", 1, 1}, + {"Just below power of two", 14, 8}, + {"Power of two", 16, 16}, + {"Large number", 123456789, 67108864}, + {"Max uint64", 18446744073709551615, 9223372036854775808}, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + result := math.LargestPowerOfTwo(tc.input) + if result != tc.expected { + t.Errorf("For input %d, expected %d but got %d", tc.input, tc.expected, result) + } + }) + } +} diff --git a/proto/engine/v1/BUILD.bazel b/proto/engine/v1/BUILD.bazel index fad2e889531d..f1ef8fb3dfea 100644 --- a/proto/engine/v1/BUILD.bazel +++ b/proto/engine/v1/BUILD.bazel @@ -42,6 +42,15 @@ ssz_gen_marshal( "ExecutionPayloadHeaderCapella", "ExecutionPayloadHeaderDeneb", "ExecutionPayloadDeneb", + "PayloadAttestationData", + "PayloadAttestation", + "PayloadAttestationMessage", + "ExecutionPayloadHeaderEPBS", + "ExecutionPayloadEnvelope", + "BlindPayloadEnvelope", + "SignedExecutionPayloadHeader", + "SignedExecutionPayloadEnvelope", + "SignedBlindPayloadEnvelope", "BlindedBlobsBundle", "BlobsBundle", "Withdrawal", @@ -55,7 +64,7 @@ ssz_gen_marshal( go_proto_library( name = "go_proto", compilers = [ - "@com_github_prysmaticlabs_protoc_gen_go_cast//:go_cast_grpc", + "@com_github_prysmaticlabs_protoc_gen_go_cast//:go_cast_grpc", ], importpath = "github.com/prysmaticlabs/prysm/v5/proto/engine/v1", proto = ":proto", @@ -65,6 +74,7 @@ go_proto_library( "//proto/eth/ext:go_default_library", "@com_github_golang_protobuf//proto:go_default_library", "@googleapis//google/api:annotations_go_proto", + "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", "@org_golang_google_protobuf//reflect/protoreflect:go_default_library", "@org_golang_google_protobuf//runtime/protoimpl:go_default_library", @@ -76,6 +86,7 @@ go_library( srcs = [ "electra.go", "execution_engine.go", + "epbs.go", "json_marshal_unmarshal.go", ":ssz_generated_files", # keep ], @@ -100,6 +111,7 @@ go_library( "@com_github_sirupsen_logrus//:go_default_library", "@googleapis//google/api:annotations_go_proto", "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", + "@com_github_prysmaticlabs_go_bitfield//:go_default_library", # keep "@io_bazel_rules_go//proto/wkt:timestamp_go_proto", "@org_golang_google_protobuf//encoding/protojson:go_default_library", "@org_golang_google_protobuf//reflect/protoreflect:go_default_library", @@ -112,6 +124,7 @@ ssz_proto_files( srcs = [ "execution_engine.proto", "electra.proto", + "epbs.proto", ], config = select({ "//conditions:default": "mainnet", diff --git a/proto/engine/v1/engine.ssz.go b/proto/engine/v1/engine.ssz.go index 010bcef6856f..f488e8e5ec9d 100644 --- a/proto/engine/v1/engine.ssz.go +++ b/proto/engine/v1/engine.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: 8a6de344d09e1816df88ecbd15d95382cdc9872ebae99c397396da1ed2c83688 +// Hash: 9adbdff12ada55c2d5a26a8a9417033d21095736693f7ff5d9af34c6294de985 package enginev1 import ( @@ -541,6 +541,944 @@ func (e *ExecutionRequests) HashTreeRootWith(hh *ssz.Hasher) (err error) { return } +// MarshalSSZ ssz marshals the ExecutionPayloadHeaderEPBS object +func (e *ExecutionPayloadHeaderEPBS) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(e) +} + +// MarshalSSZTo ssz marshals the ExecutionPayloadHeaderEPBS object to a target array +func (e *ExecutionPayloadHeaderEPBS) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'ParentBlockHash' + if size := len(e.ParentBlockHash); size != 32 { + err = ssz.ErrBytesLengthFn("--.ParentBlockHash", size, 32) + return + } + dst = append(dst, e.ParentBlockHash...) + + // Field (1) 'ParentBlockRoot' + if size := len(e.ParentBlockRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.ParentBlockRoot", size, 32) + return + } + dst = append(dst, e.ParentBlockRoot...) + + // Field (2) 'BlockHash' + if size := len(e.BlockHash); size != 32 { + err = ssz.ErrBytesLengthFn("--.BlockHash", size, 32) + return + } + dst = append(dst, e.BlockHash...) + + // Field (3) 'GasLimit' + dst = ssz.MarshalUint64(dst, e.GasLimit) + + // Field (4) 'BuilderIndex' + dst = ssz.MarshalUint64(dst, uint64(e.BuilderIndex)) + + // Field (5) 'Slot' + dst = ssz.MarshalUint64(dst, uint64(e.Slot)) + + // Field (6) 'Value' + dst = ssz.MarshalUint64(dst, e.Value) + + // Field (7) 'BlobKzgCommitmentsRoot' + if size := len(e.BlobKzgCommitmentsRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.BlobKzgCommitmentsRoot", size, 32) + return + } + dst = append(dst, e.BlobKzgCommitmentsRoot...) + + return +} + +// UnmarshalSSZ ssz unmarshals the ExecutionPayloadHeaderEPBS object +func (e *ExecutionPayloadHeaderEPBS) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 160 { + return ssz.ErrSize + } + + // Field (0) 'ParentBlockHash' + if cap(e.ParentBlockHash) == 0 { + e.ParentBlockHash = make([]byte, 0, len(buf[0:32])) + } + e.ParentBlockHash = append(e.ParentBlockHash, buf[0:32]...) + + // Field (1) 'ParentBlockRoot' + if cap(e.ParentBlockRoot) == 0 { + e.ParentBlockRoot = make([]byte, 0, len(buf[32:64])) + } + e.ParentBlockRoot = append(e.ParentBlockRoot, buf[32:64]...) + + // Field (2) 'BlockHash' + if cap(e.BlockHash) == 0 { + e.BlockHash = make([]byte, 0, len(buf[64:96])) + } + e.BlockHash = append(e.BlockHash, buf[64:96]...) + + // Field (3) 'GasLimit' + e.GasLimit = ssz.UnmarshallUint64(buf[96:104]) + + // Field (4) 'BuilderIndex' + e.BuilderIndex = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[104:112])) + + // Field (5) 'Slot' + e.Slot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[112:120])) + + // Field (6) 'Value' + e.Value = ssz.UnmarshallUint64(buf[120:128]) + + // Field (7) 'BlobKzgCommitmentsRoot' + if cap(e.BlobKzgCommitmentsRoot) == 0 { + e.BlobKzgCommitmentsRoot = make([]byte, 0, len(buf[128:160])) + } + e.BlobKzgCommitmentsRoot = append(e.BlobKzgCommitmentsRoot, buf[128:160]...) + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the ExecutionPayloadHeaderEPBS object +func (e *ExecutionPayloadHeaderEPBS) SizeSSZ() (size int) { + size = 160 + return +} + +// HashTreeRoot ssz hashes the ExecutionPayloadHeaderEPBS object +func (e *ExecutionPayloadHeaderEPBS) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(e) +} + +// HashTreeRootWith ssz hashes the ExecutionPayloadHeaderEPBS object with a hasher +func (e *ExecutionPayloadHeaderEPBS) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'ParentBlockHash' + if size := len(e.ParentBlockHash); size != 32 { + err = ssz.ErrBytesLengthFn("--.ParentBlockHash", size, 32) + return + } + hh.PutBytes(e.ParentBlockHash) + + // Field (1) 'ParentBlockRoot' + if size := len(e.ParentBlockRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.ParentBlockRoot", size, 32) + return + } + hh.PutBytes(e.ParentBlockRoot) + + // Field (2) 'BlockHash' + if size := len(e.BlockHash); size != 32 { + err = ssz.ErrBytesLengthFn("--.BlockHash", size, 32) + return + } + hh.PutBytes(e.BlockHash) + + // Field (3) 'GasLimit' + hh.PutUint64(e.GasLimit) + + // Field (4) 'BuilderIndex' + hh.PutUint64(uint64(e.BuilderIndex)) + + // Field (5) 'Slot' + hh.PutUint64(uint64(e.Slot)) + + // Field (6) 'Value' + hh.PutUint64(e.Value) + + // Field (7) 'BlobKzgCommitmentsRoot' + if size := len(e.BlobKzgCommitmentsRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.BlobKzgCommitmentsRoot", size, 32) + return + } + hh.PutBytes(e.BlobKzgCommitmentsRoot) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the SignedExecutionPayloadHeader object +func (s *SignedExecutionPayloadHeader) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(s) +} + +// MarshalSSZTo ssz marshals the SignedExecutionPayloadHeader object to a target array +func (s *SignedExecutionPayloadHeader) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'Message' + if s.Message == nil { + s.Message = new(ExecutionPayloadHeaderEPBS) + } + if dst, err = s.Message.MarshalSSZTo(dst); err != nil { + return + } + + // Field (1) 'Signature' + if size := len(s.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + dst = append(dst, s.Signature...) + + return +} + +// UnmarshalSSZ ssz unmarshals the SignedExecutionPayloadHeader object +func (s *SignedExecutionPayloadHeader) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 256 { + return ssz.ErrSize + } + + // Field (0) 'Message' + if s.Message == nil { + s.Message = new(ExecutionPayloadHeaderEPBS) + } + if err = s.Message.UnmarshalSSZ(buf[0:160]); err != nil { + return err + } + + // Field (1) 'Signature' + if cap(s.Signature) == 0 { + s.Signature = make([]byte, 0, len(buf[160:256])) + } + s.Signature = append(s.Signature, buf[160:256]...) + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the SignedExecutionPayloadHeader object +func (s *SignedExecutionPayloadHeader) SizeSSZ() (size int) { + size = 256 + return +} + +// HashTreeRoot ssz hashes the SignedExecutionPayloadHeader object +func (s *SignedExecutionPayloadHeader) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(s) +} + +// HashTreeRootWith ssz hashes the SignedExecutionPayloadHeader object with a hasher +func (s *SignedExecutionPayloadHeader) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'Message' + if err = s.Message.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'Signature' + if size := len(s.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + hh.PutBytes(s.Signature) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the ExecutionPayloadEnvelope object +func (e *ExecutionPayloadEnvelope) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(e) +} + +// MarshalSSZTo ssz marshals the ExecutionPayloadEnvelope object to a target array +func (e *ExecutionPayloadEnvelope) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(85) + + // Offset (0) 'Payload' + dst = ssz.WriteOffset(dst, offset) + if e.Payload == nil { + e.Payload = new(ExecutionPayloadDeneb) + } + offset += e.Payload.SizeSSZ() + + // Offset (1) 'ExecutionRequests' + dst = ssz.WriteOffset(dst, offset) + if e.ExecutionRequests == nil { + e.ExecutionRequests = new(ExecutionRequests) + } + offset += e.ExecutionRequests.SizeSSZ() + + // Field (2) 'BuilderIndex' + dst = ssz.MarshalUint64(dst, uint64(e.BuilderIndex)) + + // Field (3) 'BeaconBlockRoot' + if size := len(e.BeaconBlockRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32) + return + } + dst = append(dst, e.BeaconBlockRoot...) + + // Offset (4) 'BlobKzgCommitments' + dst = ssz.WriteOffset(dst, offset) + offset += len(e.BlobKzgCommitments) * 48 + + // Field (5) 'PayloadWithheld' + dst = ssz.MarshalBool(dst, e.PayloadWithheld) + + // Field (6) 'StateRoot' + if size := len(e.StateRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.StateRoot", size, 32) + return + } + dst = append(dst, e.StateRoot...) + + // Field (0) 'Payload' + if dst, err = e.Payload.MarshalSSZTo(dst); err != nil { + return + } + + // Field (1) 'ExecutionRequests' + if dst, err = e.ExecutionRequests.MarshalSSZTo(dst); err != nil { + return + } + + // Field (4) 'BlobKzgCommitments' + if size := len(e.BlobKzgCommitments); size > 4096 { + err = ssz.ErrListTooBigFn("--.BlobKzgCommitments", size, 4096) + return + } + for ii := 0; ii < len(e.BlobKzgCommitments); ii++ { + if size := len(e.BlobKzgCommitments[ii]); size != 48 { + err = ssz.ErrBytesLengthFn("--.BlobKzgCommitments[ii]", size, 48) + return + } + dst = append(dst, e.BlobKzgCommitments[ii]...) + } + + return +} + +// UnmarshalSSZ ssz unmarshals the ExecutionPayloadEnvelope object +func (e *ExecutionPayloadEnvelope) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 85 { + return ssz.ErrSize + } + + tail := buf + var o0, o1, o4 uint64 + + // Offset (0) 'Payload' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 85 { + return ssz.ErrInvalidVariableOffset + } + + // Offset (1) 'ExecutionRequests' + if o1 = ssz.ReadOffset(buf[4:8]); o1 > size || o0 > o1 { + return ssz.ErrOffset + } + + // Field (2) 'BuilderIndex' + e.BuilderIndex = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[8:16])) + + // Field (3) 'BeaconBlockRoot' + if cap(e.BeaconBlockRoot) == 0 { + e.BeaconBlockRoot = make([]byte, 0, len(buf[16:48])) + } + e.BeaconBlockRoot = append(e.BeaconBlockRoot, buf[16:48]...) + + // Offset (4) 'BlobKzgCommitments' + if o4 = ssz.ReadOffset(buf[48:52]); o4 > size || o1 > o4 { + return ssz.ErrOffset + } + + // Field (5) 'PayloadWithheld' + e.PayloadWithheld, err = ssz.DecodeBool(buf[52:53]) + if err != nil { + return err + } + + // Field (6) 'StateRoot' + if cap(e.StateRoot) == 0 { + e.StateRoot = make([]byte, 0, len(buf[53:85])) + } + e.StateRoot = append(e.StateRoot, buf[53:85]...) + + // Field (0) 'Payload' + { + buf = tail[o0:o1] + if e.Payload == nil { + e.Payload = new(ExecutionPayloadDeneb) + } + if err = e.Payload.UnmarshalSSZ(buf); err != nil { + return err + } + } + + // Field (1) 'ExecutionRequests' + { + buf = tail[o1:o4] + if e.ExecutionRequests == nil { + e.ExecutionRequests = new(ExecutionRequests) + } + if err = e.ExecutionRequests.UnmarshalSSZ(buf); err != nil { + return err + } + } + + // Field (4) 'BlobKzgCommitments' + { + buf = tail[o4:] + num, err := ssz.DivideInt2(len(buf), 48, 4096) + if err != nil { + return err + } + e.BlobKzgCommitments = make([][]byte, num) + for ii := 0; ii < num; ii++ { + if cap(e.BlobKzgCommitments[ii]) == 0 { + e.BlobKzgCommitments[ii] = make([]byte, 0, len(buf[ii*48:(ii+1)*48])) + } + e.BlobKzgCommitments[ii] = append(e.BlobKzgCommitments[ii], buf[ii*48:(ii+1)*48]...) + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the ExecutionPayloadEnvelope object +func (e *ExecutionPayloadEnvelope) SizeSSZ() (size int) { + size = 85 + + // Field (0) 'Payload' + if e.Payload == nil { + e.Payload = new(ExecutionPayloadDeneb) + } + size += e.Payload.SizeSSZ() + + // Field (1) 'ExecutionRequests' + if e.ExecutionRequests == nil { + e.ExecutionRequests = new(ExecutionRequests) + } + size += e.ExecutionRequests.SizeSSZ() + + // Field (4) 'BlobKzgCommitments' + size += len(e.BlobKzgCommitments) * 48 + + return +} + +// HashTreeRoot ssz hashes the ExecutionPayloadEnvelope object +func (e *ExecutionPayloadEnvelope) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(e) +} + +// HashTreeRootWith ssz hashes the ExecutionPayloadEnvelope object with a hasher +func (e *ExecutionPayloadEnvelope) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'Payload' + if err = e.Payload.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'ExecutionRequests' + if err = e.ExecutionRequests.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'BuilderIndex' + hh.PutUint64(uint64(e.BuilderIndex)) + + // Field (3) 'BeaconBlockRoot' + if size := len(e.BeaconBlockRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32) + return + } + hh.PutBytes(e.BeaconBlockRoot) + + // Field (4) 'BlobKzgCommitments' + { + if size := len(e.BlobKzgCommitments); size > 4096 { + err = ssz.ErrListTooBigFn("--.BlobKzgCommitments", size, 4096) + return + } + subIndx := hh.Index() + for _, i := range e.BlobKzgCommitments { + if len(i) != 48 { + err = ssz.ErrBytesLength + return + } + hh.PutBytes(i) + } + + numItems := uint64(len(e.BlobKzgCommitments)) + hh.MerkleizeWithMixin(subIndx, numItems, 4096) + } + + // Field (5) 'PayloadWithheld' + hh.PutBool(e.PayloadWithheld) + + // Field (6) 'StateRoot' + if size := len(e.StateRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.StateRoot", size, 32) + return + } + hh.PutBytes(e.StateRoot) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the SignedExecutionPayloadEnvelope object +func (s *SignedExecutionPayloadEnvelope) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(s) +} + +// MarshalSSZTo ssz marshals the SignedExecutionPayloadEnvelope object to a target array +func (s *SignedExecutionPayloadEnvelope) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(100) + + // Offset (0) 'Message' + dst = ssz.WriteOffset(dst, offset) + if s.Message == nil { + s.Message = new(ExecutionPayloadEnvelope) + } + offset += s.Message.SizeSSZ() + + // Field (1) 'Signature' + if size := len(s.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + dst = append(dst, s.Signature...) + + // Field (0) 'Message' + if dst, err = s.Message.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the SignedExecutionPayloadEnvelope object +func (s *SignedExecutionPayloadEnvelope) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 100 { + return ssz.ErrSize + } + + tail := buf + var o0 uint64 + + // Offset (0) 'Message' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 100 { + return ssz.ErrInvalidVariableOffset + } + + // Field (1) 'Signature' + if cap(s.Signature) == 0 { + s.Signature = make([]byte, 0, len(buf[4:100])) + } + s.Signature = append(s.Signature, buf[4:100]...) + + // Field (0) 'Message' + { + buf = tail[o0:] + if s.Message == nil { + s.Message = new(ExecutionPayloadEnvelope) + } + if err = s.Message.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the SignedExecutionPayloadEnvelope object +func (s *SignedExecutionPayloadEnvelope) SizeSSZ() (size int) { + size = 100 + + // Field (0) 'Message' + if s.Message == nil { + s.Message = new(ExecutionPayloadEnvelope) + } + size += s.Message.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the SignedExecutionPayloadEnvelope object +func (s *SignedExecutionPayloadEnvelope) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(s) +} + +// HashTreeRootWith ssz hashes the SignedExecutionPayloadEnvelope object with a hasher +func (s *SignedExecutionPayloadEnvelope) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'Message' + if err = s.Message.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'Signature' + if size := len(s.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + hh.PutBytes(s.Signature) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the SignedBlindPayloadEnvelope object +func (s *SignedBlindPayloadEnvelope) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(s) +} + +// MarshalSSZTo ssz marshals the SignedBlindPayloadEnvelope object to a target array +func (s *SignedBlindPayloadEnvelope) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(100) + + // Offset (0) 'Message' + dst = ssz.WriteOffset(dst, offset) + if s.Message == nil { + s.Message = new(BlindPayloadEnvelope) + } + offset += s.Message.SizeSSZ() + + // Field (1) 'Signature' + if size := len(s.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + dst = append(dst, s.Signature...) + + // Field (0) 'Message' + if dst, err = s.Message.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the SignedBlindPayloadEnvelope object +func (s *SignedBlindPayloadEnvelope) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 100 { + return ssz.ErrSize + } + + tail := buf + var o0 uint64 + + // Offset (0) 'Message' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 100 { + return ssz.ErrInvalidVariableOffset + } + + // Field (1) 'Signature' + if cap(s.Signature) == 0 { + s.Signature = make([]byte, 0, len(buf[4:100])) + } + s.Signature = append(s.Signature, buf[4:100]...) + + // Field (0) 'Message' + { + buf = tail[o0:] + if s.Message == nil { + s.Message = new(BlindPayloadEnvelope) + } + if err = s.Message.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the SignedBlindPayloadEnvelope object +func (s *SignedBlindPayloadEnvelope) SizeSSZ() (size int) { + size = 100 + + // Field (0) 'Message' + if s.Message == nil { + s.Message = new(BlindPayloadEnvelope) + } + size += s.Message.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the SignedBlindPayloadEnvelope object +func (s *SignedBlindPayloadEnvelope) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(s) +} + +// HashTreeRootWith ssz hashes the SignedBlindPayloadEnvelope object with a hasher +func (s *SignedBlindPayloadEnvelope) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'Message' + if err = s.Message.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'Signature' + if size := len(s.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + hh.PutBytes(s.Signature) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the BlindPayloadEnvelope object +func (b *BlindPayloadEnvelope) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(b) +} + +// MarshalSSZTo ssz marshals the BlindPayloadEnvelope object to a target array +func (b *BlindPayloadEnvelope) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(113) + + // Field (0) 'PayloadRoot' + if size := len(b.PayloadRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.PayloadRoot", size, 32) + return + } + dst = append(dst, b.PayloadRoot...) + + // Offset (1) 'ExecutionRequests' + dst = ssz.WriteOffset(dst, offset) + if b.ExecutionRequests == nil { + b.ExecutionRequests = new(ExecutionRequests) + } + offset += b.ExecutionRequests.SizeSSZ() + + // Field (2) 'BuilderIndex' + dst = ssz.MarshalUint64(dst, uint64(b.BuilderIndex)) + + // Field (3) 'BeaconBlockRoot' + if size := len(b.BeaconBlockRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32) + return + } + dst = append(dst, b.BeaconBlockRoot...) + + // Offset (4) 'BlobKzgCommitments' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.BlobKzgCommitments) * 48 + + // Field (5) 'PayloadWithheld' + dst = ssz.MarshalBool(dst, b.PayloadWithheld) + + // Field (6) 'StateRoot' + if size := len(b.StateRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.StateRoot", size, 32) + return + } + dst = append(dst, b.StateRoot...) + + // Field (1) 'ExecutionRequests' + if dst, err = b.ExecutionRequests.MarshalSSZTo(dst); err != nil { + return + } + + // Field (4) 'BlobKzgCommitments' + if size := len(b.BlobKzgCommitments); size > 4096 { + err = ssz.ErrListTooBigFn("--.BlobKzgCommitments", size, 4096) + return + } + for ii := 0; ii < len(b.BlobKzgCommitments); ii++ { + if size := len(b.BlobKzgCommitments[ii]); size != 48 { + err = ssz.ErrBytesLengthFn("--.BlobKzgCommitments[ii]", size, 48) + return + } + dst = append(dst, b.BlobKzgCommitments[ii]...) + } + + return +} + +// UnmarshalSSZ ssz unmarshals the BlindPayloadEnvelope object +func (b *BlindPayloadEnvelope) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 113 { + return ssz.ErrSize + } + + tail := buf + var o1, o4 uint64 + + // Field (0) 'PayloadRoot' + if cap(b.PayloadRoot) == 0 { + b.PayloadRoot = make([]byte, 0, len(buf[0:32])) + } + b.PayloadRoot = append(b.PayloadRoot, buf[0:32]...) + + // Offset (1) 'ExecutionRequests' + if o1 = ssz.ReadOffset(buf[32:36]); o1 > size { + return ssz.ErrOffset + } + + if o1 != 113 { + return ssz.ErrInvalidVariableOffset + } + + // Field (2) 'BuilderIndex' + b.BuilderIndex = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[36:44])) + + // Field (3) 'BeaconBlockRoot' + if cap(b.BeaconBlockRoot) == 0 { + b.BeaconBlockRoot = make([]byte, 0, len(buf[44:76])) + } + b.BeaconBlockRoot = append(b.BeaconBlockRoot, buf[44:76]...) + + // Offset (4) 'BlobKzgCommitments' + if o4 = ssz.ReadOffset(buf[76:80]); o4 > size || o1 > o4 { + return ssz.ErrOffset + } + + // Field (5) 'PayloadWithheld' + b.PayloadWithheld, err = ssz.DecodeBool(buf[80:81]) + if err != nil { + return err + } + + // Field (6) 'StateRoot' + if cap(b.StateRoot) == 0 { + b.StateRoot = make([]byte, 0, len(buf[81:113])) + } + b.StateRoot = append(b.StateRoot, buf[81:113]...) + + // Field (1) 'ExecutionRequests' + { + buf = tail[o1:o4] + if b.ExecutionRequests == nil { + b.ExecutionRequests = new(ExecutionRequests) + } + if err = b.ExecutionRequests.UnmarshalSSZ(buf); err != nil { + return err + } + } + + // Field (4) 'BlobKzgCommitments' + { + buf = tail[o4:] + num, err := ssz.DivideInt2(len(buf), 48, 4096) + if err != nil { + return err + } + b.BlobKzgCommitments = make([][]byte, num) + for ii := 0; ii < num; ii++ { + if cap(b.BlobKzgCommitments[ii]) == 0 { + b.BlobKzgCommitments[ii] = make([]byte, 0, len(buf[ii*48:(ii+1)*48])) + } + b.BlobKzgCommitments[ii] = append(b.BlobKzgCommitments[ii], buf[ii*48:(ii+1)*48]...) + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the BlindPayloadEnvelope object +func (b *BlindPayloadEnvelope) SizeSSZ() (size int) { + size = 113 + + // Field (1) 'ExecutionRequests' + if b.ExecutionRequests == nil { + b.ExecutionRequests = new(ExecutionRequests) + } + size += b.ExecutionRequests.SizeSSZ() + + // Field (4) 'BlobKzgCommitments' + size += len(b.BlobKzgCommitments) * 48 + + return +} + +// HashTreeRoot ssz hashes the BlindPayloadEnvelope object +func (b *BlindPayloadEnvelope) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(b) +} + +// HashTreeRootWith ssz hashes the BlindPayloadEnvelope object with a hasher +func (b *BlindPayloadEnvelope) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'PayloadRoot' + if size := len(b.PayloadRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.PayloadRoot", size, 32) + return + } + hh.PutBytes(b.PayloadRoot) + + // Field (1) 'ExecutionRequests' + if err = b.ExecutionRequests.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'BuilderIndex' + hh.PutUint64(uint64(b.BuilderIndex)) + + // Field (3) 'BeaconBlockRoot' + if size := len(b.BeaconBlockRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32) + return + } + hh.PutBytes(b.BeaconBlockRoot) + + // Field (4) 'BlobKzgCommitments' + { + if size := len(b.BlobKzgCommitments); size > 4096 { + err = ssz.ErrListTooBigFn("--.BlobKzgCommitments", size, 4096) + return + } + subIndx := hh.Index() + for _, i := range b.BlobKzgCommitments { + if len(i) != 48 { + err = ssz.ErrBytesLength + return + } + hh.PutBytes(i) + } + + numItems := uint64(len(b.BlobKzgCommitments)) + hh.MerkleizeWithMixin(subIndx, numItems, 4096) + } + + // Field (5) 'PayloadWithheld' + hh.PutBool(b.PayloadWithheld) + + // Field (6) 'StateRoot' + if size := len(b.StateRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.StateRoot", size, 32) + return + } + hh.PutBytes(b.StateRoot) + + hh.Merkleize(indx) + return +} + // MarshalSSZ ssz marshals the ExecutionPayload object func (e *ExecutionPayload) MarshalSSZ() ([]byte, error) { return ssz.MarshalSSZ(e) diff --git a/proto/engine/v1/epbs.go b/proto/engine/v1/epbs.go new file mode 100644 index 000000000000..d1fe47cb4a14 --- /dev/null +++ b/proto/engine/v1/epbs.go @@ -0,0 +1,26 @@ +package enginev1 + +func (s *SignedExecutionPayloadEnvelope) Blind() *SignedBlindPayloadEnvelope { + if s.Message == nil { + return nil + } + if s.Message.Payload == nil { + return nil + } + payloadRoot, err := s.Message.Payload.HashTreeRoot() + if err != nil { + return nil + } + return &SignedBlindPayloadEnvelope{ + Message: &BlindPayloadEnvelope{ + PayloadRoot: payloadRoot[:], + ExecutionRequests: s.Message.ExecutionRequests, + BuilderIndex: s.Message.BuilderIndex, + BeaconBlockRoot: s.Message.BeaconBlockRoot, + BlobKzgCommitments: s.Message.BlobKzgCommitments, + PayloadWithheld: s.Message.PayloadWithheld, + StateRoot: s.Message.StateRoot, + }, + Signature: s.Signature, + } +} diff --git a/proto/engine/v1/epbs.pb.go b/proto/engine/v1/epbs.pb.go new file mode 100755 index 000000000000..12e1e5d1cd38 --- /dev/null +++ b/proto/engine/v1/epbs.pb.go @@ -0,0 +1,764 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.25.1 +// source: proto/engine/v1/epbs.proto + +package enginev1 + +import ( + reflect "reflect" + sync "sync" + + github_com_prysmaticlabs_prysm_v5_consensus_types_primitives "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + _ "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 ExecutionPayloadHeaderEPBS struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentBlockHash []byte `protobuf:"bytes,1,opt,name=parent_block_hash,json=parentBlockHash,proto3" json:"parent_block_hash,omitempty" ssz-size:"32"` + ParentBlockRoot []byte `protobuf:"bytes,2,opt,name=parent_block_root,json=parentBlockRoot,proto3" json:"parent_block_root,omitempty" ssz-size:"32"` + BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty" ssz-size:"32"` + GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + BuilderIndex github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex `protobuf:"varint,5,opt,name=builder_index,json=builderIndex,proto3" json:"builder_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"` + Slot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,6,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` + Value uint64 `protobuf:"varint,7,opt,name=value,proto3" json:"value,omitempty"` + BlobKzgCommitmentsRoot []byte `protobuf:"bytes,8,opt,name=blob_kzg_commitments_root,json=blobKzgCommitmentsRoot,proto3" json:"blob_kzg_commitments_root,omitempty" ssz-size:"32"` +} + +func (x *ExecutionPayloadHeaderEPBS) Reset() { + *x = ExecutionPayloadHeaderEPBS{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_engine_v1_epbs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionPayloadHeaderEPBS) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionPayloadHeaderEPBS) ProtoMessage() {} + +func (x *ExecutionPayloadHeaderEPBS) ProtoReflect() protoreflect.Message { + mi := &file_proto_engine_v1_epbs_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 ExecutionPayloadHeaderEPBS.ProtoReflect.Descriptor instead. +func (*ExecutionPayloadHeaderEPBS) Descriptor() ([]byte, []int) { + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{0} +} + +func (x *ExecutionPayloadHeaderEPBS) GetParentBlockHash() []byte { + if x != nil { + return x.ParentBlockHash + } + return nil +} + +func (x *ExecutionPayloadHeaderEPBS) GetParentBlockRoot() []byte { + if x != nil { + return x.ParentBlockRoot + } + return nil +} + +func (x *ExecutionPayloadHeaderEPBS) GetBlockHash() []byte { + if x != nil { + return x.BlockHash + } + return nil +} + +func (x *ExecutionPayloadHeaderEPBS) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *ExecutionPayloadHeaderEPBS) GetBuilderIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { + if x != nil { + return x.BuilderIndex + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(0) +} + +func (x *ExecutionPayloadHeaderEPBS) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.Slot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +func (x *ExecutionPayloadHeaderEPBS) GetValue() uint64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *ExecutionPayloadHeaderEPBS) GetBlobKzgCommitmentsRoot() []byte { + if x != nil { + return x.BlobKzgCommitmentsRoot + } + return nil +} + +type SignedExecutionPayloadHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message *ExecutionPayloadHeaderEPBS `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` +} + +func (x *SignedExecutionPayloadHeader) Reset() { + *x = SignedExecutionPayloadHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_engine_v1_epbs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedExecutionPayloadHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedExecutionPayloadHeader) ProtoMessage() {} + +func (x *SignedExecutionPayloadHeader) ProtoReflect() protoreflect.Message { + mi := &file_proto_engine_v1_epbs_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 SignedExecutionPayloadHeader.ProtoReflect.Descriptor instead. +func (*SignedExecutionPayloadHeader) Descriptor() ([]byte, []int) { + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{1} +} + +func (x *SignedExecutionPayloadHeader) GetMessage() *ExecutionPayloadHeaderEPBS { + if x != nil { + return x.Message + } + return nil +} + +func (x *SignedExecutionPayloadHeader) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type ExecutionPayloadEnvelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload *ExecutionPayloadDeneb `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + ExecutionRequests *ExecutionRequests `protobuf:"bytes,2,opt,name=execution_requests,json=executionRequests,proto3" json:"execution_requests,omitempty"` + BuilderIndex github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex `protobuf:"varint,3,opt,name=builder_index,json=builderIndex,proto3" json:"builder_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"` + BeaconBlockRoot []byte `protobuf:"bytes,4,opt,name=beacon_block_root,json=beaconBlockRoot,proto3" json:"beacon_block_root,omitempty" ssz-size:"32"` + BlobKzgCommitments [][]byte `protobuf:"bytes,5,rep,name=blob_kzg_commitments,json=blobKzgCommitments,proto3" json:"blob_kzg_commitments,omitempty" ssz-max:"4096" ssz-size:"?,48"` + PayloadWithheld bool `protobuf:"varint,6,opt,name=payload_withheld,json=payloadWithheld,proto3" json:"payload_withheld,omitempty"` + StateRoot []byte `protobuf:"bytes,7,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty" ssz-size:"32"` +} + +func (x *ExecutionPayloadEnvelope) Reset() { + *x = ExecutionPayloadEnvelope{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_engine_v1_epbs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionPayloadEnvelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionPayloadEnvelope) ProtoMessage() {} + +func (x *ExecutionPayloadEnvelope) ProtoReflect() protoreflect.Message { + mi := &file_proto_engine_v1_epbs_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 ExecutionPayloadEnvelope.ProtoReflect.Descriptor instead. +func (*ExecutionPayloadEnvelope) Descriptor() ([]byte, []int) { + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{2} +} + +func (x *ExecutionPayloadEnvelope) GetPayload() *ExecutionPayloadDeneb { + if x != nil { + return x.Payload + } + return nil +} + +func (x *ExecutionPayloadEnvelope) GetExecutionRequests() *ExecutionRequests { + if x != nil { + return x.ExecutionRequests + } + return nil +} + +func (x *ExecutionPayloadEnvelope) GetBuilderIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { + if x != nil { + return x.BuilderIndex + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(0) +} + +func (x *ExecutionPayloadEnvelope) GetBeaconBlockRoot() []byte { + if x != nil { + return x.BeaconBlockRoot + } + return nil +} + +func (x *ExecutionPayloadEnvelope) GetBlobKzgCommitments() [][]byte { + if x != nil { + return x.BlobKzgCommitments + } + return nil +} + +func (x *ExecutionPayloadEnvelope) GetPayloadWithheld() bool { + if x != nil { + return x.PayloadWithheld + } + return false +} + +func (x *ExecutionPayloadEnvelope) GetStateRoot() []byte { + if x != nil { + return x.StateRoot + } + return nil +} + +type SignedExecutionPayloadEnvelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message *ExecutionPayloadEnvelope `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` +} + +func (x *SignedExecutionPayloadEnvelope) Reset() { + *x = SignedExecutionPayloadEnvelope{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_engine_v1_epbs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedExecutionPayloadEnvelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedExecutionPayloadEnvelope) ProtoMessage() {} + +func (x *SignedExecutionPayloadEnvelope) ProtoReflect() protoreflect.Message { + mi := &file_proto_engine_v1_epbs_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 SignedExecutionPayloadEnvelope.ProtoReflect.Descriptor instead. +func (*SignedExecutionPayloadEnvelope) Descriptor() ([]byte, []int) { + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{3} +} + +func (x *SignedExecutionPayloadEnvelope) GetMessage() *ExecutionPayloadEnvelope { + if x != nil { + return x.Message + } + return nil +} + +func (x *SignedExecutionPayloadEnvelope) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type SignedBlindPayloadEnvelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message *BlindPayloadEnvelope `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` +} + +func (x *SignedBlindPayloadEnvelope) Reset() { + *x = SignedBlindPayloadEnvelope{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_engine_v1_epbs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedBlindPayloadEnvelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedBlindPayloadEnvelope) ProtoMessage() {} + +func (x *SignedBlindPayloadEnvelope) ProtoReflect() protoreflect.Message { + mi := &file_proto_engine_v1_epbs_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 SignedBlindPayloadEnvelope.ProtoReflect.Descriptor instead. +func (*SignedBlindPayloadEnvelope) Descriptor() ([]byte, []int) { + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{4} +} + +func (x *SignedBlindPayloadEnvelope) GetMessage() *BlindPayloadEnvelope { + if x != nil { + return x.Message + } + return nil +} + +func (x *SignedBlindPayloadEnvelope) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type BlindPayloadEnvelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PayloadRoot []byte `protobuf:"bytes,1,opt,name=payload_root,json=payloadRoot,proto3" json:"payload_root,omitempty" ssz-size:"32"` + ExecutionRequests *ExecutionRequests `protobuf:"bytes,2,opt,name=execution_requests,json=executionRequests,proto3" json:"execution_requests,omitempty"` + BuilderIndex github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex `protobuf:"varint,3,opt,name=builder_index,json=builderIndex,proto3" json:"builder_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"` + BeaconBlockRoot []byte `protobuf:"bytes,4,opt,name=beacon_block_root,json=beaconBlockRoot,proto3" json:"beacon_block_root,omitempty" ssz-size:"32"` + BlobKzgCommitments [][]byte `protobuf:"bytes,5,rep,name=blob_kzg_commitments,json=blobKzgCommitments,proto3" json:"blob_kzg_commitments,omitempty" ssz-max:"4096" ssz-size:"?,48"` + PayloadWithheld bool `protobuf:"varint,6,opt,name=payload_withheld,json=payloadWithheld,proto3" json:"payload_withheld,omitempty"` + StateRoot []byte `protobuf:"bytes,7,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty" ssz-size:"32"` +} + +func (x *BlindPayloadEnvelope) Reset() { + *x = BlindPayloadEnvelope{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_engine_v1_epbs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlindPayloadEnvelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlindPayloadEnvelope) ProtoMessage() {} + +func (x *BlindPayloadEnvelope) ProtoReflect() protoreflect.Message { + mi := &file_proto_engine_v1_epbs_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 BlindPayloadEnvelope.ProtoReflect.Descriptor instead. +func (*BlindPayloadEnvelope) Descriptor() ([]byte, []int) { + return file_proto_engine_v1_epbs_proto_rawDescGZIP(), []int{5} +} + +func (x *BlindPayloadEnvelope) GetPayloadRoot() []byte { + if x != nil { + return x.PayloadRoot + } + return nil +} + +func (x *BlindPayloadEnvelope) GetExecutionRequests() *ExecutionRequests { + if x != nil { + return x.ExecutionRequests + } + return nil +} + +func (x *BlindPayloadEnvelope) GetBuilderIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { + if x != nil { + return x.BuilderIndex + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(0) +} + +func (x *BlindPayloadEnvelope) GetBeaconBlockRoot() []byte { + if x != nil { + return x.BeaconBlockRoot + } + return nil +} + +func (x *BlindPayloadEnvelope) GetBlobKzgCommitments() [][]byte { + if x != nil { + return x.BlobKzgCommitments + } + return nil +} + +func (x *BlindPayloadEnvelope) GetPayloadWithheld() bool { + if x != nil { + return x.PayloadWithheld + } + return false +} + +func (x *BlindPayloadEnvelope) GetStateRoot() []byte { + if x != nil { + return x.StateRoot + } + return nil +} + +var File_proto_engine_v1_epbs_proto protoreflect.FileDescriptor + +var file_proto_engine_v1_epbs_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x65, 0x70, 0x62, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 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, 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, 0x1d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x03, 0x0a, 0x1a, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, + 0x50, 0x42, 0x53, 0x12, 0x32, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, + 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x32, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, + 0x74, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x06, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x19, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, + 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, + 0x32, 0x52, 0x16, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x8e, 0x01, 0x0a, 0x1c, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 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, 0x45, 0x50, 0x42, 0x53, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xf5, 0x03, 0x0a, 0x18, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, + 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x43, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 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, 0x44, 0x65, + 0x6e, 0x65, 0x62, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x54, 0x0a, 0x12, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 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, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, + 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x73, 0x12, 0x74, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0c, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x11, 0x62, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0f, 0x62, 0x65, 0x61, + 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x42, 0x0a, 0x14, + 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x04, + 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x12, 0x62, 0x6c, + 0x6f, 0x62, 0x4b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x77, 0x69, 0x74, 0x68, + 0x68, 0x65, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x68, 0x65, 0x6c, 0x64, 0x12, 0x25, 0x0a, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, + 0x6f, 0x74, 0x22, 0x8e, 0x01, 0x0a, 0x1e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x76, + 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 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, 0x45, 0x6e, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x22, 0x86, 0x01, 0x0a, 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, + 0x69, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x12, 0x42, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, + 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xd7, 0x03, 0x0a, + 0x14, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x76, + 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, + 0x02, 0x33, 0x32, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x6f, 0x6f, 0x74, + 0x12, 0x54, 0x0a, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 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, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x52, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x74, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, + 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, + 0xb5, 0x18, 0x4b, 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, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0c, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x11, + 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, + 0x0f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, + 0x12, 0x42, 0x0a, 0x14, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, + 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, + 0x52, 0x12, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, + 0x77, 0x69, 0x74, 0x68, 0x68, 0x65, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x68, 0x65, 0x6c, 0x64, 0x12, + 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x42, 0x96, 0x01, 0x0a, 0x16, 0x6f, 0x72, 0x67, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, + 0x31, 0x42, 0x14, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x67, 0x69, + 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 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, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x76, 0x31, 0xaa, 0x02, 0x12, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5c, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_engine_v1_epbs_proto_rawDescOnce sync.Once + file_proto_engine_v1_epbs_proto_rawDescData = file_proto_engine_v1_epbs_proto_rawDesc +) + +func file_proto_engine_v1_epbs_proto_rawDescGZIP() []byte { + file_proto_engine_v1_epbs_proto_rawDescOnce.Do(func() { + file_proto_engine_v1_epbs_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_engine_v1_epbs_proto_rawDescData) + }) + return file_proto_engine_v1_epbs_proto_rawDescData +} + +var file_proto_engine_v1_epbs_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_proto_engine_v1_epbs_proto_goTypes = []interface{}{ + (*ExecutionPayloadHeaderEPBS)(nil), // 0: ethereum.engine.v1.ExecutionPayloadHeaderEPBS + (*SignedExecutionPayloadHeader)(nil), // 1: ethereum.engine.v1.SignedExecutionPayloadHeader + (*ExecutionPayloadEnvelope)(nil), // 2: ethereum.engine.v1.ExecutionPayloadEnvelope + (*SignedExecutionPayloadEnvelope)(nil), // 3: ethereum.engine.v1.SignedExecutionPayloadEnvelope + (*SignedBlindPayloadEnvelope)(nil), // 4: ethereum.engine.v1.SignedBlindPayloadEnvelope + (*BlindPayloadEnvelope)(nil), // 5: ethereum.engine.v1.BlindPayloadEnvelope + (*ExecutionPayloadDeneb)(nil), // 6: ethereum.engine.v1.ExecutionPayloadDeneb + (*ExecutionRequests)(nil), // 7: ethereum.engine.v1.ExecutionRequests +} +var file_proto_engine_v1_epbs_proto_depIdxs = []int32{ + 0, // 0: ethereum.engine.v1.SignedExecutionPayloadHeader.message:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderEPBS + 6, // 1: ethereum.engine.v1.ExecutionPayloadEnvelope.payload:type_name -> ethereum.engine.v1.ExecutionPayloadDeneb + 7, // 2: ethereum.engine.v1.ExecutionPayloadEnvelope.execution_requests:type_name -> ethereum.engine.v1.ExecutionRequests + 2, // 3: ethereum.engine.v1.SignedExecutionPayloadEnvelope.message:type_name -> ethereum.engine.v1.ExecutionPayloadEnvelope + 5, // 4: ethereum.engine.v1.SignedBlindPayloadEnvelope.message:type_name -> ethereum.engine.v1.BlindPayloadEnvelope + 7, // 5: ethereum.engine.v1.BlindPayloadEnvelope.execution_requests:type_name -> ethereum.engine.v1.ExecutionRequests + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_proto_engine_v1_epbs_proto_init() } +func file_proto_engine_v1_epbs_proto_init() { + if File_proto_engine_v1_epbs_proto != nil { + return + } + file_proto_engine_v1_execution_engine_proto_init() + file_proto_engine_v1_electra_proto_init() + if !protoimpl.UnsafeEnabled { + file_proto_engine_v1_epbs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionPayloadHeaderEPBS); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_engine_v1_epbs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedExecutionPayloadHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_engine_v1_epbs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionPayloadEnvelope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_engine_v1_epbs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedExecutionPayloadEnvelope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_engine_v1_epbs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedBlindPayloadEnvelope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_engine_v1_epbs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlindPayloadEnvelope); 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_engine_v1_epbs_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_engine_v1_epbs_proto_goTypes, + DependencyIndexes: file_proto_engine_v1_epbs_proto_depIdxs, + MessageInfos: file_proto_engine_v1_epbs_proto_msgTypes, + }.Build() + File_proto_engine_v1_epbs_proto = out.File + file_proto_engine_v1_epbs_proto_rawDesc = nil + file_proto_engine_v1_epbs_proto_goTypes = nil + file_proto_engine_v1_epbs_proto_depIdxs = nil +} diff --git a/proto/engine/v1/epbs.proto b/proto/engine/v1/epbs.proto new file mode 100644 index 000000000000..250f5dcda48f --- /dev/null +++ b/proto/engine/v1/epbs.proto @@ -0,0 +1,73 @@ +// 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.engine.v1; + +import "proto/eth/ext/options.proto"; +import "proto/engine/v1/execution_engine.proto"; +import "proto/engine/v1/electra.proto"; + +option csharp_namespace = "Ethereum.Engine.V1"; +option go_package = "github.com/prysmaticlabs/prysm/v5/proto/engine/v1;enginev1"; +option java_multiple_files = true; +option java_outer_classname = "ExecutionEngineProto"; +option java_package = "org.ethereum.engine.v1"; +option php_namespace = "Ethereum\\Engine\\v1"; + +message ExecutionPayloadHeaderEPBS { + bytes parent_block_hash = 1 [(ethereum.eth.ext.ssz_size) = "32"]; + bytes parent_block_root = 2 [(ethereum.eth.ext.ssz_size) = "32"]; + bytes block_hash = 3 [(ethereum.eth.ext.ssz_size) = "32"]; + uint64 gas_limit = 4; + uint64 builder_index = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; + uint64 slot = 6 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; + uint64 value = 7; + bytes blob_kzg_commitments_root = 8 [(ethereum.eth.ext.ssz_size) = "32"]; +} + +message SignedExecutionPayloadHeader{ + ExecutionPayloadHeaderEPBS message = 1; + bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"]; +} + +message ExecutionPayloadEnvelope { + ExecutionPayloadDeneb payload = 1; + ExecutionRequests execution_requests = 2; + uint64 builder_index = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; + bytes beacon_block_root = 4 [(ethereum.eth.ext.ssz_size) = "32"]; + repeated bytes blob_kzg_commitments = 5 [(ethereum.eth.ext.ssz_size) = "?,48", (ethereum.eth.ext.ssz_max) = "max_blob_commitments.size"]; + bool payload_withheld = 6; + bytes state_root = 7 [(ethereum.eth.ext.ssz_size) = "32"]; +} + +message SignedExecutionPayloadEnvelope { + ExecutionPayloadEnvelope message = 1; + bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"]; +} + +message SignedBlindPayloadEnvelope { + BlindPayloadEnvelope message = 1; + bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"]; +} + +message BlindPayloadEnvelope { + bytes payload_root = 1 [(ethereum.eth.ext.ssz_size) = "32"]; + ExecutionRequests execution_requests = 2; + uint64 builder_index = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; + bytes beacon_block_root = 4 [(ethereum.eth.ext.ssz_size) = "32"]; + repeated bytes blob_kzg_commitments = 5 [(ethereum.eth.ext.ssz_size) = "?,48", (ethereum.eth.ext.ssz_max) = "max_blob_commitments.size"]; + bool payload_withheld = 6; + bytes state_root = 7 [(ethereum.eth.ext.ssz_size) = "32"]; +} diff --git a/proto/eth/v1/gateway.ssz.go b/proto/eth/v1/gateway.ssz.go index 373b08c76407..b51121b1a36d 100644 --- a/proto/eth/v1/gateway.ssz.go +++ b/proto/eth/v1/gateway.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: 2874e1dadeb47411763f48fe31e5daaa91ac663e796933d9a508c2e7be94fa5e +// Hash: 6fed60156f1e57926b40b972ee25b48a82b18726a9c64fb0e974e4f638784049 package v1 import ( diff --git a/proto/eth/v2/grpc.ssz.go b/proto/eth/v2/grpc.ssz.go index 3d0855382373..cad00441553f 100644 --- a/proto/eth/v2/grpc.ssz.go +++ b/proto/eth/v2/grpc.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: 298a6e797d2a244a4eee0e60b198b11fd30b4b8596a8a5b911dd2e14fafebdad +// Hash: d31cc5acec05410c504af8aacff48fec5909862693e16ed56a9a1b98b4806d98 package eth import ( diff --git a/proto/prysm/v1alpha1/BUILD.bazel b/proto/prysm/v1alpha1/BUILD.bazel index e79cd7856734..7cf20cedc6cf 100644 --- a/proto/prysm/v1alpha1/BUILD.bazel +++ b/proto/prysm/v1alpha1/BUILD.bazel @@ -172,6 +172,15 @@ ssz_electra_objs = [ "SignedConsolidation", ] +ssz_epbs_objs = [ + "BeaconBlockEpbs", + "BeaconStateEPBS", + "SignedBeaconBlockEpbs", + "PayloadAttestationData", + "PayloadAttestation", + "PayloadAttestationMessage", +] + ssz_gen_marshal( name = "ssz_generated_phase0", out = "phase0.ssz.go", @@ -249,6 +258,20 @@ ssz_gen_marshal( objs = ssz_electra_objs, ) +ssz_gen_marshal( + name = "ssz_generated_epbs", + go_proto = ":go_proto", + out = "epbs.ssz.go", + includes = [ + "//consensus-types/primitives:go_default_library", + "//proto/engine/v1:go_default_library", + "//math:go_default_library", + ], + objs = ssz_epbs_objs, + exclude_objs = ssz_phase0_objs + ssz_altair_objs + ssz_bellatrix_objs + ssz_capella_objs + ssz_deneb_objs + ssz_electra_objs, +) + + ssz_gen_marshal( name = "ssz_generated_non_core", out = "non-core.ssz.go", @@ -313,6 +336,7 @@ go_library( ":ssz_generated_electra", # keep ":ssz_generated_non_core", # keep ":ssz_generated_phase0", # keep + ":ssz_generated_epbs", # keep ], embed = [":go_proto"], importpath = "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1", @@ -352,6 +376,7 @@ ssz_proto_files( "beacon_state.proto", "blobs.proto", "light_client.proto", + "payload_attestation.proto", "sync_committee.proto", "withdrawals.proto", ], diff --git a/proto/prysm/v1alpha1/altair.ssz.go b/proto/prysm/v1alpha1/altair.ssz.go index 40c8b601cf31..841b82738f9f 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: 18a07a11eb3d1daaafe0b6b1ac8934e9333ea6eceed7d5ef30166b9c2fb50d39 +// Hash: 563d85881202aefa4d8928b04768a8bd1c2e9f9d750664fe77d61f4c494686e2 package eth import ( diff --git a/proto/prysm/v1alpha1/beacon_block.pb.go b/proto/prysm/v1alpha1/beacon_block.pb.go index 609020724f75..6a3c44a3e113 100755 --- a/proto/prysm/v1alpha1/beacon_block.pb.go +++ b/proto/prysm/v1alpha1/beacon_block.pb.go @@ -42,6 +42,7 @@ type GenericSignedBeaconBlock struct { // *GenericSignedBeaconBlock_BlindedDeneb // *GenericSignedBeaconBlock_Electra // *GenericSignedBeaconBlock_BlindedElectra + // *GenericSignedBeaconBlock_Epbs Block isGenericSignedBeaconBlock_Block `protobuf_oneof:"block"` IsBlinded bool `protobuf:"varint,100,opt,name=is_blinded,json=isBlinded,proto3" json:"is_blinded,omitempty"` } @@ -155,6 +156,13 @@ func (x *GenericSignedBeaconBlock) GetBlindedElectra() *SignedBlindedBeaconBlock return nil } +func (x *GenericSignedBeaconBlock) GetEpbs() *SignedBeaconBlockEpbs { + if x, ok := x.GetBlock().(*GenericSignedBeaconBlock_Epbs); ok { + return x.Epbs + } + return nil +} + func (x *GenericSignedBeaconBlock) GetIsBlinded() bool { if x != nil { return x.IsBlinded @@ -206,6 +214,10 @@ type GenericSignedBeaconBlock_BlindedElectra struct { BlindedElectra *SignedBlindedBeaconBlockElectra `protobuf:"bytes,10,opt,name=blinded_electra,json=blindedElectra,proto3,oneof"` } +type GenericSignedBeaconBlock_Epbs struct { + Epbs *SignedBeaconBlockEpbs `protobuf:"bytes,11,opt,name=epbs,proto3,oneof"` +} + func (*GenericSignedBeaconBlock_Phase0) isGenericSignedBeaconBlock_Block() {} func (*GenericSignedBeaconBlock_Altair) isGenericSignedBeaconBlock_Block() {} @@ -226,6 +238,8 @@ func (*GenericSignedBeaconBlock_Electra) isGenericSignedBeaconBlock_Block() {} func (*GenericSignedBeaconBlock_BlindedElectra) isGenericSignedBeaconBlock_Block() {} +func (*GenericSignedBeaconBlock_Epbs) isGenericSignedBeaconBlock_Block() {} + type GenericBeaconBlock struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -243,6 +257,7 @@ type GenericBeaconBlock struct { // *GenericBeaconBlock_BlindedDeneb // *GenericBeaconBlock_Electra // *GenericBeaconBlock_BlindedElectra + // *GenericBeaconBlock_Epbs Block isGenericBeaconBlock_Block `protobuf_oneof:"block"` IsBlinded bool `protobuf:"varint,100,opt,name=is_blinded,json=isBlinded,proto3" json:"is_blinded,omitempty"` PayloadValue string `protobuf:"bytes,101,opt,name=payload_value,json=payloadValue,proto3" json:"payload_value,omitempty"` @@ -357,6 +372,13 @@ func (x *GenericBeaconBlock) GetBlindedElectra() *BlindedBeaconBlockElectra { return nil } +func (x *GenericBeaconBlock) GetEpbs() *BeaconBlockEpbs { + if x, ok := x.GetBlock().(*GenericBeaconBlock_Epbs); ok { + return x.Epbs + } + return nil +} + func (x *GenericBeaconBlock) GetIsBlinded() bool { if x != nil { return x.IsBlinded @@ -415,6 +437,10 @@ type GenericBeaconBlock_BlindedElectra struct { BlindedElectra *BlindedBeaconBlockElectra `protobuf:"bytes,10,opt,name=blinded_electra,json=blindedElectra,proto3,oneof"` } +type GenericBeaconBlock_Epbs struct { + Epbs *BeaconBlockEpbs `protobuf:"bytes,11,opt,name=epbs,proto3,oneof"` +} + func (*GenericBeaconBlock_Phase0) isGenericBeaconBlock_Block() {} func (*GenericBeaconBlock_Altair) isGenericBeaconBlock_Block() {} @@ -435,6 +461,8 @@ func (*GenericBeaconBlock_Electra) isGenericBeaconBlock_Block() {} func (*GenericBeaconBlock_BlindedElectra) isGenericBeaconBlock_Block() {} +func (*GenericBeaconBlock_Epbs) isGenericBeaconBlock_Block() {} + type BeaconBlock struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4666,6 +4694,275 @@ func (x *BlobSidecars) GetSidecars() []*BlobSidecar { return nil } +type BeaconBlockEpbs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Slot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` + ProposerIndex github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex `protobuf:"varint,2,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"` + ParentRoot []byte `protobuf:"bytes,3,opt,name=parent_root,json=parentRoot,proto3" json:"parent_root,omitempty" ssz-size:"32"` + StateRoot []byte `protobuf:"bytes,4,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty" ssz-size:"32"` + Body *BeaconBlockBodyEpbs `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *BeaconBlockEpbs) Reset() { + *x = BeaconBlockEpbs{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BeaconBlockEpbs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BeaconBlockEpbs) ProtoMessage() {} + +func (x *BeaconBlockEpbs) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[59] + 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 BeaconBlockEpbs.ProtoReflect.Descriptor instead. +func (*BeaconBlockEpbs) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_beacon_block_proto_rawDescGZIP(), []int{59} +} + +func (x *BeaconBlockEpbs) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.Slot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +func (x *BeaconBlockEpbs) GetProposerIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { + if x != nil { + return x.ProposerIndex + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(0) +} + +func (x *BeaconBlockEpbs) GetParentRoot() []byte { + if x != nil { + return x.ParentRoot + } + return nil +} + +func (x *BeaconBlockEpbs) GetStateRoot() []byte { + if x != nil { + return x.StateRoot + } + return nil +} + +func (x *BeaconBlockEpbs) GetBody() *BeaconBlockBodyEpbs { + if x != nil { + return x.Body + } + return nil +} + +type BeaconBlockBodyEpbs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RandaoReveal []byte `protobuf:"bytes,1,opt,name=randao_reveal,json=randaoReveal,proto3" json:"randao_reveal,omitempty" ssz-size:"96"` + Eth1Data *Eth1Data `protobuf:"bytes,2,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"` + Graffiti []byte `protobuf:"bytes,3,opt,name=graffiti,proto3" json:"graffiti,omitempty" ssz-size:"32"` + ProposerSlashings []*ProposerSlashing `protobuf:"bytes,4,rep,name=proposer_slashings,json=proposerSlashings,proto3" json:"proposer_slashings,omitempty" ssz-max:"16"` + AttesterSlashings []*AttesterSlashingElectra `protobuf:"bytes,5,rep,name=attester_slashings,json=attesterSlashings,proto3" json:"attester_slashings,omitempty" ssz-max:"2"` + Attestations []*AttestationElectra `protobuf:"bytes,6,rep,name=attestations,proto3" json:"attestations,omitempty" ssz-max:"128"` + Deposits []*Deposit `protobuf:"bytes,7,rep,name=deposits,proto3" json:"deposits,omitempty" ssz-max:"16"` + VoluntaryExits []*SignedVoluntaryExit `protobuf:"bytes,8,rep,name=voluntary_exits,json=voluntaryExits,proto3" json:"voluntary_exits,omitempty" ssz-max:"16"` + SyncAggregate *SyncAggregate `protobuf:"bytes,9,opt,name=sync_aggregate,json=syncAggregate,proto3" json:"sync_aggregate,omitempty"` + BlsToExecutionChanges []*SignedBLSToExecutionChange `protobuf:"bytes,10,rep,name=bls_to_execution_changes,json=blsToExecutionChanges,proto3" json:"bls_to_execution_changes,omitempty" ssz-max:"16"` + SignedExecutionPayloadHeader *v1.SignedExecutionPayloadHeader `protobuf:"bytes,11,opt,name=signed_execution_payload_header,json=signedExecutionPayloadHeader,proto3" json:"signed_execution_payload_header,omitempty"` + PayloadAttestations []*PayloadAttestation `protobuf:"bytes,12,rep,name=payload_attestations,json=payloadAttestations,proto3" json:"payload_attestations,omitempty" ssz-max:"4"` +} + +func (x *BeaconBlockBodyEpbs) Reset() { + *x = BeaconBlockBodyEpbs{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BeaconBlockBodyEpbs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BeaconBlockBodyEpbs) ProtoMessage() {} + +func (x *BeaconBlockBodyEpbs) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[60] + 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 BeaconBlockBodyEpbs.ProtoReflect.Descriptor instead. +func (*BeaconBlockBodyEpbs) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_beacon_block_proto_rawDescGZIP(), []int{60} +} + +func (x *BeaconBlockBodyEpbs) GetRandaoReveal() []byte { + if x != nil { + return x.RandaoReveal + } + return nil +} + +func (x *BeaconBlockBodyEpbs) GetEth1Data() *Eth1Data { + if x != nil { + return x.Eth1Data + } + return nil +} + +func (x *BeaconBlockBodyEpbs) GetGraffiti() []byte { + if x != nil { + return x.Graffiti + } + return nil +} + +func (x *BeaconBlockBodyEpbs) GetProposerSlashings() []*ProposerSlashing { + if x != nil { + return x.ProposerSlashings + } + return nil +} + +func (x *BeaconBlockBodyEpbs) GetAttesterSlashings() []*AttesterSlashingElectra { + if x != nil { + return x.AttesterSlashings + } + return nil +} + +func (x *BeaconBlockBodyEpbs) GetAttestations() []*AttestationElectra { + if x != nil { + return x.Attestations + } + return nil +} + +func (x *BeaconBlockBodyEpbs) GetDeposits() []*Deposit { + if x != nil { + return x.Deposits + } + return nil +} + +func (x *BeaconBlockBodyEpbs) GetVoluntaryExits() []*SignedVoluntaryExit { + if x != nil { + return x.VoluntaryExits + } + return nil +} + +func (x *BeaconBlockBodyEpbs) GetSyncAggregate() *SyncAggregate { + if x != nil { + return x.SyncAggregate + } + return nil +} + +func (x *BeaconBlockBodyEpbs) GetBlsToExecutionChanges() []*SignedBLSToExecutionChange { + if x != nil { + return x.BlsToExecutionChanges + } + return nil +} + +func (x *BeaconBlockBodyEpbs) GetSignedExecutionPayloadHeader() *v1.SignedExecutionPayloadHeader { + if x != nil { + return x.SignedExecutionPayloadHeader + } + return nil +} + +func (x *BeaconBlockBodyEpbs) GetPayloadAttestations() []*PayloadAttestation { + if x != nil { + return x.PayloadAttestations + } + return nil +} + +type SignedBeaconBlockEpbs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block *BeaconBlockEpbs `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` +} + +func (x *SignedBeaconBlockEpbs) Reset() { + *x = SignedBeaconBlockEpbs{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedBeaconBlockEpbs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedBeaconBlockEpbs) ProtoMessage() {} + +func (x *SignedBeaconBlockEpbs) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[61] + 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 SignedBeaconBlockEpbs.ProtoReflect.Descriptor instead. +func (*SignedBeaconBlockEpbs) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_beacon_block_proto_rawDescGZIP(), []int{61} +} + +func (x *SignedBeaconBlockEpbs) GetBlock() *BeaconBlockEpbs { + if x != nil { + return x.Block + } + return nil +} + +func (x *SignedBeaconBlockEpbs) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + type Deposit_Data struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4680,7 +4977,7 @@ type Deposit_Data struct { func (x *Deposit_Data) Reset() { *x = Deposit_Data{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[59] + mi := &file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4693,7 +4990,7 @@ func (x *Deposit_Data) String() string { func (*Deposit_Data) ProtoMessage() {} func (x *Deposit_Data) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[59] + mi := &file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4748,6 +5045,9 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, + 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x70, @@ -4755,65 +5055,71 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x07, 0x0a, 0x18, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x42, 0x0a, 0x06, 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x6e, 0x67, 0x69, + 0x6e, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x70, 0x62, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xea, 0x07, 0x0a, 0x18, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x42, 0x0a, + 0x06, 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x06, 0x70, 0x68, 0x61, 0x73, 0x65, + 0x30, 0x12, 0x48, 0x0a, 0x06, 0x61, 0x6c, 0x74, 0x61, 0x69, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x06, 0x70, - 0x68, 0x61, 0x73, 0x65, 0x30, 0x12, 0x48, 0x0a, 0x06, 0x61, 0x6c, 0x74, 0x61, 0x69, 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, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, - 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48, 0x00, 0x52, 0x06, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, - 0x51, 0x0a, 0x09, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, - 0x61, 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x09, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, - 0x69, 0x78, 0x12, 0x67, 0x0a, 0x11, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x65, - 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, + 0x72, 0x48, 0x00, 0x52, 0x06, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x51, 0x0a, 0x09, 0x62, + 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, + 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x48, 0x00, 0x52, 0x09, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x67, + 0x0a, 0x11, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, + 0x72, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, + 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, + 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x10, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, + 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x4b, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x65, 0x6c, + 0x6c, 0x61, 0x18, 0x05, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x48, 0x00, 0x52, 0x07, 0x63, 0x61, 0x70, + 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x61, 0x0a, 0x0f, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, + 0x63, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x69, 0x6e, - 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, - 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x10, 0x62, 0x6c, 0x69, 0x6e, 0x64, - 0x65, 0x64, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x4b, 0x0a, 0x07, 0x63, - 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x05, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, - 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x48, 0x00, 0x52, - 0x07, 0x63, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x61, 0x0a, 0x0f, 0x62, 0x6c, 0x69, 0x6e, - 0x64, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, + 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, + 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x4d, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x65, 0x62, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x48, 0x00, 0x52, + 0x05, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x5b, 0x0a, 0x0d, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, + 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x69, 0x6e, + 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, + 0x6e, 0x65, 0x62, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x44, 0x65, + 0x6e, 0x65, 0x62, 0x12, 0x53, 0x0a, 0x07, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, + 0x07, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x61, 0x0a, 0x0f, 0x62, 0x6c, 0x69, 0x6e, + 0x64, 0x65, 0x64, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x6c, 0x69, - 0x6e, 0x64, 0x65, 0x64, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x4d, 0x0a, 0x05, 0x64, - 0x65, 0x6e, 0x65, 0x62, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x44, 0x65, 0x6e, 0x65, - 0x62, 0x48, 0x00, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x5b, 0x0a, 0x0d, 0x62, 0x6c, - 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x6c, 0x69, 0x6e, 0x64, - 0x65, 0x64, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x53, 0x0a, 0x07, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x72, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, - 0x61, 0x48, 0x00, 0x52, 0x07, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x61, 0x0a, 0x0f, - 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, - 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, - 0x0e, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, + 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x6c, 0x69, + 0x6e, 0x64, 0x65, 0x64, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x42, 0x0a, 0x04, 0x65, + 0x70, 0x62, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x45, 0x70, 0x62, 0x73, 0x48, 0x00, 0x52, 0x04, 0x65, 0x70, 0x62, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x07, - 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4a, 0x04, 0x08, 0x65, 0x10, 0x66, 0x22, 0x83, 0x07, + 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4a, 0x04, 0x08, 0x65, 0x10, 0x66, 0x22, 0xc1, 0x07, 0x0a, 0x12, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x3c, 0x0a, 0x06, 0x70, 0x68, 0x61, 0x73, 0x65, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, @@ -4865,237 +5171,396 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x45, - 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x62, 0x6c, 0x69, - 0x6e, 0x64, 0x65, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x42, 0x6c, - 0x69, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x65, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x22, 0xec, 0x02, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, - 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, - 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, - 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, + 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x3c, 0x0a, 0x04, 0x65, 0x70, 0x62, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 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, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x22, 0x73, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x38, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 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, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xf8, 0x02, 0x0a, 0x11, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x59, 0x0a, - 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, - 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, - 0x12, 0x40, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, - 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, 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x52, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x22, 0x7f, 0x0a, 0x17, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x3e, 0x0a, - 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 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, - 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x22, 0xd1, 0x04, 0x0a, 0x0f, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, - 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, - 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, - 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, - 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, - 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, 0x18, - 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, - 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, - 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, - 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, - 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x22, 0xa4, 0x05, 0x0a, 0x15, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74, 0x61, 0x69, - 0x72, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, - 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, - 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, - 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, - 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, - 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, - 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x5d, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x4f, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, - 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, - 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, - 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, - 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, - 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x18, 0x09, 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, 0x22, 0xa8, - 0x01, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, - 0x69, 0x6e, 0x67, 0x12, 0x49, 0x0a, 0x08, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x31, 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, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x31, 0x12, 0x49, - 0x0a, 0x08, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x32, 0x18, 0x03, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x32, 0x22, 0xb2, 0x01, 0x0a, 0x10, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x4e, - 0x0a, 0x0d, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x31, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x31, 0x12, 0x4e, - 0x0a, 0x0d, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x32, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x22, 0xc7, - 0x01, 0x0a, 0x17, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, - 0x69, 0x6e, 0x67, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x55, 0x0a, 0x0d, 0x61, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, - 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x63, - 0x74, 0x72, 0x61, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x31, 0x12, 0x55, 0x0a, 0x0d, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x22, 0x9a, 0x02, 0x0a, 0x07, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0c, 0x42, 0x09, 0x8a, 0xb5, 0x18, 0x05, 0x33, 0x33, 0x2c, 0x33, 0x32, 0x52, 0x05, - 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x37, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xb4, - 0x01, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, - 0x02, 0x34, 0x38, 0x9a, 0xb5, 0x18, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x09, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x16, 0x77, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, - 0x52, 0x15, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x70, 0x62, 0x73, 0x48, 0x00, 0x52, 0x04, + 0x65, 0x70, 0x62, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x62, 0x6c, 0x69, 0x6e, 0x64, + 0x65, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x42, 0x6c, 0x69, 0x6e, + 0x64, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x65, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x22, 0xec, 0x02, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, + 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, + 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 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, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, + 0x22, 0x73, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x38, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 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, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, + 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xe7, 0x01, 0x0a, 0x0d, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, - 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x12, 0x5c, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 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, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x78, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xf8, 0x02, 0x0a, 0x11, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x59, 0x0a, 0x04, 0x73, + 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, - 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, - 0x75, 0x0a, 0x13, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, - 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x65, 0x78, 0x69, 0x74, 0x18, 0x01, - 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, 0x56, 0x6f, 0x6c, - 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x52, 0x04, 0x65, 0x78, 0x69, 0x74, - 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x08, 0x45, 0x74, 0x68, 0x31, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, - 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, - 0x32, 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x23, - 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, - 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0xdb, 0x02, 0x0a, 0x11, 0x42, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, + 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, + 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x40, + 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 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, + 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, + 0x22, 0x7f, 0x0a, 0x17, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x3e, 0x0a, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 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, 0x41, 0x6c, + 0x74, 0x61, 0x69, 0x72, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, + 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x22, 0xd1, 0x04, 0x0a, 0x0f, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, + 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, + 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, + 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, + 0x66, 0x69, 0x74, 0x69, 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, + 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, + 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, + 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, + 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, + 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, + 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, + 0x45, 0x78, 0x69, 0x74, 0x73, 0x22, 0xa4, 0x05, 0x0a, 0x15, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, + 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, + 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, + 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, 0x5e, + 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x5d, + 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4f, 0x0a, + 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, + 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, + 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, + 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, + 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, + 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, + 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x18, 0x09, 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, 0x22, 0xa8, 0x01, 0x0a, + 0x10, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, + 0x67, 0x12, 0x49, 0x0a, 0x08, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x31, 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, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x31, 0x12, 0x49, 0x0a, 0x08, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x32, 0x18, 0x03, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, + 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x32, 0x22, 0xb2, 0x01, 0x0a, 0x10, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x4e, 0x0a, 0x0d, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x31, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x65, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x31, 0x12, 0x4e, 0x0a, 0x0d, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x32, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x65, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x22, 0xc7, 0x01, 0x0a, + 0x17, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, + 0x67, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x55, 0x0a, 0x0d, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, + 0x61, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x31, 0x12, + 0x55, 0x0a, 0x0d, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x32, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x22, 0x9a, 0x02, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0c, 0x42, 0x09, 0x8a, 0xb5, 0x18, 0x05, 0x33, 0x33, 0x2c, 0x33, 0x32, 0x52, 0x05, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x12, 0x37, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xb4, 0x01, 0x0a, + 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x02, 0x34, + 0x38, 0x9a, 0xb5, 0x18, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x16, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x15, + 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x22, 0xe7, 0x01, 0x0a, 0x0d, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, + 0x79, 0x45, 0x78, 0x69, 0x74, 0x12, 0x5c, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 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, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x12, 0x78, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, + 0x18, 0x4b, 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, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x75, 0x0a, + 0x13, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, + 0x45, 0x78, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x65, 0x78, 0x69, 0x74, 0x18, 0x01, 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, 0x56, 0x6f, 0x6c, 0x75, 0x6e, + 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x52, 0x04, 0x65, 0x78, 0x69, 0x74, 0x12, 0x24, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x08, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x29, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, + 0x0b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x23, 0x0a, 0x0d, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0xdb, 0x02, 0x0a, 0x11, 0x42, 0x65, 0x61, + 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x59, + 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, + 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x23, 0x0a, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x62, 0x6f, + 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x17, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x40, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 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, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x12, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x35, 0x0a, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, + 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x42, 0x08, 0x92, 0xb5, + 0x18, 0x04, 0x32, 0x30, 0x34, 0x38, 0x52, 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x19, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x37, 0x0a, 0x11, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x04, 0x42, 0x0a, 0x92, 0xb5, 0x18, 0x06, 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x52, + 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, + 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x0d, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x6b, 0x0a, 0x13, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x42, 0x3b, 0x82, 0xb5, 0x18, 0x31, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x35, 0x31, 0x32, 0x8a, 0xb5, 0x18, 0x02, 0x36, 0x34, 0x52, + 0x11, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x42, 0x69, + 0x74, 0x73, 0x12, 0x40, 0x0a, 0x18, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x16, 0x73, 0x79, + 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, + 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, + 0x72, 0x69, 0x78, 0x12, 0x41, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2b, 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, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, + 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, + 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xfe, 0x02, 0x0a, + 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, + 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, + 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, + 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x43, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, + 0x18, 0x05, 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, 0x42, + 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x65, + 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xfa, 0x05, + 0x0a, 0x18, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, + 0x79, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, + 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, + 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, + 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, + 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, + 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, + 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, + 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x61, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, + 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, + 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, + 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, + 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, + 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, + 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, + 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, 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, 0x51, 0x0a, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 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, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x93, 0x01, 0x0a, 0x21, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, + 0x12, 0x48, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x32, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, + 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, + 0x72, 0x69, 0x78, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, + 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x22, 0x8c, 0x03, 0x0a, 0x1b, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, @@ -5114,169 +5579,118 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x6f, 0x6f, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, - 0x62, 0x6f, 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x17, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 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, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, - 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xad, 0x01, 0x0a, - 0x12, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x42, 0x08, - 0x92, 0xb5, 0x18, 0x04, 0x32, 0x30, 0x34, 0x38, 0x52, 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, - 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xb6, 0x01, 0x0a, - 0x19, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x37, 0x0a, 0x11, 0x61, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x04, 0x42, 0x0a, 0x92, 0xb5, 0x18, 0x06, 0x31, 0x33, 0x31, 0x30, 0x37, - 0x32, 0x52, 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x64, 0x69, - 0x63, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x0d, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x6b, 0x0a, 0x13, 0x73, 0x79, 0x6e, 0x63, 0x5f, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x42, 0x3b, 0x82, 0xb5, 0x18, 0x31, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, - 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x35, 0x31, 0x32, 0x8a, 0xb5, 0x18, 0x02, 0x36, - 0x34, 0x52, 0x11, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, - 0x42, 0x69, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x18, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x16, - 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, - 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x41, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 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, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, - 0x78, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, - 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xfe, - 0x02, 0x0a, 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, - 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, - 0x01, 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, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, - 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, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, - 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, - 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x43, 0x0a, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x18, 0x05, 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, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, + 0x6f, 0x6f, 0x74, 0x12, 0x4a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, + 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, - 0xfa, 0x05, 0x0a, 0x18, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, - 0x6f, 0x64, 0x79, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x2b, 0x0a, 0x0d, - 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, - 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, - 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, - 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, - 0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, 0x5e, 0x0a, 0x12, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x94, 0x06, 0x0a, 0x1f, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, + 0x72, 0x69, 0x78, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, + 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, + 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, + 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, + 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x74, 0x69, 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, + 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, + 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, + 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, + 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, + 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, - 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x61, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, + 0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, + 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, + 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, + 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, + 0x69, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, 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, 0x64, 0x0a, 0x18, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 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, 0x52, 0x16, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xc2, 0x01, 0x0a, 0x1e, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x43, 0x0a, 0x05, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2f, + 0x0a, 0x0a, 0x6b, 0x7a, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, + 0x34, 0x30, 0x39, 0x36, 0x52, 0x09, 0x6b, 0x7a, 0x67, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, + 0x2a, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, + 0x8a, 0xb5, 0x18, 0x08, 0x3f, 0x2c, 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x92, 0xb5, 0x18, 0x04, + 0x34, 0x30, 0x39, 0x36, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x22, 0xb6, 0x01, 0x0a, 0x18, + 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x3d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, - 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x61, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, + 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2f, 0x0a, 0x0a, 0x6b, 0x7a, 0x67, 0x5f, 0x70, + 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, + 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x09, 0x6b, + 0x7a, 0x67, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x08, 0x3f, 0x2c, 0x31, + 0x33, 0x31, 0x30, 0x37, 0x32, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x05, 0x62, + 0x6c, 0x6f, 0x62, 0x73, 0x22, 0x7d, 0x0a, 0x16, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, + 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x3d, + 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, - 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, - 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, - 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, - 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, - 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, - 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, - 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, 0x51, 0x0a, 0x11, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 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, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x93, 0x01, 0x0a, - 0x21, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, - 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, - 0x69, 0x78, 0x12, 0x48, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, - 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, - 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x22, 0x8c, 0x03, 0x0a, 0x1b, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, - 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, - 0x69, 0x78, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, - 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, - 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, - 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x4a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, - 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, - 0x64, 0x79, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x22, 0x94, 0x06, 0x0a, 0x1f, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, - 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x65, 0x6c, 0x6c, - 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x22, 0xf6, 0x02, 0x0a, 0x10, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, + 0x18, 0x01, 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, 0x04, 0x73, + 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, + 0x4b, 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, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, + 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x62, + 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 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, 0x42, 0x6f, 0x64, + 0x79, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xb3, 0x07, 0x0a, + 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, + 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, @@ -5317,342 +5731,355 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 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, 0x64, 0x0a, 0x18, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, - 0x52, 0x16, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xc2, 0x01, 0x0a, 0x1e, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x43, 0x0a, 0x05, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x12, 0x2f, 0x0a, 0x0a, 0x6b, 0x7a, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, - 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x09, 0x6b, 0x7a, 0x67, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, - 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x08, 0x3f, 0x2c, 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x92, 0xb5, - 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x22, 0xb6, 0x01, - 0x0a, 0x18, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x73, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x3d, 0x0a, 0x05, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x74, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 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, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x72, 0x0a, 0x18, 0x62, 0x6c, + 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x4c, 0x53, 0x54, 0x6f, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, + 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x15, 0x62, 0x6c, 0x73, 0x54, 0x6f, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x42, + 0x0a, 0x14, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, + 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x12, + 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x18, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, + 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, + 0x3f, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 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, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xfa, 0x02, 0x0a, 0x12, 0x42, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x59, 0x0a, + 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, + 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, + 0x12, 0x41, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 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, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, 0x04, 0x62, + 0x6f, 0x64, 0x79, 0x22, 0xf3, 0x06, 0x0a, 0x16, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x2b, + 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, + 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x65, + 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, + 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, + 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, 0x5e, 0x0a, + 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, + 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 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, 0x44, 0x65, 0x6e, - 0x65, 0x62, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2f, 0x0a, 0x0a, 0x6b, 0x7a, 0x67, - 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, - 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, - 0x09, 0x6b, 0x7a, 0x67, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x62, 0x6c, - 0x6f, 0x62, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x08, 0x3f, - 0x2c, 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, - 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x22, 0x7d, 0x0a, 0x16, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, - 0x12, 0x3d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 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, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xf6, 0x02, 0x0a, 0x10, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x18, 0x01, 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, - 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, - 0xb5, 0x18, 0x4b, 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, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, - 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, - 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3f, 0x0a, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 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, 0x42, - 0x6f, 0x64, 0x79, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xb3, - 0x07, 0x0a, 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, - 0x64, 0x79, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, - 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, - 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, - 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, - 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, - 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, + 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x5d, 0x0a, + 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, + 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, + 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4f, 0x0a, 0x0c, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, 0x18, - 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, + 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, + 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, + 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, + 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, + 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, + 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, 0x4b, + 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x18, 0x09, 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, 0x58, 0x0a, 0x11, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 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, 0x43, 0x61, 0x70, 0x65, + 0x6c, 0x6c, 0x61, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x72, 0x0a, 0x18, 0x62, 0x6c, 0x73, 0x5f, 0x74, 0x6f, 0x5f, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x4c, 0x53, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, + 0x31, 0x36, 0x52, 0x15, 0x62, 0x6c, 0x73, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x1f, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x46, 0x0a, + 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, 0x05, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x88, 0x03, 0x0a, 0x19, + 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, + 0x74, 0x18, 0x01, 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, 0x04, + 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, + 0x18, 0x4b, 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, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, + 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x48, 0x0a, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, + 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x8d, 0x07, 0x0a, 0x1d, 0x42, 0x6c, 0x69, 0x6e, 0x64, + 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, + 0x79, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, + 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, + 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, - 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, - 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, - 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, - 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, 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, 0x56, 0x0a, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x29, 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, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x72, 0x0a, 0x18, - 0x62, 0x6c, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x4c, 0x53, - 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x15, 0x62, 0x6c, 0x73, 0x54, 0x6f, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x12, 0x42, 0x0a, 0x14, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, - 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, - 0x52, 0x12, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x18, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, - 0x61, 0x12, 0x3f, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x29, 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, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, 0x05, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xfa, 0x02, 0x0a, 0x12, 0x42, 0x65, 0x61, - 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, - 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, + 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, + 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, + 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, + 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, + 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, + 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, + 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, + 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, + 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, + 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, 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, 0x6b, 0x0a, 0x18, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x18, 0x0a, 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, 0x16, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x72, 0x0a, 0x18, 0x62, 0x6c, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x0b, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x42, 0x4c, 0x53, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, + 0x15, 0x62, 0x6c, 0x73, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x1d, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 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, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x84, 0x03, 0x0a, 0x17, 0x42, 0x6c, 0x69, + 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, + 0x65, 0x6e, 0x65, 0x62, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, - 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, - 0x6f, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 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, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xf3, 0x06, 0x0a, 0x16, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, - 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, - 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, - 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, - 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, - 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, - 0x5e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x5d, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, + 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, + 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, + 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x46, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, + 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x42, 0x6f, 0x64, 0x79, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, + 0xcd, 0x07, 0x0a, 0x1b, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, + 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, + 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, + 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, 0x5e, + 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x5d, + 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4f, 0x0a, + 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, + 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, + 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, + 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4f, - 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, - 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, 0x32, - 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, - 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, - 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, - 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, - 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x18, 0x09, 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, 0x58, 0x0a, - 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 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, 0x43, 0x61, - 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x72, 0x0a, 0x18, 0x62, 0x6c, 0x73, 0x5f, 0x74, + 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, + 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, + 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, + 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x18, 0x09, 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, 0x69, 0x0a, 0x18, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0a, 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, + 0x16, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x72, 0x0a, 0x18, 0x62, 0x6c, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x4c, 0x53, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x15, 0x62, 0x6c, 0x73, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x1f, - 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, - 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, - 0x46, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, - 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, - 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, - 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x88, 0x03, - 0x0a, 0x19, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x59, 0x0a, 0x04, 0x73, - 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, - 0x82, 0xb5, 0x18, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x14, 0x62, + 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x04, 0x3f, + 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x12, 0x62, 0x6c, 0x6f, + 0x62, 0x4b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, + 0xc6, 0x01, 0x0a, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6c, 0x65, + 0x63, 0x74, 0x72, 0x61, 0x12, 0x45, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 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, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, + 0x63, 0x74, 0x72, 0x61, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2f, 0x0a, 0x0a, 0x6b, + 0x7a, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x42, + 0x10, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, + 0x36, 0x52, 0x09, 0x6b, 0x7a, 0x67, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x2a, 0x0a, 0x05, + 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, + 0x08, 0x3f, 0x2c, 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, + 0x36, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x1a, 0x42, 0x65, 0x61, + 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x3f, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 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, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, + 0x61, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2f, 0x0a, 0x0a, 0x6b, 0x7a, 0x67, 0x5f, + 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, + 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x09, + 0x6b, 0x7a, 0x67, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x62, 0x6c, 0x6f, + 0x62, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x08, 0x3f, 0x2c, + 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x05, + 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x18, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, + 0x72, 0x61, 0x12, 0x3f, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 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, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x05, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xfa, 0x02, 0x0a, 0x12, 0x42, 0x65, + 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, + 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, - 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, - 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, - 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x48, - 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x43, 0x61, 0x70, 0x65, 0x6c, - 0x6c, 0x61, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x8d, 0x07, 0x0a, 0x1d, 0x42, 0x6c, 0x69, - 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, - 0x6f, 0x64, 0x79, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, - 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, - 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, - 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, - 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, - 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, - 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, - 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x61, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, - 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, - 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, - 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, - 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, - 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, - 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, 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, 0x6b, 0x0a, 0x18, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x18, 0x0a, 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, 0x16, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x72, 0x0a, 0x18, 0x62, 0x6c, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x4c, 0x53, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, - 0x36, 0x52, 0x15, 0x62, 0x6c, 0x73, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x1d, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, - 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x84, 0x03, 0x0a, 0x17, 0x42, - 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, - 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, 0x04, 0x73, 0x6c, 0x6f, - 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, - 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, - 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x46, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x22, 0xcd, 0x07, 0x0a, 0x1b, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, - 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x44, 0x65, 0x6e, 0x65, - 0x62, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, + 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, + 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, + 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x6f, 0x6f, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 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, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, + 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x97, 0x08, 0x0a, 0x16, 0x42, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, + 0x61, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, @@ -5667,107 +6094,90 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x5d, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, + 0x12, 0x64, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, + 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 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, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x4f, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x92, 0xb5, 0x18, 0x03, 0x31, - 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, - 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, - 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, - 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, - 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x73, 0x68, 0x69, 0x6e, 0x67, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x42, 0x05, 0x92, 0xb5, + 0x18, 0x01, 0x31, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, + 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x54, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x38, 0x52, 0x0c, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, + 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, + 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, + 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 0x69, - 0x0a, 0x18, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0a, 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, 0x16, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x72, 0x0a, 0x18, 0x62, 0x6c, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x4c, 0x53, 0x54, 0x6f, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x06, - 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x15, 0x62, 0x6c, 0x73, 0x54, 0x6f, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x42, 0x0a, - 0x14, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, - 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x12, 0x62, - 0x6c, 0x6f, 0x62, 0x4b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x45, - 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x45, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 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, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, - 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2f, 0x0a, - 0x0a, 0x6b, 0x7a, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, - 0x30, 0x39, 0x36, 0x52, 0x09, 0x6b, 0x7a, 0x67, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x2a, - 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, - 0xb5, 0x18, 0x08, 0x3f, 0x2c, 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x92, 0xb5, 0x18, 0x04, 0x34, - 0x30, 0x39, 0x36, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x1a, 0x42, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x73, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x3f, 0x0a, 0x05, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 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, 0x45, 0x6c, 0x65, 0x63, - 0x74, 0x72, 0x61, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2f, 0x0a, 0x0a, 0x6b, 0x7a, - 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, - 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, - 0x52, 0x09, 0x6b, 0x7a, 0x67, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x62, - 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x08, - 0x3f, 0x2c, 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, - 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x18, 0x53, 0x69, 0x67, 0x6e, + 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, + 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, + 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x73, 0x12, 0x4b, 0x0a, + 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, + 0x09, 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, 0x56, 0x0a, 0x11, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 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, 0x44, 0x65, 0x6e, 0x65, 0x62, + 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x72, 0x0a, 0x18, 0x62, 0x6c, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x0b, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x42, 0x4c, 0x53, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, + 0x15, 0x62, 0x6c, 0x73, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x14, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, + 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0c, + 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, + 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x12, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x7a, 0x67, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x54, 0x0a, 0x12, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 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, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, 0x11, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, - 0x63, 0x74, 0x72, 0x61, 0x12, 0x3f, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 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, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x05, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, - 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xfa, 0x02, 0x0a, 0x12, - 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, - 0x72, 0x61, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, - 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, - 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, - 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 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, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x45, 0x6c, 0x65, 0x63, 0x74, - 0x72, 0x61, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x97, 0x08, 0x0a, 0x16, 0x42, 0x65, 0x61, + 0x63, 0x74, 0x72, 0x61, 0x12, 0x4a, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, + 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x88, 0x03, 0x0a, 0x19, 0x42, 0x6c, 0x69, 0x6e, 0x64, + 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, + 0x63, 0x74, 0x72, 0x61, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, + 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, + 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x48, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, + 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x42, 0x6f, 0x64, 0x79, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x04, 0x62, 0x6f, 0x64, + 0x79, 0x22, 0xb1, 0x08, 0x0a, 0x1d, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, @@ -5810,66 +6220,165 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 0x65, 0x18, 0x09, 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, 0x56, 0x0a, 0x11, + 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x69, 0x0a, 0x18, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 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, 0x44, 0x65, 0x6e, - 0x65, 0x62, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x72, 0x0a, 0x18, 0x62, 0x6c, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x4c, 0x53, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, - 0x36, 0x52, 0x15, 0x62, 0x6c, 0x73, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x14, 0x62, 0x6c, 0x6f, 0x62, - 0x5f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, - 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x12, 0x62, 0x6c, 0x6f, 0x62, 0x4b, 0x7a, - 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x54, 0x0a, 0x12, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 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, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, - 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x1f, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x69, - 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, - 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x4a, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x88, 0x03, 0x0a, 0x19, 0x42, 0x6c, 0x69, - 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, - 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, - 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, 0x04, 0x73, 0x6c, 0x6f, - 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, - 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, - 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x48, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x52, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x22, 0xb1, 0x08, 0x0a, 0x1d, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, 0x79, 0x45, 0x6c, - 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, + 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0a, 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, + 0x16, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x72, 0x0a, 0x18, 0x62, 0x6c, 0x73, 0x5f, 0x74, + 0x6f, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x4c, 0x53, 0x54, 0x6f, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x06, 0x92, 0xb5, + 0x18, 0x02, 0x31, 0x36, 0x52, 0x15, 0x62, 0x6c, 0x73, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x14, 0x62, + 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x04, 0x3f, + 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x12, 0x62, 0x6c, 0x6f, + 0x62, 0x4b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x54, 0x0a, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 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, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x73, 0x52, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0xa1, 0x01, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, + 0x31, 0x12, 0x2b, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x32, 0x30, + 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, + 0x38, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0x72, 0x0a, 0x1e, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x31, 0x12, 0x50, 0x0a, 0x08, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x56, 0x31, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x8f, 0x01, + 0x0a, 0x1d, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, + 0x48, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, + 0x8e, 0x01, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x12, 0x42, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 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, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x22, 0x75, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, + 0x72, 0x42, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x75, + 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x11, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x49, 0x0a, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 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, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x06, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0x83, 0x01, 0x0a, 0x17, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x43, 0x61, 0x70, 0x65, 0x6c, + 0x6c, 0x61, 0x12, 0x42, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x75, 0x69, 0x6c, + 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, + 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xdc, 0x01, 0x0a, + 0x0f, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x44, 0x65, 0x6e, 0x65, 0x62, + 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, 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, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x14, 0x62, 0x6c, 0x6f, + 0x62, 0x5f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, + 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x12, 0x62, 0x6c, 0x6f, 0x62, 0x4b, + 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x06, 0x70, + 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, + 0x02, 0x34, 0x38, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0x7f, 0x0a, 0x15, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x44, + 0x65, 0x6e, 0x65, 0x62, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x75, + 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, + 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xc0, 0x02, 0x0a, + 0x0b, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x1e, 0x0a, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x0a, 0x8a, 0xb5, 0x18, 0x06, 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x52, 0x04, 0x62, 0x6c, + 0x6f, 0x62, 0x12, 0x2d, 0x0a, 0x0e, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, + 0x34, 0x38, 0x52, 0x0d, 0x6b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x23, 0x0a, 0x09, 0x6b, 0x7a, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x08, 0x6b, 0x7a, + 0x67, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x5e, 0x0a, 0x13, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 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, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x09, 0x8a, 0xb5, 0x18, 0x05, + 0x31, 0x37, 0x2c, 0x33, 0x32, 0x52, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x22, + 0x55, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x73, 0x12, + 0x45, 0x0a, 0x08, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x69, + 0x64, 0x65, 0x63, 0x61, 0x72, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x36, 0x52, 0x08, 0x73, 0x69, + 0x64, 0x65, 0x63, 0x61, 0x72, 0x73, 0x22, 0xf4, 0x02, 0x0a, 0x0f, 0x42, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x70, 0x62, 0x73, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, + 0x6f, 0x74, 0x18, 0x01, 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, + 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, + 0xb5, 0x18, 0x4b, 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, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x27, 0x0a, + 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, + 0x33, 0x32, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x3e, 0x0a, + 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x42, + 0x6f, 0x64, 0x79, 0x45, 0x70, 0x62, 0x73, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x82, 0x08, + 0x0a, 0x13, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x6f, 0x64, + 0x79, 0x45, 0x70, 0x62, 0x73, 0x12, 0x2b, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, @@ -5889,171 +6398,68 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc = []byte{ 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, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, - 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x31, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x54, 0x0a, 0x0c, 0x61, 0x74, + 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x32, 0x52, 0x11, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x56, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x42, 0x05, 0x92, 0xb5, 0x18, - 0x01, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, - 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, 0x6c, 0x75, - 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, - 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, - 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x18, 0x09, 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, 0x69, - 0x0a, 0x18, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0a, 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, 0x16, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x72, 0x0a, 0x18, 0x62, 0x6c, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x42, 0x07, 0x92, 0xb5, 0x18, + 0x03, 0x31, 0x32, 0x38, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x08, 0x64, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x5b, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, + 0x61, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x6f, + 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x42, 0x06, 0x92, 0xb5, 0x18, + 0x02, 0x31, 0x36, 0x52, 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, + 0x69, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x09, 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, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x4c, 0x53, 0x54, 0x6f, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x06, - 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x15, 0x62, 0x6c, 0x73, 0x54, 0x6f, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x42, 0x0a, - 0x14, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, - 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x12, 0x62, - 0x6c, 0x6f, 0x62, 0x4b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x54, 0x0a, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 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, 0x72, 0x0a, 0x18, 0x62, 0x6c, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x42, 0x4c, 0x53, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x06, 0x92, 0xb5, 0x18, 0x02, 0x31, 0x36, 0x52, 0x15, 0x62, + 0x6c, 0x73, 0x54, 0x6f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x12, 0x77, 0x0a, 0x1f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x73, 0x52, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0xa1, 0x01, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x56, 0x31, 0x12, 0x2b, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, - 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, - 0x32, 0x30, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1e, 0x0a, 0x06, 0x70, - 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, - 0x02, 0x34, 0x38, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0x72, 0x0a, 0x1e, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x31, 0x12, 0x50, 0x0a, - 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x34, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, - 0x8f, 0x01, 0x0a, 0x1d, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, - 0x31, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x56, 0x31, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, - 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, - 0x12, 0x42, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2a, 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, 0x52, 0x06, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x22, 0x75, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x11, 0x42, 0x75, - 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, - 0x49, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 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, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, - 0x32, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, - 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0x83, 0x01, 0x0a, 0x17, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x43, 0x61, 0x70, - 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x42, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x75, - 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x52, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, - 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xdc, - 0x01, 0x0a, 0x0f, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x44, 0x65, 0x6e, - 0x65, 0x62, 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, 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, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x14, 0x62, - 0x6c, 0x6f, 0x62, 0x5f, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x04, 0x3f, - 0x2c, 0x34, 0x38, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x12, 0x62, 0x6c, 0x6f, - 0x62, 0x4b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, - 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, - 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, - 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0x7f, 0x0a, - 0x15, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, - 0x64, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x69, 0x64, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, - 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xc0, - 0x02, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1e, 0x0a, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x0a, 0x8a, 0xb5, 0x18, 0x06, 0x31, 0x33, 0x31, 0x30, 0x37, 0x32, 0x52, 0x04, - 0x62, 0x6c, 0x6f, 0x62, 0x12, 0x2d, 0x0a, 0x0e, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, - 0x18, 0x02, 0x34, 0x38, 0x52, 0x0d, 0x6b, 0x7a, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x6b, 0x7a, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x08, - 0x6b, 0x7a, 0x67, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x5e, 0x0a, 0x13, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, - 0x05, 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, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x09, 0x8a, 0xb5, - 0x18, 0x05, 0x31, 0x37, 0x2c, 0x33, 0x32, 0x52, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, - 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x22, 0x55, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, - 0x73, 0x12, 0x45, 0x0a, 0x08, 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x62, - 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x36, 0x52, 0x08, - 0x73, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x73, 0x42, 0x9b, 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, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 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, 0x70, 0x72, 0x79, 0x73, 0x6d, 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, 0x76, 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, + 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, + 0x1c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x63, 0x0a, + 0x14, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x05, 0x92, 0xb5, 0x18, 0x01, 0x34, 0x52, 0x13, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x7b, 0x0a, 0x15, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x70, 0x62, 0x73, 0x12, 0x3c, 0x0a, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 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, 0x45, 0x70, + 0x62, 0x73, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, + 0x9b, 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, 0x42, + 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3a, 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, 0x70, 0x72, 0x79, 0x73, 0x6d, + 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, 0x76, 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 ( @@ -6068,7 +6474,7 @@ func file_proto_prysm_v1alpha1_beacon_block_proto_rawDescGZIP() []byte { return file_proto_prysm_v1alpha1_beacon_block_proto_rawDescData } -var file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes = make([]protoimpl.MessageInfo, 60) +var file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes = make([]protoimpl.MessageInfo, 63) var file_proto_prysm_v1alpha1_beacon_block_proto_goTypes = []interface{}{ (*GenericSignedBeaconBlock)(nil), // 0: ethereum.eth.v1alpha1.GenericSignedBeaconBlock (*GenericBeaconBlock)(nil), // 1: ethereum.eth.v1alpha1.GenericBeaconBlock @@ -6129,18 +6535,23 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_goTypes = []interface{}{ (*SignedBuilderBidDeneb)(nil), // 56: ethereum.eth.v1alpha1.SignedBuilderBidDeneb (*BlobSidecar)(nil), // 57: ethereum.eth.v1alpha1.BlobSidecar (*BlobSidecars)(nil), // 58: ethereum.eth.v1alpha1.BlobSidecars - (*Deposit_Data)(nil), // 59: ethereum.eth.v1alpha1.Deposit.Data - (*Attestation)(nil), // 60: ethereum.eth.v1alpha1.Attestation - (*AttestationData)(nil), // 61: ethereum.eth.v1alpha1.AttestationData - (*v1.ExecutionPayload)(nil), // 62: ethereum.engine.v1.ExecutionPayload - (*v1.ExecutionPayloadHeader)(nil), // 63: ethereum.engine.v1.ExecutionPayloadHeader - (*v1.ExecutionPayloadDeneb)(nil), // 64: ethereum.engine.v1.ExecutionPayloadDeneb - (*SignedBLSToExecutionChange)(nil), // 65: ethereum.eth.v1alpha1.SignedBLSToExecutionChange - (*v1.ExecutionPayloadCapella)(nil), // 66: ethereum.engine.v1.ExecutionPayloadCapella - (*v1.ExecutionPayloadHeaderCapella)(nil), // 67: ethereum.engine.v1.ExecutionPayloadHeaderCapella - (*v1.ExecutionPayloadHeaderDeneb)(nil), // 68: ethereum.engine.v1.ExecutionPayloadHeaderDeneb - (*AttestationElectra)(nil), // 69: ethereum.eth.v1alpha1.AttestationElectra - (*v1.ExecutionRequests)(nil), // 70: ethereum.engine.v1.ExecutionRequests + (*BeaconBlockEpbs)(nil), // 59: ethereum.eth.v1alpha1.BeaconBlockEpbs + (*BeaconBlockBodyEpbs)(nil), // 60: ethereum.eth.v1alpha1.BeaconBlockBodyEpbs + (*SignedBeaconBlockEpbs)(nil), // 61: ethereum.eth.v1alpha1.SignedBeaconBlockEpbs + (*Deposit_Data)(nil), // 62: ethereum.eth.v1alpha1.Deposit.Data + (*Attestation)(nil), // 63: ethereum.eth.v1alpha1.Attestation + (*AttestationData)(nil), // 64: ethereum.eth.v1alpha1.AttestationData + (*v1.ExecutionPayload)(nil), // 65: ethereum.engine.v1.ExecutionPayload + (*v1.ExecutionPayloadHeader)(nil), // 66: ethereum.engine.v1.ExecutionPayloadHeader + (*v1.ExecutionPayloadDeneb)(nil), // 67: ethereum.engine.v1.ExecutionPayloadDeneb + (*SignedBLSToExecutionChange)(nil), // 68: ethereum.eth.v1alpha1.SignedBLSToExecutionChange + (*v1.ExecutionPayloadCapella)(nil), // 69: ethereum.engine.v1.ExecutionPayloadCapella + (*v1.ExecutionPayloadHeaderCapella)(nil), // 70: ethereum.engine.v1.ExecutionPayloadHeaderCapella + (*v1.ExecutionPayloadHeaderDeneb)(nil), // 71: ethereum.engine.v1.ExecutionPayloadHeaderDeneb + (*AttestationElectra)(nil), // 72: ethereum.eth.v1alpha1.AttestationElectra + (*v1.ExecutionRequests)(nil), // 73: ethereum.engine.v1.ExecutionRequests + (*v1.SignedExecutionPayloadHeader)(nil), // 74: ethereum.engine.v1.SignedExecutionPayloadHeader + (*PayloadAttestation)(nil), // 75: ethereum.eth.v1alpha1.PayloadAttestation } var file_proto_prysm_v1alpha1_beacon_block_proto_depIdxs = []int32{ 3, // 0: ethereum.eth.v1alpha1.GenericSignedBeaconBlock.phase0:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlock @@ -6153,151 +6564,165 @@ var file_proto_prysm_v1alpha1_beacon_block_proto_depIdxs = []int32{ 37, // 7: ethereum.eth.v1alpha1.GenericSignedBeaconBlock.blinded_deneb:type_name -> ethereum.eth.v1alpha1.SignedBlindedBeaconBlockDeneb 40, // 8: ethereum.eth.v1alpha1.GenericSignedBeaconBlock.electra:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockContentsElectra 45, // 9: ethereum.eth.v1alpha1.GenericSignedBeaconBlock.blinded_electra:type_name -> ethereum.eth.v1alpha1.SignedBlindedBeaconBlockElectra - 2, // 10: ethereum.eth.v1alpha1.GenericBeaconBlock.phase0:type_name -> ethereum.eth.v1alpha1.BeaconBlock - 4, // 11: ethereum.eth.v1alpha1.GenericBeaconBlock.altair:type_name -> ethereum.eth.v1alpha1.BeaconBlockAltair - 21, // 12: ethereum.eth.v1alpha1.GenericBeaconBlock.bellatrix:type_name -> ethereum.eth.v1alpha1.BeaconBlockBellatrix - 24, // 13: ethereum.eth.v1alpha1.GenericBeaconBlock.blinded_bellatrix:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockBellatrix - 32, // 14: ethereum.eth.v1alpha1.GenericBeaconBlock.capella:type_name -> ethereum.eth.v1alpha1.BeaconBlockCapella - 35, // 15: ethereum.eth.v1alpha1.GenericBeaconBlock.blinded_capella:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockCapella - 27, // 16: ethereum.eth.v1alpha1.GenericBeaconBlock.deneb:type_name -> ethereum.eth.v1alpha1.BeaconBlockContentsDeneb - 38, // 17: ethereum.eth.v1alpha1.GenericBeaconBlock.blinded_deneb:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockDeneb - 41, // 18: ethereum.eth.v1alpha1.GenericBeaconBlock.electra:type_name -> ethereum.eth.v1alpha1.BeaconBlockContentsElectra - 46, // 19: ethereum.eth.v1alpha1.GenericBeaconBlock.blinded_electra:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockElectra - 6, // 20: ethereum.eth.v1alpha1.BeaconBlock.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBody - 2, // 21: ethereum.eth.v1alpha1.SignedBeaconBlock.block:type_name -> ethereum.eth.v1alpha1.BeaconBlock - 7, // 22: ethereum.eth.v1alpha1.BeaconBlockAltair.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyAltair - 4, // 23: ethereum.eth.v1alpha1.SignedBeaconBlockAltair.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockAltair - 14, // 24: ethereum.eth.v1alpha1.BeaconBlockBody.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 8, // 25: ethereum.eth.v1alpha1.BeaconBlockBody.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing - 9, // 26: ethereum.eth.v1alpha1.BeaconBlockBody.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing - 60, // 27: ethereum.eth.v1alpha1.BeaconBlockBody.attestations:type_name -> ethereum.eth.v1alpha1.Attestation - 11, // 28: ethereum.eth.v1alpha1.BeaconBlockBody.deposits:type_name -> ethereum.eth.v1alpha1.Deposit - 13, // 29: ethereum.eth.v1alpha1.BeaconBlockBody.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit - 14, // 30: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 8, // 31: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing - 9, // 32: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing - 60, // 33: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.attestations:type_name -> ethereum.eth.v1alpha1.Attestation - 11, // 34: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.deposits:type_name -> ethereum.eth.v1alpha1.Deposit - 13, // 35: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit - 19, // 36: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate - 16, // 37: ethereum.eth.v1alpha1.ProposerSlashing.header_1:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockHeader - 16, // 38: ethereum.eth.v1alpha1.ProposerSlashing.header_2:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockHeader - 17, // 39: ethereum.eth.v1alpha1.AttesterSlashing.attestation_1:type_name -> ethereum.eth.v1alpha1.IndexedAttestation - 17, // 40: ethereum.eth.v1alpha1.AttesterSlashing.attestation_2:type_name -> ethereum.eth.v1alpha1.IndexedAttestation - 18, // 41: ethereum.eth.v1alpha1.AttesterSlashingElectra.attestation_1:type_name -> ethereum.eth.v1alpha1.IndexedAttestationElectra - 18, // 42: ethereum.eth.v1alpha1.AttesterSlashingElectra.attestation_2:type_name -> ethereum.eth.v1alpha1.IndexedAttestationElectra - 59, // 43: ethereum.eth.v1alpha1.Deposit.data:type_name -> ethereum.eth.v1alpha1.Deposit.Data - 12, // 44: ethereum.eth.v1alpha1.SignedVoluntaryExit.exit:type_name -> ethereum.eth.v1alpha1.VoluntaryExit - 15, // 45: ethereum.eth.v1alpha1.SignedBeaconBlockHeader.header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader - 61, // 46: ethereum.eth.v1alpha1.IndexedAttestation.data:type_name -> ethereum.eth.v1alpha1.AttestationData - 61, // 47: ethereum.eth.v1alpha1.IndexedAttestationElectra.data:type_name -> ethereum.eth.v1alpha1.AttestationData - 21, // 48: ethereum.eth.v1alpha1.SignedBeaconBlockBellatrix.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockBellatrix - 22, // 49: ethereum.eth.v1alpha1.BeaconBlockBellatrix.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix - 14, // 50: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 8, // 51: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing - 9, // 52: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing - 60, // 53: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.attestations:type_name -> ethereum.eth.v1alpha1.Attestation - 11, // 54: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.deposits:type_name -> ethereum.eth.v1alpha1.Deposit - 13, // 55: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit - 19, // 56: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate - 62, // 57: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.execution_payload:type_name -> ethereum.engine.v1.ExecutionPayload - 24, // 58: ethereum.eth.v1alpha1.SignedBlindedBeaconBlockBellatrix.block:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockBellatrix - 25, // 59: ethereum.eth.v1alpha1.BlindedBeaconBlockBellatrix.body:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix - 14, // 60: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 8, // 61: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing - 9, // 62: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing - 60, // 63: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.attestations:type_name -> ethereum.eth.v1alpha1.Attestation - 11, // 64: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.deposits:type_name -> ethereum.eth.v1alpha1.Deposit - 13, // 65: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit - 19, // 66: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate - 63, // 67: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeader - 28, // 68: ethereum.eth.v1alpha1.SignedBeaconBlockContentsDeneb.block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockDeneb - 29, // 69: ethereum.eth.v1alpha1.BeaconBlockContentsDeneb.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockDeneb - 29, // 70: ethereum.eth.v1alpha1.SignedBeaconBlockDeneb.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockDeneb - 30, // 71: ethereum.eth.v1alpha1.BeaconBlockDeneb.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyDeneb - 14, // 72: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 8, // 73: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing - 9, // 74: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing - 60, // 75: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.attestations:type_name -> ethereum.eth.v1alpha1.Attestation - 11, // 76: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.deposits:type_name -> ethereum.eth.v1alpha1.Deposit - 13, // 77: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit - 19, // 78: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate - 64, // 79: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.execution_payload:type_name -> ethereum.engine.v1.ExecutionPayloadDeneb - 65, // 80: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange - 32, // 81: ethereum.eth.v1alpha1.SignedBeaconBlockCapella.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockCapella - 33, // 82: ethereum.eth.v1alpha1.BeaconBlockCapella.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyCapella - 14, // 83: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 8, // 84: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing - 9, // 85: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing - 60, // 86: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.attestations:type_name -> ethereum.eth.v1alpha1.Attestation - 11, // 87: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.deposits:type_name -> ethereum.eth.v1alpha1.Deposit - 13, // 88: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit - 19, // 89: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate - 66, // 90: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.execution_payload:type_name -> ethereum.engine.v1.ExecutionPayloadCapella - 65, // 91: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange - 35, // 92: ethereum.eth.v1alpha1.SignedBlindedBeaconBlockCapella.block:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockCapella - 36, // 93: ethereum.eth.v1alpha1.BlindedBeaconBlockCapella.body:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella - 14, // 94: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 8, // 95: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing - 9, // 96: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing - 60, // 97: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.attestations:type_name -> ethereum.eth.v1alpha1.Attestation - 11, // 98: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.deposits:type_name -> ethereum.eth.v1alpha1.Deposit - 13, // 99: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit - 19, // 100: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate - 67, // 101: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderCapella - 65, // 102: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange - 38, // 103: ethereum.eth.v1alpha1.SignedBlindedBeaconBlockDeneb.message:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockDeneb - 39, // 104: ethereum.eth.v1alpha1.BlindedBeaconBlockDeneb.body:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb - 14, // 105: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 8, // 106: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing - 9, // 107: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing - 60, // 108: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.attestations:type_name -> ethereum.eth.v1alpha1.Attestation - 11, // 109: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.deposits:type_name -> ethereum.eth.v1alpha1.Deposit - 13, // 110: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit - 19, // 111: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate - 68, // 112: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb - 65, // 113: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange - 42, // 114: ethereum.eth.v1alpha1.SignedBeaconBlockContentsElectra.block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockElectra - 43, // 115: ethereum.eth.v1alpha1.BeaconBlockContentsElectra.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockElectra - 43, // 116: ethereum.eth.v1alpha1.SignedBeaconBlockElectra.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockElectra - 44, // 117: ethereum.eth.v1alpha1.BeaconBlockElectra.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyElectra - 14, // 118: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 8, // 119: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing - 10, // 120: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashingElectra - 69, // 121: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.attestations:type_name -> ethereum.eth.v1alpha1.AttestationElectra - 11, // 122: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.deposits:type_name -> ethereum.eth.v1alpha1.Deposit - 13, // 123: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit - 19, // 124: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate - 64, // 125: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.execution_payload:type_name -> ethereum.engine.v1.ExecutionPayloadDeneb - 65, // 126: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange - 70, // 127: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.execution_requests:type_name -> ethereum.engine.v1.ExecutionRequests - 46, // 128: ethereum.eth.v1alpha1.SignedBlindedBeaconBlockElectra.message:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockElectra - 47, // 129: ethereum.eth.v1alpha1.BlindedBeaconBlockElectra.body:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra - 14, // 130: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 8, // 131: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing - 10, // 132: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashingElectra - 69, // 133: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.attestations:type_name -> ethereum.eth.v1alpha1.AttestationElectra - 11, // 134: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.deposits:type_name -> ethereum.eth.v1alpha1.Deposit - 13, // 135: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit - 19, // 136: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate - 68, // 137: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb - 65, // 138: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange - 70, // 139: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.execution_requests:type_name -> ethereum.engine.v1.ExecutionRequests - 50, // 140: ethereum.eth.v1alpha1.SignedValidatorRegistrationsV1.messages:type_name -> ethereum.eth.v1alpha1.SignedValidatorRegistrationV1 - 48, // 141: ethereum.eth.v1alpha1.SignedValidatorRegistrationV1.message:type_name -> ethereum.eth.v1alpha1.ValidatorRegistrationV1 - 63, // 142: ethereum.eth.v1alpha1.BuilderBid.header:type_name -> ethereum.engine.v1.ExecutionPayloadHeader - 51, // 143: ethereum.eth.v1alpha1.SignedBuilderBid.message:type_name -> ethereum.eth.v1alpha1.BuilderBid - 67, // 144: ethereum.eth.v1alpha1.BuilderBidCapella.header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderCapella - 53, // 145: ethereum.eth.v1alpha1.SignedBuilderBidCapella.message:type_name -> ethereum.eth.v1alpha1.BuilderBidCapella - 68, // 146: ethereum.eth.v1alpha1.BuilderBidDeneb.header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb - 55, // 147: ethereum.eth.v1alpha1.SignedBuilderBidDeneb.message:type_name -> ethereum.eth.v1alpha1.BuilderBidDeneb - 16, // 148: ethereum.eth.v1alpha1.BlobSidecar.signed_block_header:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockHeader - 57, // 149: ethereum.eth.v1alpha1.BlobSidecars.sidecars:type_name -> ethereum.eth.v1alpha1.BlobSidecar - 150, // [150:150] is the sub-list for method output_type - 150, // [150:150] is the sub-list for method input_type - 150, // [150:150] is the sub-list for extension type_name - 150, // [150:150] is the sub-list for extension extendee - 0, // [0:150] is the sub-list for field type_name + 61, // 10: ethereum.eth.v1alpha1.GenericSignedBeaconBlock.epbs:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockEpbs + 2, // 11: ethereum.eth.v1alpha1.GenericBeaconBlock.phase0:type_name -> ethereum.eth.v1alpha1.BeaconBlock + 4, // 12: ethereum.eth.v1alpha1.GenericBeaconBlock.altair:type_name -> ethereum.eth.v1alpha1.BeaconBlockAltair + 21, // 13: ethereum.eth.v1alpha1.GenericBeaconBlock.bellatrix:type_name -> ethereum.eth.v1alpha1.BeaconBlockBellatrix + 24, // 14: ethereum.eth.v1alpha1.GenericBeaconBlock.blinded_bellatrix:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockBellatrix + 32, // 15: ethereum.eth.v1alpha1.GenericBeaconBlock.capella:type_name -> ethereum.eth.v1alpha1.BeaconBlockCapella + 35, // 16: ethereum.eth.v1alpha1.GenericBeaconBlock.blinded_capella:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockCapella + 27, // 17: ethereum.eth.v1alpha1.GenericBeaconBlock.deneb:type_name -> ethereum.eth.v1alpha1.BeaconBlockContentsDeneb + 38, // 18: ethereum.eth.v1alpha1.GenericBeaconBlock.blinded_deneb:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockDeneb + 41, // 19: ethereum.eth.v1alpha1.GenericBeaconBlock.electra:type_name -> ethereum.eth.v1alpha1.BeaconBlockContentsElectra + 46, // 20: ethereum.eth.v1alpha1.GenericBeaconBlock.blinded_electra:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockElectra + 59, // 21: ethereum.eth.v1alpha1.GenericBeaconBlock.epbs:type_name -> ethereum.eth.v1alpha1.BeaconBlockEpbs + 6, // 22: ethereum.eth.v1alpha1.BeaconBlock.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBody + 2, // 23: ethereum.eth.v1alpha1.SignedBeaconBlock.block:type_name -> ethereum.eth.v1alpha1.BeaconBlock + 7, // 24: ethereum.eth.v1alpha1.BeaconBlockAltair.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyAltair + 4, // 25: ethereum.eth.v1alpha1.SignedBeaconBlockAltair.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockAltair + 14, // 26: ethereum.eth.v1alpha1.BeaconBlockBody.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 8, // 27: ethereum.eth.v1alpha1.BeaconBlockBody.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing + 9, // 28: ethereum.eth.v1alpha1.BeaconBlockBody.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing + 63, // 29: ethereum.eth.v1alpha1.BeaconBlockBody.attestations:type_name -> ethereum.eth.v1alpha1.Attestation + 11, // 30: ethereum.eth.v1alpha1.BeaconBlockBody.deposits:type_name -> ethereum.eth.v1alpha1.Deposit + 13, // 31: ethereum.eth.v1alpha1.BeaconBlockBody.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit + 14, // 32: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 8, // 33: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing + 9, // 34: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing + 63, // 35: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.attestations:type_name -> ethereum.eth.v1alpha1.Attestation + 11, // 36: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.deposits:type_name -> ethereum.eth.v1alpha1.Deposit + 13, // 37: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit + 19, // 38: ethereum.eth.v1alpha1.BeaconBlockBodyAltair.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 16, // 39: ethereum.eth.v1alpha1.ProposerSlashing.header_1:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockHeader + 16, // 40: ethereum.eth.v1alpha1.ProposerSlashing.header_2:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockHeader + 17, // 41: ethereum.eth.v1alpha1.AttesterSlashing.attestation_1:type_name -> ethereum.eth.v1alpha1.IndexedAttestation + 17, // 42: ethereum.eth.v1alpha1.AttesterSlashing.attestation_2:type_name -> ethereum.eth.v1alpha1.IndexedAttestation + 18, // 43: ethereum.eth.v1alpha1.AttesterSlashingElectra.attestation_1:type_name -> ethereum.eth.v1alpha1.IndexedAttestationElectra + 18, // 44: ethereum.eth.v1alpha1.AttesterSlashingElectra.attestation_2:type_name -> ethereum.eth.v1alpha1.IndexedAttestationElectra + 62, // 45: ethereum.eth.v1alpha1.Deposit.data:type_name -> ethereum.eth.v1alpha1.Deposit.Data + 12, // 46: ethereum.eth.v1alpha1.SignedVoluntaryExit.exit:type_name -> ethereum.eth.v1alpha1.VoluntaryExit + 15, // 47: ethereum.eth.v1alpha1.SignedBeaconBlockHeader.header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader + 64, // 48: ethereum.eth.v1alpha1.IndexedAttestation.data:type_name -> ethereum.eth.v1alpha1.AttestationData + 64, // 49: ethereum.eth.v1alpha1.IndexedAttestationElectra.data:type_name -> ethereum.eth.v1alpha1.AttestationData + 21, // 50: ethereum.eth.v1alpha1.SignedBeaconBlockBellatrix.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockBellatrix + 22, // 51: ethereum.eth.v1alpha1.BeaconBlockBellatrix.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix + 14, // 52: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 8, // 53: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing + 9, // 54: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing + 63, // 55: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.attestations:type_name -> ethereum.eth.v1alpha1.Attestation + 11, // 56: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.deposits:type_name -> ethereum.eth.v1alpha1.Deposit + 13, // 57: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit + 19, // 58: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 65, // 59: ethereum.eth.v1alpha1.BeaconBlockBodyBellatrix.execution_payload:type_name -> ethereum.engine.v1.ExecutionPayload + 24, // 60: ethereum.eth.v1alpha1.SignedBlindedBeaconBlockBellatrix.block:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockBellatrix + 25, // 61: ethereum.eth.v1alpha1.BlindedBeaconBlockBellatrix.body:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix + 14, // 62: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 8, // 63: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing + 9, // 64: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing + 63, // 65: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.attestations:type_name -> ethereum.eth.v1alpha1.Attestation + 11, // 66: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.deposits:type_name -> ethereum.eth.v1alpha1.Deposit + 13, // 67: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit + 19, // 68: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 66, // 69: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyBellatrix.execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeader + 28, // 70: ethereum.eth.v1alpha1.SignedBeaconBlockContentsDeneb.block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockDeneb + 29, // 71: ethereum.eth.v1alpha1.BeaconBlockContentsDeneb.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockDeneb + 29, // 72: ethereum.eth.v1alpha1.SignedBeaconBlockDeneb.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockDeneb + 30, // 73: ethereum.eth.v1alpha1.BeaconBlockDeneb.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyDeneb + 14, // 74: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 8, // 75: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing + 9, // 76: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing + 63, // 77: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.attestations:type_name -> ethereum.eth.v1alpha1.Attestation + 11, // 78: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.deposits:type_name -> ethereum.eth.v1alpha1.Deposit + 13, // 79: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit + 19, // 80: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 67, // 81: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.execution_payload:type_name -> ethereum.engine.v1.ExecutionPayloadDeneb + 68, // 82: ethereum.eth.v1alpha1.BeaconBlockBodyDeneb.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange + 32, // 83: ethereum.eth.v1alpha1.SignedBeaconBlockCapella.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockCapella + 33, // 84: ethereum.eth.v1alpha1.BeaconBlockCapella.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyCapella + 14, // 85: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 8, // 86: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing + 9, // 87: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing + 63, // 88: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.attestations:type_name -> ethereum.eth.v1alpha1.Attestation + 11, // 89: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.deposits:type_name -> ethereum.eth.v1alpha1.Deposit + 13, // 90: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit + 19, // 91: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 69, // 92: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.execution_payload:type_name -> ethereum.engine.v1.ExecutionPayloadCapella + 68, // 93: ethereum.eth.v1alpha1.BeaconBlockBodyCapella.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange + 35, // 94: ethereum.eth.v1alpha1.SignedBlindedBeaconBlockCapella.block:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockCapella + 36, // 95: ethereum.eth.v1alpha1.BlindedBeaconBlockCapella.body:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella + 14, // 96: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 8, // 97: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing + 9, // 98: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing + 63, // 99: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.attestations:type_name -> ethereum.eth.v1alpha1.Attestation + 11, // 100: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.deposits:type_name -> ethereum.eth.v1alpha1.Deposit + 13, // 101: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit + 19, // 102: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 70, // 103: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderCapella + 68, // 104: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyCapella.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange + 38, // 105: ethereum.eth.v1alpha1.SignedBlindedBeaconBlockDeneb.message:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockDeneb + 39, // 106: ethereum.eth.v1alpha1.BlindedBeaconBlockDeneb.body:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb + 14, // 107: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 8, // 108: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing + 9, // 109: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashing + 63, // 110: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.attestations:type_name -> ethereum.eth.v1alpha1.Attestation + 11, // 111: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.deposits:type_name -> ethereum.eth.v1alpha1.Deposit + 13, // 112: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit + 19, // 113: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 71, // 114: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb + 68, // 115: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyDeneb.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange + 42, // 116: ethereum.eth.v1alpha1.SignedBeaconBlockContentsElectra.block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockElectra + 43, // 117: ethereum.eth.v1alpha1.BeaconBlockContentsElectra.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockElectra + 43, // 118: ethereum.eth.v1alpha1.SignedBeaconBlockElectra.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockElectra + 44, // 119: ethereum.eth.v1alpha1.BeaconBlockElectra.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyElectra + 14, // 120: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 8, // 121: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing + 10, // 122: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashingElectra + 72, // 123: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.attestations:type_name -> ethereum.eth.v1alpha1.AttestationElectra + 11, // 124: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.deposits:type_name -> ethereum.eth.v1alpha1.Deposit + 13, // 125: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit + 19, // 126: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 67, // 127: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.execution_payload:type_name -> ethereum.engine.v1.ExecutionPayloadDeneb + 68, // 128: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange + 73, // 129: ethereum.eth.v1alpha1.BeaconBlockBodyElectra.execution_requests:type_name -> ethereum.engine.v1.ExecutionRequests + 46, // 130: ethereum.eth.v1alpha1.SignedBlindedBeaconBlockElectra.message:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockElectra + 47, // 131: ethereum.eth.v1alpha1.BlindedBeaconBlockElectra.body:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra + 14, // 132: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 8, // 133: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing + 10, // 134: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashingElectra + 72, // 135: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.attestations:type_name -> ethereum.eth.v1alpha1.AttestationElectra + 11, // 136: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.deposits:type_name -> ethereum.eth.v1alpha1.Deposit + 13, // 137: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit + 19, // 138: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 71, // 139: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb + 68, // 140: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange + 73, // 141: ethereum.eth.v1alpha1.BlindedBeaconBlockBodyElectra.execution_requests:type_name -> ethereum.engine.v1.ExecutionRequests + 50, // 142: ethereum.eth.v1alpha1.SignedValidatorRegistrationsV1.messages:type_name -> ethereum.eth.v1alpha1.SignedValidatorRegistrationV1 + 48, // 143: ethereum.eth.v1alpha1.SignedValidatorRegistrationV1.message:type_name -> ethereum.eth.v1alpha1.ValidatorRegistrationV1 + 66, // 144: ethereum.eth.v1alpha1.BuilderBid.header:type_name -> ethereum.engine.v1.ExecutionPayloadHeader + 51, // 145: ethereum.eth.v1alpha1.SignedBuilderBid.message:type_name -> ethereum.eth.v1alpha1.BuilderBid + 70, // 146: ethereum.eth.v1alpha1.BuilderBidCapella.header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderCapella + 53, // 147: ethereum.eth.v1alpha1.SignedBuilderBidCapella.message:type_name -> ethereum.eth.v1alpha1.BuilderBidCapella + 71, // 148: ethereum.eth.v1alpha1.BuilderBidDeneb.header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb + 55, // 149: ethereum.eth.v1alpha1.SignedBuilderBidDeneb.message:type_name -> ethereum.eth.v1alpha1.BuilderBidDeneb + 16, // 150: ethereum.eth.v1alpha1.BlobSidecar.signed_block_header:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockHeader + 57, // 151: ethereum.eth.v1alpha1.BlobSidecars.sidecars:type_name -> ethereum.eth.v1alpha1.BlobSidecar + 60, // 152: ethereum.eth.v1alpha1.BeaconBlockEpbs.body:type_name -> ethereum.eth.v1alpha1.BeaconBlockBodyEpbs + 14, // 153: ethereum.eth.v1alpha1.BeaconBlockBodyEpbs.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 8, // 154: ethereum.eth.v1alpha1.BeaconBlockBodyEpbs.proposer_slashings:type_name -> ethereum.eth.v1alpha1.ProposerSlashing + 10, // 155: ethereum.eth.v1alpha1.BeaconBlockBodyEpbs.attester_slashings:type_name -> ethereum.eth.v1alpha1.AttesterSlashingElectra + 72, // 156: ethereum.eth.v1alpha1.BeaconBlockBodyEpbs.attestations:type_name -> ethereum.eth.v1alpha1.AttestationElectra + 11, // 157: ethereum.eth.v1alpha1.BeaconBlockBodyEpbs.deposits:type_name -> ethereum.eth.v1alpha1.Deposit + 13, // 158: ethereum.eth.v1alpha1.BeaconBlockBodyEpbs.voluntary_exits:type_name -> ethereum.eth.v1alpha1.SignedVoluntaryExit + 19, // 159: ethereum.eth.v1alpha1.BeaconBlockBodyEpbs.sync_aggregate:type_name -> ethereum.eth.v1alpha1.SyncAggregate + 68, // 160: ethereum.eth.v1alpha1.BeaconBlockBodyEpbs.bls_to_execution_changes:type_name -> ethereum.eth.v1alpha1.SignedBLSToExecutionChange + 74, // 161: ethereum.eth.v1alpha1.BeaconBlockBodyEpbs.signed_execution_payload_header:type_name -> ethereum.engine.v1.SignedExecutionPayloadHeader + 75, // 162: ethereum.eth.v1alpha1.BeaconBlockBodyEpbs.payload_attestations:type_name -> ethereum.eth.v1alpha1.PayloadAttestation + 59, // 163: ethereum.eth.v1alpha1.SignedBeaconBlockEpbs.block:type_name -> ethereum.eth.v1alpha1.BeaconBlockEpbs + 164, // [164:164] is the sub-list for method output_type + 164, // [164:164] is the sub-list for method input_type + 164, // [164:164] is the sub-list for extension type_name + 164, // [164:164] is the sub-list for extension extendee + 0, // [0:164] is the sub-list for field type_name } func init() { file_proto_prysm_v1alpha1_beacon_block_proto_init() } @@ -6306,6 +6731,7 @@ func file_proto_prysm_v1alpha1_beacon_block_proto_init() { return } file_proto_prysm_v1alpha1_attestation_proto_init() + file_proto_prysm_v1alpha1_payload_attestation_proto_init() file_proto_prysm_v1alpha1_withdrawals_proto_init() if !protoimpl.UnsafeEnabled { file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { @@ -7017,6 +7443,42 @@ func file_proto_prysm_v1alpha1_beacon_block_proto_init() { } } file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BeaconBlockEpbs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BeaconBlockBodyEpbs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedBeaconBlockEpbs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Deposit_Data); i { case 0: return &v.state @@ -7040,6 +7502,7 @@ func file_proto_prysm_v1alpha1_beacon_block_proto_init() { (*GenericSignedBeaconBlock_BlindedDeneb)(nil), (*GenericSignedBeaconBlock_Electra)(nil), (*GenericSignedBeaconBlock_BlindedElectra)(nil), + (*GenericSignedBeaconBlock_Epbs)(nil), } file_proto_prysm_v1alpha1_beacon_block_proto_msgTypes[1].OneofWrappers = []interface{}{ (*GenericBeaconBlock_Phase0)(nil), @@ -7052,6 +7515,7 @@ func file_proto_prysm_v1alpha1_beacon_block_proto_init() { (*GenericBeaconBlock_BlindedDeneb)(nil), (*GenericBeaconBlock_Electra)(nil), (*GenericBeaconBlock_BlindedElectra)(nil), + (*GenericBeaconBlock_Epbs)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -7059,7 +7523,7 @@ func file_proto_prysm_v1alpha1_beacon_block_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_prysm_v1alpha1_beacon_block_proto_rawDesc, NumEnums: 0, - NumMessages: 60, + NumMessages: 63, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/prysm/v1alpha1/beacon_block.proto b/proto/prysm/v1alpha1/beacon_block.proto index 4afcd0cf6860..a6a7a7685f0d 100644 --- a/proto/prysm/v1alpha1/beacon_block.proto +++ b/proto/prysm/v1alpha1/beacon_block.proto @@ -17,9 +17,11 @@ package ethereum.eth.v1alpha1; import "proto/eth/ext/options.proto"; import "proto/prysm/v1alpha1/attestation.proto"; +import "proto/prysm/v1alpha1/payload_attestation.proto"; import "proto/prysm/v1alpha1/withdrawals.proto"; import "proto/engine/v1/execution_engine.proto"; import "proto/engine/v1/electra.proto"; +import "proto/engine/v1/epbs.proto"; option csharp_namespace = "Ethereum.Eth.v1alpha1"; option go_package = "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1;eth"; @@ -59,6 +61,8 @@ message GenericSignedBeaconBlock { // Representing a signed, post-Electra fork blinded beacon block. SignedBlindedBeaconBlockElectra blinded_electra = 10; + // Representing a signed ePBS block + SignedBeaconBlockEpbs epbs = 11; } bool is_blinded = 100; reserved 101; // Deprecated fields @@ -84,7 +88,7 @@ message GenericBeaconBlock { // Representing a post-Capella fork blinded beacon block. BlindedBeaconBlockCapella blinded_capella = 6; - // Representing a signed, post-Deneb fork beacon block content. + // Representing a post-Deneb fork beacon block. BeaconBlockContentsDeneb deneb = 7; // Representing a post-Deneb fork blinded beacon block. @@ -95,6 +99,8 @@ message GenericBeaconBlock { // Representing a post-Electra fork blinded beacon block. BlindedBeaconBlockElectra blinded_electra = 10; + // ePBS block + BeaconBlockEpbs epbs = 11; } bool is_blinded = 100; string payload_value = 101; @@ -955,3 +961,70 @@ message BlobSidecar { message BlobSidecars { repeated BlobSidecar sidecars = 1 [(ethereum.eth.ext.ssz_max) = "max_blobs_per_block.size"]; } + +message BeaconBlockEpbs { + // Beacon chain slot that this block represents. + uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; + + // Validator index of the validator that proposed the block header. + uint64 proposer_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; + + // 32 byte root of the parent block. + bytes parent_root = 3 [(ethereum.eth.ext.ssz_size) = "32"]; + + // 32 byte root of the resulting state after processing this block. + bytes state_root = 4 [(ethereum.eth.ext.ssz_size) = "32"]; + + // The beacon block body. + BeaconBlockBodyEpbs body = 5; +} + +message BeaconBlockBodyEpbs { + // The validators RANDAO reveal 96 byte value. + bytes randao_reveal = 1 [(ethereum.eth.ext.ssz_size) = "96"]; + + // A reference to the Ethereum 1.x chain. + Eth1Data eth1_data = 2; + + // 32 byte field of arbitrary data. This field may contain any data and + // is not used for anything other than a fun message. + bytes graffiti = 3 [(ethereum.eth.ext.ssz_size) = "32"]; + + // Block operations + // Refer to spec constants at https://github.com/ethereum/consensus-specs/blob/dev/specs/core/0_beacon-chain.md#max-operations-per-block + + // At most MAX_PROPOSER_SLASHINGS. + repeated ProposerSlashing proposer_slashings = 4 [(ethereum.eth.ext.ssz_max) = "16"]; + + // At most MAX_ATTESTER_SLASHINGS. + repeated AttesterSlashingElectra attester_slashings = 5 [(ethereum.eth.ext.ssz_max) = "2"]; + + // At most MAX_ATTESTATIONS. + repeated AttestationElectra attestations = 6 [(ethereum.eth.ext.ssz_max) = "128"]; + + // At most MAX_DEPOSITS. + repeated Deposit deposits = 7 [(ethereum.eth.ext.ssz_max) = "16"]; + + // At most MAX_VOLUNTARY_EXITS. + repeated SignedVoluntaryExit voluntary_exits = 8 [(ethereum.eth.ext.ssz_max) = "16"]; + + // Sync aggregate object for the beacon chain to track sync committee votes. New in Altair network upgrade. + SyncAggregate sync_aggregate = 9; + + // At most MAX_BLS_TO_EXECUTION_CHANGES. New in Capella network upgrade. + repeated SignedBLSToExecutionChange bls_to_execution_changes = 10 [(ethereum.eth.ext.ssz_max) = "16"]; + + // Signed execution payload header envelope. New in ePBS + ethereum.engine.v1.SignedExecutionPayloadHeader signed_execution_payload_header = 11; + + // Payload attestations. New in ePBS + repeated PayloadAttestation payload_attestations = 12 [(ethereum.eth.ext.ssz_max) = "payload_attestation.size"]; +} + +message SignedBeaconBlockEpbs { + // The unsigned beacon block itself. + BeaconBlockEpbs block = 1; + + // 96 byte BLS signature from the validator that produced this block. + bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"]; +} diff --git a/proto/prysm/v1alpha1/beacon_state.pb.go b/proto/prysm/v1alpha1/beacon_state.pb.go index a9bd001c7244..ff78a016970b 100755 --- a/proto/prysm/v1alpha1/beacon_state.pb.go +++ b/proto/prysm/v1alpha1/beacon_state.pb.go @@ -2169,6 +2169,365 @@ func (x *BeaconStateElectra) GetPendingConsolidations() []*PendingConsolidation return nil } +type BeaconStateEPBS struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GenesisTime uint64 `protobuf:"varint,1001,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` + GenesisValidatorsRoot []byte `protobuf:"bytes,1002,opt,name=genesis_validators_root,json=genesisValidatorsRoot,proto3" json:"genesis_validators_root,omitempty" ssz-size:"32"` + Slot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,1003,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` + Fork *Fork `protobuf:"bytes,1004,opt,name=fork,proto3" json:"fork,omitempty"` + LatestBlockHeader *BeaconBlockHeader `protobuf:"bytes,2001,opt,name=latest_block_header,json=latestBlockHeader,proto3" json:"latest_block_header,omitempty"` + BlockRoots [][]byte `protobuf:"bytes,2002,rep,name=block_roots,json=blockRoots,proto3" json:"block_roots,omitempty" ssz-size:"8192,32"` + StateRoots [][]byte `protobuf:"bytes,2003,rep,name=state_roots,json=stateRoots,proto3" json:"state_roots,omitempty" ssz-size:"8192,32"` + HistoricalRoots [][]byte `protobuf:"bytes,2004,rep,name=historical_roots,json=historicalRoots,proto3" json:"historical_roots,omitempty" ssz-max:"16777216" ssz-size:"?,32"` + Eth1Data *Eth1Data `protobuf:"bytes,3001,opt,name=eth1_data,json=eth1Data,proto3" json:"eth1_data,omitempty"` + Eth1DataVotes []*Eth1Data `protobuf:"bytes,3002,rep,name=eth1_data_votes,json=eth1DataVotes,proto3" json:"eth1_data_votes,omitempty" ssz-max:"2048"` + Eth1DepositIndex uint64 `protobuf:"varint,3003,opt,name=eth1_deposit_index,json=eth1DepositIndex,proto3" json:"eth1_deposit_index,omitempty"` + Validators []*Validator `protobuf:"bytes,4001,rep,name=validators,proto3" json:"validators,omitempty" ssz-max:"1099511627776"` + Balances []uint64 `protobuf:"varint,4002,rep,packed,name=balances,proto3" json:"balances,omitempty" ssz-max:"1099511627776"` + RandaoMixes [][]byte `protobuf:"bytes,5001,rep,name=randao_mixes,json=randaoMixes,proto3" json:"randao_mixes,omitempty" ssz-size:"65536,32"` + Slashings []uint64 `protobuf:"varint,6001,rep,packed,name=slashings,proto3" json:"slashings,omitempty" ssz-size:"8192"` + PreviousEpochParticipation []byte `protobuf:"bytes,7001,opt,name=previous_epoch_participation,json=previousEpochParticipation,proto3" json:"previous_epoch_participation,omitempty" ssz-max:"1099511627776"` + CurrentEpochParticipation []byte `protobuf:"bytes,7002,opt,name=current_epoch_participation,json=currentEpochParticipation,proto3" json:"current_epoch_participation,omitempty" ssz-max:"1099511627776"` + JustificationBits github_com_prysmaticlabs_go_bitfield.Bitvector4 `protobuf:"bytes,8001,opt,name=justification_bits,json=justificationBits,proto3" json:"justification_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitvector4" ssz-size:"1"` + PreviousJustifiedCheckpoint *Checkpoint `protobuf:"bytes,8002,opt,name=previous_justified_checkpoint,json=previousJustifiedCheckpoint,proto3" json:"previous_justified_checkpoint,omitempty"` + CurrentJustifiedCheckpoint *Checkpoint `protobuf:"bytes,8003,opt,name=current_justified_checkpoint,json=currentJustifiedCheckpoint,proto3" json:"current_justified_checkpoint,omitempty"` + FinalizedCheckpoint *Checkpoint `protobuf:"bytes,8004,opt,name=finalized_checkpoint,json=finalizedCheckpoint,proto3" json:"finalized_checkpoint,omitempty"` + InactivityScores []uint64 `protobuf:"varint,9001,rep,packed,name=inactivity_scores,json=inactivityScores,proto3" json:"inactivity_scores,omitempty" ssz-max:"1099511627776"` + CurrentSyncCommittee *SyncCommittee `protobuf:"bytes,9002,opt,name=current_sync_committee,json=currentSyncCommittee,proto3" json:"current_sync_committee,omitempty"` + NextSyncCommittee *SyncCommittee `protobuf:"bytes,9003,opt,name=next_sync_committee,json=nextSyncCommittee,proto3" json:"next_sync_committee,omitempty"` + LatestExecutionPayloadHeader *v1.ExecutionPayloadHeaderEPBS `protobuf:"bytes,10001,opt,name=latest_execution_payload_header,json=latestExecutionPayloadHeader,proto3" json:"latest_execution_payload_header,omitempty"` + NextWithdrawalIndex uint64 `protobuf:"varint,11001,opt,name=next_withdrawal_index,json=nextWithdrawalIndex,proto3" json:"next_withdrawal_index,omitempty"` + NextWithdrawalValidatorIndex github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex `protobuf:"varint,11002,opt,name=next_withdrawal_validator_index,json=nextWithdrawalValidatorIndex,proto3" json:"next_withdrawal_validator_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"` + HistoricalSummaries []*HistoricalSummary `protobuf:"bytes,11003,rep,name=historical_summaries,json=historicalSummaries,proto3" json:"historical_summaries,omitempty" ssz-max:"16777216"` + DepositRequestsStartIndex uint64 `protobuf:"varint,12001,opt,name=deposit_requests_start_index,json=depositRequestsStartIndex,proto3" json:"deposit_requests_start_index,omitempty"` + DepositBalanceToConsume github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Gwei `protobuf:"varint,12002,opt,name=deposit_balance_to_consume,json=depositBalanceToConsume,proto3" json:"deposit_balance_to_consume,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Gwei"` + ExitBalanceToConsume github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Gwei `protobuf:"varint,12003,opt,name=exit_balance_to_consume,json=exitBalanceToConsume,proto3" json:"exit_balance_to_consume,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Gwei"` + EarliestExitEpoch github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Epoch `protobuf:"varint,12004,opt,name=earliest_exit_epoch,json=earliestExitEpoch,proto3" json:"earliest_exit_epoch,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Epoch"` + ConsolidationBalanceToConsume github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Gwei `protobuf:"varint,12005,opt,name=consolidation_balance_to_consume,json=consolidationBalanceToConsume,proto3" json:"consolidation_balance_to_consume,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Gwei"` + EarliestConsolidationEpoch github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Epoch `protobuf:"varint,12006,opt,name=earliest_consolidation_epoch,json=earliestConsolidationEpoch,proto3" json:"earliest_consolidation_epoch,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Epoch"` + PendingDeposits []*PendingDeposit `protobuf:"bytes,12007,rep,name=pending_deposits,json=pendingDeposits,proto3" json:"pending_deposits,omitempty" ssz-max:"134217728"` + PendingPartialWithdrawals []*PendingPartialWithdrawal `protobuf:"bytes,12008,rep,name=pending_partial_withdrawals,json=pendingPartialWithdrawals,proto3" json:"pending_partial_withdrawals,omitempty" ssz-max:"134217728"` + PendingConsolidations []*PendingConsolidation `protobuf:"bytes,12009,rep,name=pending_consolidations,json=pendingConsolidations,proto3" json:"pending_consolidations,omitempty" ssz-max:"262144"` + LatestBlockHash []byte `protobuf:"bytes,13001,opt,name=latest_block_hash,json=latestBlockHash,proto3" json:"latest_block_hash,omitempty" ssz-size:"32"` + LatestFullSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,13002,opt,name=latest_full_slot,json=latestFullSlot,proto3" json:"latest_full_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` + LastWithdrawalsRoot []byte `protobuf:"bytes,13003,opt,name=last_withdrawals_root,json=lastWithdrawalsRoot,proto3" json:"last_withdrawals_root,omitempty" ssz-size:"32"` +} + +func (x *BeaconStateEPBS) Reset() { + *x = BeaconStateEPBS{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BeaconStateEPBS) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BeaconStateEPBS) ProtoMessage() {} + +func (x *BeaconStateEPBS) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[16] + 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 BeaconStateEPBS.ProtoReflect.Descriptor instead. +func (*BeaconStateEPBS) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_beacon_state_proto_rawDescGZIP(), []int{16} +} + +func (x *BeaconStateEPBS) GetGenesisTime() uint64 { + if x != nil { + return x.GenesisTime + } + return 0 +} + +func (x *BeaconStateEPBS) GetGenesisValidatorsRoot() []byte { + if x != nil { + return x.GenesisValidatorsRoot + } + return nil +} + +func (x *BeaconStateEPBS) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.Slot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +func (x *BeaconStateEPBS) GetFork() *Fork { + if x != nil { + return x.Fork + } + return nil +} + +func (x *BeaconStateEPBS) GetLatestBlockHeader() *BeaconBlockHeader { + if x != nil { + return x.LatestBlockHeader + } + return nil +} + +func (x *BeaconStateEPBS) GetBlockRoots() [][]byte { + if x != nil { + return x.BlockRoots + } + return nil +} + +func (x *BeaconStateEPBS) GetStateRoots() [][]byte { + if x != nil { + return x.StateRoots + } + return nil +} + +func (x *BeaconStateEPBS) GetHistoricalRoots() [][]byte { + if x != nil { + return x.HistoricalRoots + } + return nil +} + +func (x *BeaconStateEPBS) GetEth1Data() *Eth1Data { + if x != nil { + return x.Eth1Data + } + return nil +} + +func (x *BeaconStateEPBS) GetEth1DataVotes() []*Eth1Data { + if x != nil { + return x.Eth1DataVotes + } + return nil +} + +func (x *BeaconStateEPBS) GetEth1DepositIndex() uint64 { + if x != nil { + return x.Eth1DepositIndex + } + return 0 +} + +func (x *BeaconStateEPBS) GetValidators() []*Validator { + if x != nil { + return x.Validators + } + return nil +} + +func (x *BeaconStateEPBS) GetBalances() []uint64 { + if x != nil { + return x.Balances + } + return nil +} + +func (x *BeaconStateEPBS) GetRandaoMixes() [][]byte { + if x != nil { + return x.RandaoMixes + } + return nil +} + +func (x *BeaconStateEPBS) GetSlashings() []uint64 { + if x != nil { + return x.Slashings + } + return nil +} + +func (x *BeaconStateEPBS) GetPreviousEpochParticipation() []byte { + if x != nil { + return x.PreviousEpochParticipation + } + return nil +} + +func (x *BeaconStateEPBS) GetCurrentEpochParticipation() []byte { + if x != nil { + return x.CurrentEpochParticipation + } + return nil +} + +func (x *BeaconStateEPBS) GetJustificationBits() github_com_prysmaticlabs_go_bitfield.Bitvector4 { + if x != nil { + return x.JustificationBits + } + return github_com_prysmaticlabs_go_bitfield.Bitvector4(nil) +} + +func (x *BeaconStateEPBS) GetPreviousJustifiedCheckpoint() *Checkpoint { + if x != nil { + return x.PreviousJustifiedCheckpoint + } + return nil +} + +func (x *BeaconStateEPBS) GetCurrentJustifiedCheckpoint() *Checkpoint { + if x != nil { + return x.CurrentJustifiedCheckpoint + } + return nil +} + +func (x *BeaconStateEPBS) GetFinalizedCheckpoint() *Checkpoint { + if x != nil { + return x.FinalizedCheckpoint + } + return nil +} + +func (x *BeaconStateEPBS) GetInactivityScores() []uint64 { + if x != nil { + return x.InactivityScores + } + return nil +} + +func (x *BeaconStateEPBS) GetCurrentSyncCommittee() *SyncCommittee { + if x != nil { + return x.CurrentSyncCommittee + } + return nil +} + +func (x *BeaconStateEPBS) GetNextSyncCommittee() *SyncCommittee { + if x != nil { + return x.NextSyncCommittee + } + return nil +} + +func (x *BeaconStateEPBS) GetLatestExecutionPayloadHeader() *v1.ExecutionPayloadHeaderEPBS { + if x != nil { + return x.LatestExecutionPayloadHeader + } + return nil +} + +func (x *BeaconStateEPBS) GetNextWithdrawalIndex() uint64 { + if x != nil { + return x.NextWithdrawalIndex + } + return 0 +} + +func (x *BeaconStateEPBS) GetNextWithdrawalValidatorIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { + if x != nil { + return x.NextWithdrawalValidatorIndex + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(0) +} + +func (x *BeaconStateEPBS) GetHistoricalSummaries() []*HistoricalSummary { + if x != nil { + return x.HistoricalSummaries + } + return nil +} + +func (x *BeaconStateEPBS) GetDepositRequestsStartIndex() uint64 { + if x != nil { + return x.DepositRequestsStartIndex + } + return 0 +} + +func (x *BeaconStateEPBS) GetDepositBalanceToConsume() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Gwei { + if x != nil { + return x.DepositBalanceToConsume + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Gwei(0) +} + +func (x *BeaconStateEPBS) GetExitBalanceToConsume() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Gwei { + if x != nil { + return x.ExitBalanceToConsume + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Gwei(0) +} + +func (x *BeaconStateEPBS) GetEarliestExitEpoch() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Epoch { + if x != nil { + return x.EarliestExitEpoch + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Epoch(0) +} + +func (x *BeaconStateEPBS) GetConsolidationBalanceToConsume() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Gwei { + if x != nil { + return x.ConsolidationBalanceToConsume + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Gwei(0) +} + +func (x *BeaconStateEPBS) GetEarliestConsolidationEpoch() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Epoch { + if x != nil { + return x.EarliestConsolidationEpoch + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Epoch(0) +} + +func (x *BeaconStateEPBS) GetPendingDeposits() []*PendingDeposit { + if x != nil { + return x.PendingDeposits + } + return nil +} + +func (x *BeaconStateEPBS) GetPendingPartialWithdrawals() []*PendingPartialWithdrawal { + if x != nil { + return x.PendingPartialWithdrawals + } + return nil +} + +func (x *BeaconStateEPBS) GetPendingConsolidations() []*PendingConsolidation { + if x != nil { + return x.PendingConsolidations + } + return nil +} + +func (x *BeaconStateEPBS) GetLatestBlockHash() []byte { + if x != nil { + return x.LatestBlockHash + } + return nil +} + +func (x *BeaconStateEPBS) GetLatestFullSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.LatestFullSlot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +func (x *BeaconStateEPBS) GetLastWithdrawalsRoot() []byte { + if x != nil { + return x.LastWithdrawalsRoot + } + return nil +} + type PowBlock struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2182,7 +2541,7 @@ type PowBlock struct { func (x *PowBlock) Reset() { *x = PowBlock{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[16] + mi := &file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2195,7 +2554,7 @@ func (x *PowBlock) String() string { func (*PowBlock) ProtoMessage() {} func (x *PowBlock) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[16] + mi := &file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2208,7 +2567,7 @@ func (x *PowBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use PowBlock.ProtoReflect.Descriptor instead. func (*PowBlock) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_beacon_state_proto_rawDescGZIP(), []int{16} + return file_proto_prysm_v1alpha1_beacon_state_proto_rawDescGZIP(), []int{17} } func (x *PowBlock) GetBlockHash() []byte { @@ -2244,7 +2603,7 @@ type HistoricalSummary struct { func (x *HistoricalSummary) Reset() { *x = HistoricalSummary{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[17] + mi := &file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2257,7 +2616,7 @@ func (x *HistoricalSummary) String() string { func (*HistoricalSummary) ProtoMessage() {} func (x *HistoricalSummary) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[17] + mi := &file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2270,7 +2629,7 @@ func (x *HistoricalSummary) ProtoReflect() protoreflect.Message { // Deprecated: Use HistoricalSummary.ProtoReflect.Descriptor instead. func (*HistoricalSummary) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_beacon_state_proto_rawDescGZIP(), []int{17} + return file_proto_prysm_v1alpha1_beacon_state_proto_rawDescGZIP(), []int{18} } func (x *HistoricalSummary) GetBlockSummaryRoot() []byte { @@ -2304,324 +2663,579 @@ var file_proto_prysm_v1alpha1_beacon_state_proto_rawDesc = []byte{ 0x72, 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, - 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, 0x23, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2f, 0x65, 0x69, 0x70, 0x5f, 0x37, 0x32, 0x35, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x97, 0x0c, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, - 0x15, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x5a, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0xeb, - 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x65, 0x70, 0x62, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0x23, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x65, + 0x69, 0x70, 0x5f, 0x37, 0x32, 0x35, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x0c, + 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, + 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0xe9, 0x07, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x3f, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0xea, 0x07, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x15, 0x67, 0x65, 0x6e, + 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x6f, + 0x6f, 0x74, 0x12, 0x5a, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0xeb, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x30, + 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, 0x66, 0x6f, 0x72, 0x6b, + 0x12, 0x59, 0x0a, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0xd1, 0x0f, 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, 0x11, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd2, 0x0f, 0x20, 0x03, 0x28, + 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd3, 0x0f, 0x20, 0x03, 0x28, 0x0c, + 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x10, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd4, 0x0f, + 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x33, 0x32, 0x92, 0xb5, + 0x18, 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x0f, 0x68, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x65, + 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0xb9, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x0f, 0x65, 0x74, + 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0xba, 0x17, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, + 0x31, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x32, 0x30, 0x34, 0x38, 0x52, + 0x0d, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x2d, + 0x0a, 0x12, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0xbb, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x65, 0x74, 0x68, + 0x31, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x54, 0x0a, + 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0xa1, 0x1f, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, + 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, + 0xa2, 0x1f, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, + 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x6d, 0x69, + 0x78, 0x65, 0x73, 0x18, 0x89, 0x27, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0c, 0x8a, 0xb5, 0x18, 0x08, + 0x36, 0x35, 0x35, 0x33, 0x36, 0x2c, 0x33, 0x32, 0x52, 0x0b, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, + 0x4d, 0x69, 0x78, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0xf1, 0x2e, 0x20, 0x03, 0x28, 0x04, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x38, + 0x31, 0x39, 0x32, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x74, + 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd9, 0x36, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x08, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x19, 0x70, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0xda, 0x36, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x18, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x68, 0x0a, 0x12, 0x6a, 0x75, 0x73, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0xc1, + 0x3e, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x82, 0xb5, 0x18, 0x2f, 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, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, - 0x66, 0x6f, 0x72, 0x6b, 0x12, 0x59, 0x0a, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0xd1, 0x0f, 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, 0x11, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, - 0x2d, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd2, - 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, - 0x33, 0x32, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x2d, - 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd3, 0x0f, - 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, - 0x32, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x40, 0x0a, - 0x10, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x73, 0x18, 0xd4, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, - 0x33, 0x32, 0x92, 0xb5, 0x18, 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x0f, - 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, - 0x3d, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0xb9, 0x17, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, - 0x0a, 0x0f, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x76, 0x6f, 0x74, 0x65, - 0x73, 0x18, 0xba, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x32, - 0x30, 0x34, 0x38, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x56, 0x6f, 0x74, - 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xbb, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x10, 0x65, 0x74, 0x68, 0x31, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x54, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, - 0xa1, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, - 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x0a, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x73, 0x18, 0xa2, 0x1f, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, - 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x08, 0x62, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, - 0x6f, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x73, 0x18, 0x89, 0x27, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0c, - 0x8a, 0xb5, 0x18, 0x08, 0x36, 0x35, 0x35, 0x33, 0x36, 0x2c, 0x33, 0x32, 0x52, 0x0b, 0x72, 0x61, - 0x6e, 0x64, 0x61, 0x6f, 0x4d, 0x69, 0x78, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x09, 0x73, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0xf1, 0x2e, 0x20, 0x03, 0x28, 0x04, 0x42, 0x08, 0x8a, - 0xb5, 0x18, 0x04, 0x38, 0x31, 0x39, 0x32, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x74, 0x0a, 0x1b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0xd9, 0x36, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, 0x39, 0x36, 0x52, 0x19, 0x70, - 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x41, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x1a, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xda, 0x36, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x61, 0x62, 0x73, 0x2f, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, + 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, 0x8a, 0xb5, 0x18, 0x01, 0x31, 0x52, + 0x11, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, + 0x74, 0x73, 0x12, 0x66, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6a, + 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0xc2, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1b, 0x70, + 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x1c, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc3, 0x3e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x75, 0x73, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x12, 0x55, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc4, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0xd2, 0x0d, 0x0a, 0x11, 0x42, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x22, 0x0a, + 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0xe9, 0x07, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x3f, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0xea, 0x07, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x15, 0x67, 0x65, 0x6e, + 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x6f, + 0x6f, 0x74, 0x12, 0x5a, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0xeb, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x30, + 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x34, 0x30, - 0x39, 0x36, 0x52, 0x18, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x68, 0x0a, 0x12, - 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, - 0x74, 0x73, 0x18, 0xc1, 0x3e, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x82, 0xb5, 0x18, 0x2f, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, 0x8a, 0xb5, - 0x18, 0x01, 0x31, 0x52, 0x11, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x66, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, - 0x75, 0x73, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc2, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, 0x66, 0x6f, 0x72, 0x6b, + 0x12, 0x59, 0x0a, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0xd1, 0x0f, 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, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x1b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x64, - 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc3, - 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc4, 0x3e, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0xd2, 0x0d, 0x0a, 0x11, - 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x74, 0x61, 0x69, - 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, - 0x15, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x5a, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0xeb, - 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, + 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, 0x11, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd2, 0x0f, 0x20, 0x03, 0x28, + 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd3, 0x0f, 0x20, 0x03, 0x28, 0x0c, + 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x10, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd4, 0x0f, + 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x33, 0x32, 0x92, 0xb5, + 0x18, 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x0f, 0x68, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x65, + 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0xb9, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x0f, 0x65, 0x74, + 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0xba, 0x17, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, + 0x31, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x32, 0x30, 0x34, 0x38, 0x52, + 0x0d, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x2d, + 0x0a, 0x12, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0xbb, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x65, 0x74, 0x68, + 0x31, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x54, 0x0a, + 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0xa1, 0x1f, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, + 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, + 0xa2, 0x1f, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, + 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x6d, 0x69, + 0x78, 0x65, 0x73, 0x18, 0x89, 0x27, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0c, 0x8a, 0xb5, 0x18, 0x08, + 0x36, 0x35, 0x35, 0x33, 0x36, 0x2c, 0x33, 0x32, 0x52, 0x0b, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, + 0x4d, 0x69, 0x78, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0xf1, 0x2e, 0x20, 0x03, 0x28, 0x04, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x38, + 0x31, 0x39, 0x32, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x54, + 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xd9, + 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, + 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x1a, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, + 0x75, 0x73, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x1b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0xda, 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, + 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x19, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, + 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x12, 0x6a, 0x75, 0x73, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0xc1, + 0x3e, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x82, 0xb5, 0x18, 0x2f, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, + 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, 0x8a, 0xb5, 0x18, 0x01, 0x31, 0x52, + 0x11, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, + 0x74, 0x73, 0x12, 0x66, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6a, + 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0xc2, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1b, 0x70, + 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x1c, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc3, 0x3e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x75, 0x73, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x12, 0x55, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc4, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x11, 0x69, 0x6e, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, 0xa9, 0x46, 0x20, + 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, + 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x10, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, + 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x5b, 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, 0xaa, 0x46, 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, 0x55, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x79, + 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0xab, 0x46, 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, 0x22, 0xc6, 0x01, 0x0a, + 0x04, 0x46, 0x6f, 0x72, 0x6b, 0x12, 0x30, 0x0a, 0x10, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x05, 0x8a, 0xb5, 0x18, 0x01, 0x34, 0x52, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x05, 0x8a, 0xb5, 0x18, 0x01, 0x34, 0x52, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 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, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x9d, 0x03, 0x0a, 0x12, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x10, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x82, 0xb5, 0x18, 0x2c, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x2e, 0x42, 0x69, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x92, 0xb5, 0x18, 0x04, 0x32, 0x30, 0x34, 0x38, + 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, + 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x6e, 0x0a, + 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, + 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, 0x0e, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x76, 0x0a, + 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, - 0x66, 0x6f, 0x72, 0x6b, 0x12, 0x59, 0x0a, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0xd1, 0x0f, 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, 0x11, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, - 0x2d, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd2, - 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, - 0x33, 0x32, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x2d, - 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd3, 0x0f, - 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, - 0x32, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x40, 0x0a, - 0x10, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x73, 0x18, 0xd4, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, - 0x33, 0x32, 0x92, 0xb5, 0x18, 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x0f, - 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, - 0x3d, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0xb9, 0x17, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, - 0x0a, 0x0f, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x76, 0x6f, 0x74, 0x65, - 0x73, 0x18, 0xba, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x32, - 0x30, 0x34, 0x38, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x56, 0x6f, 0x74, - 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xbb, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x10, 0x65, 0x74, 0x68, 0x31, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x54, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, - 0xa1, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, - 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x0a, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x73, 0x18, 0xa2, 0x1f, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, - 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x08, 0x62, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, - 0x6f, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x73, 0x18, 0x89, 0x27, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0c, - 0x8a, 0xb5, 0x18, 0x08, 0x36, 0x35, 0x35, 0x33, 0x36, 0x2c, 0x33, 0x32, 0x52, 0x0b, 0x72, 0x61, - 0x6e, 0x64, 0x61, 0x6f, 0x4d, 0x69, 0x78, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x09, 0x73, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0xf1, 0x2e, 0x20, 0x03, 0x28, 0x04, 0x42, 0x08, 0x8a, - 0xb5, 0x18, 0x04, 0x38, 0x31, 0x39, 0x32, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x54, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0xd9, 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, - 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x1a, 0x70, 0x72, - 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, - 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x1b, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, - 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xda, 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, - 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, - 0x36, 0x52, 0x19, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, - 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x12, - 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, - 0x74, 0x73, 0x18, 0xc1, 0x3e, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x82, 0xb5, 0x18, 0x2f, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, 0x8a, 0xb5, - 0x18, 0x01, 0x31, 0x52, 0x11, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x66, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, - 0x75, 0x73, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc2, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x6d, 0x0a, 0x0f, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, + 0x63, 0x61, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, + 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, + 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x6f, 0x6f, 0x74, 0x73, 0x22, 0x7d, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x72, + 0x6f, 0x6f, 0x74, 0x22, 0x56, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x27, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, + 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1e, 0x0a, 0x06, 0x64, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, + 0x02, 0x33, 0x32, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x7a, 0x0a, 0x08, 0x46, + 0x6f, 0x72, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x05, 0x8a, 0xb5, 0x18, 0x01, 0x34, 0x52, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, + 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, + 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0xb7, 0x01, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x50, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x67, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, + 0x0a, 0x0e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, + 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x73, + 0x12, 0x2f, 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x1b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x64, - 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc3, - 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc4, 0x3e, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x11, 0x69, - 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, - 0x18, 0xa9, 0x46, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, - 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x10, 0x69, 0x6e, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x5b, 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, 0xaa, 0x46, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, 0x66, 0x6f, 0x72, + 0x6b, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, + 0x9a, 0xb5, 0x18, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x16, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x61, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x15, 0x77, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x68, 0x0a, 0x0d, + 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x24, 0x0a, + 0x07, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0a, + 0x8a, 0xb5, 0x18, 0x06, 0x35, 0x31, 0x32, 0x2c, 0x34, 0x38, 0x52, 0x07, 0x70, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x73, 0x12, 0x31, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, + 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0xa7, 0x01, 0x0a, 0x1b, 0x53, 0x79, 0x6e, 0x63, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, + 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, 0x04, 0x73, 0x6c, 0x6f, + 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x73, + 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x22, 0xc9, 0x0e, 0x0a, 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x65, 0x6e, + 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, + 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x5a, + 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0xeb, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x6f, + 0x72, 0x6b, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x12, 0x59, 0x0a, 0x13, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x18, 0xd1, 0x0f, 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, 0x11, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd2, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, + 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd3, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, + 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x10, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, + 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd4, 0x0f, 0x20, 0x03, 0x28, 0x0c, + 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x33, 0x32, 0x92, 0xb5, 0x18, 0x08, 0x31, 0x36, + 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x0f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, + 0x61, 0x6c, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0xb9, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, + 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x0f, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0xba, 0x17, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, + 0x61, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x32, 0x30, 0x34, 0x38, 0x52, 0x0d, 0x65, 0x74, 0x68, + 0x31, 0x44, 0x61, 0x74, 0x61, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x74, + 0x68, 0x31, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0xbb, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x65, 0x74, 0x68, 0x31, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x54, 0x0a, 0x0a, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0xa1, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, + 0x37, 0x37, 0x36, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, + 0x2e, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0xa2, 0x1f, 0x20, 0x03, + 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, + 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, + 0x30, 0x0a, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x73, 0x18, + 0x89, 0x27, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0c, 0x8a, 0xb5, 0x18, 0x08, 0x36, 0x35, 0x35, 0x33, + 0x36, 0x2c, 0x33, 0x32, 0x52, 0x0b, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x4d, 0x69, 0x78, 0x65, + 0x73, 0x12, 0x27, 0x0a, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0xf1, + 0x2e, 0x20, 0x03, 0x28, 0x04, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x38, 0x31, 0x39, 0x32, 0x52, + 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x54, 0x0a, 0x1c, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xd9, 0x36, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, + 0x37, 0x37, 0x37, 0x36, 0x52, 0x1a, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x45, 0x70, + 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x52, 0x0a, 0x1b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, + 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0xda, 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, + 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x19, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x12, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0xc1, 0x3e, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x38, 0x82, 0xb5, 0x18, 0x2f, 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, + 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, 0x8a, 0xb5, 0x18, 0x01, 0x31, 0x52, 0x11, 0x6a, 0x75, 0x73, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x66, + 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0xc2, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1b, 0x70, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc3, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 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, 0x55, 0x0a, 0x13, 0x6e, 0x65, 0x78, - 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, - 0x18, 0xab, 0x46, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x52, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x14, + 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc4, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, + 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x11, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, 0xa9, 0x46, 0x20, 0x03, 0x28, 0x04, 0x42, + 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, + 0x37, 0x36, 0x52, 0x10, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x63, + 0x6f, 0x72, 0x65, 0x73, 0x12, 0x5b, 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, 0xaa, + 0x46, 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, 0x55, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0xab, 0x46, 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, 0x72, 0x0a, 0x1f, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x74, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x91, 0x4e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 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, 0x52, 0x1c, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x89, 0x11, 0x0a, + 0x12, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x61, 0x70, 0x65, + 0x6c, 0x6c, 0x61, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, + 0x6f, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, + 0x32, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x5a, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, + 0x18, 0xeb, 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, 0x04, + 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x18, 0xec, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, + 0x52, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x12, 0x59, 0x0a, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0xd1, 0x0f, + 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, 0x11, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x2d, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, + 0x18, 0xd2, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, + 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x73, + 0x12, 0x2d, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, + 0xd3, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, + 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, + 0x40, 0x0a, 0x10, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x6f, + 0x6f, 0x74, 0x73, 0x18, 0xd4, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x04, + 0x3f, 0x2c, 0x33, 0x32, 0x92, 0xb5, 0x18, 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, + 0x52, 0x0f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x6f, 0x6f, 0x74, + 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0xb9, + 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, + 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x52, 0x0a, 0x0f, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x76, 0x6f, + 0x74, 0x65, 0x73, 0x18, 0xba, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x92, 0xb5, 0x18, + 0x04, 0x32, 0x30, 0x34, 0x38, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x56, + 0x6f, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xbb, 0x17, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x10, 0x65, 0x74, 0x68, 0x31, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x54, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x18, 0xa1, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, + 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x0a, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x62, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0xa2, 0x1f, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, + 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, + 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x0c, 0x72, 0x61, 0x6e, + 0x64, 0x61, 0x6f, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x73, 0x18, 0x89, 0x27, 0x20, 0x03, 0x28, 0x0c, + 0x42, 0x0c, 0x8a, 0xb5, 0x18, 0x08, 0x36, 0x35, 0x35, 0x33, 0x36, 0x2c, 0x33, 0x32, 0x52, 0x0b, + 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x4d, 0x69, 0x78, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x09, 0x73, + 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0xf1, 0x2e, 0x20, 0x03, 0x28, 0x04, 0x42, + 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x38, 0x31, 0x39, 0x32, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x54, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, + 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xd9, 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0x92, 0xb5, 0x18, + 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x1a, + 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, + 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x1b, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, + 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xda, 0x36, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, + 0x37, 0x37, 0x36, 0x52, 0x19, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, + 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, + 0x0a, 0x12, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x62, 0x69, 0x74, 0x73, 0x18, 0xc1, 0x3e, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x82, 0xb5, 0x18, + 0x2f, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, + 0x8a, 0xb5, 0x18, 0x01, 0x31, 0x52, 0x11, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x66, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x76, + 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc2, 0x3e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x1b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4a, 0x75, 0x73, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x12, 0x64, 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x73, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x18, 0xc3, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 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, - 0x22, 0xc6, 0x01, 0x0a, 0x04, 0x46, 0x6f, 0x72, 0x6b, 0x12, 0x30, 0x0a, 0x10, 0x70, 0x72, 0x65, - 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x05, 0x8a, 0xb5, 0x18, 0x01, 0x34, 0x52, 0x0f, 0x70, 0x72, 0x65, 0x76, - 0x69, 0x6f, 0x75, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x0f, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x42, 0x05, 0x8a, 0xb5, 0x18, 0x01, 0x34, 0x52, 0x0e, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x05, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, - 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, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x9d, 0x03, 0x0a, 0x12, 0x50, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x63, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x62, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x82, 0xb5, 0x18, 0x2c, - 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x92, 0xb5, 0x18, 0x04, - 0x32, 0x30, 0x34, 0x38, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x6e, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x64, - 0x65, 0x6c, 0x61, 0x79, 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, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x61, - 0x79, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x6d, 0x0a, 0x0f, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0b, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x0b, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x42, - 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x22, 0x7d, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, - 0x18, 0x01, 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, 0x04, 0x73, - 0x6c, 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x56, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x27, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, - 0x02, 0x33, 0x32, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, - 0x1e, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, - 0x7a, 0x0a, 0x08, 0x46, 0x6f, 0x72, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x0f, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0c, 0x42, 0x05, 0x8a, 0xb5, 0x18, 0x01, 0x34, 0x52, 0x0e, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x17, 0x67, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, - 0x18, 0x02, 0x33, 0x32, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0xb7, 0x01, 0x0a, 0x0b, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x73, - 0x65, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x12, - 0x21, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x52, 0x6f, - 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x64, - 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x75, 0x62, - 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x75, 0x62, - 0x4b, 0x65, 0x79, 0x73, 0x12, 0x2f, 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, - 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, - 0x18, 0x02, 0x34, 0x38, 0x9a, 0xb5, 0x18, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x16, 0x77, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, - 0x32, 0x52, 0x15, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x68, 0x0a, 0x0d, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, - 0x65, 0x12, 0x24, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0c, 0x42, 0x0a, 0x8a, 0xb5, 0x18, 0x06, 0x35, 0x31, 0x32, 0x2c, 0x34, 0x38, 0x52, 0x07, - 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x31, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0xa7, 0x01, 0x0a, 0x1b, 0x53, - 0x79, 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x18, 0x01, 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, - 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x11, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x22, 0xc9, 0x0e, 0x0a, 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x22, 0x0a, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1a, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc4, + 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3f, 0x0a, + 0x11, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x72, + 0x65, 0x73, 0x18, 0xa9, 0x46, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, + 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x10, 0x69, 0x6e, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x5b, + 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, 0xaa, 0x46, 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, 0x55, 0x0a, 0x13, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, + 0x65, 0x65, 0x18, 0xab, 0x46, 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, 0x79, 0x0a, 0x1f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x91, 0x4e, 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, + 0x1c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x33, 0x0a, + 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xf9, 0x55, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6e, + 0x65, 0x78, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x97, 0x01, 0x0a, 0x1f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xfa, 0x55, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, + 0xb5, 0x18, 0x4b, 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, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x1c, + 0x6e, 0x65, 0x78, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x6a, 0x0a, 0x14, + 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x69, 0x65, 0x73, 0x18, 0xfb, 0x55, 0x20, 0x03, 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, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x42, 0x0c, 0x92, 0xb5, 0x18, 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, + 0x32, 0x31, 0x36, 0x52, 0x13, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x22, 0x85, 0x11, 0x0a, 0x10, 0x42, 0x65, 0x61, + 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, @@ -2729,16 +3343,36 @@ var file_proto_prysm_v1alpha1_beacon_state_proto_rawDesc = []byte{ 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, 0x72, 0x0a, 0x1f, + 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x77, 0x0a, 0x1f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, - 0x91, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x91, 0x4e, 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, 0x52, 0x1c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x22, 0x89, 0x11, 0x0a, 0x12, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, + 0x65, 0x72, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x52, 0x1c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xf9, + 0x55, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x61, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x97, 0x01, 0x0a, 0x1f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xfa, + 0x55, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x1c, 0x6e, 0x65, 0x78, 0x74, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x6a, 0x0a, 0x14, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, + 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0xfb, 0x55, 0x20, + 0x03, 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, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x42, 0x0c, 0x92, + 0xb5, 0x18, 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x13, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, + 0x22, 0xb9, 0x19, 0x0a, 0x12, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, @@ -2846,402 +3480,346 @@ var file_proto_prysm_v1alpha1_beacon_state_proto_rawDesc = []byte{ 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, 0x79, 0x0a, 0x1f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, + 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x77, 0x0a, 0x1f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x91, 0x4e, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, + 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, 0x43, 0x61, 0x70, 0x65, - 0x6c, 0x6c, 0x61, 0x52, 0x1c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x12, 0x33, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xf9, 0x55, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, - 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x97, 0x01, 0x0a, 0x1f, 0x6e, 0x65, 0x78, 0x74, 0x5f, - 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xfa, 0x55, 0x20, 0x01, 0x28, - 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x52, 0x1c, 0x6e, 0x65, 0x78, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x6a, 0x0a, 0x14, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x73, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0xfb, 0x55, 0x20, 0x03, 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, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, - 0x61, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x42, 0x0c, 0x92, 0xb5, 0x18, 0x08, 0x31, - 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x13, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, - 0x63, 0x61, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x22, 0x85, 0x11, 0x0a, - 0x10, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x65, - 0x62, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, - 0x15, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x5a, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0xeb, - 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, 0x04, 0x73, 0x6c, - 0x6f, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, - 0x66, 0x6f, 0x72, 0x6b, 0x12, 0x59, 0x0a, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0xd1, 0x0f, 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, 0x11, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, - 0x2d, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd2, - 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, - 0x33, 0x32, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x2d, - 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd3, 0x0f, - 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, - 0x32, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x40, 0x0a, - 0x10, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6f, 0x74, - 0x73, 0x18, 0xd4, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, - 0x33, 0x32, 0x92, 0xb5, 0x18, 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x0f, - 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, - 0x3d, 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0xb9, 0x17, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, - 0x0a, 0x0f, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x76, 0x6f, 0x74, 0x65, - 0x73, 0x18, 0xba, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x32, - 0x30, 0x34, 0x38, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x56, 0x6f, 0x74, - 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xbb, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x10, 0x65, 0x74, 0x68, 0x31, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x12, 0x54, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, - 0xa1, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, - 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x0a, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x73, 0x18, 0xa2, 0x1f, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, - 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x08, 0x62, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, - 0x6f, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x73, 0x18, 0x89, 0x27, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0c, - 0x8a, 0xb5, 0x18, 0x08, 0x36, 0x35, 0x35, 0x33, 0x36, 0x2c, 0x33, 0x32, 0x52, 0x0b, 0x72, 0x61, - 0x6e, 0x64, 0x61, 0x6f, 0x4d, 0x69, 0x78, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x09, 0x73, 0x6c, 0x61, - 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0xf1, 0x2e, 0x20, 0x03, 0x28, 0x04, 0x42, 0x08, 0x8a, - 0xb5, 0x18, 0x04, 0x38, 0x31, 0x39, 0x32, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x54, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0xd9, 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, - 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x1a, 0x70, 0x72, - 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, - 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x1b, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, - 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xda, 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, - 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, - 0x36, 0x52, 0x19, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, - 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x12, - 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, - 0x74, 0x73, 0x18, 0xc1, 0x3e, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x82, 0xb5, 0x18, 0x2f, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, 0x8a, 0xb5, - 0x18, 0x01, 0x31, 0x52, 0x11, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x66, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, - 0x75, 0x73, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc2, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x1b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x64, - 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc3, - 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc4, 0x3e, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x11, 0x69, - 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, - 0x18, 0xa9, 0x46, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, - 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x10, 0x69, 0x6e, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x5b, 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, 0xaa, 0x46, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, 0x65, 0x6e, 0x65, + 0x62, 0x52, 0x1c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, + 0x33, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xf9, 0x55, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x13, 0x6e, 0x65, 0x78, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x97, 0x01, 0x0a, 0x1f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xfa, 0x55, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x52, 0x1c, 0x6e, 0x65, 0x78, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x6a, + 0x0a, 0x14, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0xfb, 0x55, 0x20, 0x03, 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, 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, 0x55, 0x0a, 0x13, 0x6e, 0x65, 0x78, - 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, - 0x18, 0xab, 0x46, 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, 0x77, 0x0a, 0x1f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x18, 0x91, 0x4e, 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, 0x1c, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x15, 0x6e, 0x65, 0x78, - 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0xf9, 0x55, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x57, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x97, - 0x01, 0x0a, 0x1f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0xfa, 0x55, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x1c, 0x6e, 0x65, 0x78, 0x74, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x6a, 0x0a, 0x14, 0x68, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, - 0x18, 0xfb, 0x55, 0x20, 0x03, 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, - 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x79, 0x42, 0x0c, 0x92, 0xb5, 0x18, 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, - 0x13, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x69, 0x65, 0x73, 0x22, 0xb9, 0x19, 0x0a, 0x12, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x22, 0x0a, 0x0c, 0x67, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0xe9, 0x07, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x3f, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x6f, 0x6f, 0x74, - 0x12, 0x5a, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, - 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x42, 0x0c, 0x92, 0xb5, 0x18, 0x08, 0x31, 0x36, 0x37, + 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x13, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, + 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xe1, 0x5d, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x19, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x83, 0x01, 0x0a, + 0x1a, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x18, 0xe2, 0x5d, 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, 0x47, 0x77, 0x65, 0x69, 0x52, 0x17, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x73, 0x75, + 0x6d, 0x65, 0x12, 0x7d, 0x0a, 0x17, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x18, 0xe3, 0x5d, + 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, 0x47, 0x77, 0x65, 0x69, 0x52, 0x14, 0x65, 0x78, 0x69, + 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, + 0x65, 0x12, 0x77, 0x0a, 0x13, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x78, + 0x69, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0xe4, 0x5d, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x46, 0x82, 0xb5, 0x18, 0x42, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x30, 0x0a, 0x04, - 0x66, 0x6f, 0x72, 0x6b, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x12, 0x59, - 0x0a, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0xd1, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, + 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x11, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, + 0x74, 0x45, 0x78, 0x69, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x8f, 0x01, 0x0a, 0x20, 0x63, + 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x18, + 0xe5, 0x5d, 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, 0x47, 0x77, 0x65, 0x69, 0x52, 0x1d, 0x63, + 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x89, 0x01, 0x0a, + 0x1c, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0xe6, 0x5d, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 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, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x1a, 0x65, 0x61, + 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x60, 0x0a, 0x10, 0x70, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0xe7, 0x5d, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x0d, 0x92, 0xb5, 0x18, 0x09, + 0x31, 0x33, 0x34, 0x32, 0x31, 0x37, 0x37, 0x32, 0x38, 0x52, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x7f, 0x0a, 0x1b, 0x70, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x18, 0xe8, 0x5d, 0x20, 0x03, 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, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, + 0x6c, 0x42, 0x0d, 0x92, 0xb5, 0x18, 0x09, 0x31, 0x33, 0x34, 0x32, 0x31, 0x37, 0x37, 0x32, 0x38, + 0x52, 0x19, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x12, 0x6f, 0x0a, 0x16, 0x70, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe9, 0x5d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 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, 0x11, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd2, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, - 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd3, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, - 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, 0x52, 0x0a, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x10, 0x68, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd4, 0x0f, 0x20, 0x03, - 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x33, 0x32, 0x92, 0xb5, 0x18, 0x08, - 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x0f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x69, 0x63, 0x61, 0x6c, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x65, 0x74, 0x68, - 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0xb9, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, - 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x0f, 0x65, 0x74, 0x68, 0x31, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0xba, 0x17, 0x20, 0x03, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, + 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x92, 0xb5, 0x18, 0x06, 0x32, + 0x36, 0x32, 0x31, 0x34, 0x34, 0x52, 0x15, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, + 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x99, 0x1b, 0x0a, + 0x0f, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x50, 0x42, 0x53, + 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, + 0xea, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x15, + 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x5a, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0xeb, 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, 0x04, 0x73, 0x6c, 0x6f, + 0x74, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x6f, 0x72, 0x6b, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x52, 0x04, 0x66, + 0x6f, 0x72, 0x6b, 0x12, 0x59, 0x0a, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0xd1, 0x0f, 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, 0x11, 0x6c, 0x61, 0x74, + 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2d, + 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd2, 0x0f, + 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, + 0x32, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x2d, 0x0a, + 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0xd3, 0x0f, 0x20, + 0x03, 0x28, 0x0c, 0x42, 0x0b, 0x8a, 0xb5, 0x18, 0x07, 0x38, 0x31, 0x39, 0x32, 0x2c, 0x33, 0x32, + 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x10, + 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x73, + 0x18, 0xd4, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x14, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x33, + 0x32, 0x92, 0xb5, 0x18, 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x0f, 0x68, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x3d, + 0x0a, 0x09, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0xb9, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x31, 0x44, - 0x61, 0x74, 0x61, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x32, 0x30, 0x34, 0x38, 0x52, 0x0d, 0x65, - 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, - 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0xbb, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x65, 0x74, 0x68, 0x31, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x54, 0x0a, 0x0a, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0xa1, 0x1f, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, - 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0xa2, 0x1f, - 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, - 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x12, 0x30, 0x0a, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x5f, 0x6d, 0x69, 0x78, 0x65, - 0x73, 0x18, 0x89, 0x27, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0c, 0x8a, 0xb5, 0x18, 0x08, 0x36, 0x35, - 0x35, 0x33, 0x36, 0x2c, 0x33, 0x32, 0x52, 0x0b, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x4d, 0x69, - 0x78, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, - 0x18, 0xf1, 0x2e, 0x20, 0x03, 0x28, 0x04, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x38, 0x31, 0x39, - 0x32, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x54, 0x0a, 0x1c, - 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, - 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xd9, 0x36, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, - 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x1a, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x1b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, + 0x0f, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x73, + 0x18, 0xba, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x45, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x92, 0xb5, 0x18, 0x04, 0x32, 0x30, + 0x34, 0x38, 0x52, 0x0d, 0x65, 0x74, 0x68, 0x31, 0x44, 0x61, 0x74, 0x61, 0x56, 0x6f, 0x74, 0x65, + 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xbb, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x65, 0x74, 0x68, 0x31, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x54, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0xa1, + 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, + 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x73, 0x18, 0xa2, 0x1f, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, + 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x08, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x0c, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, + 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x73, 0x18, 0x89, 0x27, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x0c, 0x8a, + 0xb5, 0x18, 0x08, 0x36, 0x35, 0x35, 0x33, 0x36, 0x2c, 0x33, 0x32, 0x52, 0x0b, 0x72, 0x61, 0x6e, + 0x64, 0x61, 0x6f, 0x4d, 0x69, 0x78, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x09, 0x73, 0x6c, 0x61, 0x73, + 0x68, 0x69, 0x6e, 0x67, 0x73, 0x18, 0xf1, 0x2e, 0x20, 0x03, 0x28, 0x04, 0x42, 0x08, 0x8a, 0xb5, + 0x18, 0x04, 0x38, 0x31, 0x39, 0x32, 0x52, 0x09, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x54, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0xda, 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, - 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x19, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, - 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x12, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0xc1, 0x3e, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x38, 0x82, 0xb5, 0x18, 0x2f, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, - 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, 0x8a, 0xb5, 0x18, 0x01, 0x31, 0x52, 0x11, 0x6a, - 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, - 0x12, 0x66, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6a, 0x75, 0x73, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x18, 0xc2, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1b, 0x70, 0x72, 0x65, - 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc3, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x52, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0x75, 0x73, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x55, - 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc4, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x6e, 0x18, 0xd9, 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, + 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x1a, 0x70, 0x72, 0x65, + 0x76, 0x69, 0x6f, 0x75, 0x73, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, + 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x1b, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, + 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xda, 0x36, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0x92, + 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, + 0x52, 0x19, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x50, 0x61, + 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x12, 0x6a, + 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, + 0x73, 0x18, 0xc1, 0x3e, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x38, 0x82, 0xb5, 0x18, 0x2f, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x34, 0x8a, 0xb5, 0x18, + 0x01, 0x31, 0x52, 0x11, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x69, 0x74, 0x73, 0x12, 0x66, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc2, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x11, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, 0xa9, 0x46, 0x20, 0x03, 0x28, - 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, 0x35, 0x31, 0x31, 0x36, 0x32, - 0x37, 0x37, 0x37, 0x36, 0x52, 0x10, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x5b, 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, 0xaa, 0x46, 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, 0x55, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0xab, 0x46, 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, 0x77, 0x0a, 0x1f, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x91, 0x4e, - 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, 0x1c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xf9, 0x55, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x61, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x97, 0x01, 0x0a, 0x1f, 0x6e, 0x65, 0x78, - 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xfa, 0x55, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x52, 0x1c, 0x6e, 0x65, 0x78, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x6a, 0x0a, 0x14, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, - 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0xfb, 0x55, 0x20, 0x03, 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, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x69, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x42, 0x0c, 0x92, 0xb5, 0x18, - 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x13, 0x68, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x40, - 0x0a, 0x1c, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0xe1, - 0x5d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x83, 0x01, 0x0a, 0x1a, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x62, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x18, - 0xe2, 0x5d, 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, 0x47, 0x77, 0x65, 0x69, 0x52, 0x17, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, - 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x7d, 0x0a, 0x17, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x62, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, - 0x65, 0x18, 0xe3, 0x5d, 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, 0x47, 0x77, 0x65, 0x69, 0x52, - 0x14, 0x65, 0x78, 0x69, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x6f, - 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x77, 0x0a, 0x13, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, - 0x74, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0xe4, 0x5d, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 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, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x11, 0x65, 0x61, 0x72, - 0x6c, 0x69, 0x65, 0x73, 0x74, 0x45, 0x78, 0x69, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x8f, - 0x01, 0x0a, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x1b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x64, 0x0a, + 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc3, 0x3e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0xc4, 0x3e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x11, 0x69, 0x6e, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, + 0xa9, 0x46, 0x20, 0x03, 0x28, 0x04, 0x42, 0x11, 0x92, 0xb5, 0x18, 0x0d, 0x31, 0x30, 0x39, 0x39, + 0x35, 0x31, 0x31, 0x36, 0x32, 0x37, 0x37, 0x37, 0x36, 0x52, 0x10, 0x69, 0x6e, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x5b, 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, 0xaa, 0x46, 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, 0x55, 0x0a, 0x13, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, + 0xab, 0x46, 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, + 0x76, 0x0a, 0x1f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0x91, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 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, 0x45, 0x50, 0x42, 0x53, 0x52, 0x1c, 0x6c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0xf9, 0x55, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x97, 0x01, 0x0a, + 0x1f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, + 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0xfa, 0x55, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x1c, 0x6e, 0x65, 0x78, 0x74, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x6a, 0x0a, 0x14, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0xfb, + 0x55, 0x20, 0x03, 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, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x42, + 0x0c, 0x92, 0xb5, 0x18, 0x08, 0x31, 0x36, 0x37, 0x37, 0x37, 0x32, 0x31, 0x36, 0x52, 0x13, 0x68, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, + 0x65, 0x73, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0xe1, 0x5d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x83, 0x01, 0x0a, 0x1a, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x73, - 0x75, 0x6d, 0x65, 0x18, 0xe5, 0x5d, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, + 0x75, 0x6d, 0x65, 0x18, 0xe2, 0x5d, 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, 0x47, 0x77, 0x65, - 0x69, 0x52, 0x1d, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, - 0x12, 0x89, 0x01, 0x0a, 0x1c, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, - 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x70, 0x6f, 0x63, - 0x68, 0x18, 0xe6, 0x5d, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 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, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x52, 0x1a, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x60, 0x0a, 0x10, - 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, - 0x18, 0xe7, 0x5d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x0d, - 0x92, 0xb5, 0x18, 0x09, 0x31, 0x33, 0x34, 0x32, 0x31, 0x37, 0x37, 0x32, 0x38, 0x52, 0x0f, 0x70, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x7f, - 0x0a, 0x1b, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, - 0x6c, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x18, 0xe8, 0x5d, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x69, 0x52, 0x17, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x7d, 0x0a, 0x17, 0x65, 0x78, + 0x69, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x18, 0xe3, 0x5d, 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, 0x47, + 0x77, 0x65, 0x69, 0x52, 0x14, 0x65, 0x78, 0x69, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x54, 0x6f, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x77, 0x0a, 0x13, 0x65, 0x61, 0x72, + 0x6c, 0x69, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x18, 0xe4, 0x5d, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 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, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, + 0x11, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x45, 0x78, 0x69, 0x74, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x12, 0x8f, 0x01, 0x0a, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x5f, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x18, 0xe5, 0x5d, 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, 0x47, 0x77, 0x65, 0x69, 0x52, 0x1d, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x6f, 0x43, 0x6f, 0x6e, + 0x73, 0x75, 0x6d, 0x65, 0x12, 0x89, 0x01, 0x0a, 0x1c, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0xe6, 0x5d, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, + 0x18, 0x42, 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, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x52, 0x1a, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x43, 0x6f, + 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x70, 0x6f, 0x63, 0x68, + 0x12, 0x60, 0x0a, 0x10, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x18, 0xe7, 0x5d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x42, 0x0d, 0x92, 0xb5, 0x18, 0x09, 0x31, 0x33, 0x34, 0x32, 0x31, 0x37, 0x37, 0x32, + 0x38, 0x52, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x12, 0x7f, 0x0a, 0x1b, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, + 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, + 0x73, 0x18, 0xe8, 0x5d, 0x20, 0x03, 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, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x42, 0x0d, 0x92, 0xb5, 0x18, 0x09, 0x31, + 0x33, 0x34, 0x32, 0x31, 0x37, 0x37, 0x32, 0x38, 0x52, 0x19, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x61, 0x6c, 0x73, 0x12, 0x6f, 0x0a, 0x16, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, + 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe9, 0x5d, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x61, 0x6c, 0x42, 0x0d, 0x92, 0xb5, 0x18, 0x09, 0x31, 0x33, 0x34, 0x32, 0x31, - 0x37, 0x37, 0x32, 0x38, 0x52, 0x19, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, - 0x74, 0x69, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x12, - 0x6f, 0x0a, 0x16, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x6f, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe9, 0x5d, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x92, - 0xb5, 0x18, 0x06, 0x32, 0x36, 0x32, 0x31, 0x34, 0x34, 0x52, 0x15, 0x70, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x8d, 0x01, 0x0a, 0x08, 0x50, 0x6f, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x25, 0x0a, - 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x27, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, - 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x31, 0x0a, - 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, - 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, - 0x22, 0x7f, 0x0a, 0x11, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x12, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x34, 0x0a, 0x12, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x6f, 0x6f, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, - 0x10, 0x73, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x6f, 0x6f, - 0x74, 0x42, 0x9b, 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, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x3a, 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, 0x70, 0x72, 0x79, - 0x73, 0x6d, 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, 0x41, 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, + 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x0a, 0x92, 0xb5, 0x18, 0x06, 0x32, 0x36, 0x32, 0x31, 0x34, 0x34, 0x52, 0x15, 0x70, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x11, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0xc9, 0x65, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x70, 0x0a, 0x10, 0x6c, 0x61, 0x74, + 0x65, 0x73, 0x74, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0xca, 0x65, + 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, 0x0e, 0x6c, 0x61, 0x74, + 0x65, 0x73, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x3b, 0x0a, 0x15, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x18, 0xcb, 0x65, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, + 0x02, 0x33, 0x32, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x61, 0x6c, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x8d, 0x01, 0x0a, 0x08, 0x50, 0x6f, 0x77, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x25, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, + 0x32, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x27, 0x0a, 0x0b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x31, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, + 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x69, + 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x22, 0x7f, 0x0a, 0x11, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x34, 0x0a, + 0x12, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, + 0x32, 0x52, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, + 0x6f, 0x6f, 0x74, 0x12, 0x34, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x6f, 0x6f, 0x74, 0x42, 0x9b, 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, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 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, 0x70, 0x72, 0x79, 0x73, 0x6d, 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, 0x41, 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 ( @@ -3256,7 +3834,7 @@ func file_proto_prysm_v1alpha1_beacon_state_proto_rawDescGZIP() []byte { return file_proto_prysm_v1alpha1_beacon_state_proto_rawDescData } -var file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_proto_prysm_v1alpha1_beacon_state_proto_goTypes = []interface{}{ (*BeaconState)(nil), // 0: ethereum.eth.v1alpha1.BeaconState (*BeaconStateAltair)(nil), // 1: ethereum.eth.v1alpha1.BeaconStateAltair @@ -3274,98 +3852,115 @@ var file_proto_prysm_v1alpha1_beacon_state_proto_goTypes = []interface{}{ (*BeaconStateCapella)(nil), // 13: ethereum.eth.v1alpha1.BeaconStateCapella (*BeaconStateDeneb)(nil), // 14: ethereum.eth.v1alpha1.BeaconStateDeneb (*BeaconStateElectra)(nil), // 15: ethereum.eth.v1alpha1.BeaconStateElectra - (*PowBlock)(nil), // 16: ethereum.eth.v1alpha1.PowBlock - (*HistoricalSummary)(nil), // 17: ethereum.eth.v1alpha1.HistoricalSummary - (*BeaconBlockHeader)(nil), // 18: ethereum.eth.v1alpha1.BeaconBlockHeader - (*Eth1Data)(nil), // 19: ethereum.eth.v1alpha1.Eth1Data - (*Validator)(nil), // 20: ethereum.eth.v1alpha1.Validator - (*Checkpoint)(nil), // 21: ethereum.eth.v1alpha1.Checkpoint - (*AttestationData)(nil), // 22: ethereum.eth.v1alpha1.AttestationData - (*v1.ExecutionPayloadHeader)(nil), // 23: ethereum.engine.v1.ExecutionPayloadHeader - (*v1.ExecutionPayloadHeaderCapella)(nil), // 24: ethereum.engine.v1.ExecutionPayloadHeaderCapella - (*v1.ExecutionPayloadHeaderDeneb)(nil), // 25: ethereum.engine.v1.ExecutionPayloadHeaderDeneb - (*PendingDeposit)(nil), // 26: ethereum.eth.v1alpha1.PendingDeposit - (*PendingPartialWithdrawal)(nil), // 27: ethereum.eth.v1alpha1.PendingPartialWithdrawal - (*PendingConsolidation)(nil), // 28: ethereum.eth.v1alpha1.PendingConsolidation + (*BeaconStateEPBS)(nil), // 16: ethereum.eth.v1alpha1.BeaconStateEPBS + (*PowBlock)(nil), // 17: ethereum.eth.v1alpha1.PowBlock + (*HistoricalSummary)(nil), // 18: ethereum.eth.v1alpha1.HistoricalSummary + (*BeaconBlockHeader)(nil), // 19: ethereum.eth.v1alpha1.BeaconBlockHeader + (*Eth1Data)(nil), // 20: ethereum.eth.v1alpha1.Eth1Data + (*Validator)(nil), // 21: ethereum.eth.v1alpha1.Validator + (*Checkpoint)(nil), // 22: ethereum.eth.v1alpha1.Checkpoint + (*AttestationData)(nil), // 23: ethereum.eth.v1alpha1.AttestationData + (*v1.ExecutionPayloadHeader)(nil), // 24: ethereum.engine.v1.ExecutionPayloadHeader + (*v1.ExecutionPayloadHeaderCapella)(nil), // 25: ethereum.engine.v1.ExecutionPayloadHeaderCapella + (*v1.ExecutionPayloadHeaderDeneb)(nil), // 26: ethereum.engine.v1.ExecutionPayloadHeaderDeneb + (*PendingDeposit)(nil), // 27: ethereum.eth.v1alpha1.PendingDeposit + (*PendingPartialWithdrawal)(nil), // 28: ethereum.eth.v1alpha1.PendingPartialWithdrawal + (*PendingConsolidation)(nil), // 29: ethereum.eth.v1alpha1.PendingConsolidation + (*v1.ExecutionPayloadHeaderEPBS)(nil), // 30: ethereum.engine.v1.ExecutionPayloadHeaderEPBS } var file_proto_prysm_v1alpha1_beacon_state_proto_depIdxs = []int32{ 2, // 0: ethereum.eth.v1alpha1.BeaconState.fork:type_name -> ethereum.eth.v1alpha1.Fork - 18, // 1: ethereum.eth.v1alpha1.BeaconState.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader - 19, // 2: ethereum.eth.v1alpha1.BeaconState.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 19, // 3: ethereum.eth.v1alpha1.BeaconState.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data - 20, // 4: ethereum.eth.v1alpha1.BeaconState.validators:type_name -> ethereum.eth.v1alpha1.Validator + 19, // 1: ethereum.eth.v1alpha1.BeaconState.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader + 20, // 2: ethereum.eth.v1alpha1.BeaconState.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 20, // 3: ethereum.eth.v1alpha1.BeaconState.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data + 21, // 4: ethereum.eth.v1alpha1.BeaconState.validators:type_name -> ethereum.eth.v1alpha1.Validator 3, // 5: ethereum.eth.v1alpha1.BeaconState.previous_epoch_attestations:type_name -> ethereum.eth.v1alpha1.PendingAttestation 3, // 6: ethereum.eth.v1alpha1.BeaconState.current_epoch_attestations:type_name -> ethereum.eth.v1alpha1.PendingAttestation - 21, // 7: ethereum.eth.v1alpha1.BeaconState.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 21, // 8: ethereum.eth.v1alpha1.BeaconState.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 21, // 9: ethereum.eth.v1alpha1.BeaconState.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 7: ethereum.eth.v1alpha1.BeaconState.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 8: ethereum.eth.v1alpha1.BeaconState.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 9: ethereum.eth.v1alpha1.BeaconState.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint 2, // 10: ethereum.eth.v1alpha1.BeaconStateAltair.fork:type_name -> ethereum.eth.v1alpha1.Fork - 18, // 11: ethereum.eth.v1alpha1.BeaconStateAltair.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader - 19, // 12: ethereum.eth.v1alpha1.BeaconStateAltair.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 19, // 13: ethereum.eth.v1alpha1.BeaconStateAltair.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data - 20, // 14: ethereum.eth.v1alpha1.BeaconStateAltair.validators:type_name -> ethereum.eth.v1alpha1.Validator - 21, // 15: ethereum.eth.v1alpha1.BeaconStateAltair.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 21, // 16: ethereum.eth.v1alpha1.BeaconStateAltair.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 21, // 17: ethereum.eth.v1alpha1.BeaconStateAltair.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 19, // 11: ethereum.eth.v1alpha1.BeaconStateAltair.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader + 20, // 12: ethereum.eth.v1alpha1.BeaconStateAltair.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 20, // 13: ethereum.eth.v1alpha1.BeaconStateAltair.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data + 21, // 14: ethereum.eth.v1alpha1.BeaconStateAltair.validators:type_name -> ethereum.eth.v1alpha1.Validator + 22, // 15: ethereum.eth.v1alpha1.BeaconStateAltair.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 16: ethereum.eth.v1alpha1.BeaconStateAltair.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 17: ethereum.eth.v1alpha1.BeaconStateAltair.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint 10, // 18: ethereum.eth.v1alpha1.BeaconStateAltair.current_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee 10, // 19: ethereum.eth.v1alpha1.BeaconStateAltair.next_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee - 22, // 20: ethereum.eth.v1alpha1.PendingAttestation.data:type_name -> ethereum.eth.v1alpha1.AttestationData + 23, // 20: ethereum.eth.v1alpha1.PendingAttestation.data:type_name -> ethereum.eth.v1alpha1.AttestationData 2, // 21: ethereum.eth.v1alpha1.CheckPtInfo.fork:type_name -> ethereum.eth.v1alpha1.Fork 2, // 22: ethereum.eth.v1alpha1.BeaconStateBellatrix.fork:type_name -> ethereum.eth.v1alpha1.Fork - 18, // 23: ethereum.eth.v1alpha1.BeaconStateBellatrix.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader - 19, // 24: ethereum.eth.v1alpha1.BeaconStateBellatrix.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 19, // 25: ethereum.eth.v1alpha1.BeaconStateBellatrix.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data - 20, // 26: ethereum.eth.v1alpha1.BeaconStateBellatrix.validators:type_name -> ethereum.eth.v1alpha1.Validator - 21, // 27: ethereum.eth.v1alpha1.BeaconStateBellatrix.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 21, // 28: ethereum.eth.v1alpha1.BeaconStateBellatrix.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 21, // 29: ethereum.eth.v1alpha1.BeaconStateBellatrix.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 19, // 23: ethereum.eth.v1alpha1.BeaconStateBellatrix.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader + 20, // 24: ethereum.eth.v1alpha1.BeaconStateBellatrix.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 20, // 25: ethereum.eth.v1alpha1.BeaconStateBellatrix.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data + 21, // 26: ethereum.eth.v1alpha1.BeaconStateBellatrix.validators:type_name -> ethereum.eth.v1alpha1.Validator + 22, // 27: ethereum.eth.v1alpha1.BeaconStateBellatrix.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 28: ethereum.eth.v1alpha1.BeaconStateBellatrix.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 29: ethereum.eth.v1alpha1.BeaconStateBellatrix.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint 10, // 30: ethereum.eth.v1alpha1.BeaconStateBellatrix.current_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee 10, // 31: ethereum.eth.v1alpha1.BeaconStateBellatrix.next_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee - 23, // 32: ethereum.eth.v1alpha1.BeaconStateBellatrix.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeader + 24, // 32: ethereum.eth.v1alpha1.BeaconStateBellatrix.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeader 2, // 33: ethereum.eth.v1alpha1.BeaconStateCapella.fork:type_name -> ethereum.eth.v1alpha1.Fork - 18, // 34: ethereum.eth.v1alpha1.BeaconStateCapella.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader - 19, // 35: ethereum.eth.v1alpha1.BeaconStateCapella.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 19, // 36: ethereum.eth.v1alpha1.BeaconStateCapella.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data - 20, // 37: ethereum.eth.v1alpha1.BeaconStateCapella.validators:type_name -> ethereum.eth.v1alpha1.Validator - 21, // 38: ethereum.eth.v1alpha1.BeaconStateCapella.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 21, // 39: ethereum.eth.v1alpha1.BeaconStateCapella.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 21, // 40: ethereum.eth.v1alpha1.BeaconStateCapella.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 19, // 34: ethereum.eth.v1alpha1.BeaconStateCapella.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader + 20, // 35: ethereum.eth.v1alpha1.BeaconStateCapella.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 20, // 36: ethereum.eth.v1alpha1.BeaconStateCapella.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data + 21, // 37: ethereum.eth.v1alpha1.BeaconStateCapella.validators:type_name -> ethereum.eth.v1alpha1.Validator + 22, // 38: ethereum.eth.v1alpha1.BeaconStateCapella.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 39: ethereum.eth.v1alpha1.BeaconStateCapella.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 40: ethereum.eth.v1alpha1.BeaconStateCapella.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint 10, // 41: ethereum.eth.v1alpha1.BeaconStateCapella.current_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee 10, // 42: ethereum.eth.v1alpha1.BeaconStateCapella.next_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee - 24, // 43: ethereum.eth.v1alpha1.BeaconStateCapella.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderCapella - 17, // 44: ethereum.eth.v1alpha1.BeaconStateCapella.historical_summaries:type_name -> ethereum.eth.v1alpha1.HistoricalSummary + 25, // 43: ethereum.eth.v1alpha1.BeaconStateCapella.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderCapella + 18, // 44: ethereum.eth.v1alpha1.BeaconStateCapella.historical_summaries:type_name -> ethereum.eth.v1alpha1.HistoricalSummary 2, // 45: ethereum.eth.v1alpha1.BeaconStateDeneb.fork:type_name -> ethereum.eth.v1alpha1.Fork - 18, // 46: ethereum.eth.v1alpha1.BeaconStateDeneb.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader - 19, // 47: ethereum.eth.v1alpha1.BeaconStateDeneb.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 19, // 48: ethereum.eth.v1alpha1.BeaconStateDeneb.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data - 20, // 49: ethereum.eth.v1alpha1.BeaconStateDeneb.validators:type_name -> ethereum.eth.v1alpha1.Validator - 21, // 50: ethereum.eth.v1alpha1.BeaconStateDeneb.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 21, // 51: ethereum.eth.v1alpha1.BeaconStateDeneb.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 21, // 52: ethereum.eth.v1alpha1.BeaconStateDeneb.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 19, // 46: ethereum.eth.v1alpha1.BeaconStateDeneb.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader + 20, // 47: ethereum.eth.v1alpha1.BeaconStateDeneb.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 20, // 48: ethereum.eth.v1alpha1.BeaconStateDeneb.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data + 21, // 49: ethereum.eth.v1alpha1.BeaconStateDeneb.validators:type_name -> ethereum.eth.v1alpha1.Validator + 22, // 50: ethereum.eth.v1alpha1.BeaconStateDeneb.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 51: ethereum.eth.v1alpha1.BeaconStateDeneb.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 52: ethereum.eth.v1alpha1.BeaconStateDeneb.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint 10, // 53: ethereum.eth.v1alpha1.BeaconStateDeneb.current_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee 10, // 54: ethereum.eth.v1alpha1.BeaconStateDeneb.next_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee - 25, // 55: ethereum.eth.v1alpha1.BeaconStateDeneb.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb - 17, // 56: ethereum.eth.v1alpha1.BeaconStateDeneb.historical_summaries:type_name -> ethereum.eth.v1alpha1.HistoricalSummary + 26, // 55: ethereum.eth.v1alpha1.BeaconStateDeneb.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb + 18, // 56: ethereum.eth.v1alpha1.BeaconStateDeneb.historical_summaries:type_name -> ethereum.eth.v1alpha1.HistoricalSummary 2, // 57: ethereum.eth.v1alpha1.BeaconStateElectra.fork:type_name -> ethereum.eth.v1alpha1.Fork - 18, // 58: ethereum.eth.v1alpha1.BeaconStateElectra.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader - 19, // 59: ethereum.eth.v1alpha1.BeaconStateElectra.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data - 19, // 60: ethereum.eth.v1alpha1.BeaconStateElectra.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data - 20, // 61: ethereum.eth.v1alpha1.BeaconStateElectra.validators:type_name -> ethereum.eth.v1alpha1.Validator - 21, // 62: ethereum.eth.v1alpha1.BeaconStateElectra.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 21, // 63: ethereum.eth.v1alpha1.BeaconStateElectra.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint - 21, // 64: ethereum.eth.v1alpha1.BeaconStateElectra.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 19, // 58: ethereum.eth.v1alpha1.BeaconStateElectra.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader + 20, // 59: ethereum.eth.v1alpha1.BeaconStateElectra.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 20, // 60: ethereum.eth.v1alpha1.BeaconStateElectra.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data + 21, // 61: ethereum.eth.v1alpha1.BeaconStateElectra.validators:type_name -> ethereum.eth.v1alpha1.Validator + 22, // 62: ethereum.eth.v1alpha1.BeaconStateElectra.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 63: ethereum.eth.v1alpha1.BeaconStateElectra.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 64: ethereum.eth.v1alpha1.BeaconStateElectra.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint 10, // 65: ethereum.eth.v1alpha1.BeaconStateElectra.current_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee 10, // 66: ethereum.eth.v1alpha1.BeaconStateElectra.next_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee - 25, // 67: ethereum.eth.v1alpha1.BeaconStateElectra.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb - 17, // 68: ethereum.eth.v1alpha1.BeaconStateElectra.historical_summaries:type_name -> ethereum.eth.v1alpha1.HistoricalSummary - 26, // 69: ethereum.eth.v1alpha1.BeaconStateElectra.pending_deposits:type_name -> ethereum.eth.v1alpha1.PendingDeposit - 27, // 70: ethereum.eth.v1alpha1.BeaconStateElectra.pending_partial_withdrawals:type_name -> ethereum.eth.v1alpha1.PendingPartialWithdrawal - 28, // 71: ethereum.eth.v1alpha1.BeaconStateElectra.pending_consolidations:type_name -> ethereum.eth.v1alpha1.PendingConsolidation - 72, // [72:72] is the sub-list for method output_type - 72, // [72:72] is the sub-list for method input_type - 72, // [72:72] is the sub-list for extension type_name - 72, // [72:72] is the sub-list for extension extendee - 0, // [0:72] is the sub-list for field type_name + 26, // 67: ethereum.eth.v1alpha1.BeaconStateElectra.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb + 18, // 68: ethereum.eth.v1alpha1.BeaconStateElectra.historical_summaries:type_name -> ethereum.eth.v1alpha1.HistoricalSummary + 27, // 69: ethereum.eth.v1alpha1.BeaconStateElectra.pending_deposits:type_name -> ethereum.eth.v1alpha1.PendingDeposit + 28, // 70: ethereum.eth.v1alpha1.BeaconStateElectra.pending_partial_withdrawals:type_name -> ethereum.eth.v1alpha1.PendingPartialWithdrawal + 29, // 71: ethereum.eth.v1alpha1.BeaconStateElectra.pending_consolidations:type_name -> ethereum.eth.v1alpha1.PendingConsolidation + 2, // 72: ethereum.eth.v1alpha1.BeaconStateEPBS.fork:type_name -> ethereum.eth.v1alpha1.Fork + 19, // 73: ethereum.eth.v1alpha1.BeaconStateEPBS.latest_block_header:type_name -> ethereum.eth.v1alpha1.BeaconBlockHeader + 20, // 74: ethereum.eth.v1alpha1.BeaconStateEPBS.eth1_data:type_name -> ethereum.eth.v1alpha1.Eth1Data + 20, // 75: ethereum.eth.v1alpha1.BeaconStateEPBS.eth1_data_votes:type_name -> ethereum.eth.v1alpha1.Eth1Data + 21, // 76: ethereum.eth.v1alpha1.BeaconStateEPBS.validators:type_name -> ethereum.eth.v1alpha1.Validator + 22, // 77: ethereum.eth.v1alpha1.BeaconStateEPBS.previous_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 78: ethereum.eth.v1alpha1.BeaconStateEPBS.current_justified_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 22, // 79: ethereum.eth.v1alpha1.BeaconStateEPBS.finalized_checkpoint:type_name -> ethereum.eth.v1alpha1.Checkpoint + 10, // 80: ethereum.eth.v1alpha1.BeaconStateEPBS.current_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee + 10, // 81: ethereum.eth.v1alpha1.BeaconStateEPBS.next_sync_committee:type_name -> ethereum.eth.v1alpha1.SyncCommittee + 30, // 82: ethereum.eth.v1alpha1.BeaconStateEPBS.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderEPBS + 18, // 83: ethereum.eth.v1alpha1.BeaconStateEPBS.historical_summaries:type_name -> ethereum.eth.v1alpha1.HistoricalSummary + 27, // 84: ethereum.eth.v1alpha1.BeaconStateEPBS.pending_deposits:type_name -> ethereum.eth.v1alpha1.PendingDeposit + 28, // 85: ethereum.eth.v1alpha1.BeaconStateEPBS.pending_partial_withdrawals:type_name -> ethereum.eth.v1alpha1.PendingPartialWithdrawal + 29, // 86: ethereum.eth.v1alpha1.BeaconStateEPBS.pending_consolidations:type_name -> ethereum.eth.v1alpha1.PendingConsolidation + 87, // [87:87] is the sub-list for method output_type + 87, // [87:87] is the sub-list for method input_type + 87, // [87:87] is the sub-list for extension type_name + 87, // [87:87] is the sub-list for extension extendee + 0, // [0:87] is the sub-list for field type_name } func init() { file_proto_prysm_v1alpha1_beacon_state_proto_init() } @@ -3571,7 +4166,7 @@ func file_proto_prysm_v1alpha1_beacon_state_proto_init() { } } file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PowBlock); i { + switch v := v.(*BeaconStateEPBS); i { case 0: return &v.state case 1: @@ -3583,6 +4178,18 @@ func file_proto_prysm_v1alpha1_beacon_state_proto_init() { } } file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PowBlock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_beacon_state_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HistoricalSummary); i { case 0: return &v.state @@ -3601,7 +4208,7 @@ func file_proto_prysm_v1alpha1_beacon_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_prysm_v1alpha1_beacon_state_proto_rawDesc, NumEnums: 0, - NumMessages: 18, + NumMessages: 19, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/prysm/v1alpha1/beacon_state.proto b/proto/prysm/v1alpha1/beacon_state.proto index ae184e0864c4..f4fb357b90fa 100644 --- a/proto/prysm/v1alpha1/beacon_state.proto +++ b/proto/prysm/v1alpha1/beacon_state.proto @@ -6,6 +6,7 @@ import "proto/prysm/v1alpha1/attestation.proto"; import "proto/prysm/v1alpha1/beacon_block.proto"; import "proto/prysm/v1alpha1/validator.proto"; import "proto/engine/v1/execution_engine.proto"; +import "proto/engine/v1/epbs.proto"; import "proto/eth/ext/options.proto"; import "proto/prysm/v1alpha1/eip_7251.proto"; @@ -407,6 +408,79 @@ message BeaconStateElectra { repeated PendingConsolidation pending_consolidations = 12009 [(ethereum.eth.ext.ssz_max) = "pending_consolidations_limit"]; } +message BeaconStateEPBS { + // Versioning [1001-2000] + uint64 genesis_time = 1001; + bytes genesis_validators_root = 1002 [(ethereum.eth.ext.ssz_size) = "32"]; + uint64 slot = 1003 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; + Fork fork = 1004; + + // History [2001-3000] + BeaconBlockHeader latest_block_header = 2001; + repeated bytes block_roots = 2002 [(ethereum.eth.ext.ssz_size) = "block_roots.size"]; + repeated bytes state_roots = 2003 [(ethereum.eth.ext.ssz_size) = "state_roots.size"]; + repeated bytes historical_roots = 2004 [(ethereum.eth.ext.ssz_size) = "?,32", (ethereum.eth.ext.ssz_max) = "16777216"]; + + // Eth1 [3001-4000] + Eth1Data eth1_data = 3001; + repeated Eth1Data eth1_data_votes = 3002 [(ethereum.eth.ext.ssz_max) = "eth1_data_votes.size"]; + uint64 eth1_deposit_index = 3003; + + // Registry [4001-5000] + repeated Validator validators = 4001 [(ethereum.eth.ext.ssz_max) = "1099511627776"]; + repeated uint64 balances = 4002 [(ethereum.eth.ext.ssz_max) = "1099511627776"]; + + // Randomness [5001-6000] + repeated bytes randao_mixes = 5001 [(ethereum.eth.ext.ssz_size) = "randao_mixes.size"]; + + // Slashings [6001-7000] + repeated uint64 slashings = 6001 [(ethereum.eth.ext.ssz_size) = "slashings.size"]; + + // Participation [7001-8000] + bytes previous_epoch_participation = 7001 [(ethereum.eth.ext.ssz_max) = "1099511627776"]; + bytes current_epoch_participation = 7002 [(ethereum.eth.ext.ssz_max) = "1099511627776"]; + + // Finality [8001-9000] + // Spec type [4]Bitvector which means this would be a fixed size of 4 bits. + bytes justification_bits = 8001 [(ethereum.eth.ext.ssz_size) = "1", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitvector4"]; + Checkpoint previous_justified_checkpoint = 8002; + Checkpoint current_justified_checkpoint = 8003; + Checkpoint finalized_checkpoint = 8004; + + // Fields introduced in Altair fork [9001-10000] + repeated uint64 inactivity_scores = 9001 [(ethereum.eth.ext.ssz_max) = "1099511627776"]; + SyncCommittee current_sync_committee = 9002; + SyncCommittee next_sync_committee = 9003; + + // Fields introduced in Bellatrix fork [10001-11000] + // ethereum.engine.v1.ExecutionPayloadHeaderDeneb latest_execution_payload_header = 10001; [Removed in ePBS] + ethereum.engine.v1.ExecutionPayloadHeaderEPBS latest_execution_payload_header = 10001; + + // Fields introduced in Capella fork [11001-12000] + uint64 next_withdrawal_index = 11001; + uint64 next_withdrawal_validator_index = 11002 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; + repeated HistoricalSummary historical_summaries = 11003 [(ethereum.eth.ext.ssz_max) = "16777216"]; + + // Fields introduced in Electra fork [12001-13000] + uint64 deposit_requests_start_index = 12001; + uint64 deposit_balance_to_consume = 12002 [(ethereum.eth.ext.cast_type) = +"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Gwei"]; + uint64 exit_balance_to_consume = 12003 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Gwei"]; + uint64 earliest_exit_epoch = 12004 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Epoch"]; + uint64 consolidation_balance_to_consume = 12005 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Gwei"]; + uint64 earliest_consolidation_epoch = 12006 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Epoch"]; + repeated PendingDeposit pending_deposits = 12007 [(ethereum.eth.ext.ssz_max) = "pending_deposits_limit"]; + repeated PendingPartialWithdrawal pending_partial_withdrawals = 12008 [(ethereum.eth.ext.ssz_max) = "pending_partial_withdrawals_limit"]; + repeated PendingConsolidation pending_consolidations = 12009 [(ethereum.eth.ext.ssz_max) = "pending_consolidations_limit"]; + + // Fields introduced in ePBS fork [13001-14000] + bytes latest_block_hash = 13001 [(ethereum.eth.ext.ssz_size) = "32"]; + uint64 latest_full_slot = 13002 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; + bytes last_withdrawals_root = 13003 [(ethereum.eth.ext.ssz_size) = "32"]; +} + + + // PowBlock is a definition from Bellatrix fork choice spec to represent a block with total difficulty in the PoW chain. // Spec: // class PowBlock(Container): diff --git a/proto/prysm/v1alpha1/bellatrix.ssz.go b/proto/prysm/v1alpha1/bellatrix.ssz.go index c2fafaaa073d..4c9f1c9efffd 100644 --- a/proto/prysm/v1alpha1/bellatrix.ssz.go +++ b/proto/prysm/v1alpha1/bellatrix.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: c6614861443f105e2d5445ca29187cc78c2a929161d0a15b36ce2f0e6517a0ea +// Hash: a3e84fd8ae0b93dbeb3c909af7e8359e155f825f5073ca59c7d9c2a6b1a4c7c3 package eth import ( diff --git a/proto/prysm/v1alpha1/capella.ssz.go b/proto/prysm/v1alpha1/capella.ssz.go index 80fa1e074f3f..2aca885b0829 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: 6bee0cf7c5707af68be518a221b248ce37edd4b0b1e6fec9703c6152a5107a1d +// Hash: 28505ce59f413ad624222ccd124026b33de9b2b91f56249cc2950482b8b7a026 package eth import ( diff --git a/proto/prysm/v1alpha1/cloners.go b/proto/prysm/v1alpha1/cloners.go index d4180948ccf2..98599e5b8df1 100644 --- a/proto/prysm/v1alpha1/cloners.go +++ b/proto/prysm/v1alpha1/cloners.go @@ -2,6 +2,7 @@ package eth import ( "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ) type copier[T any] interface { @@ -61,3 +62,113 @@ func CopySyncCommitteeContribution(c *SyncCommitteeContribution) *SyncCommitteeC Signature: bytesutil.SafeCopyBytes(c.Signature), } } + +// CopySignedBeaconBlockEPBS copies the provided SignedBeaconBlockEPBS. +func CopySignedBeaconBlockEPBS(sigBlock *SignedBeaconBlockEpbs) *SignedBeaconBlockEpbs { + if sigBlock == nil { + return nil + } + return &SignedBeaconBlockEpbs{ + Block: CopyBeaconBlockEPBS(sigBlock.Block), + Signature: bytesutil.SafeCopyBytes(sigBlock.Signature), + } +} + +// CopyBeaconBlockEPBS copies the provided BeaconBlockEPBS. +func CopyBeaconBlockEPBS(block *BeaconBlockEpbs) *BeaconBlockEpbs { + if block == nil { + return nil + } + return &BeaconBlockEpbs{ + Slot: block.Slot, + ProposerIndex: block.ProposerIndex, + ParentRoot: bytesutil.SafeCopyBytes(block.ParentRoot), + StateRoot: bytesutil.SafeCopyBytes(block.StateRoot), + Body: CopyBeaconBlockBodyEPBS(block.Body), + } +} + +// CopyBeaconBlockBodyEPBS copies the provided BeaconBlockBodyEPBS. +func CopyBeaconBlockBodyEPBS(body *BeaconBlockBodyEpbs) *BeaconBlockBodyEpbs { + if body == nil { + return nil + } + return &BeaconBlockBodyEpbs{ + RandaoReveal: bytesutil.SafeCopyBytes(body.RandaoReveal), + Eth1Data: body.Eth1Data.Copy(), + Graffiti: bytesutil.SafeCopyBytes(body.Graffiti), + ProposerSlashings: CopySlice(body.ProposerSlashings), + AttesterSlashings: CopySlice(body.AttesterSlashings), + Attestations: CopySlice(body.Attestations), + Deposits: CopySlice(body.Deposits), + VoluntaryExits: CopySlice(body.VoluntaryExits), + SyncAggregate: body.SyncAggregate.Copy(), + BlsToExecutionChanges: CopySlice(body.BlsToExecutionChanges), + SignedExecutionPayloadHeader: CopySignedExecutionPayloadHeader(body.SignedExecutionPayloadHeader), + PayloadAttestations: CopyPayloadAttestations(body.PayloadAttestations), + } +} + +// CopySignedExecutionPayloadHeader copies the provided SignedExecutionPayloadHeader. +func CopySignedExecutionPayloadHeader(payload *enginev1.SignedExecutionPayloadHeader) *enginev1.SignedExecutionPayloadHeader { + if payload == nil { + return nil + } + return &enginev1.SignedExecutionPayloadHeader{ + Message: CopyExecutionPayloadHeaderEPBS(payload.Message), + Signature: bytesutil.SafeCopyBytes(payload.Signature), + } +} + +// CopyExecutionPayloadHeaderEPBS copies the provided execution payload header object. +func CopyExecutionPayloadHeaderEPBS(payload *enginev1.ExecutionPayloadHeaderEPBS) *enginev1.ExecutionPayloadHeaderEPBS { + if payload == nil { + return nil + } + return &enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: bytesutil.SafeCopyBytes(payload.ParentBlockHash), + ParentBlockRoot: bytesutil.SafeCopyBytes(payload.ParentBlockRoot), + BlockHash: bytesutil.SafeCopyBytes(payload.BlockHash), + BuilderIndex: payload.BuilderIndex, + Slot: payload.Slot, + Value: payload.Value, + BlobKzgCommitmentsRoot: bytesutil.SafeCopyBytes(payload.BlobKzgCommitmentsRoot), + GasLimit: payload.GasLimit, + } +} + +// CopyPayloadAttestations copies the provided PayloadAttestation array. +func CopyPayloadAttestations(attestations []*PayloadAttestation) []*PayloadAttestation { + if attestations == nil { + return nil + } + newAttestations := make([]*PayloadAttestation, len(attestations)) + for i, att := range attestations { + newAttestations[i] = CopyPayloadAttestation(att) + } + return newAttestations +} + +// CopyPayloadAttestationData copies the provided PayloadAttestationData. +func CopyPayloadAttestationData(data *PayloadAttestationData) *PayloadAttestationData { + if data == nil { + return nil + } + return &PayloadAttestationData{ + BeaconBlockRoot: bytesutil.SafeCopyBytes(data.BeaconBlockRoot), + Slot: data.Slot, + PayloadStatus: data.PayloadStatus, + } +} + +// CopyPayloadAttestation copies the provided PayloadAttestation. +func CopyPayloadAttestation(a *PayloadAttestation) *PayloadAttestation { + if a == nil { + return nil + } + return &PayloadAttestation{ + AggregationBits: bytesutil.SafeCopyBytes(a.AggregationBits), + Data: CopyPayloadAttestationData(a.Data), + Signature: bytesutil.SafeCopyBytes(a.Signature), + } +} diff --git a/proto/prysm/v1alpha1/deneb.ssz.go b/proto/prysm/v1alpha1/deneb.ssz.go index d5b8cf461aba..f16eea9ceca1 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: dc56f26fb2603482588d88426187e889583abce2eeb7556ac0dc1ebaa891c455 +// Hash: dd3fb6e04b4ae2a395469905df1c979b1f1c7c5c5fc9209e8cc5b5666a665278 package eth import ( diff --git a/proto/prysm/v1alpha1/electra.ssz.go b/proto/prysm/v1alpha1/electra.ssz.go index 772aec1ecb90..53e40feabf7c 100644 --- a/proto/prysm/v1alpha1/electra.ssz.go +++ b/proto/prysm/v1alpha1/electra.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: 5ca1c2c4e61b47b1f8185b3e9c477ae280f82e1483b88d4e11fa214452da5117 +// Hash: f81b46bda0875d8910f190f097511b06d8796b67e36e53a7c10ec64c6285770d package eth import ( diff --git a/proto/prysm/v1alpha1/epbs.ssz.go b/proto/prysm/v1alpha1/epbs.ssz.go new file mode 100644 index 000000000000..861a7834b9b7 --- /dev/null +++ b/proto/prysm/v1alpha1/epbs.ssz.go @@ -0,0 +1,2286 @@ +// Code generated by fastssz. DO NOT EDIT. +// Hash: 3ff87daefbdb992eae24ed85f116b1f4c5659f2e4cad10f2260ccc52a6f37afd +package eth + +import ( + ssz "github.com/prysmaticlabs/fastssz" + 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" +) + +// MarshalSSZ ssz marshals the BeaconBlockEpbs object +func (b *BeaconBlockEpbs) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(b) +} + +// MarshalSSZTo ssz marshals the BeaconBlockEpbs object to a target array +func (b *BeaconBlockEpbs) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(84) + + // Field (0) 'Slot' + dst = ssz.MarshalUint64(dst, uint64(b.Slot)) + + // Field (1) 'ProposerIndex' + dst = ssz.MarshalUint64(dst, uint64(b.ProposerIndex)) + + // Field (2) 'ParentRoot' + if size := len(b.ParentRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.ParentRoot", size, 32) + return + } + dst = append(dst, b.ParentRoot...) + + // Field (3) 'StateRoot' + if size := len(b.StateRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.StateRoot", size, 32) + return + } + dst = append(dst, b.StateRoot...) + + // Offset (4) 'Body' + dst = ssz.WriteOffset(dst, offset) + if b.Body == nil { + b.Body = new(BeaconBlockBodyEpbs) + } + offset += b.Body.SizeSSZ() + + // Field (4) 'Body' + if dst, err = b.Body.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the BeaconBlockEpbs object +func (b *BeaconBlockEpbs) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 84 { + return ssz.ErrSize + } + + tail := buf + var o4 uint64 + + // Field (0) 'Slot' + b.Slot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[0:8])) + + // Field (1) 'ProposerIndex' + b.ProposerIndex = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[8:16])) + + // Field (2) 'ParentRoot' + if cap(b.ParentRoot) == 0 { + b.ParentRoot = make([]byte, 0, len(buf[16:48])) + } + b.ParentRoot = append(b.ParentRoot, buf[16:48]...) + + // Field (3) 'StateRoot' + if cap(b.StateRoot) == 0 { + b.StateRoot = make([]byte, 0, len(buf[48:80])) + } + b.StateRoot = append(b.StateRoot, buf[48:80]...) + + // Offset (4) 'Body' + if o4 = ssz.ReadOffset(buf[80:84]); o4 > size { + return ssz.ErrOffset + } + + if o4 != 84 { + return ssz.ErrInvalidVariableOffset + } + + // Field (4) 'Body' + { + buf = tail[o4:] + if b.Body == nil { + b.Body = new(BeaconBlockBodyEpbs) + } + if err = b.Body.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the BeaconBlockEpbs object +func (b *BeaconBlockEpbs) SizeSSZ() (size int) { + size = 84 + + // Field (4) 'Body' + if b.Body == nil { + b.Body = new(BeaconBlockBodyEpbs) + } + size += b.Body.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the BeaconBlockEpbs object +func (b *BeaconBlockEpbs) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(b) +} + +// HashTreeRootWith ssz hashes the BeaconBlockEpbs object with a hasher +func (b *BeaconBlockEpbs) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'Slot' + hh.PutUint64(uint64(b.Slot)) + + // Field (1) 'ProposerIndex' + hh.PutUint64(uint64(b.ProposerIndex)) + + // Field (2) 'ParentRoot' + if size := len(b.ParentRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.ParentRoot", size, 32) + return + } + hh.PutBytes(b.ParentRoot) + + // Field (3) 'StateRoot' + if size := len(b.StateRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.StateRoot", size, 32) + return + } + hh.PutBytes(b.StateRoot) + + // Field (4) 'Body' + if err = b.Body.HashTreeRootWith(hh); err != nil { + return + } + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the BeaconBlockBodyEpbs object +func (b *BeaconBlockBodyEpbs) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(b) +} + +// MarshalSSZTo ssz marshals the BeaconBlockBodyEpbs object to a target array +func (b *BeaconBlockBodyEpbs) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(644) + + // Field (0) 'RandaoReveal' + if size := len(b.RandaoReveal); size != 96 { + err = ssz.ErrBytesLengthFn("--.RandaoReveal", size, 96) + return + } + dst = append(dst, b.RandaoReveal...) + + // Field (1) 'Eth1Data' + if b.Eth1Data == nil { + b.Eth1Data = new(Eth1Data) + } + if dst, err = b.Eth1Data.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'Graffiti' + if size := len(b.Graffiti); size != 32 { + err = ssz.ErrBytesLengthFn("--.Graffiti", size, 32) + return + } + dst = append(dst, b.Graffiti...) + + // Offset (3) 'ProposerSlashings' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.ProposerSlashings) * 416 + + // Offset (4) 'AttesterSlashings' + dst = ssz.WriteOffset(dst, offset) + for ii := 0; ii < len(b.AttesterSlashings); ii++ { + offset += 4 + offset += b.AttesterSlashings[ii].SizeSSZ() + } + + // Offset (5) 'Attestations' + dst = ssz.WriteOffset(dst, offset) + for ii := 0; ii < len(b.Attestations); ii++ { + offset += 4 + offset += b.Attestations[ii].SizeSSZ() + } + + // Offset (6) 'Deposits' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.Deposits) * 1240 + + // Offset (7) 'VoluntaryExits' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.VoluntaryExits) * 112 + + // Field (8) 'SyncAggregate' + if b.SyncAggregate == nil { + b.SyncAggregate = new(SyncAggregate) + } + if dst, err = b.SyncAggregate.MarshalSSZTo(dst); err != nil { + return + } + + // Offset (9) 'BlsToExecutionChanges' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.BlsToExecutionChanges) * 172 + + // Field (10) 'SignedExecutionPayloadHeader' + if b.SignedExecutionPayloadHeader == nil { + b.SignedExecutionPayloadHeader = new(v1.SignedExecutionPayloadHeader) + } + if dst, err = b.SignedExecutionPayloadHeader.MarshalSSZTo(dst); err != nil { + return + } + + // Offset (11) 'PayloadAttestations' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.PayloadAttestations) * 208 + + // Field (3) 'ProposerSlashings' + if size := len(b.ProposerSlashings); size > 16 { + err = ssz.ErrListTooBigFn("--.ProposerSlashings", size, 16) + return + } + for ii := 0; ii < len(b.ProposerSlashings); ii++ { + if dst, err = b.ProposerSlashings[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + // Field (4) 'AttesterSlashings' + if size := len(b.AttesterSlashings); size > 2 { + err = ssz.ErrListTooBigFn("--.AttesterSlashings", size, 2) + return + } + { + offset = 4 * len(b.AttesterSlashings) + for ii := 0; ii < len(b.AttesterSlashings); ii++ { + dst = ssz.WriteOffset(dst, offset) + offset += b.AttesterSlashings[ii].SizeSSZ() + } + } + for ii := 0; ii < len(b.AttesterSlashings); ii++ { + if dst, err = b.AttesterSlashings[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + // Field (5) 'Attestations' + if size := len(b.Attestations); size > 128 { + err = ssz.ErrListTooBigFn("--.Attestations", size, 128) + return + } + { + offset = 4 * len(b.Attestations) + for ii := 0; ii < len(b.Attestations); ii++ { + dst = ssz.WriteOffset(dst, offset) + offset += b.Attestations[ii].SizeSSZ() + } + } + for ii := 0; ii < len(b.Attestations); ii++ { + if dst, err = b.Attestations[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + // Field (6) 'Deposits' + if size := len(b.Deposits); size > 16 { + err = ssz.ErrListTooBigFn("--.Deposits", size, 16) + return + } + for ii := 0; ii < len(b.Deposits); ii++ { + if dst, err = b.Deposits[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + // Field (7) 'VoluntaryExits' + if size := len(b.VoluntaryExits); size > 16 { + err = ssz.ErrListTooBigFn("--.VoluntaryExits", size, 16) + return + } + for ii := 0; ii < len(b.VoluntaryExits); ii++ { + if dst, err = b.VoluntaryExits[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + // Field (9) 'BlsToExecutionChanges' + if size := len(b.BlsToExecutionChanges); size > 16 { + err = ssz.ErrListTooBigFn("--.BlsToExecutionChanges", size, 16) + return + } + for ii := 0; ii < len(b.BlsToExecutionChanges); ii++ { + if dst, err = b.BlsToExecutionChanges[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + // Field (11) 'PayloadAttestations' + if size := len(b.PayloadAttestations); size > 4 { + err = ssz.ErrListTooBigFn("--.PayloadAttestations", size, 4) + return + } + for ii := 0; ii < len(b.PayloadAttestations); ii++ { + if dst, err = b.PayloadAttestations[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + return +} + +// UnmarshalSSZ ssz unmarshals the BeaconBlockBodyEpbs object +func (b *BeaconBlockBodyEpbs) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 644 { + return ssz.ErrSize + } + + tail := buf + var o3, o4, o5, o6, o7, o9, o11 uint64 + + // Field (0) 'RandaoReveal' + if cap(b.RandaoReveal) == 0 { + b.RandaoReveal = make([]byte, 0, len(buf[0:96])) + } + b.RandaoReveal = append(b.RandaoReveal, buf[0:96]...) + + // Field (1) 'Eth1Data' + if b.Eth1Data == nil { + b.Eth1Data = new(Eth1Data) + } + if err = b.Eth1Data.UnmarshalSSZ(buf[96:168]); err != nil { + return err + } + + // Field (2) 'Graffiti' + if cap(b.Graffiti) == 0 { + b.Graffiti = make([]byte, 0, len(buf[168:200])) + } + b.Graffiti = append(b.Graffiti, buf[168:200]...) + + // Offset (3) 'ProposerSlashings' + if o3 = ssz.ReadOffset(buf[200:204]); o3 > size { + return ssz.ErrOffset + } + + if o3 != 644 { + return ssz.ErrInvalidVariableOffset + } + + // Offset (4) 'AttesterSlashings' + if o4 = ssz.ReadOffset(buf[204:208]); o4 > size || o3 > o4 { + return ssz.ErrOffset + } + + // Offset (5) 'Attestations' + if o5 = ssz.ReadOffset(buf[208:212]); o5 > size || o4 > o5 { + return ssz.ErrOffset + } + + // Offset (6) 'Deposits' + if o6 = ssz.ReadOffset(buf[212:216]); o6 > size || o5 > o6 { + return ssz.ErrOffset + } + + // Offset (7) 'VoluntaryExits' + if o7 = ssz.ReadOffset(buf[216:220]); o7 > size || o6 > o7 { + return ssz.ErrOffset + } + + // Field (8) 'SyncAggregate' + if b.SyncAggregate == nil { + b.SyncAggregate = new(SyncAggregate) + } + if err = b.SyncAggregate.UnmarshalSSZ(buf[220:380]); err != nil { + return err + } + + // Offset (9) 'BlsToExecutionChanges' + if o9 = ssz.ReadOffset(buf[380:384]); o9 > size || o7 > o9 { + return ssz.ErrOffset + } + + // Field (10) 'SignedExecutionPayloadHeader' + if b.SignedExecutionPayloadHeader == nil { + b.SignedExecutionPayloadHeader = new(v1.SignedExecutionPayloadHeader) + } + if err = b.SignedExecutionPayloadHeader.UnmarshalSSZ(buf[384:640]); err != nil { + return err + } + + // Offset (11) 'PayloadAttestations' + if o11 = ssz.ReadOffset(buf[640:644]); o11 > size || o9 > o11 { + return ssz.ErrOffset + } + + // Field (3) 'ProposerSlashings' + { + buf = tail[o3:o4] + num, err := ssz.DivideInt2(len(buf), 416, 16) + if err != nil { + return err + } + b.ProposerSlashings = make([]*ProposerSlashing, num) + for ii := 0; ii < num; ii++ { + if b.ProposerSlashings[ii] == nil { + b.ProposerSlashings[ii] = new(ProposerSlashing) + } + if err = b.ProposerSlashings[ii].UnmarshalSSZ(buf[ii*416 : (ii+1)*416]); err != nil { + return err + } + } + } + + // Field (4) 'AttesterSlashings' + { + buf = tail[o4:o5] + num, err := ssz.DecodeDynamicLength(buf, 2) + if err != nil { + return err + } + b.AttesterSlashings = make([]*AttesterSlashingElectra, num) + err = ssz.UnmarshalDynamic(buf, num, func(indx int, buf []byte) (err error) { + if b.AttesterSlashings[indx] == nil { + b.AttesterSlashings[indx] = new(AttesterSlashingElectra) + } + if err = b.AttesterSlashings[indx].UnmarshalSSZ(buf); err != nil { + return err + } + return nil + }) + if err != nil { + return err + } + } + + // Field (5) 'Attestations' + { + buf = tail[o5:o6] + num, err := ssz.DecodeDynamicLength(buf, 128) + if err != nil { + return err + } + b.Attestations = make([]*AttestationElectra, num) + err = ssz.UnmarshalDynamic(buf, num, func(indx int, buf []byte) (err error) { + if b.Attestations[indx] == nil { + b.Attestations[indx] = new(AttestationElectra) + } + if err = b.Attestations[indx].UnmarshalSSZ(buf); err != nil { + return err + } + return nil + }) + if err != nil { + return err + } + } + + // Field (6) 'Deposits' + { + buf = tail[o6:o7] + num, err := ssz.DivideInt2(len(buf), 1240, 16) + if err != nil { + return err + } + b.Deposits = make([]*Deposit, num) + for ii := 0; ii < num; ii++ { + if b.Deposits[ii] == nil { + b.Deposits[ii] = new(Deposit) + } + if err = b.Deposits[ii].UnmarshalSSZ(buf[ii*1240 : (ii+1)*1240]); err != nil { + return err + } + } + } + + // Field (7) 'VoluntaryExits' + { + buf = tail[o7:o9] + num, err := ssz.DivideInt2(len(buf), 112, 16) + if err != nil { + return err + } + b.VoluntaryExits = make([]*SignedVoluntaryExit, num) + for ii := 0; ii < num; ii++ { + if b.VoluntaryExits[ii] == nil { + b.VoluntaryExits[ii] = new(SignedVoluntaryExit) + } + if err = b.VoluntaryExits[ii].UnmarshalSSZ(buf[ii*112 : (ii+1)*112]); err != nil { + return err + } + } + } + + // Field (9) 'BlsToExecutionChanges' + { + buf = tail[o9:o11] + num, err := ssz.DivideInt2(len(buf), 172, 16) + if err != nil { + return err + } + b.BlsToExecutionChanges = make([]*SignedBLSToExecutionChange, num) + for ii := 0; ii < num; ii++ { + if b.BlsToExecutionChanges[ii] == nil { + b.BlsToExecutionChanges[ii] = new(SignedBLSToExecutionChange) + } + if err = b.BlsToExecutionChanges[ii].UnmarshalSSZ(buf[ii*172 : (ii+1)*172]); err != nil { + return err + } + } + } + + // Field (11) 'PayloadAttestations' + { + buf = tail[o11:] + num, err := ssz.DivideInt2(len(buf), 208, 4) + if err != nil { + return err + } + b.PayloadAttestations = make([]*PayloadAttestation, num) + for ii := 0; ii < num; ii++ { + if b.PayloadAttestations[ii] == nil { + b.PayloadAttestations[ii] = new(PayloadAttestation) + } + if err = b.PayloadAttestations[ii].UnmarshalSSZ(buf[ii*208 : (ii+1)*208]); err != nil { + return err + } + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the BeaconBlockBodyEpbs object +func (b *BeaconBlockBodyEpbs) SizeSSZ() (size int) { + size = 644 + + // Field (3) 'ProposerSlashings' + size += len(b.ProposerSlashings) * 416 + + // Field (4) 'AttesterSlashings' + for ii := 0; ii < len(b.AttesterSlashings); ii++ { + size += 4 + size += b.AttesterSlashings[ii].SizeSSZ() + } + + // Field (5) 'Attestations' + for ii := 0; ii < len(b.Attestations); ii++ { + size += 4 + size += b.Attestations[ii].SizeSSZ() + } + + // Field (6) 'Deposits' + size += len(b.Deposits) * 1240 + + // Field (7) 'VoluntaryExits' + size += len(b.VoluntaryExits) * 112 + + // Field (9) 'BlsToExecutionChanges' + size += len(b.BlsToExecutionChanges) * 172 + + // Field (11) 'PayloadAttestations' + size += len(b.PayloadAttestations) * 208 + + return +} + +// HashTreeRoot ssz hashes the BeaconBlockBodyEpbs object +func (b *BeaconBlockBodyEpbs) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(b) +} + +// HashTreeRootWith ssz hashes the BeaconBlockBodyEpbs object with a hasher +func (b *BeaconBlockBodyEpbs) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'RandaoReveal' + if size := len(b.RandaoReveal); size != 96 { + err = ssz.ErrBytesLengthFn("--.RandaoReveal", size, 96) + return + } + hh.PutBytes(b.RandaoReveal) + + // Field (1) 'Eth1Data' + if err = b.Eth1Data.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'Graffiti' + if size := len(b.Graffiti); size != 32 { + err = ssz.ErrBytesLengthFn("--.Graffiti", size, 32) + return + } + hh.PutBytes(b.Graffiti) + + // Field (3) 'ProposerSlashings' + { + subIndx := hh.Index() + num := uint64(len(b.ProposerSlashings)) + if num > 16 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.ProposerSlashings { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 16) + } + + // Field (4) 'AttesterSlashings' + { + subIndx := hh.Index() + num := uint64(len(b.AttesterSlashings)) + if num > 2 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.AttesterSlashings { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 2) + } + + // Field (5) 'Attestations' + { + subIndx := hh.Index() + num := uint64(len(b.Attestations)) + if num > 128 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.Attestations { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 128) + } + + // Field (6) 'Deposits' + { + subIndx := hh.Index() + num := uint64(len(b.Deposits)) + if num > 16 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.Deposits { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 16) + } + + // Field (7) 'VoluntaryExits' + { + subIndx := hh.Index() + num := uint64(len(b.VoluntaryExits)) + if num > 16 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.VoluntaryExits { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 16) + } + + // Field (8) 'SyncAggregate' + if err = b.SyncAggregate.HashTreeRootWith(hh); err != nil { + return + } + + // Field (9) 'BlsToExecutionChanges' + { + subIndx := hh.Index() + num := uint64(len(b.BlsToExecutionChanges)) + if num > 16 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.BlsToExecutionChanges { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 16) + } + + // Field (10) 'SignedExecutionPayloadHeader' + if err = b.SignedExecutionPayloadHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (11) 'PayloadAttestations' + { + subIndx := hh.Index() + num := uint64(len(b.PayloadAttestations)) + if num > 4 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.PayloadAttestations { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 4) + } + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the SignedBeaconBlockEpbs object +func (s *SignedBeaconBlockEpbs) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(s) +} + +// MarshalSSZTo ssz marshals the SignedBeaconBlockEpbs object to a target array +func (s *SignedBeaconBlockEpbs) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(100) + + // Offset (0) 'Block' + dst = ssz.WriteOffset(dst, offset) + if s.Block == nil { + s.Block = new(BeaconBlockEpbs) + } + offset += s.Block.SizeSSZ() + + // Field (1) 'Signature' + if size := len(s.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + dst = append(dst, s.Signature...) + + // Field (0) 'Block' + if dst, err = s.Block.MarshalSSZTo(dst); err != nil { + return + } + + return +} + +// UnmarshalSSZ ssz unmarshals the SignedBeaconBlockEpbs object +func (s *SignedBeaconBlockEpbs) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 100 { + return ssz.ErrSize + } + + tail := buf + var o0 uint64 + + // Offset (0) 'Block' + if o0 = ssz.ReadOffset(buf[0:4]); o0 > size { + return ssz.ErrOffset + } + + if o0 != 100 { + return ssz.ErrInvalidVariableOffset + } + + // Field (1) 'Signature' + if cap(s.Signature) == 0 { + s.Signature = make([]byte, 0, len(buf[4:100])) + } + s.Signature = append(s.Signature, buf[4:100]...) + + // Field (0) 'Block' + { + buf = tail[o0:] + if s.Block == nil { + s.Block = new(BeaconBlockEpbs) + } + if err = s.Block.UnmarshalSSZ(buf); err != nil { + return err + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the SignedBeaconBlockEpbs object +func (s *SignedBeaconBlockEpbs) SizeSSZ() (size int) { + size = 100 + + // Field (0) 'Block' + if s.Block == nil { + s.Block = new(BeaconBlockEpbs) + } + size += s.Block.SizeSSZ() + + return +} + +// HashTreeRoot ssz hashes the SignedBeaconBlockEpbs object +func (s *SignedBeaconBlockEpbs) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(s) +} + +// HashTreeRootWith ssz hashes the SignedBeaconBlockEpbs object with a hasher +func (s *SignedBeaconBlockEpbs) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'Block' + if err = s.Block.HashTreeRootWith(hh); err != nil { + return + } + + // Field (1) 'Signature' + if size := len(s.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + hh.PutBytes(s.Signature) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the BeaconStateEPBS object +func (b *BeaconStateEPBS) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(b) +} + +// MarshalSSZTo ssz marshals the BeaconStateEPBS object to a target array +func (b *BeaconStateEPBS) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + offset := int(2736941) + + // Field (0) 'GenesisTime' + dst = ssz.MarshalUint64(dst, b.GenesisTime) + + // Field (1) 'GenesisValidatorsRoot' + if size := len(b.GenesisValidatorsRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.GenesisValidatorsRoot", size, 32) + return + } + dst = append(dst, b.GenesisValidatorsRoot...) + + // Field (2) 'Slot' + dst = ssz.MarshalUint64(dst, uint64(b.Slot)) + + // Field (3) 'Fork' + if b.Fork == nil { + b.Fork = new(Fork) + } + if dst, err = b.Fork.MarshalSSZTo(dst); err != nil { + return + } + + // Field (4) 'LatestBlockHeader' + if b.LatestBlockHeader == nil { + b.LatestBlockHeader = new(BeaconBlockHeader) + } + if dst, err = b.LatestBlockHeader.MarshalSSZTo(dst); err != nil { + return + } + + // Field (5) 'BlockRoots' + if size := len(b.BlockRoots); size != 8192 { + err = ssz.ErrVectorLengthFn("--.BlockRoots", size, 8192) + return + } + for ii := 0; ii < 8192; ii++ { + if size := len(b.BlockRoots[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.BlockRoots[ii]", size, 32) + return + } + dst = append(dst, b.BlockRoots[ii]...) + } + + // Field (6) 'StateRoots' + if size := len(b.StateRoots); size != 8192 { + err = ssz.ErrVectorLengthFn("--.StateRoots", size, 8192) + return + } + for ii := 0; ii < 8192; ii++ { + if size := len(b.StateRoots[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.StateRoots[ii]", size, 32) + return + } + dst = append(dst, b.StateRoots[ii]...) + } + + // Offset (7) 'HistoricalRoots' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.HistoricalRoots) * 32 + + // Field (8) 'Eth1Data' + if b.Eth1Data == nil { + b.Eth1Data = new(Eth1Data) + } + if dst, err = b.Eth1Data.MarshalSSZTo(dst); err != nil { + return + } + + // Offset (9) 'Eth1DataVotes' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.Eth1DataVotes) * 72 + + // Field (10) 'Eth1DepositIndex' + dst = ssz.MarshalUint64(dst, b.Eth1DepositIndex) + + // Offset (11) 'Validators' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.Validators) * 121 + + // Offset (12) 'Balances' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.Balances) * 8 + + // Field (13) 'RandaoMixes' + if size := len(b.RandaoMixes); size != 65536 { + err = ssz.ErrVectorLengthFn("--.RandaoMixes", size, 65536) + return + } + for ii := 0; ii < 65536; ii++ { + if size := len(b.RandaoMixes[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.RandaoMixes[ii]", size, 32) + return + } + dst = append(dst, b.RandaoMixes[ii]...) + } + + // Field (14) 'Slashings' + if size := len(b.Slashings); size != 8192 { + err = ssz.ErrVectorLengthFn("--.Slashings", size, 8192) + return + } + for ii := 0; ii < 8192; ii++ { + dst = ssz.MarshalUint64(dst, b.Slashings[ii]) + } + + // Offset (15) 'PreviousEpochParticipation' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.PreviousEpochParticipation) + + // Offset (16) 'CurrentEpochParticipation' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.CurrentEpochParticipation) + + // Field (17) 'JustificationBits' + if size := len(b.JustificationBits); size != 1 { + err = ssz.ErrBytesLengthFn("--.JustificationBits", size, 1) + return + } + dst = append(dst, b.JustificationBits...) + + // Field (18) 'PreviousJustifiedCheckpoint' + if b.PreviousJustifiedCheckpoint == nil { + b.PreviousJustifiedCheckpoint = new(Checkpoint) + } + if dst, err = b.PreviousJustifiedCheckpoint.MarshalSSZTo(dst); err != nil { + return + } + + // Field (19) 'CurrentJustifiedCheckpoint' + if b.CurrentJustifiedCheckpoint == nil { + b.CurrentJustifiedCheckpoint = new(Checkpoint) + } + if dst, err = b.CurrentJustifiedCheckpoint.MarshalSSZTo(dst); err != nil { + return + } + + // Field (20) 'FinalizedCheckpoint' + if b.FinalizedCheckpoint == nil { + b.FinalizedCheckpoint = new(Checkpoint) + } + if dst, err = b.FinalizedCheckpoint.MarshalSSZTo(dst); err != nil { + return + } + + // Offset (21) 'InactivityScores' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.InactivityScores) * 8 + + // Field (22) 'CurrentSyncCommittee' + if b.CurrentSyncCommittee == nil { + b.CurrentSyncCommittee = new(SyncCommittee) + } + if dst, err = b.CurrentSyncCommittee.MarshalSSZTo(dst); err != nil { + return + } + + // Field (23) 'NextSyncCommittee' + if b.NextSyncCommittee == nil { + b.NextSyncCommittee = new(SyncCommittee) + } + if dst, err = b.NextSyncCommittee.MarshalSSZTo(dst); err != nil { + return + } + + // Field (24) 'LatestExecutionPayloadHeader' + if b.LatestExecutionPayloadHeader == nil { + b.LatestExecutionPayloadHeader = new(v1.ExecutionPayloadHeaderEPBS) + } + if dst, err = b.LatestExecutionPayloadHeader.MarshalSSZTo(dst); err != nil { + return + } + + // Field (25) 'NextWithdrawalIndex' + dst = ssz.MarshalUint64(dst, b.NextWithdrawalIndex) + + // Field (26) 'NextWithdrawalValidatorIndex' + dst = ssz.MarshalUint64(dst, uint64(b.NextWithdrawalValidatorIndex)) + + // Offset (27) 'HistoricalSummaries' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.HistoricalSummaries) * 64 + + // Field (28) 'DepositRequestsStartIndex' + dst = ssz.MarshalUint64(dst, b.DepositRequestsStartIndex) + + // Field (29) 'DepositBalanceToConsume' + dst = ssz.MarshalUint64(dst, uint64(b.DepositBalanceToConsume)) + + // Field (30) 'ExitBalanceToConsume' + dst = ssz.MarshalUint64(dst, uint64(b.ExitBalanceToConsume)) + + // Field (31) 'EarliestExitEpoch' + dst = ssz.MarshalUint64(dst, uint64(b.EarliestExitEpoch)) + + // Field (32) 'ConsolidationBalanceToConsume' + dst = ssz.MarshalUint64(dst, uint64(b.ConsolidationBalanceToConsume)) + + // Field (33) 'EarliestConsolidationEpoch' + dst = ssz.MarshalUint64(dst, uint64(b.EarliestConsolidationEpoch)) + + // Offset (34) 'PendingDeposits' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.PendingDeposits) * 192 + + // Offset (35) 'PendingPartialWithdrawals' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.PendingPartialWithdrawals) * 24 + + // Offset (36) 'PendingConsolidations' + dst = ssz.WriteOffset(dst, offset) + offset += len(b.PendingConsolidations) * 16 + + // Field (37) 'LatestBlockHash' + if size := len(b.LatestBlockHash); size != 32 { + err = ssz.ErrBytesLengthFn("--.LatestBlockHash", size, 32) + return + } + dst = append(dst, b.LatestBlockHash...) + + // Field (38) 'LatestFullSlot' + dst = ssz.MarshalUint64(dst, uint64(b.LatestFullSlot)) + + // Field (39) 'LastWithdrawalsRoot' + if size := len(b.LastWithdrawalsRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.LastWithdrawalsRoot", size, 32) + return + } + dst = append(dst, b.LastWithdrawalsRoot...) + + // Field (7) 'HistoricalRoots' + if size := len(b.HistoricalRoots); size > 16777216 { + err = ssz.ErrListTooBigFn("--.HistoricalRoots", size, 16777216) + return + } + for ii := 0; ii < len(b.HistoricalRoots); ii++ { + if size := len(b.HistoricalRoots[ii]); size != 32 { + err = ssz.ErrBytesLengthFn("--.HistoricalRoots[ii]", size, 32) + return + } + dst = append(dst, b.HistoricalRoots[ii]...) + } + + // Field (9) 'Eth1DataVotes' + if size := len(b.Eth1DataVotes); size > 2048 { + err = ssz.ErrListTooBigFn("--.Eth1DataVotes", size, 2048) + return + } + for ii := 0; ii < len(b.Eth1DataVotes); ii++ { + if dst, err = b.Eth1DataVotes[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + // Field (11) 'Validators' + if size := len(b.Validators); size > 1099511627776 { + err = ssz.ErrListTooBigFn("--.Validators", size, 1099511627776) + return + } + for ii := 0; ii < len(b.Validators); ii++ { + if dst, err = b.Validators[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + // Field (12) 'Balances' + if size := len(b.Balances); size > 1099511627776 { + err = ssz.ErrListTooBigFn("--.Balances", size, 1099511627776) + return + } + for ii := 0; ii < len(b.Balances); ii++ { + dst = ssz.MarshalUint64(dst, b.Balances[ii]) + } + + // Field (15) 'PreviousEpochParticipation' + if size := len(b.PreviousEpochParticipation); size > 1099511627776 { + err = ssz.ErrBytesLengthFn("--.PreviousEpochParticipation", size, 1099511627776) + return + } + dst = append(dst, b.PreviousEpochParticipation...) + + // Field (16) 'CurrentEpochParticipation' + if size := len(b.CurrentEpochParticipation); size > 1099511627776 { + err = ssz.ErrBytesLengthFn("--.CurrentEpochParticipation", size, 1099511627776) + return + } + dst = append(dst, b.CurrentEpochParticipation...) + + // Field (21) 'InactivityScores' + if size := len(b.InactivityScores); size > 1099511627776 { + err = ssz.ErrListTooBigFn("--.InactivityScores", size, 1099511627776) + return + } + for ii := 0; ii < len(b.InactivityScores); ii++ { + dst = ssz.MarshalUint64(dst, b.InactivityScores[ii]) + } + + // Field (27) 'HistoricalSummaries' + if size := len(b.HistoricalSummaries); size > 16777216 { + err = ssz.ErrListTooBigFn("--.HistoricalSummaries", size, 16777216) + return + } + for ii := 0; ii < len(b.HistoricalSummaries); ii++ { + if dst, err = b.HistoricalSummaries[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + // Field (34) 'PendingDeposits' + if size := len(b.PendingDeposits); size > 134217728 { + err = ssz.ErrListTooBigFn("--.PendingDeposits", size, 134217728) + return + } + for ii := 0; ii < len(b.PendingDeposits); ii++ { + if dst, err = b.PendingDeposits[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + // Field (35) 'PendingPartialWithdrawals' + if size := len(b.PendingPartialWithdrawals); size > 134217728 { + err = ssz.ErrListTooBigFn("--.PendingPartialWithdrawals", size, 134217728) + return + } + for ii := 0; ii < len(b.PendingPartialWithdrawals); ii++ { + if dst, err = b.PendingPartialWithdrawals[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + // Field (36) 'PendingConsolidations' + if size := len(b.PendingConsolidations); size > 262144 { + err = ssz.ErrListTooBigFn("--.PendingConsolidations", size, 262144) + return + } + for ii := 0; ii < len(b.PendingConsolidations); ii++ { + if dst, err = b.PendingConsolidations[ii].MarshalSSZTo(dst); err != nil { + return + } + } + + return +} + +// UnmarshalSSZ ssz unmarshals the BeaconStateEPBS object +func (b *BeaconStateEPBS) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size < 2736941 { + return ssz.ErrSize + } + + tail := buf + var o7, o9, o11, o12, o15, o16, o21, o27, o34, o35, o36 uint64 + + // Field (0) 'GenesisTime' + b.GenesisTime = ssz.UnmarshallUint64(buf[0:8]) + + // Field (1) 'GenesisValidatorsRoot' + if cap(b.GenesisValidatorsRoot) == 0 { + b.GenesisValidatorsRoot = make([]byte, 0, len(buf[8:40])) + } + b.GenesisValidatorsRoot = append(b.GenesisValidatorsRoot, buf[8:40]...) + + // Field (2) 'Slot' + b.Slot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[40:48])) + + // Field (3) 'Fork' + if b.Fork == nil { + b.Fork = new(Fork) + } + if err = b.Fork.UnmarshalSSZ(buf[48:64]); err != nil { + return err + } + + // Field (4) 'LatestBlockHeader' + if b.LatestBlockHeader == nil { + b.LatestBlockHeader = new(BeaconBlockHeader) + } + if err = b.LatestBlockHeader.UnmarshalSSZ(buf[64:176]); err != nil { + return err + } + + // Field (5) 'BlockRoots' + b.BlockRoots = make([][]byte, 8192) + for ii := 0; ii < 8192; ii++ { + if cap(b.BlockRoots[ii]) == 0 { + b.BlockRoots[ii] = make([]byte, 0, len(buf[176:262320][ii*32:(ii+1)*32])) + } + b.BlockRoots[ii] = append(b.BlockRoots[ii], buf[176:262320][ii*32:(ii+1)*32]...) + } + + // Field (6) 'StateRoots' + b.StateRoots = make([][]byte, 8192) + for ii := 0; ii < 8192; ii++ { + if cap(b.StateRoots[ii]) == 0 { + b.StateRoots[ii] = make([]byte, 0, len(buf[262320:524464][ii*32:(ii+1)*32])) + } + b.StateRoots[ii] = append(b.StateRoots[ii], buf[262320:524464][ii*32:(ii+1)*32]...) + } + + // Offset (7) 'HistoricalRoots' + if o7 = ssz.ReadOffset(buf[524464:524468]); o7 > size { + return ssz.ErrOffset + } + + if o7 != 2736941 { + return ssz.ErrInvalidVariableOffset + } + + // Field (8) 'Eth1Data' + if b.Eth1Data == nil { + b.Eth1Data = new(Eth1Data) + } + if err = b.Eth1Data.UnmarshalSSZ(buf[524468:524540]); err != nil { + return err + } + + // Offset (9) 'Eth1DataVotes' + if o9 = ssz.ReadOffset(buf[524540:524544]); o9 > size || o7 > o9 { + return ssz.ErrOffset + } + + // Field (10) 'Eth1DepositIndex' + b.Eth1DepositIndex = ssz.UnmarshallUint64(buf[524544:524552]) + + // Offset (11) 'Validators' + if o11 = ssz.ReadOffset(buf[524552:524556]); o11 > size || o9 > o11 { + return ssz.ErrOffset + } + + // Offset (12) 'Balances' + if o12 = ssz.ReadOffset(buf[524556:524560]); o12 > size || o11 > o12 { + return ssz.ErrOffset + } + + // Field (13) 'RandaoMixes' + b.RandaoMixes = make([][]byte, 65536) + for ii := 0; ii < 65536; ii++ { + if cap(b.RandaoMixes[ii]) == 0 { + b.RandaoMixes[ii] = make([]byte, 0, len(buf[524560:2621712][ii*32:(ii+1)*32])) + } + b.RandaoMixes[ii] = append(b.RandaoMixes[ii], buf[524560:2621712][ii*32:(ii+1)*32]...) + } + + // Field (14) 'Slashings' + b.Slashings = ssz.ExtendUint64(b.Slashings, 8192) + for ii := 0; ii < 8192; ii++ { + b.Slashings[ii] = ssz.UnmarshallUint64(buf[2621712:2687248][ii*8 : (ii+1)*8]) + } + + // Offset (15) 'PreviousEpochParticipation' + if o15 = ssz.ReadOffset(buf[2687248:2687252]); o15 > size || o12 > o15 { + return ssz.ErrOffset + } + + // Offset (16) 'CurrentEpochParticipation' + if o16 = ssz.ReadOffset(buf[2687252:2687256]); o16 > size || o15 > o16 { + return ssz.ErrOffset + } + + // Field (17) 'JustificationBits' + if cap(b.JustificationBits) == 0 { + b.JustificationBits = make([]byte, 0, len(buf[2687256:2687257])) + } + b.JustificationBits = append(b.JustificationBits, buf[2687256:2687257]...) + + // Field (18) 'PreviousJustifiedCheckpoint' + if b.PreviousJustifiedCheckpoint == nil { + b.PreviousJustifiedCheckpoint = new(Checkpoint) + } + if err = b.PreviousJustifiedCheckpoint.UnmarshalSSZ(buf[2687257:2687297]); err != nil { + return err + } + + // Field (19) 'CurrentJustifiedCheckpoint' + if b.CurrentJustifiedCheckpoint == nil { + b.CurrentJustifiedCheckpoint = new(Checkpoint) + } + if err = b.CurrentJustifiedCheckpoint.UnmarshalSSZ(buf[2687297:2687337]); err != nil { + return err + } + + // Field (20) 'FinalizedCheckpoint' + if b.FinalizedCheckpoint == nil { + b.FinalizedCheckpoint = new(Checkpoint) + } + if err = b.FinalizedCheckpoint.UnmarshalSSZ(buf[2687337:2687377]); err != nil { + return err + } + + // Offset (21) 'InactivityScores' + if o21 = ssz.ReadOffset(buf[2687377:2687381]); o21 > size || o16 > o21 { + return ssz.ErrOffset + } + + // Field (22) 'CurrentSyncCommittee' + if b.CurrentSyncCommittee == nil { + b.CurrentSyncCommittee = new(SyncCommittee) + } + if err = b.CurrentSyncCommittee.UnmarshalSSZ(buf[2687381:2712005]); err != nil { + return err + } + + // Field (23) 'NextSyncCommittee' + if b.NextSyncCommittee == nil { + b.NextSyncCommittee = new(SyncCommittee) + } + if err = b.NextSyncCommittee.UnmarshalSSZ(buf[2712005:2736629]); err != nil { + return err + } + + // Field (24) 'LatestExecutionPayloadHeader' + if b.LatestExecutionPayloadHeader == nil { + b.LatestExecutionPayloadHeader = new(v1.ExecutionPayloadHeaderEPBS) + } + if err = b.LatestExecutionPayloadHeader.UnmarshalSSZ(buf[2736629:2736789]); err != nil { + return err + } + + // Field (25) 'NextWithdrawalIndex' + b.NextWithdrawalIndex = ssz.UnmarshallUint64(buf[2736789:2736797]) + + // Field (26) 'NextWithdrawalValidatorIndex' + b.NextWithdrawalValidatorIndex = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[2736797:2736805])) + + // Offset (27) 'HistoricalSummaries' + if o27 = ssz.ReadOffset(buf[2736805:2736809]); o27 > size || o21 > o27 { + return ssz.ErrOffset + } + + // Field (28) 'DepositRequestsStartIndex' + b.DepositRequestsStartIndex = ssz.UnmarshallUint64(buf[2736809:2736817]) + + // Field (29) 'DepositBalanceToConsume' + b.DepositBalanceToConsume = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Gwei(ssz.UnmarshallUint64(buf[2736817:2736825])) + + // Field (30) 'ExitBalanceToConsume' + b.ExitBalanceToConsume = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Gwei(ssz.UnmarshallUint64(buf[2736825:2736833])) + + // Field (31) 'EarliestExitEpoch' + b.EarliestExitEpoch = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Epoch(ssz.UnmarshallUint64(buf[2736833:2736841])) + + // Field (32) 'ConsolidationBalanceToConsume' + b.ConsolidationBalanceToConsume = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Gwei(ssz.UnmarshallUint64(buf[2736841:2736849])) + + // Field (33) 'EarliestConsolidationEpoch' + b.EarliestConsolidationEpoch = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Epoch(ssz.UnmarshallUint64(buf[2736849:2736857])) + + // Offset (34) 'PendingDeposits' + if o34 = ssz.ReadOffset(buf[2736857:2736861]); o34 > size || o27 > o34 { + return ssz.ErrOffset + } + + // Offset (35) 'PendingPartialWithdrawals' + if o35 = ssz.ReadOffset(buf[2736861:2736865]); o35 > size || o34 > o35 { + return ssz.ErrOffset + } + + // Offset (36) 'PendingConsolidations' + if o36 = ssz.ReadOffset(buf[2736865:2736869]); o36 > size || o35 > o36 { + return ssz.ErrOffset + } + + // Field (37) 'LatestBlockHash' + if cap(b.LatestBlockHash) == 0 { + b.LatestBlockHash = make([]byte, 0, len(buf[2736869:2736901])) + } + b.LatestBlockHash = append(b.LatestBlockHash, buf[2736869:2736901]...) + + // Field (38) 'LatestFullSlot' + b.LatestFullSlot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[2736901:2736909])) + + // Field (39) 'LastWithdrawalsRoot' + if cap(b.LastWithdrawalsRoot) == 0 { + b.LastWithdrawalsRoot = make([]byte, 0, len(buf[2736909:2736941])) + } + b.LastWithdrawalsRoot = append(b.LastWithdrawalsRoot, buf[2736909:2736941]...) + + // Field (7) 'HistoricalRoots' + { + buf = tail[o7:o9] + num, err := ssz.DivideInt2(len(buf), 32, 16777216) + if err != nil { + return err + } + b.HistoricalRoots = make([][]byte, num) + for ii := 0; ii < num; ii++ { + if cap(b.HistoricalRoots[ii]) == 0 { + b.HistoricalRoots[ii] = make([]byte, 0, len(buf[ii*32:(ii+1)*32])) + } + b.HistoricalRoots[ii] = append(b.HistoricalRoots[ii], buf[ii*32:(ii+1)*32]...) + } + } + + // Field (9) 'Eth1DataVotes' + { + buf = tail[o9:o11] + num, err := ssz.DivideInt2(len(buf), 72, 2048) + if err != nil { + return err + } + b.Eth1DataVotes = make([]*Eth1Data, num) + for ii := 0; ii < num; ii++ { + if b.Eth1DataVotes[ii] == nil { + b.Eth1DataVotes[ii] = new(Eth1Data) + } + if err = b.Eth1DataVotes[ii].UnmarshalSSZ(buf[ii*72 : (ii+1)*72]); err != nil { + return err + } + } + } + + // Field (11) 'Validators' + { + buf = tail[o11:o12] + num, err := ssz.DivideInt2(len(buf), 121, 1099511627776) + if err != nil { + return err + } + b.Validators = make([]*Validator, num) + for ii := 0; ii < num; ii++ { + if b.Validators[ii] == nil { + b.Validators[ii] = new(Validator) + } + if err = b.Validators[ii].UnmarshalSSZ(buf[ii*121 : (ii+1)*121]); err != nil { + return err + } + } + } + + // Field (12) 'Balances' + { + buf = tail[o12:o15] + num, err := ssz.DivideInt2(len(buf), 8, 1099511627776) + if err != nil { + return err + } + b.Balances = ssz.ExtendUint64(b.Balances, num) + for ii := 0; ii < num; ii++ { + b.Balances[ii] = ssz.UnmarshallUint64(buf[ii*8 : (ii+1)*8]) + } + } + + // Field (15) 'PreviousEpochParticipation' + { + buf = tail[o15:o16] + if len(buf) > 1099511627776 { + return ssz.ErrBytesLength + } + if cap(b.PreviousEpochParticipation) == 0 { + b.PreviousEpochParticipation = make([]byte, 0, len(buf)) + } + b.PreviousEpochParticipation = append(b.PreviousEpochParticipation, buf...) + } + + // Field (16) 'CurrentEpochParticipation' + { + buf = tail[o16:o21] + if len(buf) > 1099511627776 { + return ssz.ErrBytesLength + } + if cap(b.CurrentEpochParticipation) == 0 { + b.CurrentEpochParticipation = make([]byte, 0, len(buf)) + } + b.CurrentEpochParticipation = append(b.CurrentEpochParticipation, buf...) + } + + // Field (21) 'InactivityScores' + { + buf = tail[o21:o27] + num, err := ssz.DivideInt2(len(buf), 8, 1099511627776) + if err != nil { + return err + } + b.InactivityScores = ssz.ExtendUint64(b.InactivityScores, num) + for ii := 0; ii < num; ii++ { + b.InactivityScores[ii] = ssz.UnmarshallUint64(buf[ii*8 : (ii+1)*8]) + } + } + + // Field (27) 'HistoricalSummaries' + { + buf = tail[o27:o34] + num, err := ssz.DivideInt2(len(buf), 64, 16777216) + if err != nil { + return err + } + b.HistoricalSummaries = make([]*HistoricalSummary, num) + for ii := 0; ii < num; ii++ { + if b.HistoricalSummaries[ii] == nil { + b.HistoricalSummaries[ii] = new(HistoricalSummary) + } + if err = b.HistoricalSummaries[ii].UnmarshalSSZ(buf[ii*64 : (ii+1)*64]); err != nil { + return err + } + } + } + + // Field (34) 'PendingDeposits' + { + buf = tail[o34:o35] + num, err := ssz.DivideInt2(len(buf), 192, 134217728) + if err != nil { + return err + } + b.PendingDeposits = make([]*PendingDeposit, num) + for ii := 0; ii < num; ii++ { + if b.PendingDeposits[ii] == nil { + b.PendingDeposits[ii] = new(PendingDeposit) + } + if err = b.PendingDeposits[ii].UnmarshalSSZ(buf[ii*192 : (ii+1)*192]); err != nil { + return err + } + } + } + + // Field (35) 'PendingPartialWithdrawals' + { + buf = tail[o35:o36] + num, err := ssz.DivideInt2(len(buf), 24, 134217728) + if err != nil { + return err + } + b.PendingPartialWithdrawals = make([]*PendingPartialWithdrawal, num) + for ii := 0; ii < num; ii++ { + if b.PendingPartialWithdrawals[ii] == nil { + b.PendingPartialWithdrawals[ii] = new(PendingPartialWithdrawal) + } + if err = b.PendingPartialWithdrawals[ii].UnmarshalSSZ(buf[ii*24 : (ii+1)*24]); err != nil { + return err + } + } + } + + // Field (36) 'PendingConsolidations' + { + buf = tail[o36:] + num, err := ssz.DivideInt2(len(buf), 16, 262144) + if err != nil { + return err + } + b.PendingConsolidations = make([]*PendingConsolidation, num) + for ii := 0; ii < num; ii++ { + if b.PendingConsolidations[ii] == nil { + b.PendingConsolidations[ii] = new(PendingConsolidation) + } + if err = b.PendingConsolidations[ii].UnmarshalSSZ(buf[ii*16 : (ii+1)*16]); err != nil { + return err + } + } + } + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the BeaconStateEPBS object +func (b *BeaconStateEPBS) SizeSSZ() (size int) { + size = 2736941 + + // Field (7) 'HistoricalRoots' + size += len(b.HistoricalRoots) * 32 + + // Field (9) 'Eth1DataVotes' + size += len(b.Eth1DataVotes) * 72 + + // Field (11) 'Validators' + size += len(b.Validators) * 121 + + // Field (12) 'Balances' + size += len(b.Balances) * 8 + + // Field (15) 'PreviousEpochParticipation' + size += len(b.PreviousEpochParticipation) + + // Field (16) 'CurrentEpochParticipation' + size += len(b.CurrentEpochParticipation) + + // Field (21) 'InactivityScores' + size += len(b.InactivityScores) * 8 + + // Field (27) 'HistoricalSummaries' + size += len(b.HistoricalSummaries) * 64 + + // Field (34) 'PendingDeposits' + size += len(b.PendingDeposits) * 192 + + // Field (35) 'PendingPartialWithdrawals' + size += len(b.PendingPartialWithdrawals) * 24 + + // Field (36) 'PendingConsolidations' + size += len(b.PendingConsolidations) * 16 + + return +} + +// HashTreeRoot ssz hashes the BeaconStateEPBS object +func (b *BeaconStateEPBS) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(b) +} + +// HashTreeRootWith ssz hashes the BeaconStateEPBS object with a hasher +func (b *BeaconStateEPBS) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'GenesisTime' + hh.PutUint64(b.GenesisTime) + + // Field (1) 'GenesisValidatorsRoot' + if size := len(b.GenesisValidatorsRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.GenesisValidatorsRoot", size, 32) + return + } + hh.PutBytes(b.GenesisValidatorsRoot) + + // Field (2) 'Slot' + hh.PutUint64(uint64(b.Slot)) + + // Field (3) 'Fork' + if err = b.Fork.HashTreeRootWith(hh); err != nil { + return + } + + // Field (4) 'LatestBlockHeader' + if err = b.LatestBlockHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (5) 'BlockRoots' + { + if size := len(b.BlockRoots); size != 8192 { + err = ssz.ErrVectorLengthFn("--.BlockRoots", size, 8192) + return + } + subIndx := hh.Index() + for _, i := range b.BlockRoots { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + // Field (6) 'StateRoots' + { + if size := len(b.StateRoots); size != 8192 { + err = ssz.ErrVectorLengthFn("--.StateRoots", size, 8192) + return + } + subIndx := hh.Index() + for _, i := range b.StateRoots { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + // Field (7) 'HistoricalRoots' + { + if size := len(b.HistoricalRoots); size > 16777216 { + err = ssz.ErrListTooBigFn("--.HistoricalRoots", size, 16777216) + return + } + subIndx := hh.Index() + for _, i := range b.HistoricalRoots { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + + numItems := uint64(len(b.HistoricalRoots)) + hh.MerkleizeWithMixin(subIndx, numItems, 16777216) + } + + // Field (8) 'Eth1Data' + if err = b.Eth1Data.HashTreeRootWith(hh); err != nil { + return + } + + // Field (9) 'Eth1DataVotes' + { + subIndx := hh.Index() + num := uint64(len(b.Eth1DataVotes)) + if num > 2048 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.Eth1DataVotes { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 2048) + } + + // Field (10) 'Eth1DepositIndex' + hh.PutUint64(b.Eth1DepositIndex) + + // Field (11) 'Validators' + { + subIndx := hh.Index() + num := uint64(len(b.Validators)) + if num > 1099511627776 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.Validators { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 1099511627776) + } + + // Field (12) 'Balances' + { + if size := len(b.Balances); size > 1099511627776 { + err = ssz.ErrListTooBigFn("--.Balances", size, 1099511627776) + return + } + subIndx := hh.Index() + for _, i := range b.Balances { + hh.AppendUint64(i) + } + hh.FillUpTo32() + + numItems := uint64(len(b.Balances)) + hh.MerkleizeWithMixin(subIndx, numItems, ssz.CalculateLimit(1099511627776, numItems, 8)) + } + + // Field (13) 'RandaoMixes' + { + if size := len(b.RandaoMixes); size != 65536 { + err = ssz.ErrVectorLengthFn("--.RandaoMixes", size, 65536) + return + } + subIndx := hh.Index() + for _, i := range b.RandaoMixes { + if len(i) != 32 { + err = ssz.ErrBytesLength + return + } + hh.Append(i) + } + hh.Merkleize(subIndx) + } + + // Field (14) 'Slashings' + { + if size := len(b.Slashings); size != 8192 { + err = ssz.ErrVectorLengthFn("--.Slashings", size, 8192) + return + } + subIndx := hh.Index() + for _, i := range b.Slashings { + hh.AppendUint64(i) + } + hh.Merkleize(subIndx) + } + + // Field (15) 'PreviousEpochParticipation' + { + elemIndx := hh.Index() + byteLen := uint64(len(b.PreviousEpochParticipation)) + if byteLen > 1099511627776 { + err = ssz.ErrIncorrectListSize + return + } + hh.PutBytes(b.PreviousEpochParticipation) + hh.MerkleizeWithMixin(elemIndx, byteLen, (1099511627776+31)/32) + } + + // Field (16) 'CurrentEpochParticipation' + { + elemIndx := hh.Index() + byteLen := uint64(len(b.CurrentEpochParticipation)) + if byteLen > 1099511627776 { + err = ssz.ErrIncorrectListSize + return + } + hh.PutBytes(b.CurrentEpochParticipation) + hh.MerkleizeWithMixin(elemIndx, byteLen, (1099511627776+31)/32) + } + + // Field (17) 'JustificationBits' + if size := len(b.JustificationBits); size != 1 { + err = ssz.ErrBytesLengthFn("--.JustificationBits", size, 1) + return + } + hh.PutBytes(b.JustificationBits) + + // Field (18) 'PreviousJustifiedCheckpoint' + if err = b.PreviousJustifiedCheckpoint.HashTreeRootWith(hh); err != nil { + return + } + + // Field (19) 'CurrentJustifiedCheckpoint' + if err = b.CurrentJustifiedCheckpoint.HashTreeRootWith(hh); err != nil { + return + } + + // Field (20) 'FinalizedCheckpoint' + if err = b.FinalizedCheckpoint.HashTreeRootWith(hh); err != nil { + return + } + + // Field (21) 'InactivityScores' + { + if size := len(b.InactivityScores); size > 1099511627776 { + err = ssz.ErrListTooBigFn("--.InactivityScores", size, 1099511627776) + return + } + subIndx := hh.Index() + for _, i := range b.InactivityScores { + hh.AppendUint64(i) + } + hh.FillUpTo32() + + numItems := uint64(len(b.InactivityScores)) + hh.MerkleizeWithMixin(subIndx, numItems, ssz.CalculateLimit(1099511627776, numItems, 8)) + } + + // Field (22) 'CurrentSyncCommittee' + if err = b.CurrentSyncCommittee.HashTreeRootWith(hh); err != nil { + return + } + + // Field (23) 'NextSyncCommittee' + if err = b.NextSyncCommittee.HashTreeRootWith(hh); err != nil { + return + } + + // Field (24) 'LatestExecutionPayloadHeader' + if err = b.LatestExecutionPayloadHeader.HashTreeRootWith(hh); err != nil { + return + } + + // Field (25) 'NextWithdrawalIndex' + hh.PutUint64(b.NextWithdrawalIndex) + + // Field (26) 'NextWithdrawalValidatorIndex' + hh.PutUint64(uint64(b.NextWithdrawalValidatorIndex)) + + // Field (27) 'HistoricalSummaries' + { + subIndx := hh.Index() + num := uint64(len(b.HistoricalSummaries)) + if num > 16777216 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.HistoricalSummaries { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 16777216) + } + + // Field (28) 'DepositRequestsStartIndex' + hh.PutUint64(b.DepositRequestsStartIndex) + + // Field (29) 'DepositBalanceToConsume' + hh.PutUint64(uint64(b.DepositBalanceToConsume)) + + // Field (30) 'ExitBalanceToConsume' + hh.PutUint64(uint64(b.ExitBalanceToConsume)) + + // Field (31) 'EarliestExitEpoch' + hh.PutUint64(uint64(b.EarliestExitEpoch)) + + // Field (32) 'ConsolidationBalanceToConsume' + hh.PutUint64(uint64(b.ConsolidationBalanceToConsume)) + + // Field (33) 'EarliestConsolidationEpoch' + hh.PutUint64(uint64(b.EarliestConsolidationEpoch)) + + // Field (34) 'PendingDeposits' + { + subIndx := hh.Index() + num := uint64(len(b.PendingDeposits)) + if num > 134217728 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.PendingDeposits { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 134217728) + } + + // Field (35) 'PendingPartialWithdrawals' + { + subIndx := hh.Index() + num := uint64(len(b.PendingPartialWithdrawals)) + if num > 134217728 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.PendingPartialWithdrawals { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 134217728) + } + + // Field (36) 'PendingConsolidations' + { + subIndx := hh.Index() + num := uint64(len(b.PendingConsolidations)) + if num > 262144 { + err = ssz.ErrIncorrectListSize + return + } + for _, elem := range b.PendingConsolidations { + if err = elem.HashTreeRootWith(hh); err != nil { + return + } + } + hh.MerkleizeWithMixin(subIndx, num, 262144) + } + + // Field (37) 'LatestBlockHash' + if size := len(b.LatestBlockHash); size != 32 { + err = ssz.ErrBytesLengthFn("--.LatestBlockHash", size, 32) + return + } + hh.PutBytes(b.LatestBlockHash) + + // Field (38) 'LatestFullSlot' + hh.PutUint64(uint64(b.LatestFullSlot)) + + // Field (39) 'LastWithdrawalsRoot' + if size := len(b.LastWithdrawalsRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.LastWithdrawalsRoot", size, 32) + return + } + hh.PutBytes(b.LastWithdrawalsRoot) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the PayloadAttestationData object +func (p *PayloadAttestationData) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(p) +} + +// MarshalSSZTo ssz marshals the PayloadAttestationData object to a target array +func (p *PayloadAttestationData) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'BeaconBlockRoot' + if size := len(p.BeaconBlockRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32) + return + } + dst = append(dst, p.BeaconBlockRoot...) + + // Field (1) 'Slot' + dst = ssz.MarshalUint64(dst, uint64(p.Slot)) + + // Field (2) 'PayloadStatus' + dst = ssz.MarshalUint64(dst, uint64(p.PayloadStatus)) + + return +} + +// UnmarshalSSZ ssz unmarshals the PayloadAttestationData object +func (p *PayloadAttestationData) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 48 { + return ssz.ErrSize + } + + // Field (0) 'BeaconBlockRoot' + if cap(p.BeaconBlockRoot) == 0 { + p.BeaconBlockRoot = make([]byte, 0, len(buf[0:32])) + } + p.BeaconBlockRoot = append(p.BeaconBlockRoot, buf[0:32]...) + + // Field (1) 'Slot' + p.Slot = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[32:40])) + + // Field (2) 'PayloadStatus' + p.PayloadStatus = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.PTCStatus(ssz.UnmarshallUint64(buf[40:48])) + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the PayloadAttestationData object +func (p *PayloadAttestationData) SizeSSZ() (size int) { + size = 48 + return +} + +// HashTreeRoot ssz hashes the PayloadAttestationData object +func (p *PayloadAttestationData) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(p) +} + +// HashTreeRootWith ssz hashes the PayloadAttestationData object with a hasher +func (p *PayloadAttestationData) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'BeaconBlockRoot' + if size := len(p.BeaconBlockRoot); size != 32 { + err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32) + return + } + hh.PutBytes(p.BeaconBlockRoot) + + // Field (1) 'Slot' + hh.PutUint64(uint64(p.Slot)) + + // Field (2) 'PayloadStatus' + hh.PutUint64(uint64(p.PayloadStatus)) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the PayloadAttestation object +func (p *PayloadAttestation) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(p) +} + +// MarshalSSZTo ssz marshals the PayloadAttestation object to a target array +func (p *PayloadAttestation) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'AggregationBits' + if size := len(p.AggregationBits); size != 64 { + err = ssz.ErrBytesLengthFn("--.AggregationBits", size, 64) + return + } + dst = append(dst, p.AggregationBits...) + + // Field (1) 'Data' + if p.Data == nil { + p.Data = new(PayloadAttestationData) + } + if dst, err = p.Data.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'Signature' + if size := len(p.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + dst = append(dst, p.Signature...) + + return +} + +// UnmarshalSSZ ssz unmarshals the PayloadAttestation object +func (p *PayloadAttestation) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 208 { + return ssz.ErrSize + } + + // Field (0) 'AggregationBits' + if cap(p.AggregationBits) == 0 { + p.AggregationBits = make([]byte, 0, len(buf[0:64])) + } + p.AggregationBits = append(p.AggregationBits, buf[0:64]...) + + // Field (1) 'Data' + if p.Data == nil { + p.Data = new(PayloadAttestationData) + } + if err = p.Data.UnmarshalSSZ(buf[64:112]); err != nil { + return err + } + + // Field (2) 'Signature' + if cap(p.Signature) == 0 { + p.Signature = make([]byte, 0, len(buf[112:208])) + } + p.Signature = append(p.Signature, buf[112:208]...) + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the PayloadAttestation object +func (p *PayloadAttestation) SizeSSZ() (size int) { + size = 208 + return +} + +// HashTreeRoot ssz hashes the PayloadAttestation object +func (p *PayloadAttestation) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(p) +} + +// HashTreeRootWith ssz hashes the PayloadAttestation object with a hasher +func (p *PayloadAttestation) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'AggregationBits' + if size := len(p.AggregationBits); size != 64 { + err = ssz.ErrBytesLengthFn("--.AggregationBits", size, 64) + return + } + hh.PutBytes(p.AggregationBits) + + // Field (1) 'Data' + if err = p.Data.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'Signature' + if size := len(p.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + hh.PutBytes(p.Signature) + + hh.Merkleize(indx) + return +} + +// MarshalSSZ ssz marshals the PayloadAttestationMessage object +func (p *PayloadAttestationMessage) MarshalSSZ() ([]byte, error) { + return ssz.MarshalSSZ(p) +} + +// MarshalSSZTo ssz marshals the PayloadAttestationMessage object to a target array +func (p *PayloadAttestationMessage) MarshalSSZTo(buf []byte) (dst []byte, err error) { + dst = buf + + // Field (0) 'ValidatorIndex' + dst = ssz.MarshalUint64(dst, uint64(p.ValidatorIndex)) + + // Field (1) 'Data' + if p.Data == nil { + p.Data = new(PayloadAttestationData) + } + if dst, err = p.Data.MarshalSSZTo(dst); err != nil { + return + } + + // Field (2) 'Signature' + if size := len(p.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + dst = append(dst, p.Signature...) + + return +} + +// UnmarshalSSZ ssz unmarshals the PayloadAttestationMessage object +func (p *PayloadAttestationMessage) UnmarshalSSZ(buf []byte) error { + var err error + size := uint64(len(buf)) + if size != 152 { + return ssz.ErrSize + } + + // Field (0) 'ValidatorIndex' + p.ValidatorIndex = github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[0:8])) + + // Field (1) 'Data' + if p.Data == nil { + p.Data = new(PayloadAttestationData) + } + if err = p.Data.UnmarshalSSZ(buf[8:56]); err != nil { + return err + } + + // Field (2) 'Signature' + if cap(p.Signature) == 0 { + p.Signature = make([]byte, 0, len(buf[56:152])) + } + p.Signature = append(p.Signature, buf[56:152]...) + + return err +} + +// SizeSSZ returns the ssz encoded size in bytes for the PayloadAttestationMessage object +func (p *PayloadAttestationMessage) SizeSSZ() (size int) { + size = 152 + return +} + +// HashTreeRoot ssz hashes the PayloadAttestationMessage object +func (p *PayloadAttestationMessage) HashTreeRoot() ([32]byte, error) { + return ssz.HashWithDefaultHasher(p) +} + +// HashTreeRootWith ssz hashes the PayloadAttestationMessage object with a hasher +func (p *PayloadAttestationMessage) HashTreeRootWith(hh *ssz.Hasher) (err error) { + indx := hh.Index() + + // Field (0) 'ValidatorIndex' + hh.PutUint64(uint64(p.ValidatorIndex)) + + // Field (1) 'Data' + if err = p.Data.HashTreeRootWith(hh); err != nil { + return + } + + // Field (2) 'Signature' + if size := len(p.Signature); size != 96 { + err = ssz.ErrBytesLengthFn("--.Signature", size, 96) + return + } + hh.PutBytes(p.Signature) + + hh.Merkleize(indx) + return +} diff --git a/proto/prysm/v1alpha1/non-core.ssz.go b/proto/prysm/v1alpha1/non-core.ssz.go index 2630eec1ccb2..3cd4ff7f03e2 100644 --- a/proto/prysm/v1alpha1/non-core.ssz.go +++ b/proto/prysm/v1alpha1/non-core.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: bfd7d6b556134c3bd236b880245717aa01ae79573b33f2746a08c165ba5dcedb +// Hash: b3075e0bd8197085e3a7b03347ee5d860f83cb455602041d4baefad0b4b93da1 package eth import ( diff --git a/proto/prysm/v1alpha1/payload_attestation.pb.go b/proto/prysm/v1alpha1/payload_attestation.pb.go new file mode 100755 index 000000000000..1d62c2ea7ace --- /dev/null +++ b/proto/prysm/v1alpha1/payload_attestation.pb.go @@ -0,0 +1,376 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.25.1 +// source: proto/prysm/v1alpha1/payload_attestation.proto + +package eth + +import ( + reflect "reflect" + sync "sync" + + github_com_prysmaticlabs_go_bitfield "github.com/prysmaticlabs/go-bitfield" + github_com_prysmaticlabs_prysm_v5_consensus_types_primitives "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + _ "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 PayloadAttestationData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BeaconBlockRoot []byte `protobuf:"bytes,1,opt,name=beacon_block_root,json=beaconBlockRoot,proto3" json:"beacon_block_root,omitempty" ssz-size:"32"` + Slot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` + PayloadStatus github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.PTCStatus `protobuf:"varint,3,opt,name=payload_status,json=payloadStatus,proto3" json:"payload_status,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.PTCStatus"` +} + +func (x *PayloadAttestationData) Reset() { + *x = PayloadAttestationData{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayloadAttestationData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadAttestationData) ProtoMessage() {} + +func (x *PayloadAttestationData) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_payload_attestation_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 PayloadAttestationData.ProtoReflect.Descriptor instead. +func (*PayloadAttestationData) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescGZIP(), []int{0} +} + +func (x *PayloadAttestationData) GetBeaconBlockRoot() []byte { + if x != nil { + return x.BeaconBlockRoot + } + return nil +} + +func (x *PayloadAttestationData) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.Slot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +func (x *PayloadAttestationData) GetPayloadStatus() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.PTCStatus { + if x != nil { + return x.PayloadStatus + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.PTCStatus(0) +} + +type PayloadAttestation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AggregationBits github_com_prysmaticlabs_go_bitfield.Bitvector512 `protobuf:"bytes,1,opt,name=aggregation_bits,json=aggregationBits,proto3" json:"aggregation_bits,omitempty" cast-type:"github.com/prysmaticlabs/go-bitfield.Bitvector512" ssz-size:"64"` + Data *PayloadAttestationData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` +} + +func (x *PayloadAttestation) Reset() { + *x = PayloadAttestation{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayloadAttestation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadAttestation) ProtoMessage() {} + +func (x *PayloadAttestation) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_payload_attestation_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 PayloadAttestation.ProtoReflect.Descriptor instead. +func (*PayloadAttestation) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescGZIP(), []int{1} +} + +func (x *PayloadAttestation) GetAggregationBits() github_com_prysmaticlabs_go_bitfield.Bitvector512 { + if x != nil { + return x.AggregationBits + } + return github_com_prysmaticlabs_go_bitfield.Bitvector512(nil) +} + +func (x *PayloadAttestation) GetData() *PayloadAttestationData { + if x != nil { + return x.Data + } + return nil +} + +func (x *PayloadAttestation) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type PayloadAttestationMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValidatorIndex github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex `protobuf:"varint,1,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"` + Data *PayloadAttestationData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty" ssz-size:"96"` +} + +func (x *PayloadAttestationMessage) Reset() { + *x = PayloadAttestationMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayloadAttestationMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadAttestationMessage) ProtoMessage() {} + +func (x *PayloadAttestationMessage) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_payload_attestation_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 PayloadAttestationMessage.ProtoReflect.Descriptor instead. +func (*PayloadAttestationMessage) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescGZIP(), []int{2} +} + +func (x *PayloadAttestationMessage) GetValidatorIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { + if x != nil { + return x.ValidatorIndex + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(0) +} + +func (x *PayloadAttestationMessage) GetData() *PayloadAttestationData { + if x != nil { + return x.Data + } + return nil +} + +func (x *PayloadAttestationMessage) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +var File_proto_prysm_v1alpha1_payload_attestation_proto protoreflect.FileDescriptor + +var file_proto_prysm_v1alpha1_payload_attestation_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0x9a, 0x02, 0x0a, 0x16, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x32, 0x0a, 0x11, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, + 0x33, 0x32, 0x52, 0x0f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x6f, 0x6f, 0x74, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x02, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x71, + 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4a, 0x82, 0xb5, 0x18, 0x46, 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, 0x50, 0x54, 0x43, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x42, 0x3b, 0x82, 0xb5, 0x18, 0x31, 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, 0x67, 0x6f, 0x2d, 0x62, 0x69, 0x74, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x42, 0x69, 0x74, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x35, 0x31, 0x32, 0x8a, 0xb5, 0x18, 0x02, 0x36, 0x34, 0x52, + 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x74, 0x73, + 0x12, 0x41, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 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, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xfe, 0x01, 0x0a, 0x19, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x78, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x41, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 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, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x39, 0x36, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0xa2, 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, 0x17, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3a, 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, 0x70, 0x72, 0x79, + 0x73, 0x6d, 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, 0x76, + 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_payload_attestation_proto_rawDescOnce sync.Once + file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescData = file_proto_prysm_v1alpha1_payload_attestation_proto_rawDesc +) + +func file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescGZIP() []byte { + file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescOnce.Do(func() { + file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescData) + }) + return file_proto_prysm_v1alpha1_payload_attestation_proto_rawDescData +} + +var file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proto_prysm_v1alpha1_payload_attestation_proto_goTypes = []interface{}{ + (*PayloadAttestationData)(nil), // 0: ethereum.eth.v1alpha1.PayloadAttestationData + (*PayloadAttestation)(nil), // 1: ethereum.eth.v1alpha1.PayloadAttestation + (*PayloadAttestationMessage)(nil), // 2: ethereum.eth.v1alpha1.PayloadAttestationMessage +} +var file_proto_prysm_v1alpha1_payload_attestation_proto_depIdxs = []int32{ + 0, // 0: ethereum.eth.v1alpha1.PayloadAttestation.data:type_name -> ethereum.eth.v1alpha1.PayloadAttestationData + 0, // 1: ethereum.eth.v1alpha1.PayloadAttestationMessage.data:type_name -> ethereum.eth.v1alpha1.PayloadAttestationData + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_proto_prysm_v1alpha1_payload_attestation_proto_init() } +func file_proto_prysm_v1alpha1_payload_attestation_proto_init() { + if File_proto_prysm_v1alpha1_payload_attestation_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayloadAttestationData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayloadAttestation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayloadAttestationMessage); 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_payload_attestation_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_prysm_v1alpha1_payload_attestation_proto_goTypes, + DependencyIndexes: file_proto_prysm_v1alpha1_payload_attestation_proto_depIdxs, + MessageInfos: file_proto_prysm_v1alpha1_payload_attestation_proto_msgTypes, + }.Build() + File_proto_prysm_v1alpha1_payload_attestation_proto = out.File + file_proto_prysm_v1alpha1_payload_attestation_proto_rawDesc = nil + file_proto_prysm_v1alpha1_payload_attestation_proto_goTypes = nil + file_proto_prysm_v1alpha1_payload_attestation_proto_depIdxs = nil +} diff --git a/proto/prysm/v1alpha1/payload_attestation.pb.gw.go b/proto/prysm/v1alpha1/payload_attestation.pb.gw.go new file mode 100755 index 000000000000..cdd03643f0c7 --- /dev/null +++ b/proto/prysm/v1alpha1/payload_attestation.pb.gw.go @@ -0,0 +1,4 @@ +//go:build ignore +// +build ignore + +package ignore diff --git a/proto/prysm/v1alpha1/payload_attestation.proto b/proto/prysm/v1alpha1/payload_attestation.proto new file mode 100644 index 000000000000..7778245688ef --- /dev/null +++ b/proto/prysm/v1alpha1/payload_attestation.proto @@ -0,0 +1,43 @@ +// 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"; + +option csharp_namespace = "Ethereum.Eth.v1alpha1"; +option go_package = "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1;eth"; +option java_multiple_files = true; +option java_outer_classname = "PayloadAttestationProto"; +option java_package = "org.ethereum.eth.v1alpha1"; +option php_namespace = "Ethereum\\Eth\\v1alpha1"; + +message PayloadAttestationData { + bytes beacon_block_root = 1 [(ethereum.eth.ext.ssz_size) = "32"]; + uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; + uint64 payload_status = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.PTCStatus"]; +} + +message PayloadAttestation { + bytes aggregation_bits = 1 [(ethereum.eth.ext.ssz_size) = "ptc.size", (ethereum.eth.ext.cast_type) = "ptc.type"]; + PayloadAttestationData data = 2; + bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"]; +} + +message PayloadAttestationMessage { + uint64 validator_index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; + PayloadAttestationData data = 2; + bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"]; +} diff --git a/proto/prysm/v1alpha1/phase0.ssz.go b/proto/prysm/v1alpha1/phase0.ssz.go index 96748fccc31e..364136af6440 100644 --- a/proto/prysm/v1alpha1/phase0.ssz.go +++ b/proto/prysm/v1alpha1/phase0.ssz.go @@ -1,5 +1,5 @@ // Code generated by fastssz. DO NOT EDIT. -// Hash: 5797213d138ec1a089f9dae2198cab6f4f829ac0cc1f0bda2633fff544db4e68 +// Hash: 2c3f308594f5efa50a99bb0dd633029ce3b4657ce1bb239656723d784e334979 package eth import ( diff --git a/proto/prysm/v1alpha1/validator-client/BUILD.bazel b/proto/prysm/v1alpha1/validator-client/BUILD.bazel index df99b795100a..f8c601ca2eac 100644 --- a/proto/prysm/v1alpha1/validator-client/BUILD.bazel +++ b/proto/prysm/v1alpha1/validator-client/BUILD.bazel @@ -19,6 +19,7 @@ proto_library( visibility = ["//visibility:public"], deps = [ "//proto/eth/ext:proto", + "//proto/engine/v1:proto", "//proto/prysm/v1alpha1:proto", "@com_google_protobuf//:any_proto", "@com_google_protobuf//:descriptor_proto", @@ -41,6 +42,7 @@ go_proto_library( "//consensus-types/primitives:go_default_library", "//consensus-types/validator:go_default_library", "//proto/eth/ext:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "@com_github_golang_protobuf//proto:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", @@ -68,6 +70,7 @@ go_library( visibility = ["//visibility:public"], deps = [ "//proto/eth/ext:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "@com_github_golang_protobuf//proto:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", # keep diff --git a/proto/prysm/v1alpha1/validator-client/keymanager.pb.go b/proto/prysm/v1alpha1/validator-client/keymanager.pb.go index b6e9f1b1542a..daa931261af9 100755 --- a/proto/prysm/v1alpha1/validator-client/keymanager.pb.go +++ b/proto/prysm/v1alpha1/validator-client/keymanager.pb.go @@ -12,6 +12,7 @@ import ( github_com_prysmaticlabs_prysm_v5_consensus_types_primitives "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" github_com_prysmaticlabs_prysm_v5_consensus_types_validator "github.com/prysmaticlabs/prysm/v5/consensus-types/validator" + v1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" _ "github.com/prysmaticlabs/prysm/v5/proto/eth/ext" v1alpha1 "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -107,6 +108,10 @@ type SignRequest struct { // *SignRequest_BlockElectra // *SignRequest_BlindedBlockElectra // *SignRequest_AggregateAttestationAndProofElectra + // *SignRequest_PayloadAttestationData + // *SignRequest_BlockEpbs + // *SignRequest_ExecutionPayloadHeaderEpbs + // *SignRequest_ExecutionPayloadEnvelope Object isSignRequest_Object `protobuf_oneof:"object"` SigningSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,6,opt,name=signing_slot,json=signingSlot,proto3" json:"signing_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` } @@ -311,6 +316,34 @@ func (x *SignRequest) GetAggregateAttestationAndProofElectra() *v1alpha1.Aggrega return nil } +func (x *SignRequest) GetPayloadAttestationData() *v1alpha1.PayloadAttestationData { + if x, ok := x.GetObject().(*SignRequest_PayloadAttestationData); ok { + return x.PayloadAttestationData + } + return nil +} + +func (x *SignRequest) GetBlockEpbs() *v1alpha1.BeaconBlockEpbs { + if x, ok := x.GetObject().(*SignRequest_BlockEpbs); ok { + return x.BlockEpbs + } + return nil +} + +func (x *SignRequest) GetExecutionPayloadHeaderEpbs() *v1.ExecutionPayloadHeaderEPBS { + if x, ok := x.GetObject().(*SignRequest_ExecutionPayloadHeaderEpbs); ok { + return x.ExecutionPayloadHeaderEpbs + } + return nil +} + +func (x *SignRequest) GetExecutionPayloadEnvelope() *v1.ExecutionPayloadEnvelope { + if x, ok := x.GetObject().(*SignRequest_ExecutionPayloadEnvelope); ok { + return x.ExecutionPayloadEnvelope + } + return nil +} + func (x *SignRequest) GetSigningSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { if x != nil { return x.SigningSlot @@ -402,6 +435,22 @@ type SignRequest_AggregateAttestationAndProofElectra struct { AggregateAttestationAndProofElectra *v1alpha1.AggregateAttestationAndProofElectra `protobuf:"bytes,120,opt,name=aggregate_attestation_and_proof_electra,json=aggregateAttestationAndProofElectra,proto3,oneof"` } +type SignRequest_PayloadAttestationData struct { + PayloadAttestationData *v1alpha1.PayloadAttestationData `protobuf:"bytes,121,opt,name=payload_attestation_data,json=payloadAttestationData,proto3,oneof"` +} + +type SignRequest_BlockEpbs struct { + BlockEpbs *v1alpha1.BeaconBlockEpbs `protobuf:"bytes,122,opt,name=block_epbs,json=blockEpbs,proto3,oneof"` +} + +type SignRequest_ExecutionPayloadHeaderEpbs struct { + ExecutionPayloadHeaderEpbs *v1.ExecutionPayloadHeaderEPBS `protobuf:"bytes,123,opt,name=execution_payload_header_epbs,json=executionPayloadHeaderEpbs,proto3,oneof"` +} + +type SignRequest_ExecutionPayloadEnvelope struct { + ExecutionPayloadEnvelope *v1.ExecutionPayloadEnvelope `protobuf:"bytes,124,opt,name=execution_payload_envelope,json=executionPayloadEnvelope,proto3,oneof"` +} + func (*SignRequest_Block) isSignRequest_Object() {} func (*SignRequest_AttestationData) isSignRequest_Object() {} @@ -442,6 +491,14 @@ func (*SignRequest_BlindedBlockElectra) isSignRequest_Object() {} func (*SignRequest_AggregateAttestationAndProofElectra) isSignRequest_Object() {} +func (*SignRequest_PayloadAttestationData) isSignRequest_Object() {} + +func (*SignRequest_BlockEpbs) isSignRequest_Object() {} + +func (*SignRequest_ExecutionPayloadHeaderEpbs) isSignRequest_Object() {} + +func (*SignRequest_ExecutionPayloadEnvelope) isSignRequest_Object() {} + type SignResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -690,6 +747,9 @@ var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_rawDesc = []byte 0x65, 0x74, 0x68, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, @@ -698,209 +758,236 @@ var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_rawDesc = []byte 0x63, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x74, 0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x10, 0x0a, 0x0b, 0x53, - 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x29, 0x0a, 0x10, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x3a, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 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, 0x00, 0x52, 0x05, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x12, 0x53, 0x0a, 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x7c, 0x0a, 0x1f, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x67, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, - 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x1c, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, - 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x3a, 0x0a, 0x04, 0x65, 0x78, 0x69, 0x74, 0x18, 0x68, - 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, 0x56, 0x6f, 0x6c, - 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x65, 0x78, - 0x69, 0x74, 0x12, 0x5b, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x69, 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, 0x48, 0x00, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, - 0x5e, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, - 0x82, 0xb5, 0x18, 0x42, 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, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x48, 0x00, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, - 0x4d, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x18, - 0x6b, 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, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48, - 0x00, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x79, - 0x0a, 0x1e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 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, 0x6f, 0x72, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1b, 0x73, 0x79, - 0x6e, 0x63, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x63, 0x0a, 0x16, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, - 0x6f, 0x6f, 0x66, 0x18, 0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, - 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x37, - 0x0a, 0x17, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0c, 0x48, - 0x00, 0x52, 0x14, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x56, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2b, 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, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, - 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, - 0x6c, 0x0a, 0x17, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x32, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, - 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, - 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x15, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x54, 0x0a, - 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x71, 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, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x63, 0x61, 0x70, - 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 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, 0x43, 0x61, - 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, - 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x66, 0x0a, 0x15, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x73, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, - 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, - 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, - 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x48, 0x00, 0x52, 0x13, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, - 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x4a, 0x0a, - 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x18, 0x74, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x74, 0x74, 0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x70, 0x62, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x13, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x69, 0x67, + 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x12, 0x3a, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x65, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 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, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x48, 0x00, 0x52, 0x0a, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x60, 0x0a, 0x13, 0x62, 0x6c, 0x69, - 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x65, 0x62, - 0x18, 0x75, 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, 0x42, - 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x48, 0x00, 0x52, 0x11, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, - 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x50, 0x0a, 0x0d, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x18, 0x76, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x29, 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, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, - 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x66, 0x0a, - 0x15, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x18, 0x77, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, + 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, + 0x53, 0x0a, 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, + 0x61, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x7c, 0x0a, 0x1f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, + 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, + 0x6f, 0x66, 0x48, 0x00, 0x52, 0x1c, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, + 0x6f, 0x66, 0x12, 0x3a, 0x0a, 0x04, 0x65, 0x78, 0x69, 0x74, 0x18, 0x68, 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, 0x56, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, + 0x72, 0x79, 0x45, 0x78, 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x65, 0x78, 0x69, 0x74, 0x12, 0x5b, + 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x69, 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, 0x48, 0x00, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x5e, 0x0a, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, + 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, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x48, 0x00, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x4d, 0x0a, 0x0c, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x18, 0x6b, 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, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x12, 0x79, 0x0a, 0x1e, 0x73, 0x79, + 0x6e, 0x63, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x6c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 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, 0x6f, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1b, 0x73, 0x79, 0x6e, 0x63, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x63, 0x0a, 0x16, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, + 0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, + 0x6f, 0x66, 0x48, 0x00, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x37, 0x0a, 0x17, 0x73, 0x79, + 0x6e, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x14, 0x73, + 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x6f, 0x6f, 0x74, 0x12, 0x56, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x62, 0x65, 0x6c, + 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x6f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 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, + 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x6c, 0x0a, 0x17, 0x62, + 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x62, 0x65, 0x6c, + 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x70, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, - 0x52, 0x13, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, - 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x92, 0x01, 0x0a, 0x27, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, - 0x61, 0x18, 0x78, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x45, 0x6c, 0x65, 0x63, - 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, 0x23, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x68, 0x0a, 0x0c, 0x73, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x06, 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, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x53, 0x6c, 0x6f, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4a, 0x04, - 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xb7, 0x01, 0x0a, 0x0c, 0x53, - 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3c, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, - 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, - 0x45, 0x44, 0x10, 0x03, 0x22, 0xb3, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, - 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, - 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, - 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x08, - 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, - 0x09, 0x5f, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x22, 0xa6, 0x01, 0x0a, 0x0d, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x63, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 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, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x36, - 0x34, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, - 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6c, - 0x61, 0x79, 0x73, 0x22, 0xe7, 0x02, 0x0a, 0x17, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, - 0x74, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x1a, 0x78, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4b, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x74, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, + 0x48, 0x00, 0x52, 0x15, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x54, 0x0a, 0x0c, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x71, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x48, + 0x00, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x50, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, + 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 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, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, + 0x61, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, + 0x61, 0x12, 0x66, 0x0a, 0x15, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x63, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x18, 0x73, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, + 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, + 0x6c, 0x61, 0x48, 0x00, 0x52, 0x13, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x12, 0x4a, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x18, 0x74, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 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, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x60, 0x0a, 0x13, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x18, 0x75, 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, 0x42, 0x6c, 0x69, 0x6e, 0x64, + 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, + 0x65, 0x62, 0x48, 0x00, 0x52, 0x11, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x12, 0x50, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x18, 0x76, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 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, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x66, 0x0a, 0x15, 0x62, 0x6c, 0x69, + 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x72, 0x61, 0x18, 0x77, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, 0x13, 0x62, 0x6c, + 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, + 0x61, 0x12, 0x92, 0x01, 0x0a, 0x27, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x64, 0x5f, + 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x18, 0x78, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, + 0x00, 0x52, 0x23, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x45, + 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x12, 0x69, 0x0a, 0x18, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x79, 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, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x16, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x47, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x70, 0x62, 0x73, 0x18, + 0x7a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 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, 0x45, 0x70, 0x62, 0x73, 0x48, 0x00, 0x52, + 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x70, 0x62, 0x73, 0x12, 0x73, 0x0a, 0x1d, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x65, 0x70, 0x62, 0x73, 0x18, 0x7b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2e, 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, 0x45, 0x50, 0x42, + 0x53, 0x48, 0x00, 0x52, 0x1a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x70, 0x62, 0x73, 0x12, + 0x6c, 0x0a, 0x1a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x18, 0x7c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 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, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x48, 0x00, 0x52, 0x18, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x68, 0x0a, + 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x06, 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, 0x0b, 0x73, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x6f, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xb7, 0x01, + 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x4b, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3c, 0x0a, 0x06, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, + 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, + 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x22, 0xb3, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x52, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, + 0x1f, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x08, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x88, 0x01, 0x01, + 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x67, 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x22, 0xa6, 0x01, + 0x0a, 0x0d, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x63, 0x0a, 0x09, 0x67, 0x61, 0x73, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, + 0x18, 0x42, 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, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x65, 0x6c, 0x61, 0x79, 0x73, 0x22, 0xe7, 0x02, 0x0a, 0x17, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x74, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xce, 0x01, - 0x0a, 0x22, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x4b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 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, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x3b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xaa, 0x02, 0x1e, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x1e, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x32, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x78, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x4b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x42, 0xce, 0x01, 0x0a, 0x22, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x4b, 0x65, 0x79, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 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, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x3b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xaa, + 0x02, 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x32, + 0xca, 0x02, 0x1e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, + 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -942,6 +1029,10 @@ var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_goTypes = []inte (*v1alpha1.BeaconBlockElectra)(nil), // 21: ethereum.eth.v1alpha1.BeaconBlockElectra (*v1alpha1.BlindedBeaconBlockElectra)(nil), // 22: ethereum.eth.v1alpha1.BlindedBeaconBlockElectra (*v1alpha1.AggregateAttestationAndProofElectra)(nil), // 23: ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra + (*v1alpha1.PayloadAttestationData)(nil), // 24: ethereum.eth.v1alpha1.PayloadAttestationData + (*v1alpha1.BeaconBlockEpbs)(nil), // 25: ethereum.eth.v1alpha1.BeaconBlockEpbs + (*v1.ExecutionPayloadHeaderEPBS)(nil), // 26: ethereum.engine.v1.ExecutionPayloadHeaderEPBS + (*v1.ExecutionPayloadEnvelope)(nil), // 27: ethereum.engine.v1.ExecutionPayloadEnvelope } var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_depIdxs = []int32{ 7, // 0: ethereum.validator.accounts.v2.SignRequest.block:type_name -> ethereum.eth.v1alpha1.BeaconBlock @@ -961,16 +1052,20 @@ var file_proto_prysm_v1alpha1_validator_client_keymanager_proto_depIdxs = []int3 21, // 14: ethereum.validator.accounts.v2.SignRequest.block_electra:type_name -> ethereum.eth.v1alpha1.BeaconBlockElectra 22, // 15: ethereum.validator.accounts.v2.SignRequest.blinded_block_electra:type_name -> ethereum.eth.v1alpha1.BlindedBeaconBlockElectra 23, // 16: ethereum.validator.accounts.v2.SignRequest.aggregate_attestation_and_proof_electra:type_name -> ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra - 0, // 17: ethereum.validator.accounts.v2.SignResponse.status:type_name -> ethereum.validator.accounts.v2.SignResponse.Status - 4, // 18: ethereum.validator.accounts.v2.ProposerOptionPayload.builder:type_name -> ethereum.validator.accounts.v2.BuilderConfig - 6, // 19: ethereum.validator.accounts.v2.ProposerSettingsPayload.proposer_config:type_name -> ethereum.validator.accounts.v2.ProposerSettingsPayload.ProposerConfigEntry - 3, // 20: ethereum.validator.accounts.v2.ProposerSettingsPayload.default_config:type_name -> ethereum.validator.accounts.v2.ProposerOptionPayload - 3, // 21: ethereum.validator.accounts.v2.ProposerSettingsPayload.ProposerConfigEntry.value:type_name -> ethereum.validator.accounts.v2.ProposerOptionPayload - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 24, // 17: ethereum.validator.accounts.v2.SignRequest.payload_attestation_data:type_name -> ethereum.eth.v1alpha1.PayloadAttestationData + 25, // 18: ethereum.validator.accounts.v2.SignRequest.block_epbs:type_name -> ethereum.eth.v1alpha1.BeaconBlockEpbs + 26, // 19: ethereum.validator.accounts.v2.SignRequest.execution_payload_header_epbs:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderEPBS + 27, // 20: ethereum.validator.accounts.v2.SignRequest.execution_payload_envelope:type_name -> ethereum.engine.v1.ExecutionPayloadEnvelope + 0, // 21: ethereum.validator.accounts.v2.SignResponse.status:type_name -> ethereum.validator.accounts.v2.SignResponse.Status + 4, // 22: ethereum.validator.accounts.v2.ProposerOptionPayload.builder:type_name -> ethereum.validator.accounts.v2.BuilderConfig + 6, // 23: ethereum.validator.accounts.v2.ProposerSettingsPayload.proposer_config:type_name -> ethereum.validator.accounts.v2.ProposerSettingsPayload.ProposerConfigEntry + 3, // 24: ethereum.validator.accounts.v2.ProposerSettingsPayload.default_config:type_name -> ethereum.validator.accounts.v2.ProposerOptionPayload + 3, // 25: ethereum.validator.accounts.v2.ProposerSettingsPayload.ProposerConfigEntry.value:type_name -> ethereum.validator.accounts.v2.ProposerOptionPayload + 26, // [26:26] is the sub-list for method output_type + 26, // [26:26] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_proto_prysm_v1alpha1_validator_client_keymanager_proto_init() } @@ -1061,6 +1156,10 @@ func file_proto_prysm_v1alpha1_validator_client_keymanager_proto_init() { (*SignRequest_BlockElectra)(nil), (*SignRequest_BlindedBlockElectra)(nil), (*SignRequest_AggregateAttestationAndProofElectra)(nil), + (*SignRequest_PayloadAttestationData)(nil), + (*SignRequest_BlockEpbs)(nil), + (*SignRequest_ExecutionPayloadHeaderEpbs)(nil), + (*SignRequest_ExecutionPayloadEnvelope)(nil), } file_proto_prysm_v1alpha1_validator_client_keymanager_proto_msgTypes[2].OneofWrappers = []interface{}{} type x struct{} diff --git a/proto/prysm/v1alpha1/validator-client/keymanager.pb.gw.go b/proto/prysm/v1alpha1/validator-client/keymanager.pb.gw.go new file mode 100755 index 000000000000..cdd03643f0c7 --- /dev/null +++ b/proto/prysm/v1alpha1/validator-client/keymanager.pb.gw.go @@ -0,0 +1,4 @@ +//go:build ignore +// +build ignore + +package ignore diff --git a/proto/prysm/v1alpha1/validator-client/keymanager.proto b/proto/prysm/v1alpha1/validator-client/keymanager.proto index 81769612a17c..0cb7a1ab3121 100644 --- a/proto/prysm/v1alpha1/validator-client/keymanager.proto +++ b/proto/prysm/v1alpha1/validator-client/keymanager.proto @@ -3,9 +3,11 @@ package ethereum.validator.accounts.v2; import "proto/eth/ext/options.proto"; import "proto/prysm/v1alpha1/attestation.proto"; +import "proto/prysm/v1alpha1/payload_attestation.proto"; import "proto/prysm/v1alpha1/beacon_block.proto"; import "proto/prysm/v1alpha1/beacon_state.proto"; import "proto/prysm/v1alpha1/sync_committee.proto"; +import "proto/engine/v1/epbs.proto"; option csharp_namespace = "Ethereum.Validator.Accounts.V2"; option go_package = "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1/validator-client;validatorpb"; @@ -65,6 +67,12 @@ message SignRequest { ethereum.eth.v1alpha1.BeaconBlockElectra block_electra = 118; ethereum.eth.v1alpha1.BlindedBeaconBlockElectra blinded_block_electra = 119; ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra aggregate_attestation_and_proof_electra = 120; + + // ePBS objects. + ethereum.eth.v1alpha1.PayloadAttestationData payload_attestation_data = 121; + ethereum.eth.v1alpha1.BeaconBlockEpbs block_epbs = 122; + ethereum.engine.v1.ExecutionPayloadHeaderEPBS execution_payload_header_epbs = 123; + ethereum.engine.v1.ExecutionPayloadEnvelope execution_payload_envelope = 124; } reserved 4, 5; // Reserving old, deleted fields. uint64 signing_slot = 6 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; diff --git a/proto/prysm/v1alpha1/validator.pb.go b/proto/prysm/v1alpha1/validator.pb.go index f0e5cec84a48..021cf1a9d888 100755 --- a/proto/prysm/v1alpha1/validator.pb.go +++ b/proto/prysm/v1alpha1/validator.pb.go @@ -12,6 +12,7 @@ import ( 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" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" @@ -97,6 +98,163 @@ func (ValidatorStatus) EnumDescriptor() ([]byte, []int) { return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{0} } +type PayloadEnvelopeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Slot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` + ProposerIndex github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex `protobuf:"varint,2,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"` +} + +func (x *PayloadEnvelopeRequest) Reset() { + *x = PayloadEnvelopeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayloadEnvelopeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadEnvelopeRequest) ProtoMessage() {} + +func (x *PayloadEnvelopeRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_validator_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 PayloadEnvelopeRequest.ProtoReflect.Descriptor instead. +func (*PayloadEnvelopeRequest) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{0} +} + +func (x *PayloadEnvelopeRequest) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.Slot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +func (x *PayloadEnvelopeRequest) GetProposerIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { + if x != nil { + return x.ProposerIndex + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(0) +} + +type HeaderRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Slot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` + ProposerIndex github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex `protobuf:"varint,2,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"` +} + +func (x *HeaderRequest) Reset() { + *x = HeaderRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderRequest) ProtoMessage() {} + +func (x *HeaderRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_validator_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 HeaderRequest.ProtoReflect.Descriptor instead. +func (*HeaderRequest) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{1} +} + +func (x *HeaderRequest) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.Slot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + +func (x *HeaderRequest) GetProposerIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { + if x != nil { + return x.ProposerIndex + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex(0) +} + +type GetPayloadAttestationDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Slot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` +} + +func (x *GetPayloadAttestationDataRequest) Reset() { + *x = GetPayloadAttestationDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPayloadAttestationDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPayloadAttestationDataRequest) ProtoMessage() {} + +func (x *GetPayloadAttestationDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_prysm_v1alpha1_validator_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 GetPayloadAttestationDataRequest.ProtoReflect.Descriptor instead. +func (*GetPayloadAttestationDataRequest) Descriptor() ([]byte, []int) { + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{2} +} + +func (x *GetPayloadAttestationDataRequest) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.Slot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + type SyncMessageBlockRootResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -108,7 +266,7 @@ type SyncMessageBlockRootResponse struct { func (x *SyncMessageBlockRootResponse) Reset() { *x = SyncMessageBlockRootResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[0] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -121,7 +279,7 @@ func (x *SyncMessageBlockRootResponse) String() string { func (*SyncMessageBlockRootResponse) ProtoMessage() {} func (x *SyncMessageBlockRootResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[0] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -134,7 +292,7 @@ func (x *SyncMessageBlockRootResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessageBlockRootResponse.ProtoReflect.Descriptor instead. func (*SyncMessageBlockRootResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{0} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{3} } func (x *SyncMessageBlockRootResponse) GetRoot() []byte { @@ -156,7 +314,7 @@ type SyncSubcommitteeIndexRequest struct { func (x *SyncSubcommitteeIndexRequest) Reset() { *x = SyncSubcommitteeIndexRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[1] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -169,7 +327,7 @@ func (x *SyncSubcommitteeIndexRequest) String() string { func (*SyncSubcommitteeIndexRequest) ProtoMessage() {} func (x *SyncSubcommitteeIndexRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[1] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -182,7 +340,7 @@ func (x *SyncSubcommitteeIndexRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncSubcommitteeIndexRequest.ProtoReflect.Descriptor instead. func (*SyncSubcommitteeIndexRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{1} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{4} } func (x *SyncSubcommitteeIndexRequest) GetPublicKey() []byte { @@ -212,7 +370,7 @@ type SyncCommitteeContributionRequest struct { func (x *SyncCommitteeContributionRequest) Reset() { *x = SyncCommitteeContributionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[2] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -225,7 +383,7 @@ func (x *SyncCommitteeContributionRequest) String() string { func (*SyncCommitteeContributionRequest) ProtoMessage() {} func (x *SyncCommitteeContributionRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[2] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -238,7 +396,7 @@ func (x *SyncCommitteeContributionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncCommitteeContributionRequest.ProtoReflect.Descriptor instead. func (*SyncCommitteeContributionRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{2} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{5} } func (x *SyncCommitteeContributionRequest) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { @@ -273,7 +431,7 @@ type SyncSubcommitteeIndexResponse struct { func (x *SyncSubcommitteeIndexResponse) Reset() { *x = SyncSubcommitteeIndexResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[3] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -286,7 +444,7 @@ func (x *SyncSubcommitteeIndexResponse) String() string { func (*SyncSubcommitteeIndexResponse) ProtoMessage() {} func (x *SyncSubcommitteeIndexResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[3] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -299,7 +457,7 @@ func (x *SyncSubcommitteeIndexResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncSubcommitteeIndexResponse.ProtoReflect.Descriptor instead. func (*SyncSubcommitteeIndexResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{3} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{6} } func (x *SyncSubcommitteeIndexResponse) GetIndices() []github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.CommitteeIndex { @@ -321,7 +479,7 @@ type StreamSlotsResponse struct { func (x *StreamSlotsResponse) Reset() { *x = StreamSlotsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[4] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -334,7 +492,7 @@ func (x *StreamSlotsResponse) String() string { func (*StreamSlotsResponse) ProtoMessage() {} func (x *StreamSlotsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[4] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -347,7 +505,7 @@ func (x *StreamSlotsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamSlotsResponse.ProtoReflect.Descriptor instead. func (*StreamSlotsResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{4} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{7} } func (x *StreamSlotsResponse) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { @@ -377,7 +535,7 @@ type StreamBlocksResponse struct { func (x *StreamBlocksResponse) Reset() { *x = StreamBlocksResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[5] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -390,7 +548,7 @@ func (x *StreamBlocksResponse) String() string { func (*StreamBlocksResponse) ProtoMessage() {} func (x *StreamBlocksResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[5] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -403,7 +561,7 @@ func (x *StreamBlocksResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamBlocksResponse.ProtoReflect.Descriptor instead. func (*StreamBlocksResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{5} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{8} } func (m *StreamBlocksResponse) GetBlock() isStreamBlocksResponse_Block { @@ -507,7 +665,7 @@ type DomainRequest struct { func (x *DomainRequest) Reset() { *x = DomainRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[6] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -520,7 +678,7 @@ func (x *DomainRequest) String() string { func (*DomainRequest) ProtoMessage() {} func (x *DomainRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[6] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -533,7 +691,7 @@ func (x *DomainRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DomainRequest.ProtoReflect.Descriptor instead. func (*DomainRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{6} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{9} } func (x *DomainRequest) GetEpoch() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Epoch { @@ -561,7 +719,7 @@ type DomainResponse struct { func (x *DomainResponse) Reset() { *x = DomainResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[7] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -574,7 +732,7 @@ func (x *DomainResponse) String() string { func (*DomainResponse) ProtoMessage() {} func (x *DomainResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[7] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -587,7 +745,7 @@ func (x *DomainResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DomainResponse.ProtoReflect.Descriptor instead. func (*DomainResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{7} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{10} } func (x *DomainResponse) GetSignatureDomain() []byte { @@ -608,7 +766,7 @@ type ValidatorActivationRequest struct { func (x *ValidatorActivationRequest) Reset() { *x = ValidatorActivationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[8] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -621,7 +779,7 @@ func (x *ValidatorActivationRequest) String() string { func (*ValidatorActivationRequest) ProtoMessage() {} func (x *ValidatorActivationRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[8] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -634,7 +792,7 @@ func (x *ValidatorActivationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorActivationRequest.ProtoReflect.Descriptor instead. func (*ValidatorActivationRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{8} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{11} } func (x *ValidatorActivationRequest) GetPublicKeys() [][]byte { @@ -655,7 +813,7 @@ type ValidatorActivationResponse struct { func (x *ValidatorActivationResponse) Reset() { *x = ValidatorActivationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[9] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -668,7 +826,7 @@ func (x *ValidatorActivationResponse) String() string { func (*ValidatorActivationResponse) ProtoMessage() {} func (x *ValidatorActivationResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[9] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -681,7 +839,7 @@ func (x *ValidatorActivationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorActivationResponse.ProtoReflect.Descriptor instead. func (*ValidatorActivationResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{9} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{12} } func (x *ValidatorActivationResponse) GetStatuses() []*ValidatorActivationResponse_Status { @@ -704,7 +862,7 @@ type ChainStartResponse struct { func (x *ChainStartResponse) Reset() { *x = ChainStartResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[10] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -717,7 +875,7 @@ func (x *ChainStartResponse) String() string { func (*ChainStartResponse) ProtoMessage() {} func (x *ChainStartResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[10] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -730,7 +888,7 @@ func (x *ChainStartResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ChainStartResponse.ProtoReflect.Descriptor instead. func (*ChainStartResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{10} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{13} } func (x *ChainStartResponse) GetStarted() bool { @@ -766,7 +924,7 @@ type SyncedResponse struct { func (x *SyncedResponse) Reset() { *x = SyncedResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[11] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -779,7 +937,7 @@ func (x *SyncedResponse) String() string { func (*SyncedResponse) ProtoMessage() {} func (x *SyncedResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[11] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -792,7 +950,7 @@ func (x *SyncedResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncedResponse.ProtoReflect.Descriptor instead. func (*SyncedResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{11} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{14} } func (x *SyncedResponse) GetSynced() bool { @@ -820,7 +978,7 @@ type ValidatorIndexRequest struct { func (x *ValidatorIndexRequest) Reset() { *x = ValidatorIndexRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[12] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -833,7 +991,7 @@ func (x *ValidatorIndexRequest) String() string { func (*ValidatorIndexRequest) ProtoMessage() {} func (x *ValidatorIndexRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[12] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -846,7 +1004,7 @@ func (x *ValidatorIndexRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorIndexRequest.ProtoReflect.Descriptor instead. func (*ValidatorIndexRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{12} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{15} } func (x *ValidatorIndexRequest) GetPublicKey() []byte { @@ -867,7 +1025,7 @@ type ValidatorIndexResponse struct { func (x *ValidatorIndexResponse) Reset() { *x = ValidatorIndexResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[13] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -880,7 +1038,7 @@ func (x *ValidatorIndexResponse) String() string { func (*ValidatorIndexResponse) ProtoMessage() {} func (x *ValidatorIndexResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[13] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -893,7 +1051,7 @@ func (x *ValidatorIndexResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorIndexResponse.ProtoReflect.Descriptor instead. func (*ValidatorIndexResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{13} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{16} } func (x *ValidatorIndexResponse) GetIndex() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { @@ -914,7 +1072,7 @@ type ValidatorStatusRequest struct { func (x *ValidatorStatusRequest) Reset() { *x = ValidatorStatusRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[14] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -927,7 +1085,7 @@ func (x *ValidatorStatusRequest) String() string { func (*ValidatorStatusRequest) ProtoMessage() {} func (x *ValidatorStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[14] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -940,7 +1098,7 @@ func (x *ValidatorStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorStatusRequest.ProtoReflect.Descriptor instead. func (*ValidatorStatusRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{14} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{17} } func (x *ValidatorStatusRequest) GetPublicKey() []byte { @@ -965,7 +1123,7 @@ type ValidatorStatusResponse struct { func (x *ValidatorStatusResponse) Reset() { *x = ValidatorStatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[15] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -978,7 +1136,7 @@ func (x *ValidatorStatusResponse) String() string { func (*ValidatorStatusResponse) ProtoMessage() {} func (x *ValidatorStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[15] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -991,7 +1149,7 @@ func (x *ValidatorStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorStatusResponse.ProtoReflect.Descriptor instead. func (*ValidatorStatusResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{15} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{18} } func (x *ValidatorStatusResponse) GetStatus() ValidatorStatus { @@ -1041,7 +1199,7 @@ type MultipleValidatorStatusRequest struct { func (x *MultipleValidatorStatusRequest) Reset() { *x = MultipleValidatorStatusRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[16] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1054,7 +1212,7 @@ func (x *MultipleValidatorStatusRequest) String() string { func (*MultipleValidatorStatusRequest) ProtoMessage() {} func (x *MultipleValidatorStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[16] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1067,7 +1225,7 @@ func (x *MultipleValidatorStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MultipleValidatorStatusRequest.ProtoReflect.Descriptor instead. func (*MultipleValidatorStatusRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{16} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{19} } func (x *MultipleValidatorStatusRequest) GetPublicKeys() [][]byte { @@ -1097,7 +1255,7 @@ type MultipleValidatorStatusResponse struct { func (x *MultipleValidatorStatusResponse) Reset() { *x = MultipleValidatorStatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[17] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1110,7 +1268,7 @@ func (x *MultipleValidatorStatusResponse) String() string { func (*MultipleValidatorStatusResponse) ProtoMessage() {} func (x *MultipleValidatorStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[17] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1123,7 +1281,7 @@ func (x *MultipleValidatorStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MultipleValidatorStatusResponse.ProtoReflect.Descriptor instead. func (*MultipleValidatorStatusResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{17} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{20} } func (x *MultipleValidatorStatusResponse) GetPublicKeys() [][]byte { @@ -1159,7 +1317,7 @@ type DutiesRequest struct { func (x *DutiesRequest) Reset() { *x = DutiesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[18] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1172,7 +1330,7 @@ func (x *DutiesRequest) String() string { func (*DutiesRequest) ProtoMessage() {} func (x *DutiesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[18] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1185,7 +1343,7 @@ func (x *DutiesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DutiesRequest.ProtoReflect.Descriptor instead. func (*DutiesRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{18} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{21} } func (x *DutiesRequest) GetEpoch() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Epoch { @@ -1214,7 +1372,7 @@ type DutiesResponse struct { func (x *DutiesResponse) Reset() { *x = DutiesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[19] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1227,7 +1385,7 @@ func (x *DutiesResponse) String() string { func (*DutiesResponse) ProtoMessage() {} func (x *DutiesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[19] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1240,7 +1398,7 @@ func (x *DutiesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DutiesResponse.ProtoReflect.Descriptor instead. func (*DutiesResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{19} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{22} } func (x *DutiesResponse) GetCurrentEpochDuties() []*DutiesResponse_Duty { @@ -1272,7 +1430,7 @@ type BlockRequest struct { func (x *BlockRequest) Reset() { *x = BlockRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[20] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1285,7 +1443,7 @@ func (x *BlockRequest) String() string { func (*BlockRequest) ProtoMessage() {} func (x *BlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[20] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1298,7 +1456,7 @@ func (x *BlockRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockRequest.ProtoReflect.Descriptor instead. func (*BlockRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{20} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{23} } func (x *BlockRequest) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { @@ -1347,7 +1505,7 @@ type ProposeResponse struct { func (x *ProposeResponse) Reset() { *x = ProposeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[21] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1360,7 +1518,7 @@ func (x *ProposeResponse) String() string { func (*ProposeResponse) ProtoMessage() {} func (x *ProposeResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[21] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1373,7 +1531,7 @@ func (x *ProposeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ProposeResponse.ProtoReflect.Descriptor instead. func (*ProposeResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{21} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{24} } func (x *ProposeResponse) GetBlockRoot() []byte { @@ -1394,7 +1552,7 @@ type ProposeExitResponse struct { func (x *ProposeExitResponse) Reset() { *x = ProposeExitResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[22] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1407,7 +1565,7 @@ func (x *ProposeExitResponse) String() string { func (*ProposeExitResponse) ProtoMessage() {} func (x *ProposeExitResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[22] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1420,7 +1578,7 @@ func (x *ProposeExitResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ProposeExitResponse.ProtoReflect.Descriptor instead. func (*ProposeExitResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{22} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{25} } func (x *ProposeExitResponse) GetExitRoot() []byte { @@ -1442,7 +1600,7 @@ type AttestationDataRequest struct { func (x *AttestationDataRequest) Reset() { *x = AttestationDataRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[23] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1455,7 +1613,7 @@ func (x *AttestationDataRequest) String() string { func (*AttestationDataRequest) ProtoMessage() {} func (x *AttestationDataRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[23] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1468,7 +1626,7 @@ func (x *AttestationDataRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AttestationDataRequest.ProtoReflect.Descriptor instead. func (*AttestationDataRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{23} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{26} } func (x *AttestationDataRequest) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { @@ -1496,7 +1654,7 @@ type AttestResponse struct { func (x *AttestResponse) Reset() { *x = AttestResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[24] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1509,7 +1667,7 @@ func (x *AttestResponse) String() string { func (*AttestResponse) ProtoMessage() {} func (x *AttestResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[24] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1522,7 +1680,7 @@ func (x *AttestResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AttestResponse.ProtoReflect.Descriptor instead. func (*AttestResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{24} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{27} } func (x *AttestResponse) GetAttestationDataRoot() []byte { @@ -1546,7 +1704,7 @@ type AggregateSelectionRequest struct { func (x *AggregateSelectionRequest) Reset() { *x = AggregateSelectionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[25] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1559,7 +1717,7 @@ func (x *AggregateSelectionRequest) String() string { func (*AggregateSelectionRequest) ProtoMessage() {} func (x *AggregateSelectionRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[25] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1572,7 +1730,7 @@ func (x *AggregateSelectionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AggregateSelectionRequest.ProtoReflect.Descriptor instead. func (*AggregateSelectionRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{25} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{28} } func (x *AggregateSelectionRequest) GetSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { @@ -1614,7 +1772,7 @@ type AggregateSelectionResponse struct { func (x *AggregateSelectionResponse) Reset() { *x = AggregateSelectionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[26] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1627,7 +1785,7 @@ func (x *AggregateSelectionResponse) String() string { func (*AggregateSelectionResponse) ProtoMessage() {} func (x *AggregateSelectionResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[26] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1640,7 +1798,7 @@ func (x *AggregateSelectionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AggregateSelectionResponse.ProtoReflect.Descriptor instead. func (*AggregateSelectionResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{26} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{29} } func (x *AggregateSelectionResponse) GetAggregateAndProof() *AggregateAttestationAndProof { @@ -1661,7 +1819,7 @@ type AggregateSelectionElectraResponse struct { func (x *AggregateSelectionElectraResponse) Reset() { *x = AggregateSelectionElectraResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[27] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1674,7 +1832,7 @@ func (x *AggregateSelectionElectraResponse) String() string { func (*AggregateSelectionElectraResponse) ProtoMessage() {} func (x *AggregateSelectionElectraResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[27] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1687,7 +1845,7 @@ func (x *AggregateSelectionElectraResponse) ProtoReflect() protoreflect.Message // Deprecated: Use AggregateSelectionElectraResponse.ProtoReflect.Descriptor instead. func (*AggregateSelectionElectraResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{27} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{30} } func (x *AggregateSelectionElectraResponse) GetAggregateAndProof() *AggregateAttestationAndProofElectra { @@ -1708,7 +1866,7 @@ type SignedAggregateSubmitRequest struct { func (x *SignedAggregateSubmitRequest) Reset() { *x = SignedAggregateSubmitRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[28] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1721,7 +1879,7 @@ func (x *SignedAggregateSubmitRequest) String() string { func (*SignedAggregateSubmitRequest) ProtoMessage() {} func (x *SignedAggregateSubmitRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[28] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1734,7 +1892,7 @@ func (x *SignedAggregateSubmitRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SignedAggregateSubmitRequest.ProtoReflect.Descriptor instead. func (*SignedAggregateSubmitRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{28} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{31} } func (x *SignedAggregateSubmitRequest) GetSignedAggregateAndProof() *SignedAggregateAttestationAndProof { @@ -1755,7 +1913,7 @@ type SignedAggregateSubmitElectraRequest struct { func (x *SignedAggregateSubmitElectraRequest) Reset() { *x = SignedAggregateSubmitElectraRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[29] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1768,7 +1926,7 @@ func (x *SignedAggregateSubmitElectraRequest) String() string { func (*SignedAggregateSubmitElectraRequest) ProtoMessage() {} func (x *SignedAggregateSubmitElectraRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[29] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1781,7 +1939,7 @@ func (x *SignedAggregateSubmitElectraRequest) ProtoReflect() protoreflect.Messag // Deprecated: Use SignedAggregateSubmitElectraRequest.ProtoReflect.Descriptor instead. func (*SignedAggregateSubmitElectraRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{29} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{32} } func (x *SignedAggregateSubmitElectraRequest) GetSignedAggregateAndProof() *SignedAggregateAttestationAndProofElectra { @@ -1802,7 +1960,7 @@ type SignedAggregateSubmitResponse struct { func (x *SignedAggregateSubmitResponse) Reset() { *x = SignedAggregateSubmitResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[30] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1815,7 +1973,7 @@ func (x *SignedAggregateSubmitResponse) String() string { func (*SignedAggregateSubmitResponse) ProtoMessage() {} func (x *SignedAggregateSubmitResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[30] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1828,7 +1986,7 @@ func (x *SignedAggregateSubmitResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SignedAggregateSubmitResponse.ProtoReflect.Descriptor instead. func (*SignedAggregateSubmitResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{30} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{33} } func (x *SignedAggregateSubmitResponse) GetAttestationDataRoot() []byte { @@ -1851,7 +2009,7 @@ type CommitteeSubnetsSubscribeRequest struct { func (x *CommitteeSubnetsSubscribeRequest) Reset() { *x = CommitteeSubnetsSubscribeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[31] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1864,7 +2022,7 @@ func (x *CommitteeSubnetsSubscribeRequest) String() string { func (*CommitteeSubnetsSubscribeRequest) ProtoMessage() {} func (x *CommitteeSubnetsSubscribeRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[31] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1877,7 +2035,7 @@ func (x *CommitteeSubnetsSubscribeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CommitteeSubnetsSubscribeRequest.ProtoReflect.Descriptor instead. func (*CommitteeSubnetsSubscribeRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{31} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{34} } func (x *CommitteeSubnetsSubscribeRequest) GetSlots() []github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { @@ -1919,7 +2077,7 @@ type Validator struct { func (x *Validator) Reset() { *x = Validator{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[32] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1932,7 +2090,7 @@ func (x *Validator) String() string { func (*Validator) ProtoMessage() {} func (x *Validator) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[32] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1945,7 +2103,7 @@ func (x *Validator) ProtoReflect() protoreflect.Message { // Deprecated: Use Validator.ProtoReflect.Descriptor instead. func (*Validator) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{32} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{35} } func (x *Validator) GetPublicKey() []byte { @@ -2027,7 +2185,7 @@ type ValidatorParticipation struct { func (x *ValidatorParticipation) Reset() { *x = ValidatorParticipation{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[33] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2040,7 +2198,7 @@ func (x *ValidatorParticipation) String() string { func (*ValidatorParticipation) ProtoMessage() {} func (x *ValidatorParticipation) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[33] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2053,7 +2211,7 @@ func (x *ValidatorParticipation) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorParticipation.ProtoReflect.Descriptor instead. func (*ValidatorParticipation) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{33} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{36} } // Deprecated: Marked as deprecated in proto/prysm/v1alpha1/validator.proto. @@ -2146,7 +2304,7 @@ type ValidatorInfo struct { func (x *ValidatorInfo) Reset() { *x = ValidatorInfo{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[34] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2159,7 +2317,7 @@ func (x *ValidatorInfo) String() string { func (*ValidatorInfo) ProtoMessage() {} func (x *ValidatorInfo) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[34] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2172,7 +2330,7 @@ func (x *ValidatorInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidatorInfo.ProtoReflect.Descriptor instead. func (*ValidatorInfo) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{34} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{37} } func (x *ValidatorInfo) GetPublicKey() []byte { @@ -2235,7 +2393,7 @@ type DoppelGangerRequest struct { func (x *DoppelGangerRequest) Reset() { *x = DoppelGangerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[35] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2248,7 +2406,7 @@ func (x *DoppelGangerRequest) String() string { func (*DoppelGangerRequest) ProtoMessage() {} func (x *DoppelGangerRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[35] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2261,7 +2419,7 @@ func (x *DoppelGangerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DoppelGangerRequest.ProtoReflect.Descriptor instead. func (*DoppelGangerRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{35} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{38} } func (x *DoppelGangerRequest) GetValidatorRequests() []*DoppelGangerRequest_ValidatorRequest { @@ -2282,7 +2440,7 @@ type DoppelGangerResponse struct { func (x *DoppelGangerResponse) Reset() { *x = DoppelGangerResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[36] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2295,7 +2453,7 @@ func (x *DoppelGangerResponse) String() string { func (*DoppelGangerResponse) ProtoMessage() {} func (x *DoppelGangerResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[36] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2308,7 +2466,7 @@ func (x *DoppelGangerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DoppelGangerResponse.ProtoReflect.Descriptor instead. func (*DoppelGangerResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{36} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{39} } func (x *DoppelGangerResponse) GetResponses() []*DoppelGangerResponse_ValidatorResponse { @@ -2330,7 +2488,7 @@ type StreamSlotsRequest struct { func (x *StreamSlotsRequest) Reset() { *x = StreamSlotsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[37] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2343,7 +2501,7 @@ func (x *StreamSlotsRequest) String() string { func (*StreamSlotsRequest) ProtoMessage() {} func (x *StreamSlotsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[37] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2356,7 +2514,7 @@ func (x *StreamSlotsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamSlotsRequest.ProtoReflect.Descriptor instead. func (*StreamSlotsRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{37} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{40} } func (x *StreamSlotsRequest) GetVerifiedOnly() bool { @@ -2378,7 +2536,7 @@ type StreamBlocksRequest struct { func (x *StreamBlocksRequest) Reset() { *x = StreamBlocksRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[38] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2391,7 +2549,7 @@ func (x *StreamBlocksRequest) String() string { func (*StreamBlocksRequest) ProtoMessage() {} func (x *StreamBlocksRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[38] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2404,7 +2562,7 @@ func (x *StreamBlocksRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamBlocksRequest.ProtoReflect.Descriptor instead. func (*StreamBlocksRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{38} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{41} } func (x *StreamBlocksRequest) GetVerifiedOnly() bool { @@ -2425,7 +2583,7 @@ type PrepareBeaconProposerRequest struct { func (x *PrepareBeaconProposerRequest) Reset() { *x = PrepareBeaconProposerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[39] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2438,7 +2596,7 @@ func (x *PrepareBeaconProposerRequest) String() string { func (*PrepareBeaconProposerRequest) ProtoMessage() {} func (x *PrepareBeaconProposerRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[39] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2451,7 +2609,7 @@ func (x *PrepareBeaconProposerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PrepareBeaconProposerRequest.ProtoReflect.Descriptor instead. func (*PrepareBeaconProposerRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{39} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{42} } func (x *PrepareBeaconProposerRequest) GetRecipients() []*PrepareBeaconProposerRequest_FeeRecipientContainer { @@ -2472,7 +2630,7 @@ type FeeRecipientByPubKeyRequest struct { func (x *FeeRecipientByPubKeyRequest) Reset() { *x = FeeRecipientByPubKeyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[40] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2485,7 +2643,7 @@ func (x *FeeRecipientByPubKeyRequest) String() string { func (*FeeRecipientByPubKeyRequest) ProtoMessage() {} func (x *FeeRecipientByPubKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[40] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2498,7 +2656,7 @@ func (x *FeeRecipientByPubKeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FeeRecipientByPubKeyRequest.ProtoReflect.Descriptor instead. func (*FeeRecipientByPubKeyRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{40} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{43} } func (x *FeeRecipientByPubKeyRequest) GetPublicKey() []byte { @@ -2519,7 +2677,7 @@ type FeeRecipientByPubKeyResponse struct { func (x *FeeRecipientByPubKeyResponse) Reset() { *x = FeeRecipientByPubKeyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[41] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2532,7 +2690,7 @@ func (x *FeeRecipientByPubKeyResponse) String() string { func (*FeeRecipientByPubKeyResponse) ProtoMessage() {} func (x *FeeRecipientByPubKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[41] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2545,7 +2703,7 @@ func (x *FeeRecipientByPubKeyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FeeRecipientByPubKeyResponse.ProtoReflect.Descriptor instead. func (*FeeRecipientByPubKeyResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{41} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{44} } func (x *FeeRecipientByPubKeyResponse) GetFeeRecipient() []byte { @@ -2567,7 +2725,7 @@ type AssignValidatorToSubnetRequest struct { func (x *AssignValidatorToSubnetRequest) Reset() { *x = AssignValidatorToSubnetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[42] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2580,7 +2738,7 @@ func (x *AssignValidatorToSubnetRequest) String() string { func (*AssignValidatorToSubnetRequest) ProtoMessage() {} func (x *AssignValidatorToSubnetRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[42] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2593,7 +2751,7 @@ func (x *AssignValidatorToSubnetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AssignValidatorToSubnetRequest.ProtoReflect.Descriptor instead. func (*AssignValidatorToSubnetRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{42} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{45} } func (x *AssignValidatorToSubnetRequest) GetPublicKey() []byte { @@ -2624,7 +2782,7 @@ type AggregatedSigAndAggregationBitsRequest struct { func (x *AggregatedSigAndAggregationBitsRequest) Reset() { *x = AggregatedSigAndAggregationBitsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[43] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2637,7 +2795,7 @@ func (x *AggregatedSigAndAggregationBitsRequest) String() string { func (*AggregatedSigAndAggregationBitsRequest) ProtoMessage() {} func (x *AggregatedSigAndAggregationBitsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[43] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2650,7 +2808,7 @@ func (x *AggregatedSigAndAggregationBitsRequest) ProtoReflect() protoreflect.Mes // Deprecated: Use AggregatedSigAndAggregationBitsRequest.ProtoReflect.Descriptor instead. func (*AggregatedSigAndAggregationBitsRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{43} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{46} } func (x *AggregatedSigAndAggregationBitsRequest) GetMsgs() []*SyncCommitteeMessage { @@ -2693,7 +2851,7 @@ type AggregatedSigAndAggregationBitsResponse struct { func (x *AggregatedSigAndAggregationBitsResponse) Reset() { *x = AggregatedSigAndAggregationBitsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[44] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2706,7 +2864,7 @@ func (x *AggregatedSigAndAggregationBitsResponse) String() string { func (*AggregatedSigAndAggregationBitsResponse) ProtoMessage() {} func (x *AggregatedSigAndAggregationBitsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[44] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2719,7 +2877,7 @@ func (x *AggregatedSigAndAggregationBitsResponse) ProtoReflect() protoreflect.Me // Deprecated: Use AggregatedSigAndAggregationBitsResponse.ProtoReflect.Descriptor instead. func (*AggregatedSigAndAggregationBitsResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{44} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{47} } func (x *AggregatedSigAndAggregationBitsResponse) GetAggregatedSig() []byte { @@ -2749,7 +2907,7 @@ type ValidatorActivationResponse_Status struct { func (x *ValidatorActivationResponse_Status) Reset() { *x = ValidatorActivationResponse_Status{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[45] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2762,7 +2920,7 @@ func (x *ValidatorActivationResponse_Status) String() string { func (*ValidatorActivationResponse_Status) ProtoMessage() {} func (x *ValidatorActivationResponse_Status) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[45] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2775,7 +2933,7 @@ func (x *ValidatorActivationResponse_Status) ProtoReflect() protoreflect.Message // Deprecated: Use ValidatorActivationResponse_Status.ProtoReflect.Descriptor instead. func (*ValidatorActivationResponse_Status) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{9, 0} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{12, 0} } func (x *ValidatorActivationResponse_Status) GetPublicKey() []byte { @@ -2813,12 +2971,13 @@ type DutiesResponse_Duty struct { ValidatorIndex github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex `protobuf:"varint,7,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"` IsSyncCommittee bool `protobuf:"varint,8,opt,name=is_sync_committee,json=isSyncCommittee,proto3" json:"is_sync_committee,omitempty"` CommitteesAtSlot uint64 `protobuf:"varint,9,opt,name=committees_at_slot,json=committeesAtSlot,proto3" json:"committees_at_slot,omitempty"` + PtcSlot github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot `protobuf:"varint,10,opt,name=ptc_slot,json=ptcSlot,proto3" json:"ptc_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"` } func (x *DutiesResponse_Duty) Reset() { *x = DutiesResponse_Duty{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[46] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2831,7 +2990,7 @@ func (x *DutiesResponse_Duty) String() string { func (*DutiesResponse_Duty) ProtoMessage() {} func (x *DutiesResponse_Duty) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[46] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2844,7 +3003,7 @@ func (x *DutiesResponse_Duty) ProtoReflect() protoreflect.Message { // Deprecated: Use DutiesResponse_Duty.ProtoReflect.Descriptor instead. func (*DutiesResponse_Duty) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{19, 0} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{22, 0} } func (x *DutiesResponse_Duty) GetCommittee() []github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.ValidatorIndex { @@ -2910,6 +3069,13 @@ func (x *DutiesResponse_Duty) GetCommitteesAtSlot() uint64 { return 0 } +func (x *DutiesResponse_Duty) GetPtcSlot() github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot { + if x != nil { + return x.PtcSlot + } + return github_com_prysmaticlabs_prysm_v5_consensus_types_primitives.Slot(0) +} + type DoppelGangerRequest_ValidatorRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2923,7 +3089,7 @@ type DoppelGangerRequest_ValidatorRequest struct { func (x *DoppelGangerRequest_ValidatorRequest) Reset() { *x = DoppelGangerRequest_ValidatorRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[47] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2936,7 +3102,7 @@ func (x *DoppelGangerRequest_ValidatorRequest) String() string { func (*DoppelGangerRequest_ValidatorRequest) ProtoMessage() {} func (x *DoppelGangerRequest_ValidatorRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[47] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2949,7 +3115,7 @@ func (x *DoppelGangerRequest_ValidatorRequest) ProtoReflect() protoreflect.Messa // Deprecated: Use DoppelGangerRequest_ValidatorRequest.ProtoReflect.Descriptor instead. func (*DoppelGangerRequest_ValidatorRequest) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{35, 0} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{38, 0} } func (x *DoppelGangerRequest_ValidatorRequest) GetPublicKey() []byte { @@ -2985,7 +3151,7 @@ type DoppelGangerResponse_ValidatorResponse struct { func (x *DoppelGangerResponse_ValidatorResponse) Reset() { *x = DoppelGangerResponse_ValidatorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[48] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2998,7 +3164,7 @@ func (x *DoppelGangerResponse_ValidatorResponse) String() string { func (*DoppelGangerResponse_ValidatorResponse) ProtoMessage() {} func (x *DoppelGangerResponse_ValidatorResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[48] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3011,7 +3177,7 @@ func (x *DoppelGangerResponse_ValidatorResponse) ProtoReflect() protoreflect.Mes // Deprecated: Use DoppelGangerResponse_ValidatorResponse.ProtoReflect.Descriptor instead. func (*DoppelGangerResponse_ValidatorResponse) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{36, 0} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{39, 0} } func (x *DoppelGangerResponse_ValidatorResponse) GetPublicKey() []byte { @@ -3040,7 +3206,7 @@ type PrepareBeaconProposerRequest_FeeRecipientContainer struct { func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) Reset() { *x = PrepareBeaconProposerRequest_FeeRecipientContainer{} if protoimpl.UnsafeEnabled { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[49] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3053,7 +3219,7 @@ func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) String() string { func (*PrepareBeaconProposerRequest_FeeRecipientContainer) ProtoMessage() {} func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) ProtoReflect() protoreflect.Message { - mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[49] + mi := &file_proto_prysm_v1alpha1_validator_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3066,7 +3232,7 @@ func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) ProtoReflect() prot // Deprecated: Use PrepareBeaconProposerRequest_FeeRecipientContainer.ProtoReflect.Descriptor instead. func (*PrepareBeaconProposerRequest_FeeRecipientContainer) Descriptor() ([]byte, []int) { - return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{39, 0} + return file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP(), []int{42, 0} } func (x *PrepareBeaconProposerRequest_FeeRecipientContainer) GetFeeRecipient() []byte { @@ -3105,274 +3271,322 @@ var file_proto_prysm_v1alpha1_validator_proto_rawDesc = []byte{ 0x74, 0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x3a, 0x0a, 0x1c, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1a, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0xa0, 0x01, - 0x0a, 0x1c, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, - 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x02, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, - 0x22, 0xcb, 0x01, 0x0a, 0x20, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, - 0x12, 0x2f, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x9a, 0xb5, 0x18, 0x06, - 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x22, 0x8a, - 0x01, 0x0a, 0x1d, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x69, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x13, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2f, + 0x76, 0x31, 0x2f, 0x65, 0x70, 0x62, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xeb, 0x01, + 0x0a, 0x16, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, + 0x18, 0x01, 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, 0x04, 0x73, + 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, + 0x4b, 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, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0d, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xe2, 0x01, 0x0a, 0x0d, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x59, 0x0a, + 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x3a, 0x02, 0x18, - 0x01, 0x22, 0xa7, 0x04, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x70, 0x68, - 0x61, 0x73, 0x65, 0x30, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x68, - 0x61, 0x73, 0x65, 0x30, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x53, 0x0a, 0x0c, 0x61, 0x6c, 0x74, - 0x61, 0x69, 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, - 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48, - 0x00, 0x52, 0x0b, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x5c, - 0x0a, 0x0f, 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x42, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x65, - 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x56, 0x0a, 0x0d, - 0x63, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 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, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, - 0x65, 0x6c, 0x6c, 0x61, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x50, 0x0a, 0x0b, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x5f, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x18, 0x05, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x6e, 0x65, - 0x62, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x56, 0x0a, 0x0d, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, - 0x61, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x06, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, - 0x52, 0x0c, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x02, - 0x18, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x85, 0x01, 0x0a, 0x0d, - 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5c, 0x0a, - 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, - 0x18, 0x42, 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, 0x45, - 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x6f, 0x6d, - 0x61, 0x69, 0x6e, 0x22, 0x3b, 0x0a, 0x0e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x22, 0x47, 0x0a, 0x1a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, - 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x52, 0x0a, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xcd, 0x02, 0x0a, 0x1b, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x08, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, - 0x1a, 0xd6, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x65, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x91, 0x01, 0x0a, 0x12, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3e, 0x0a, - 0x17, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, - 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x4b, 0x0a, - 0x0e, 0x53, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x15, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, - 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x7f, 0x0a, 0x16, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x3f, 0x0a, 0x16, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, - 0x38, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0xc5, 0x03, 0x0a, - 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x19, 0x65, 0x74, 0x68, 0x31, - 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x65, 0x74, 0x68, - 0x31, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x7b, 0x0a, 0x16, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 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, 0x14, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x6c, 0x6f, 0x74, - 0x12, 0x71, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, - 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, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x52, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x6e, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, - 0x65, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, - 0x75, 0x65, 0x75, 0x65, 0x22, 0x65, 0x0a, 0x1e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, - 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x03, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x83, 0x02, 0x0a, 0x1f, - 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x29, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x52, 0x0a, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x4a, 0x0a, 0x08, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x69, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, - 0x73, 0x22, 0x98, 0x01, 0x0a, 0x0d, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x5c, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x22, 0x7d, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, - 0x68, 0x12, 0x29, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, - 0x52, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xd3, 0x07, 0x0a, - 0x0e, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x5c, 0x0a, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x5f, 0x64, 0x75, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x75, 0x74, 0x79, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x12, 0x56, 0x0a, - 0x11, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x64, 0x75, 0x74, 0x69, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x44, 0x75, 0x74, 0x79, 0x52, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x44, - 0x75, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x84, 0x06, 0x0a, 0x04, 0x44, 0x75, 0x74, 0x79, 0x12, 0x6d, - 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x69, 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x22, + 0x3a, 0x0a, 0x1c, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1a, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, + 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0xa0, 0x01, 0x0a, 0x1c, + 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0a, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x02, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x78, 0x0a, - 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x6a, 0x0a, 0x0d, 0x61, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, + 0x76, 0x65, 0x73, 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x22, 0xcb, + 0x01, 0x0a, 0x20, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x2f, + 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x42, 0x10, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x9a, 0xb5, 0x18, 0x06, 0x70, 0x75, + 0x62, 0x6b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, + 0x1b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x22, 0x8a, 0x01, 0x0a, + 0x1d, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, + 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x42, + 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x13, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x53, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 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, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x6c, 0x6f, 0x74, 0x12, 0x6c, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, - 0x73, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 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, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x6f, 0x74, - 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x09, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x2e, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x3a, 0x02, 0x18, 0x01, 0x22, + 0xa7, 0x04, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x70, 0x68, 0x61, 0x73, + 0x65, 0x30, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, + 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x68, 0x61, 0x73, + 0x65, 0x30, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x53, 0x0a, 0x0c, 0x61, 0x6c, 0x74, 0x61, 0x69, + 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x48, 0x00, 0x52, + 0x0b, 0x61, 0x6c, 0x74, 0x61, 0x69, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x5c, 0x0a, 0x0f, + 0x62, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, + 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x72, 0x69, 0x78, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x65, 0x6c, 0x6c, + 0x61, 0x74, 0x72, 0x69, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x56, 0x0a, 0x0d, 0x63, 0x61, + 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x61, 0x70, 0x65, 0x6c, + 0x6c, 0x61, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x65, 0x6c, 0x6c, 0x61, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x12, 0x50, 0x0a, 0x0b, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x05, 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, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x44, 0x65, 0x6e, 0x65, 0x62, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x6e, 0x65, 0x62, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x56, 0x0a, 0x0d, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x06, 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, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x48, 0x00, 0x52, 0x0c, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x02, 0x18, 0x01, + 0x42, 0x07, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x85, 0x01, 0x0a, 0x0d, 0x44, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5c, 0x0a, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, + 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, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x22, 0x3b, 0x0a, 0x0e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x47, + 0x0a, 0x1a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0b, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x52, 0x0a, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xcd, 0x02, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x1a, 0xd6, + 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x78, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x65, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x91, 0x01, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x17, 0x67, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, + 0x18, 0x02, 0x33, 0x32, 0x52, 0x15, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0x4b, 0x0a, 0x0e, 0x53, + 0x79, 0x6e, 0x63, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, + 0x79, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x65, 0x6e, + 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x09, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x7f, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x65, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x73, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, - 0x73, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x2c, - 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x5f, - 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x41, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x4a, 0x04, 0x08, 0x01, + 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x3f, 0x0a, 0x16, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0xc5, 0x03, 0x0a, 0x17, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x19, 0x65, 0x74, 0x68, 0x31, 0x5f, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x65, 0x74, 0x68, 0x31, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x7b, 0x0a, 0x16, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 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, 0x14, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x71, + 0x0a, 0x10, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 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, 0x45, 0x70, 0x6f, 0x63, 0x68, + 0x52, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x70, 0x6f, 0x63, + 0x68, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, + 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x75, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, + 0x75, 0x65, 0x22, 0x65, 0x0a, 0x1e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, + 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x3f, + 0x2c, 0x34, 0x38, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, + 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x83, 0x02, 0x0a, 0x1f, 0x4d, 0x75, + 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, + 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x52, 0x0a, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x4a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x65, 0x73, 0x12, 0x69, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, + 0x98, 0x01, 0x0a, 0x0d, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x5c, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x46, 0x82, 0xb5, 0x18, 0x42, 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, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, + 0x29, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0c, 0x42, 0x08, 0x8a, 0xb5, 0x18, 0x04, 0x3f, 0x2c, 0x34, 0x38, 0x52, 0x0a, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xb5, 0x08, 0x0a, 0x0e, 0x44, + 0x75, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, + 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x64, + 0x75, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x44, 0x75, 0x74, 0x79, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x45, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x11, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x64, 0x75, 0x74, 0x69, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, + 0x75, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x75, + 0x74, 0x79, 0x52, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x44, 0x75, 0x74, + 0x69, 0x65, 0x73, 0x1a, 0xe6, 0x06, 0x0a, 0x04, 0x44, 0x75, 0x74, 0x79, 0x12, 0x6d, 0x0a, 0x09, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x42, + 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x78, 0x0a, 0x0f, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x6a, 0x0a, 0x0d, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, + 0x72, 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, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x6f, + 0x74, 0x12, 0x6c, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, + 0x6f, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 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, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x6f, 0x74, 0x73, 0x12, + 0x25, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x34, 0x38, 0x52, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x78, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x4f, 0x82, 0xb5, 0x18, 0x4b, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x73, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x53, + 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x2c, 0x0a, 0x12, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x5f, 0x73, 0x6c, + 0x6f, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x65, 0x73, 0x41, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x60, 0x0a, 0x08, 0x70, 0x74, + 0x63, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x0a, 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, 0x07, 0x70, 0x74, 0x63, 0x53, 0x6c, 0x6f, 0x74, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0xb0, 0x02, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, @@ -3728,7 +3942,7 @@ var file_proto_prysm_v1alpha1_validator_proto_rawDesc = []byte{ 0x0a, 0x0a, 0x06, 0x45, 0x58, 0x49, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x4c, 0x59, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x44, 0x10, - 0x08, 0x32, 0xf5, 0x28, 0x0a, 0x13, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, + 0x08, 0x32, 0xb5, 0x2e, 0x0a, 0x13, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x80, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x44, 0x75, 0x74, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, @@ -4055,7 +4269,51 @@ var file_proto_prysm_v1alpha1_validator_proto_rawDesc = []byte{ 0x70, 0x68, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x42, 0x93, 0x01, 0x0a, 0x19, 0x6f, 0x72, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x19, 0x47, 0x65, + 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x37, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, + 0x00, 0x12, 0x66, 0x0a, 0x18, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x24, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x12, 0x32, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x76, + 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x70, 0x0a, 0x22, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x00, 0x12, 0x7c, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, + 0x12, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 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, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x22, 0x00, 0x12, + 0x68, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x24, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 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, 0x45, 0x50, 0x42, 0x53, 0x22, 0x00, 0x42, 0x93, 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, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, @@ -4081,171 +4339,192 @@ func file_proto_prysm_v1alpha1_validator_proto_rawDescGZIP() []byte { } var file_proto_prysm_v1alpha1_validator_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_prysm_v1alpha1_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 50) +var file_proto_prysm_v1alpha1_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 53) var file_proto_prysm_v1alpha1_validator_proto_goTypes = []interface{}{ (ValidatorStatus)(0), // 0: ethereum.eth.v1alpha1.ValidatorStatus - (*SyncMessageBlockRootResponse)(nil), // 1: ethereum.eth.v1alpha1.SyncMessageBlockRootResponse - (*SyncSubcommitteeIndexRequest)(nil), // 2: ethereum.eth.v1alpha1.SyncSubcommitteeIndexRequest - (*SyncCommitteeContributionRequest)(nil), // 3: ethereum.eth.v1alpha1.SyncCommitteeContributionRequest - (*SyncSubcommitteeIndexResponse)(nil), // 4: ethereum.eth.v1alpha1.SyncSubcommitteeIndexResponse - (*StreamSlotsResponse)(nil), // 5: ethereum.eth.v1alpha1.StreamSlotsResponse - (*StreamBlocksResponse)(nil), // 6: ethereum.eth.v1alpha1.StreamBlocksResponse - (*DomainRequest)(nil), // 7: ethereum.eth.v1alpha1.DomainRequest - (*DomainResponse)(nil), // 8: ethereum.eth.v1alpha1.DomainResponse - (*ValidatorActivationRequest)(nil), // 9: ethereum.eth.v1alpha1.ValidatorActivationRequest - (*ValidatorActivationResponse)(nil), // 10: ethereum.eth.v1alpha1.ValidatorActivationResponse - (*ChainStartResponse)(nil), // 11: ethereum.eth.v1alpha1.ChainStartResponse - (*SyncedResponse)(nil), // 12: ethereum.eth.v1alpha1.SyncedResponse - (*ValidatorIndexRequest)(nil), // 13: ethereum.eth.v1alpha1.ValidatorIndexRequest - (*ValidatorIndexResponse)(nil), // 14: ethereum.eth.v1alpha1.ValidatorIndexResponse - (*ValidatorStatusRequest)(nil), // 15: ethereum.eth.v1alpha1.ValidatorStatusRequest - (*ValidatorStatusResponse)(nil), // 16: ethereum.eth.v1alpha1.ValidatorStatusResponse - (*MultipleValidatorStatusRequest)(nil), // 17: ethereum.eth.v1alpha1.MultipleValidatorStatusRequest - (*MultipleValidatorStatusResponse)(nil), // 18: ethereum.eth.v1alpha1.MultipleValidatorStatusResponse - (*DutiesRequest)(nil), // 19: ethereum.eth.v1alpha1.DutiesRequest - (*DutiesResponse)(nil), // 20: ethereum.eth.v1alpha1.DutiesResponse - (*BlockRequest)(nil), // 21: ethereum.eth.v1alpha1.BlockRequest - (*ProposeResponse)(nil), // 22: ethereum.eth.v1alpha1.ProposeResponse - (*ProposeExitResponse)(nil), // 23: ethereum.eth.v1alpha1.ProposeExitResponse - (*AttestationDataRequest)(nil), // 24: ethereum.eth.v1alpha1.AttestationDataRequest - (*AttestResponse)(nil), // 25: ethereum.eth.v1alpha1.AttestResponse - (*AggregateSelectionRequest)(nil), // 26: ethereum.eth.v1alpha1.AggregateSelectionRequest - (*AggregateSelectionResponse)(nil), // 27: ethereum.eth.v1alpha1.AggregateSelectionResponse - (*AggregateSelectionElectraResponse)(nil), // 28: ethereum.eth.v1alpha1.AggregateSelectionElectraResponse - (*SignedAggregateSubmitRequest)(nil), // 29: ethereum.eth.v1alpha1.SignedAggregateSubmitRequest - (*SignedAggregateSubmitElectraRequest)(nil), // 30: ethereum.eth.v1alpha1.SignedAggregateSubmitElectraRequest - (*SignedAggregateSubmitResponse)(nil), // 31: ethereum.eth.v1alpha1.SignedAggregateSubmitResponse - (*CommitteeSubnetsSubscribeRequest)(nil), // 32: ethereum.eth.v1alpha1.CommitteeSubnetsSubscribeRequest - (*Validator)(nil), // 33: ethereum.eth.v1alpha1.Validator - (*ValidatorParticipation)(nil), // 34: ethereum.eth.v1alpha1.ValidatorParticipation - (*ValidatorInfo)(nil), // 35: ethereum.eth.v1alpha1.ValidatorInfo - (*DoppelGangerRequest)(nil), // 36: ethereum.eth.v1alpha1.DoppelGangerRequest - (*DoppelGangerResponse)(nil), // 37: ethereum.eth.v1alpha1.DoppelGangerResponse - (*StreamSlotsRequest)(nil), // 38: ethereum.eth.v1alpha1.StreamSlotsRequest - (*StreamBlocksRequest)(nil), // 39: ethereum.eth.v1alpha1.StreamBlocksRequest - (*PrepareBeaconProposerRequest)(nil), // 40: ethereum.eth.v1alpha1.PrepareBeaconProposerRequest - (*FeeRecipientByPubKeyRequest)(nil), // 41: ethereum.eth.v1alpha1.FeeRecipientByPubKeyRequest - (*FeeRecipientByPubKeyResponse)(nil), // 42: ethereum.eth.v1alpha1.FeeRecipientByPubKeyResponse - (*AssignValidatorToSubnetRequest)(nil), // 43: ethereum.eth.v1alpha1.AssignValidatorToSubnetRequest - (*AggregatedSigAndAggregationBitsRequest)(nil), // 44: ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsRequest - (*AggregatedSigAndAggregationBitsResponse)(nil), // 45: ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsResponse - (*ValidatorActivationResponse_Status)(nil), // 46: ethereum.eth.v1alpha1.ValidatorActivationResponse.Status - (*DutiesResponse_Duty)(nil), // 47: ethereum.eth.v1alpha1.DutiesResponse.Duty - (*DoppelGangerRequest_ValidatorRequest)(nil), // 48: ethereum.eth.v1alpha1.DoppelGangerRequest.ValidatorRequest - (*DoppelGangerResponse_ValidatorResponse)(nil), // 49: ethereum.eth.v1alpha1.DoppelGangerResponse.ValidatorResponse - (*PrepareBeaconProposerRequest_FeeRecipientContainer)(nil), // 50: ethereum.eth.v1alpha1.PrepareBeaconProposerRequest.FeeRecipientContainer - (*SignedBeaconBlock)(nil), // 51: ethereum.eth.v1alpha1.SignedBeaconBlock - (*SignedBeaconBlockAltair)(nil), // 52: ethereum.eth.v1alpha1.SignedBeaconBlockAltair - (*SignedBeaconBlockBellatrix)(nil), // 53: ethereum.eth.v1alpha1.SignedBeaconBlockBellatrix - (*SignedBeaconBlockCapella)(nil), // 54: ethereum.eth.v1alpha1.SignedBeaconBlockCapella - (*SignedBeaconBlockDeneb)(nil), // 55: ethereum.eth.v1alpha1.SignedBeaconBlockDeneb - (*SignedBeaconBlockElectra)(nil), // 56: ethereum.eth.v1alpha1.SignedBeaconBlockElectra - (*wrapperspb.UInt64Value)(nil), // 57: google.protobuf.UInt64Value - (*AggregateAttestationAndProof)(nil), // 58: ethereum.eth.v1alpha1.AggregateAttestationAndProof - (*AggregateAttestationAndProofElectra)(nil), // 59: ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra - (*SignedAggregateAttestationAndProof)(nil), // 60: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProof - (*SignedAggregateAttestationAndProofElectra)(nil), // 61: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProofElectra - (*SyncCommitteeMessage)(nil), // 62: ethereum.eth.v1alpha1.SyncCommitteeMessage - (*emptypb.Empty)(nil), // 63: google.protobuf.Empty - (*GenericSignedBeaconBlock)(nil), // 64: ethereum.eth.v1alpha1.GenericSignedBeaconBlock - (*Attestation)(nil), // 65: ethereum.eth.v1alpha1.Attestation - (*AttestationElectra)(nil), // 66: ethereum.eth.v1alpha1.AttestationElectra - (*SignedVoluntaryExit)(nil), // 67: ethereum.eth.v1alpha1.SignedVoluntaryExit - (*SignedContributionAndProof)(nil), // 68: ethereum.eth.v1alpha1.SignedContributionAndProof - (*SignedValidatorRegistrationsV1)(nil), // 69: ethereum.eth.v1alpha1.SignedValidatorRegistrationsV1 - (*GenericBeaconBlock)(nil), // 70: ethereum.eth.v1alpha1.GenericBeaconBlock - (*AttestationData)(nil), // 71: ethereum.eth.v1alpha1.AttestationData - (*SyncCommitteeContribution)(nil), // 72: ethereum.eth.v1alpha1.SyncCommitteeContribution + (*PayloadEnvelopeRequest)(nil), // 1: ethereum.eth.v1alpha1.PayloadEnvelopeRequest + (*HeaderRequest)(nil), // 2: ethereum.eth.v1alpha1.HeaderRequest + (*GetPayloadAttestationDataRequest)(nil), // 3: ethereum.eth.v1alpha1.GetPayloadAttestationDataRequest + (*SyncMessageBlockRootResponse)(nil), // 4: ethereum.eth.v1alpha1.SyncMessageBlockRootResponse + (*SyncSubcommitteeIndexRequest)(nil), // 5: ethereum.eth.v1alpha1.SyncSubcommitteeIndexRequest + (*SyncCommitteeContributionRequest)(nil), // 6: ethereum.eth.v1alpha1.SyncCommitteeContributionRequest + (*SyncSubcommitteeIndexResponse)(nil), // 7: ethereum.eth.v1alpha1.SyncSubcommitteeIndexResponse + (*StreamSlotsResponse)(nil), // 8: ethereum.eth.v1alpha1.StreamSlotsResponse + (*StreamBlocksResponse)(nil), // 9: ethereum.eth.v1alpha1.StreamBlocksResponse + (*DomainRequest)(nil), // 10: ethereum.eth.v1alpha1.DomainRequest + (*DomainResponse)(nil), // 11: ethereum.eth.v1alpha1.DomainResponse + (*ValidatorActivationRequest)(nil), // 12: ethereum.eth.v1alpha1.ValidatorActivationRequest + (*ValidatorActivationResponse)(nil), // 13: ethereum.eth.v1alpha1.ValidatorActivationResponse + (*ChainStartResponse)(nil), // 14: ethereum.eth.v1alpha1.ChainStartResponse + (*SyncedResponse)(nil), // 15: ethereum.eth.v1alpha1.SyncedResponse + (*ValidatorIndexRequest)(nil), // 16: ethereum.eth.v1alpha1.ValidatorIndexRequest + (*ValidatorIndexResponse)(nil), // 17: ethereum.eth.v1alpha1.ValidatorIndexResponse + (*ValidatorStatusRequest)(nil), // 18: ethereum.eth.v1alpha1.ValidatorStatusRequest + (*ValidatorStatusResponse)(nil), // 19: ethereum.eth.v1alpha1.ValidatorStatusResponse + (*MultipleValidatorStatusRequest)(nil), // 20: ethereum.eth.v1alpha1.MultipleValidatorStatusRequest + (*MultipleValidatorStatusResponse)(nil), // 21: ethereum.eth.v1alpha1.MultipleValidatorStatusResponse + (*DutiesRequest)(nil), // 22: ethereum.eth.v1alpha1.DutiesRequest + (*DutiesResponse)(nil), // 23: ethereum.eth.v1alpha1.DutiesResponse + (*BlockRequest)(nil), // 24: ethereum.eth.v1alpha1.BlockRequest + (*ProposeResponse)(nil), // 25: ethereum.eth.v1alpha1.ProposeResponse + (*ProposeExitResponse)(nil), // 26: ethereum.eth.v1alpha1.ProposeExitResponse + (*AttestationDataRequest)(nil), // 27: ethereum.eth.v1alpha1.AttestationDataRequest + (*AttestResponse)(nil), // 28: ethereum.eth.v1alpha1.AttestResponse + (*AggregateSelectionRequest)(nil), // 29: ethereum.eth.v1alpha1.AggregateSelectionRequest + (*AggregateSelectionResponse)(nil), // 30: ethereum.eth.v1alpha1.AggregateSelectionResponse + (*AggregateSelectionElectraResponse)(nil), // 31: ethereum.eth.v1alpha1.AggregateSelectionElectraResponse + (*SignedAggregateSubmitRequest)(nil), // 32: ethereum.eth.v1alpha1.SignedAggregateSubmitRequest + (*SignedAggregateSubmitElectraRequest)(nil), // 33: ethereum.eth.v1alpha1.SignedAggregateSubmitElectraRequest + (*SignedAggregateSubmitResponse)(nil), // 34: ethereum.eth.v1alpha1.SignedAggregateSubmitResponse + (*CommitteeSubnetsSubscribeRequest)(nil), // 35: ethereum.eth.v1alpha1.CommitteeSubnetsSubscribeRequest + (*Validator)(nil), // 36: ethereum.eth.v1alpha1.Validator + (*ValidatorParticipation)(nil), // 37: ethereum.eth.v1alpha1.ValidatorParticipation + (*ValidatorInfo)(nil), // 38: ethereum.eth.v1alpha1.ValidatorInfo + (*DoppelGangerRequest)(nil), // 39: ethereum.eth.v1alpha1.DoppelGangerRequest + (*DoppelGangerResponse)(nil), // 40: ethereum.eth.v1alpha1.DoppelGangerResponse + (*StreamSlotsRequest)(nil), // 41: ethereum.eth.v1alpha1.StreamSlotsRequest + (*StreamBlocksRequest)(nil), // 42: ethereum.eth.v1alpha1.StreamBlocksRequest + (*PrepareBeaconProposerRequest)(nil), // 43: ethereum.eth.v1alpha1.PrepareBeaconProposerRequest + (*FeeRecipientByPubKeyRequest)(nil), // 44: ethereum.eth.v1alpha1.FeeRecipientByPubKeyRequest + (*FeeRecipientByPubKeyResponse)(nil), // 45: ethereum.eth.v1alpha1.FeeRecipientByPubKeyResponse + (*AssignValidatorToSubnetRequest)(nil), // 46: ethereum.eth.v1alpha1.AssignValidatorToSubnetRequest + (*AggregatedSigAndAggregationBitsRequest)(nil), // 47: ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsRequest + (*AggregatedSigAndAggregationBitsResponse)(nil), // 48: ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsResponse + (*ValidatorActivationResponse_Status)(nil), // 49: ethereum.eth.v1alpha1.ValidatorActivationResponse.Status + (*DutiesResponse_Duty)(nil), // 50: ethereum.eth.v1alpha1.DutiesResponse.Duty + (*DoppelGangerRequest_ValidatorRequest)(nil), // 51: ethereum.eth.v1alpha1.DoppelGangerRequest.ValidatorRequest + (*DoppelGangerResponse_ValidatorResponse)(nil), // 52: ethereum.eth.v1alpha1.DoppelGangerResponse.ValidatorResponse + (*PrepareBeaconProposerRequest_FeeRecipientContainer)(nil), // 53: ethereum.eth.v1alpha1.PrepareBeaconProposerRequest.FeeRecipientContainer + (*SignedBeaconBlock)(nil), // 54: ethereum.eth.v1alpha1.SignedBeaconBlock + (*SignedBeaconBlockAltair)(nil), // 55: ethereum.eth.v1alpha1.SignedBeaconBlockAltair + (*SignedBeaconBlockBellatrix)(nil), // 56: ethereum.eth.v1alpha1.SignedBeaconBlockBellatrix + (*SignedBeaconBlockCapella)(nil), // 57: ethereum.eth.v1alpha1.SignedBeaconBlockCapella + (*SignedBeaconBlockDeneb)(nil), // 58: ethereum.eth.v1alpha1.SignedBeaconBlockDeneb + (*SignedBeaconBlockElectra)(nil), // 59: ethereum.eth.v1alpha1.SignedBeaconBlockElectra + (*wrapperspb.UInt64Value)(nil), // 60: google.protobuf.UInt64Value + (*AggregateAttestationAndProof)(nil), // 61: ethereum.eth.v1alpha1.AggregateAttestationAndProof + (*AggregateAttestationAndProofElectra)(nil), // 62: ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra + (*SignedAggregateAttestationAndProof)(nil), // 63: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProof + (*SignedAggregateAttestationAndProofElectra)(nil), // 64: ethereum.eth.v1alpha1.SignedAggregateAttestationAndProofElectra + (*SyncCommitteeMessage)(nil), // 65: ethereum.eth.v1alpha1.SyncCommitteeMessage + (*emptypb.Empty)(nil), // 66: google.protobuf.Empty + (*GenericSignedBeaconBlock)(nil), // 67: ethereum.eth.v1alpha1.GenericSignedBeaconBlock + (*Attestation)(nil), // 68: ethereum.eth.v1alpha1.Attestation + (*AttestationElectra)(nil), // 69: ethereum.eth.v1alpha1.AttestationElectra + (*SignedVoluntaryExit)(nil), // 70: ethereum.eth.v1alpha1.SignedVoluntaryExit + (*SignedContributionAndProof)(nil), // 71: ethereum.eth.v1alpha1.SignedContributionAndProof + (*SignedValidatorRegistrationsV1)(nil), // 72: ethereum.eth.v1alpha1.SignedValidatorRegistrationsV1 + (*PayloadAttestationMessage)(nil), // 73: ethereum.eth.v1alpha1.PayloadAttestationMessage + (*v1.SignedExecutionPayloadEnvelope)(nil), // 74: ethereum.engine.v1.SignedExecutionPayloadEnvelope + (*v1.SignedExecutionPayloadHeader)(nil), // 75: ethereum.engine.v1.SignedExecutionPayloadHeader + (*GenericBeaconBlock)(nil), // 76: ethereum.eth.v1alpha1.GenericBeaconBlock + (*AttestationData)(nil), // 77: ethereum.eth.v1alpha1.AttestationData + (*SyncCommitteeContribution)(nil), // 78: ethereum.eth.v1alpha1.SyncCommitteeContribution + (*PayloadAttestationData)(nil), // 79: ethereum.eth.v1alpha1.PayloadAttestationData + (*v1.ExecutionPayloadEnvelope)(nil), // 80: ethereum.engine.v1.ExecutionPayloadEnvelope + (*v1.ExecutionPayloadHeaderEPBS)(nil), // 81: ethereum.engine.v1.ExecutionPayloadHeaderEPBS } var file_proto_prysm_v1alpha1_validator_proto_depIdxs = []int32{ - 51, // 0: ethereum.eth.v1alpha1.StreamBlocksResponse.phase0_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlock - 52, // 1: ethereum.eth.v1alpha1.StreamBlocksResponse.altair_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockAltair - 53, // 2: ethereum.eth.v1alpha1.StreamBlocksResponse.bellatrix_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockBellatrix - 54, // 3: ethereum.eth.v1alpha1.StreamBlocksResponse.capella_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockCapella - 55, // 4: ethereum.eth.v1alpha1.StreamBlocksResponse.deneb_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockDeneb - 56, // 5: ethereum.eth.v1alpha1.StreamBlocksResponse.electra_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockElectra - 46, // 6: ethereum.eth.v1alpha1.ValidatorActivationResponse.statuses:type_name -> ethereum.eth.v1alpha1.ValidatorActivationResponse.Status + 54, // 0: ethereum.eth.v1alpha1.StreamBlocksResponse.phase0_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlock + 55, // 1: ethereum.eth.v1alpha1.StreamBlocksResponse.altair_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockAltair + 56, // 2: ethereum.eth.v1alpha1.StreamBlocksResponse.bellatrix_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockBellatrix + 57, // 3: ethereum.eth.v1alpha1.StreamBlocksResponse.capella_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockCapella + 58, // 4: ethereum.eth.v1alpha1.StreamBlocksResponse.deneb_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockDeneb + 59, // 5: ethereum.eth.v1alpha1.StreamBlocksResponse.electra_block:type_name -> ethereum.eth.v1alpha1.SignedBeaconBlockElectra + 49, // 6: ethereum.eth.v1alpha1.ValidatorActivationResponse.statuses:type_name -> ethereum.eth.v1alpha1.ValidatorActivationResponse.Status 0, // 7: ethereum.eth.v1alpha1.ValidatorStatusResponse.status:type_name -> ethereum.eth.v1alpha1.ValidatorStatus - 16, // 8: ethereum.eth.v1alpha1.MultipleValidatorStatusResponse.statuses:type_name -> ethereum.eth.v1alpha1.ValidatorStatusResponse - 47, // 9: ethereum.eth.v1alpha1.DutiesResponse.current_epoch_duties:type_name -> ethereum.eth.v1alpha1.DutiesResponse.Duty - 47, // 10: ethereum.eth.v1alpha1.DutiesResponse.next_epoch_duties:type_name -> ethereum.eth.v1alpha1.DutiesResponse.Duty - 57, // 11: ethereum.eth.v1alpha1.BlockRequest.builder_boost_factor:type_name -> google.protobuf.UInt64Value - 58, // 12: ethereum.eth.v1alpha1.AggregateSelectionResponse.aggregate_and_proof:type_name -> ethereum.eth.v1alpha1.AggregateAttestationAndProof - 59, // 13: ethereum.eth.v1alpha1.AggregateSelectionElectraResponse.aggregate_and_proof:type_name -> ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra - 60, // 14: ethereum.eth.v1alpha1.SignedAggregateSubmitRequest.signed_aggregate_and_proof:type_name -> ethereum.eth.v1alpha1.SignedAggregateAttestationAndProof - 61, // 15: ethereum.eth.v1alpha1.SignedAggregateSubmitElectraRequest.signed_aggregate_and_proof:type_name -> ethereum.eth.v1alpha1.SignedAggregateAttestationAndProofElectra + 19, // 8: ethereum.eth.v1alpha1.MultipleValidatorStatusResponse.statuses:type_name -> ethereum.eth.v1alpha1.ValidatorStatusResponse + 50, // 9: ethereum.eth.v1alpha1.DutiesResponse.current_epoch_duties:type_name -> ethereum.eth.v1alpha1.DutiesResponse.Duty + 50, // 10: ethereum.eth.v1alpha1.DutiesResponse.next_epoch_duties:type_name -> ethereum.eth.v1alpha1.DutiesResponse.Duty + 60, // 11: ethereum.eth.v1alpha1.BlockRequest.builder_boost_factor:type_name -> google.protobuf.UInt64Value + 61, // 12: ethereum.eth.v1alpha1.AggregateSelectionResponse.aggregate_and_proof:type_name -> ethereum.eth.v1alpha1.AggregateAttestationAndProof + 62, // 13: ethereum.eth.v1alpha1.AggregateSelectionElectraResponse.aggregate_and_proof:type_name -> ethereum.eth.v1alpha1.AggregateAttestationAndProofElectra + 63, // 14: ethereum.eth.v1alpha1.SignedAggregateSubmitRequest.signed_aggregate_and_proof:type_name -> ethereum.eth.v1alpha1.SignedAggregateAttestationAndProof + 64, // 15: ethereum.eth.v1alpha1.SignedAggregateSubmitElectraRequest.signed_aggregate_and_proof:type_name -> ethereum.eth.v1alpha1.SignedAggregateAttestationAndProofElectra 0, // 16: ethereum.eth.v1alpha1.ValidatorInfo.status:type_name -> ethereum.eth.v1alpha1.ValidatorStatus - 48, // 17: ethereum.eth.v1alpha1.DoppelGangerRequest.validator_requests:type_name -> ethereum.eth.v1alpha1.DoppelGangerRequest.ValidatorRequest - 49, // 18: ethereum.eth.v1alpha1.DoppelGangerResponse.responses:type_name -> ethereum.eth.v1alpha1.DoppelGangerResponse.ValidatorResponse - 50, // 19: ethereum.eth.v1alpha1.PrepareBeaconProposerRequest.recipients:type_name -> ethereum.eth.v1alpha1.PrepareBeaconProposerRequest.FeeRecipientContainer + 51, // 17: ethereum.eth.v1alpha1.DoppelGangerRequest.validator_requests:type_name -> ethereum.eth.v1alpha1.DoppelGangerRequest.ValidatorRequest + 52, // 18: ethereum.eth.v1alpha1.DoppelGangerResponse.responses:type_name -> ethereum.eth.v1alpha1.DoppelGangerResponse.ValidatorResponse + 53, // 19: ethereum.eth.v1alpha1.PrepareBeaconProposerRequest.recipients:type_name -> ethereum.eth.v1alpha1.PrepareBeaconProposerRequest.FeeRecipientContainer 0, // 20: ethereum.eth.v1alpha1.AssignValidatorToSubnetRequest.status:type_name -> ethereum.eth.v1alpha1.ValidatorStatus - 62, // 21: ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsRequest.msgs:type_name -> ethereum.eth.v1alpha1.SyncCommitteeMessage - 16, // 22: ethereum.eth.v1alpha1.ValidatorActivationResponse.Status.status:type_name -> ethereum.eth.v1alpha1.ValidatorStatusResponse + 65, // 21: ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsRequest.msgs:type_name -> ethereum.eth.v1alpha1.SyncCommitteeMessage + 19, // 22: ethereum.eth.v1alpha1.ValidatorActivationResponse.Status.status:type_name -> ethereum.eth.v1alpha1.ValidatorStatusResponse 0, // 23: ethereum.eth.v1alpha1.DutiesResponse.Duty.status:type_name -> ethereum.eth.v1alpha1.ValidatorStatus - 19, // 24: ethereum.eth.v1alpha1.BeaconNodeValidator.GetDuties:input_type -> ethereum.eth.v1alpha1.DutiesRequest - 7, // 25: ethereum.eth.v1alpha1.BeaconNodeValidator.DomainData:input_type -> ethereum.eth.v1alpha1.DomainRequest - 63, // 26: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForChainStart:input_type -> google.protobuf.Empty - 9, // 27: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForActivation:input_type -> ethereum.eth.v1alpha1.ValidatorActivationRequest - 13, // 28: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorIndex:input_type -> ethereum.eth.v1alpha1.ValidatorIndexRequest - 15, // 29: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorStatus:input_type -> ethereum.eth.v1alpha1.ValidatorStatusRequest - 17, // 30: ethereum.eth.v1alpha1.BeaconNodeValidator.MultipleValidatorStatus:input_type -> ethereum.eth.v1alpha1.MultipleValidatorStatusRequest - 21, // 31: ethereum.eth.v1alpha1.BeaconNodeValidator.GetBeaconBlock:input_type -> ethereum.eth.v1alpha1.BlockRequest - 64, // 32: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeBeaconBlock:input_type -> ethereum.eth.v1alpha1.GenericSignedBeaconBlock - 40, // 33: ethereum.eth.v1alpha1.BeaconNodeValidator.PrepareBeaconProposer:input_type -> ethereum.eth.v1alpha1.PrepareBeaconProposerRequest - 41, // 34: ethereum.eth.v1alpha1.BeaconNodeValidator.GetFeeRecipientByPubKey:input_type -> ethereum.eth.v1alpha1.FeeRecipientByPubKeyRequest - 24, // 35: ethereum.eth.v1alpha1.BeaconNodeValidator.GetAttestationData:input_type -> ethereum.eth.v1alpha1.AttestationDataRequest - 65, // 36: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestation:input_type -> ethereum.eth.v1alpha1.Attestation - 66, // 37: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestationElectra:input_type -> ethereum.eth.v1alpha1.AttestationElectra - 26, // 38: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProof:input_type -> ethereum.eth.v1alpha1.AggregateSelectionRequest - 26, // 39: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProofElectra:input_type -> ethereum.eth.v1alpha1.AggregateSelectionRequest - 29, // 40: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProof:input_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitRequest - 30, // 41: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProofElectra:input_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitElectraRequest - 67, // 42: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeExit:input_type -> ethereum.eth.v1alpha1.SignedVoluntaryExit - 32, // 43: ethereum.eth.v1alpha1.BeaconNodeValidator.SubscribeCommitteeSubnets:input_type -> ethereum.eth.v1alpha1.CommitteeSubnetsSubscribeRequest - 36, // 44: ethereum.eth.v1alpha1.BeaconNodeValidator.CheckDoppelGanger:input_type -> ethereum.eth.v1alpha1.DoppelGangerRequest - 63, // 45: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncMessageBlockRoot:input_type -> google.protobuf.Empty - 62, // 46: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSyncMessage:input_type -> ethereum.eth.v1alpha1.SyncCommitteeMessage - 2, // 47: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncSubcommitteeIndex:input_type -> ethereum.eth.v1alpha1.SyncSubcommitteeIndexRequest - 3, // 48: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncCommitteeContribution:input_type -> ethereum.eth.v1alpha1.SyncCommitteeContributionRequest - 68, // 49: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedContributionAndProof:input_type -> ethereum.eth.v1alpha1.SignedContributionAndProof - 38, // 50: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamSlots:input_type -> ethereum.eth.v1alpha1.StreamSlotsRequest - 39, // 51: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamBlocksAltair:input_type -> ethereum.eth.v1alpha1.StreamBlocksRequest - 69, // 52: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitValidatorRegistrations:input_type -> ethereum.eth.v1alpha1.SignedValidatorRegistrationsV1 - 43, // 53: ethereum.eth.v1alpha1.BeaconNodeValidator.AssignValidatorToSubnet:input_type -> ethereum.eth.v1alpha1.AssignValidatorToSubnetRequest - 44, // 54: ethereum.eth.v1alpha1.BeaconNodeValidator.AggregatedSigAndAggregationBits:input_type -> ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsRequest - 20, // 55: ethereum.eth.v1alpha1.BeaconNodeValidator.GetDuties:output_type -> ethereum.eth.v1alpha1.DutiesResponse - 8, // 56: ethereum.eth.v1alpha1.BeaconNodeValidator.DomainData:output_type -> ethereum.eth.v1alpha1.DomainResponse - 11, // 57: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForChainStart:output_type -> ethereum.eth.v1alpha1.ChainStartResponse - 10, // 58: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForActivation:output_type -> ethereum.eth.v1alpha1.ValidatorActivationResponse - 14, // 59: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorIndex:output_type -> ethereum.eth.v1alpha1.ValidatorIndexResponse - 16, // 60: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorStatus:output_type -> ethereum.eth.v1alpha1.ValidatorStatusResponse - 18, // 61: ethereum.eth.v1alpha1.BeaconNodeValidator.MultipleValidatorStatus:output_type -> ethereum.eth.v1alpha1.MultipleValidatorStatusResponse - 70, // 62: ethereum.eth.v1alpha1.BeaconNodeValidator.GetBeaconBlock:output_type -> ethereum.eth.v1alpha1.GenericBeaconBlock - 22, // 63: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeBeaconBlock:output_type -> ethereum.eth.v1alpha1.ProposeResponse - 63, // 64: ethereum.eth.v1alpha1.BeaconNodeValidator.PrepareBeaconProposer:output_type -> google.protobuf.Empty - 42, // 65: ethereum.eth.v1alpha1.BeaconNodeValidator.GetFeeRecipientByPubKey:output_type -> ethereum.eth.v1alpha1.FeeRecipientByPubKeyResponse - 71, // 66: ethereum.eth.v1alpha1.BeaconNodeValidator.GetAttestationData:output_type -> ethereum.eth.v1alpha1.AttestationData - 25, // 67: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestation:output_type -> ethereum.eth.v1alpha1.AttestResponse - 25, // 68: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestationElectra:output_type -> ethereum.eth.v1alpha1.AttestResponse - 27, // 69: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProof:output_type -> ethereum.eth.v1alpha1.AggregateSelectionResponse - 28, // 70: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProofElectra:output_type -> ethereum.eth.v1alpha1.AggregateSelectionElectraResponse - 31, // 71: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProof:output_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitResponse - 31, // 72: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProofElectra:output_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitResponse - 23, // 73: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeExit:output_type -> ethereum.eth.v1alpha1.ProposeExitResponse - 63, // 74: ethereum.eth.v1alpha1.BeaconNodeValidator.SubscribeCommitteeSubnets:output_type -> google.protobuf.Empty - 37, // 75: ethereum.eth.v1alpha1.BeaconNodeValidator.CheckDoppelGanger:output_type -> ethereum.eth.v1alpha1.DoppelGangerResponse - 1, // 76: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncMessageBlockRoot:output_type -> ethereum.eth.v1alpha1.SyncMessageBlockRootResponse - 63, // 77: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSyncMessage:output_type -> google.protobuf.Empty - 4, // 78: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncSubcommitteeIndex:output_type -> ethereum.eth.v1alpha1.SyncSubcommitteeIndexResponse - 72, // 79: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncCommitteeContribution:output_type -> ethereum.eth.v1alpha1.SyncCommitteeContribution - 63, // 80: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedContributionAndProof:output_type -> google.protobuf.Empty - 5, // 81: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamSlots:output_type -> ethereum.eth.v1alpha1.StreamSlotsResponse - 6, // 82: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamBlocksAltair:output_type -> ethereum.eth.v1alpha1.StreamBlocksResponse - 63, // 83: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitValidatorRegistrations:output_type -> google.protobuf.Empty - 63, // 84: ethereum.eth.v1alpha1.BeaconNodeValidator.AssignValidatorToSubnet:output_type -> google.protobuf.Empty - 45, // 85: ethereum.eth.v1alpha1.BeaconNodeValidator.AggregatedSigAndAggregationBits:output_type -> ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsResponse - 55, // [55:86] is the sub-list for method output_type - 24, // [24:55] is the sub-list for method input_type + 22, // 24: ethereum.eth.v1alpha1.BeaconNodeValidator.GetDuties:input_type -> ethereum.eth.v1alpha1.DutiesRequest + 10, // 25: ethereum.eth.v1alpha1.BeaconNodeValidator.DomainData:input_type -> ethereum.eth.v1alpha1.DomainRequest + 66, // 26: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForChainStart:input_type -> google.protobuf.Empty + 12, // 27: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForActivation:input_type -> ethereum.eth.v1alpha1.ValidatorActivationRequest + 16, // 28: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorIndex:input_type -> ethereum.eth.v1alpha1.ValidatorIndexRequest + 18, // 29: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorStatus:input_type -> ethereum.eth.v1alpha1.ValidatorStatusRequest + 20, // 30: ethereum.eth.v1alpha1.BeaconNodeValidator.MultipleValidatorStatus:input_type -> ethereum.eth.v1alpha1.MultipleValidatorStatusRequest + 24, // 31: ethereum.eth.v1alpha1.BeaconNodeValidator.GetBeaconBlock:input_type -> ethereum.eth.v1alpha1.BlockRequest + 67, // 32: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeBeaconBlock:input_type -> ethereum.eth.v1alpha1.GenericSignedBeaconBlock + 43, // 33: ethereum.eth.v1alpha1.BeaconNodeValidator.PrepareBeaconProposer:input_type -> ethereum.eth.v1alpha1.PrepareBeaconProposerRequest + 44, // 34: ethereum.eth.v1alpha1.BeaconNodeValidator.GetFeeRecipientByPubKey:input_type -> ethereum.eth.v1alpha1.FeeRecipientByPubKeyRequest + 27, // 35: ethereum.eth.v1alpha1.BeaconNodeValidator.GetAttestationData:input_type -> ethereum.eth.v1alpha1.AttestationDataRequest + 68, // 36: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestation:input_type -> ethereum.eth.v1alpha1.Attestation + 69, // 37: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestationElectra:input_type -> ethereum.eth.v1alpha1.AttestationElectra + 29, // 38: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProof:input_type -> ethereum.eth.v1alpha1.AggregateSelectionRequest + 29, // 39: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProofElectra:input_type -> ethereum.eth.v1alpha1.AggregateSelectionRequest + 32, // 40: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProof:input_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitRequest + 33, // 41: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProofElectra:input_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitElectraRequest + 70, // 42: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeExit:input_type -> ethereum.eth.v1alpha1.SignedVoluntaryExit + 35, // 43: ethereum.eth.v1alpha1.BeaconNodeValidator.SubscribeCommitteeSubnets:input_type -> ethereum.eth.v1alpha1.CommitteeSubnetsSubscribeRequest + 39, // 44: ethereum.eth.v1alpha1.BeaconNodeValidator.CheckDoppelGanger:input_type -> ethereum.eth.v1alpha1.DoppelGangerRequest + 66, // 45: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncMessageBlockRoot:input_type -> google.protobuf.Empty + 65, // 46: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSyncMessage:input_type -> ethereum.eth.v1alpha1.SyncCommitteeMessage + 5, // 47: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncSubcommitteeIndex:input_type -> ethereum.eth.v1alpha1.SyncSubcommitteeIndexRequest + 6, // 48: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncCommitteeContribution:input_type -> ethereum.eth.v1alpha1.SyncCommitteeContributionRequest + 71, // 49: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedContributionAndProof:input_type -> ethereum.eth.v1alpha1.SignedContributionAndProof + 41, // 50: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamSlots:input_type -> ethereum.eth.v1alpha1.StreamSlotsRequest + 42, // 51: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamBlocksAltair:input_type -> ethereum.eth.v1alpha1.StreamBlocksRequest + 72, // 52: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitValidatorRegistrations:input_type -> ethereum.eth.v1alpha1.SignedValidatorRegistrationsV1 + 46, // 53: ethereum.eth.v1alpha1.BeaconNodeValidator.AssignValidatorToSubnet:input_type -> ethereum.eth.v1alpha1.AssignValidatorToSubnetRequest + 47, // 54: ethereum.eth.v1alpha1.BeaconNodeValidator.AggregatedSigAndAggregationBits:input_type -> ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsRequest + 3, // 55: ethereum.eth.v1alpha1.BeaconNodeValidator.GetPayloadAttestationData:input_type -> ethereum.eth.v1alpha1.GetPayloadAttestationDataRequest + 73, // 56: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitPayloadAttestation:input_type -> ethereum.eth.v1alpha1.PayloadAttestationMessage + 74, // 57: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedExecutionPayloadEnvelope:input_type -> ethereum.engine.v1.SignedExecutionPayloadEnvelope + 75, // 58: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedExecutionPayloadHeader:input_type -> ethereum.engine.v1.SignedExecutionPayloadHeader + 1, // 59: ethereum.eth.v1alpha1.BeaconNodeValidator.GetExecutionPayloadEnvelope:input_type -> ethereum.eth.v1alpha1.PayloadEnvelopeRequest + 2, // 60: ethereum.eth.v1alpha1.BeaconNodeValidator.GetLocalHeader:input_type -> ethereum.eth.v1alpha1.HeaderRequest + 23, // 61: ethereum.eth.v1alpha1.BeaconNodeValidator.GetDuties:output_type -> ethereum.eth.v1alpha1.DutiesResponse + 11, // 62: ethereum.eth.v1alpha1.BeaconNodeValidator.DomainData:output_type -> ethereum.eth.v1alpha1.DomainResponse + 14, // 63: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForChainStart:output_type -> ethereum.eth.v1alpha1.ChainStartResponse + 13, // 64: ethereum.eth.v1alpha1.BeaconNodeValidator.WaitForActivation:output_type -> ethereum.eth.v1alpha1.ValidatorActivationResponse + 17, // 65: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorIndex:output_type -> ethereum.eth.v1alpha1.ValidatorIndexResponse + 19, // 66: ethereum.eth.v1alpha1.BeaconNodeValidator.ValidatorStatus:output_type -> ethereum.eth.v1alpha1.ValidatorStatusResponse + 21, // 67: ethereum.eth.v1alpha1.BeaconNodeValidator.MultipleValidatorStatus:output_type -> ethereum.eth.v1alpha1.MultipleValidatorStatusResponse + 76, // 68: ethereum.eth.v1alpha1.BeaconNodeValidator.GetBeaconBlock:output_type -> ethereum.eth.v1alpha1.GenericBeaconBlock + 25, // 69: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeBeaconBlock:output_type -> ethereum.eth.v1alpha1.ProposeResponse + 66, // 70: ethereum.eth.v1alpha1.BeaconNodeValidator.PrepareBeaconProposer:output_type -> google.protobuf.Empty + 45, // 71: ethereum.eth.v1alpha1.BeaconNodeValidator.GetFeeRecipientByPubKey:output_type -> ethereum.eth.v1alpha1.FeeRecipientByPubKeyResponse + 77, // 72: ethereum.eth.v1alpha1.BeaconNodeValidator.GetAttestationData:output_type -> ethereum.eth.v1alpha1.AttestationData + 28, // 73: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestation:output_type -> ethereum.eth.v1alpha1.AttestResponse + 28, // 74: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeAttestationElectra:output_type -> ethereum.eth.v1alpha1.AttestResponse + 30, // 75: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProof:output_type -> ethereum.eth.v1alpha1.AggregateSelectionResponse + 31, // 76: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitAggregateSelectionProofElectra:output_type -> ethereum.eth.v1alpha1.AggregateSelectionElectraResponse + 34, // 77: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProof:output_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitResponse + 34, // 78: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedAggregateSelectionProofElectra:output_type -> ethereum.eth.v1alpha1.SignedAggregateSubmitResponse + 26, // 79: ethereum.eth.v1alpha1.BeaconNodeValidator.ProposeExit:output_type -> ethereum.eth.v1alpha1.ProposeExitResponse + 66, // 80: ethereum.eth.v1alpha1.BeaconNodeValidator.SubscribeCommitteeSubnets:output_type -> google.protobuf.Empty + 40, // 81: ethereum.eth.v1alpha1.BeaconNodeValidator.CheckDoppelGanger:output_type -> ethereum.eth.v1alpha1.DoppelGangerResponse + 4, // 82: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncMessageBlockRoot:output_type -> ethereum.eth.v1alpha1.SyncMessageBlockRootResponse + 66, // 83: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSyncMessage:output_type -> google.protobuf.Empty + 7, // 84: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncSubcommitteeIndex:output_type -> ethereum.eth.v1alpha1.SyncSubcommitteeIndexResponse + 78, // 85: ethereum.eth.v1alpha1.BeaconNodeValidator.GetSyncCommitteeContribution:output_type -> ethereum.eth.v1alpha1.SyncCommitteeContribution + 66, // 86: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedContributionAndProof:output_type -> google.protobuf.Empty + 8, // 87: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamSlots:output_type -> ethereum.eth.v1alpha1.StreamSlotsResponse + 9, // 88: ethereum.eth.v1alpha1.BeaconNodeValidator.StreamBlocksAltair:output_type -> ethereum.eth.v1alpha1.StreamBlocksResponse + 66, // 89: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitValidatorRegistrations:output_type -> google.protobuf.Empty + 66, // 90: ethereum.eth.v1alpha1.BeaconNodeValidator.AssignValidatorToSubnet:output_type -> google.protobuf.Empty + 48, // 91: ethereum.eth.v1alpha1.BeaconNodeValidator.AggregatedSigAndAggregationBits:output_type -> ethereum.eth.v1alpha1.AggregatedSigAndAggregationBitsResponse + 79, // 92: ethereum.eth.v1alpha1.BeaconNodeValidator.GetPayloadAttestationData:output_type -> ethereum.eth.v1alpha1.PayloadAttestationData + 66, // 93: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitPayloadAttestation:output_type -> google.protobuf.Empty + 66, // 94: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedExecutionPayloadEnvelope:output_type -> google.protobuf.Empty + 66, // 95: ethereum.eth.v1alpha1.BeaconNodeValidator.SubmitSignedExecutionPayloadHeader:output_type -> google.protobuf.Empty + 80, // 96: ethereum.eth.v1alpha1.BeaconNodeValidator.GetExecutionPayloadEnvelope:output_type -> ethereum.engine.v1.ExecutionPayloadEnvelope + 81, // 97: ethereum.eth.v1alpha1.BeaconNodeValidator.GetLocalHeader:output_type -> ethereum.engine.v1.ExecutionPayloadHeaderEPBS + 61, // [61:98] is the sub-list for method output_type + 24, // [24:61] is the sub-list for method input_type 24, // [24:24] is the sub-list for extension type_name 24, // [24:24] is the sub-list for extension extendee 0, // [0:24] is the sub-list for field type_name @@ -4259,8 +4538,45 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { file_proto_prysm_v1alpha1_beacon_block_proto_init() file_proto_prysm_v1alpha1_sync_committee_proto_init() file_proto_prysm_v1alpha1_attestation_proto_init() + file_proto_prysm_v1alpha1_payload_attestation_proto_init() if !protoimpl.UnsafeEnabled { file_proto_prysm_v1alpha1_validator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PayloadEnvelopeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_validator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_validator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPayloadAttestationDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_prysm_v1alpha1_validator_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncMessageBlockRootResponse); i { case 0: return &v.state @@ -4272,7 +4588,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncSubcommitteeIndexRequest); i { case 0: return &v.state @@ -4284,7 +4600,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncCommitteeContributionRequest); i { case 0: return &v.state @@ -4296,7 +4612,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncSubcommitteeIndexResponse); i { case 0: return &v.state @@ -4308,7 +4624,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamSlotsResponse); i { case 0: return &v.state @@ -4320,7 +4636,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamBlocksResponse); i { case 0: return &v.state @@ -4332,7 +4648,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DomainRequest); i { case 0: return &v.state @@ -4344,7 +4660,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DomainResponse); i { case 0: return &v.state @@ -4356,7 +4672,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorActivationRequest); i { case 0: return &v.state @@ -4368,7 +4684,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorActivationResponse); i { case 0: return &v.state @@ -4380,7 +4696,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChainStartResponse); i { case 0: return &v.state @@ -4392,7 +4708,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncedResponse); i { case 0: return &v.state @@ -4404,7 +4720,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorIndexRequest); i { case 0: return &v.state @@ -4416,7 +4732,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorIndexResponse); i { case 0: return &v.state @@ -4428,7 +4744,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorStatusRequest); i { case 0: return &v.state @@ -4440,7 +4756,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorStatusResponse); i { case 0: return &v.state @@ -4452,7 +4768,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MultipleValidatorStatusRequest); i { case 0: return &v.state @@ -4464,7 +4780,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MultipleValidatorStatusResponse); i { case 0: return &v.state @@ -4476,7 +4792,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DutiesRequest); i { case 0: return &v.state @@ -4488,7 +4804,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DutiesResponse); i { case 0: return &v.state @@ -4500,7 +4816,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlockRequest); i { case 0: return &v.state @@ -4512,7 +4828,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProposeResponse); i { case 0: return &v.state @@ -4524,7 +4840,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProposeExitResponse); i { case 0: return &v.state @@ -4536,7 +4852,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AttestationDataRequest); i { case 0: return &v.state @@ -4548,7 +4864,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AttestResponse); i { case 0: return &v.state @@ -4560,7 +4876,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AggregateSelectionRequest); i { case 0: return &v.state @@ -4572,7 +4888,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AggregateSelectionResponse); i { case 0: return &v.state @@ -4584,7 +4900,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AggregateSelectionElectraResponse); i { case 0: return &v.state @@ -4596,7 +4912,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignedAggregateSubmitRequest); i { case 0: return &v.state @@ -4608,7 +4924,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignedAggregateSubmitElectraRequest); i { case 0: return &v.state @@ -4620,7 +4936,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignedAggregateSubmitResponse); i { case 0: return &v.state @@ -4632,7 +4948,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CommitteeSubnetsSubscribeRequest); i { case 0: return &v.state @@ -4644,7 +4960,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Validator); i { case 0: return &v.state @@ -4656,7 +4972,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorParticipation); i { case 0: return &v.state @@ -4668,7 +4984,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorInfo); i { case 0: return &v.state @@ -4680,7 +4996,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DoppelGangerRequest); i { case 0: return &v.state @@ -4692,7 +5008,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DoppelGangerResponse); i { case 0: return &v.state @@ -4704,7 +5020,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamSlotsRequest); i { case 0: return &v.state @@ -4716,7 +5032,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamBlocksRequest); i { case 0: return &v.state @@ -4728,7 +5044,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PrepareBeaconProposerRequest); i { case 0: return &v.state @@ -4740,7 +5056,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FeeRecipientByPubKeyRequest); i { case 0: return &v.state @@ -4752,7 +5068,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FeeRecipientByPubKeyResponse); i { case 0: return &v.state @@ -4764,7 +5080,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AssignValidatorToSubnetRequest); i { case 0: return &v.state @@ -4776,7 +5092,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AggregatedSigAndAggregationBitsRequest); i { case 0: return &v.state @@ -4788,7 +5104,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AggregatedSigAndAggregationBitsResponse); i { case 0: return &v.state @@ -4800,7 +5116,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValidatorActivationResponse_Status); i { case 0: return &v.state @@ -4812,7 +5128,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DutiesResponse_Duty); i { case 0: return &v.state @@ -4824,7 +5140,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DoppelGangerRequest_ValidatorRequest); i { case 0: return &v.state @@ -4836,7 +5152,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DoppelGangerResponse_ValidatorResponse); i { case 0: return &v.state @@ -4848,7 +5164,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { return nil } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + file_proto_prysm_v1alpha1_validator_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PrepareBeaconProposerRequest_FeeRecipientContainer); i { case 0: return &v.state @@ -4861,7 +5177,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { } } } - file_proto_prysm_v1alpha1_validator_proto_msgTypes[5].OneofWrappers = []interface{}{ + file_proto_prysm_v1alpha1_validator_proto_msgTypes[8].OneofWrappers = []interface{}{ (*StreamBlocksResponse_Phase0Block)(nil), (*StreamBlocksResponse_AltairBlock)(nil), (*StreamBlocksResponse_BellatrixBlock)(nil), @@ -4875,7 +5191,7 @@ func file_proto_prysm_v1alpha1_validator_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_prysm_v1alpha1_validator_proto_rawDesc, NumEnums: 1, - NumMessages: 50, + NumMessages: 53, NumExtensions: 0, NumServices: 1, }, @@ -4937,6 +5253,12 @@ type BeaconNodeValidatorClient interface { SubmitValidatorRegistrations(ctx context.Context, in *SignedValidatorRegistrationsV1, opts ...grpc.CallOption) (*emptypb.Empty, error) AssignValidatorToSubnet(ctx context.Context, in *AssignValidatorToSubnetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) AggregatedSigAndAggregationBits(ctx context.Context, in *AggregatedSigAndAggregationBitsRequest, opts ...grpc.CallOption) (*AggregatedSigAndAggregationBitsResponse, error) + GetPayloadAttestationData(ctx context.Context, in *GetPayloadAttestationDataRequest, opts ...grpc.CallOption) (*PayloadAttestationData, error) + SubmitPayloadAttestation(ctx context.Context, in *PayloadAttestationMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) + SubmitSignedExecutionPayloadEnvelope(ctx context.Context, in *v1.SignedExecutionPayloadEnvelope, opts ...grpc.CallOption) (*emptypb.Empty, error) + SubmitSignedExecutionPayloadHeader(ctx context.Context, in *v1.SignedExecutionPayloadHeader, opts ...grpc.CallOption) (*emptypb.Empty, error) + GetExecutionPayloadEnvelope(ctx context.Context, in *PayloadEnvelopeRequest, opts ...grpc.CallOption) (*v1.ExecutionPayloadEnvelope, error) + GetLocalHeader(ctx context.Context, in *HeaderRequest, opts ...grpc.CallOption) (*v1.ExecutionPayloadHeaderEPBS, error) } type beaconNodeValidatorClient struct { @@ -5322,6 +5644,60 @@ func (c *beaconNodeValidatorClient) AggregatedSigAndAggregationBits(ctx context. return out, nil } +func (c *beaconNodeValidatorClient) GetPayloadAttestationData(ctx context.Context, in *GetPayloadAttestationDataRequest, opts ...grpc.CallOption) (*PayloadAttestationData, error) { + out := new(PayloadAttestationData) + err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetPayloadAttestationData", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *beaconNodeValidatorClient) SubmitPayloadAttestation(ctx context.Context, in *PayloadAttestationMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitPayloadAttestation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *beaconNodeValidatorClient) SubmitSignedExecutionPayloadEnvelope(ctx context.Context, in *v1.SignedExecutionPayloadEnvelope, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitSignedExecutionPayloadEnvelope", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *beaconNodeValidatorClient) SubmitSignedExecutionPayloadHeader(ctx context.Context, in *v1.SignedExecutionPayloadHeader, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitSignedExecutionPayloadHeader", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *beaconNodeValidatorClient) GetExecutionPayloadEnvelope(ctx context.Context, in *PayloadEnvelopeRequest, opts ...grpc.CallOption) (*v1.ExecutionPayloadEnvelope, error) { + out := new(v1.ExecutionPayloadEnvelope) + err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetExecutionPayloadEnvelope", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *beaconNodeValidatorClient) GetLocalHeader(ctx context.Context, in *HeaderRequest, opts ...grpc.CallOption) (*v1.ExecutionPayloadHeaderEPBS, error) { + out := new(v1.ExecutionPayloadHeaderEPBS) + err := c.cc.Invoke(ctx, "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetLocalHeader", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // BeaconNodeValidatorServer is the server API for BeaconNodeValidator service. type BeaconNodeValidatorServer interface { GetDuties(context.Context, *DutiesRequest) (*DutiesResponse, error) @@ -5359,6 +5735,12 @@ type BeaconNodeValidatorServer interface { SubmitValidatorRegistrations(context.Context, *SignedValidatorRegistrationsV1) (*emptypb.Empty, error) AssignValidatorToSubnet(context.Context, *AssignValidatorToSubnetRequest) (*emptypb.Empty, error) AggregatedSigAndAggregationBits(context.Context, *AggregatedSigAndAggregationBitsRequest) (*AggregatedSigAndAggregationBitsResponse, error) + GetPayloadAttestationData(context.Context, *GetPayloadAttestationDataRequest) (*PayloadAttestationData, error) + SubmitPayloadAttestation(context.Context, *PayloadAttestationMessage) (*emptypb.Empty, error) + SubmitSignedExecutionPayloadEnvelope(context.Context, *v1.SignedExecutionPayloadEnvelope) (*emptypb.Empty, error) + SubmitSignedExecutionPayloadHeader(context.Context, *v1.SignedExecutionPayloadHeader) (*emptypb.Empty, error) + GetExecutionPayloadEnvelope(context.Context, *PayloadEnvelopeRequest) (*v1.ExecutionPayloadEnvelope, error) + GetLocalHeader(context.Context, *HeaderRequest) (*v1.ExecutionPayloadHeaderEPBS, error) } // UnimplementedBeaconNodeValidatorServer can be embedded to have forward compatible implementations. @@ -5458,6 +5840,24 @@ func (*UnimplementedBeaconNodeValidatorServer) AssignValidatorToSubnet(context.C func (*UnimplementedBeaconNodeValidatorServer) AggregatedSigAndAggregationBits(context.Context, *AggregatedSigAndAggregationBitsRequest) (*AggregatedSigAndAggregationBitsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AggregatedSigAndAggregationBits not implemented") } +func (*UnimplementedBeaconNodeValidatorServer) GetPayloadAttestationData(context.Context, *GetPayloadAttestationDataRequest) (*PayloadAttestationData, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPayloadAttestationData not implemented") +} +func (*UnimplementedBeaconNodeValidatorServer) SubmitPayloadAttestation(context.Context, *PayloadAttestationMessage) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitPayloadAttestation not implemented") +} +func (*UnimplementedBeaconNodeValidatorServer) SubmitSignedExecutionPayloadEnvelope(context.Context, *v1.SignedExecutionPayloadEnvelope) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitSignedExecutionPayloadEnvelope not implemented") +} +func (*UnimplementedBeaconNodeValidatorServer) SubmitSignedExecutionPayloadHeader(context.Context, *v1.SignedExecutionPayloadHeader) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitSignedExecutionPayloadHeader not implemented") +} +func (*UnimplementedBeaconNodeValidatorServer) GetExecutionPayloadEnvelope(context.Context, *PayloadEnvelopeRequest) (*v1.ExecutionPayloadEnvelope, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExecutionPayloadEnvelope not implemented") +} +func (*UnimplementedBeaconNodeValidatorServer) GetLocalHeader(context.Context, *HeaderRequest) (*v1.ExecutionPayloadHeaderEPBS, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLocalHeader not implemented") +} func RegisterBeaconNodeValidatorServer(s *grpc.Server, srv BeaconNodeValidatorServer) { s.RegisterService(&_BeaconNodeValidator_serviceDesc, srv) @@ -6033,6 +6433,114 @@ func _BeaconNodeValidator_AggregatedSigAndAggregationBits_Handler(srv interface{ return interceptor(ctx, in, info, handler) } +func _BeaconNodeValidator_GetPayloadAttestationData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPayloadAttestationDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BeaconNodeValidatorServer).GetPayloadAttestationData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetPayloadAttestationData", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BeaconNodeValidatorServer).GetPayloadAttestationData(ctx, req.(*GetPayloadAttestationDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BeaconNodeValidator_SubmitPayloadAttestation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PayloadAttestationMessage) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BeaconNodeValidatorServer).SubmitPayloadAttestation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitPayloadAttestation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BeaconNodeValidatorServer).SubmitPayloadAttestation(ctx, req.(*PayloadAttestationMessage)) + } + return interceptor(ctx, in, info, handler) +} + +func _BeaconNodeValidator_SubmitSignedExecutionPayloadEnvelope_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.SignedExecutionPayloadEnvelope) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BeaconNodeValidatorServer).SubmitSignedExecutionPayloadEnvelope(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitSignedExecutionPayloadEnvelope", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BeaconNodeValidatorServer).SubmitSignedExecutionPayloadEnvelope(ctx, req.(*v1.SignedExecutionPayloadEnvelope)) + } + return interceptor(ctx, in, info, handler) +} + +func _BeaconNodeValidator_SubmitSignedExecutionPayloadHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.SignedExecutionPayloadHeader) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BeaconNodeValidatorServer).SubmitSignedExecutionPayloadHeader(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/SubmitSignedExecutionPayloadHeader", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BeaconNodeValidatorServer).SubmitSignedExecutionPayloadHeader(ctx, req.(*v1.SignedExecutionPayloadHeader)) + } + return interceptor(ctx, in, info, handler) +} + +func _BeaconNodeValidator_GetExecutionPayloadEnvelope_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PayloadEnvelopeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BeaconNodeValidatorServer).GetExecutionPayloadEnvelope(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetExecutionPayloadEnvelope", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BeaconNodeValidatorServer).GetExecutionPayloadEnvelope(ctx, req.(*PayloadEnvelopeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BeaconNodeValidator_GetLocalHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HeaderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BeaconNodeValidatorServer).GetLocalHeader(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.v1alpha1.BeaconNodeValidator/GetLocalHeader", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BeaconNodeValidatorServer).GetLocalHeader(ctx, req.(*HeaderRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _BeaconNodeValidator_serviceDesc = grpc.ServiceDesc{ ServiceName: "ethereum.eth.v1alpha1.BeaconNodeValidator", HandlerType: (*BeaconNodeValidatorServer)(nil), @@ -6145,6 +6653,30 @@ var _BeaconNodeValidator_serviceDesc = grpc.ServiceDesc{ MethodName: "AggregatedSigAndAggregationBits", Handler: _BeaconNodeValidator_AggregatedSigAndAggregationBits_Handler, }, + { + MethodName: "GetPayloadAttestationData", + Handler: _BeaconNodeValidator_GetPayloadAttestationData_Handler, + }, + { + MethodName: "SubmitPayloadAttestation", + Handler: _BeaconNodeValidator_SubmitPayloadAttestation_Handler, + }, + { + MethodName: "SubmitSignedExecutionPayloadEnvelope", + Handler: _BeaconNodeValidator_SubmitSignedExecutionPayloadEnvelope_Handler, + }, + { + MethodName: "SubmitSignedExecutionPayloadHeader", + Handler: _BeaconNodeValidator_SubmitSignedExecutionPayloadHeader_Handler, + }, + { + MethodName: "GetExecutionPayloadEnvelope", + Handler: _BeaconNodeValidator_GetExecutionPayloadEnvelope_Handler, + }, + { + MethodName: "GetLocalHeader", + Handler: _BeaconNodeValidator_GetLocalHeader_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/proto/prysm/v1alpha1/validator.proto b/proto/prysm/v1alpha1/validator.proto index d4d68d702851..7047fab37f47 100644 --- a/proto/prysm/v1alpha1/validator.proto +++ b/proto/prysm/v1alpha1/validator.proto @@ -24,6 +24,8 @@ import "proto/eth/ext/options.proto"; import "proto/prysm/v1alpha1/beacon_block.proto"; import "proto/prysm/v1alpha1/sync_committee.proto"; import "proto/prysm/v1alpha1/attestation.proto"; +import "proto/prysm/v1alpha1/payload_attestation.proto"; +import "proto/engine/v1/epbs.proto"; option csharp_namespace = "Ethereum.Eth.V1"; option go_package = "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1;eth"; @@ -351,6 +353,29 @@ service BeaconNodeValidator { get: "/eth/v1alpha1/validator/blocks/aggregated_sig_and_aggregation_bits" }; } + + rpc GetPayloadAttestationData(GetPayloadAttestationDataRequest) returns (PayloadAttestationData) {} + rpc SubmitPayloadAttestation(PayloadAttestationMessage) returns (google.protobuf.Empty) {} + + // ePBS RPC endpoints + rpc SubmitSignedExecutionPayloadEnvelope(ethereum.engine.v1.SignedExecutionPayloadEnvelope) returns (google.protobuf.Empty) {} + rpc SubmitSignedExecutionPayloadHeader(ethereum.engine.v1.SignedExecutionPayloadHeader) returns (google.protobuf.Empty) {} + rpc GetExecutionPayloadEnvelope(PayloadEnvelopeRequest) returns (ethereum.engine.v1.ExecutionPayloadEnvelope) {} + rpc GetLocalHeader(HeaderRequest) returns (ethereum.engine.v1.ExecutionPayloadHeaderEPBS) {} +} + +message PayloadEnvelopeRequest { + uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; + uint64 proposer_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; +} + +message HeaderRequest { + uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; + uint64 proposer_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"]; +} + +message GetPayloadAttestationDataRequest { + uint64 slot = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; } // SyncMessageBlockRootResponse for beacon chain validator to retrieve and @@ -573,6 +598,9 @@ message DutiesResponse { // The number of committees in the duty's slot. uint64 committees_at_slot = 9; + + // Slot at which a validator attest to payload attestation timeliness. + uint64 ptc_slot = 10 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"]; } } diff --git a/proto/ssz_proto_library.bzl b/proto/ssz_proto_library.bzl index 820cad3ff7ce..28c28285a8be 100644 --- a/proto/ssz_proto_library.bzl +++ b/proto/ssz_proto_library.bzl @@ -36,6 +36,10 @@ mainnet = { "pending_partial_withdrawals_limit": "134217728", "pending_consolidations_limit": "262144", "max_consolidation_requests_per_payload.size": "1", + "max_inclusion_list.size": "1024", #MAX_TRANSACTIONS_PER_INCLUSION_LIST + "ptc.size": "64", #PTC_SIZE + "ptc.type": "github.com/prysmaticlabs/go-bitfield.Bitvector512", + "payload_attestation.size": "4", } minimal = { @@ -68,6 +72,10 @@ minimal = { "pending_partial_withdrawals_limit": "64", "pending_consolidations_limit": "64", "max_consolidation_requests_per_payload.size": "1", + "max_inclusion_list.size": "16", #MAX_TRANSACTIONS_PER_INCLUSION_LIST + "ptc.size": "4", #PTC_SIZE + "ptc.type": "github.com/prysmaticlabs/go-bitfield.Bitvector32", + "payload_attestation.size": "4", } ###### Rules definitions ####### diff --git a/runtime/interop/premine-state.go b/runtime/interop/premine-state.go index b34445a0076a..86f24a102264 100644 --- a/runtime/interop/premine-state.go +++ b/runtime/interop/premine-state.go @@ -66,7 +66,7 @@ func NewPreminedGenesis(ctx context.Context, t, nvals, pCreds uint64, version in func (s *PremineGenesisConfig) prepare(ctx context.Context) (state.BeaconState, error) { switch s.Version { - case version.Phase0, version.Altair, version.Bellatrix, version.Capella, version.Deneb, version.Electra: + case version.Phase0, version.Altair, version.Bellatrix, version.Capella, version.Deneb, version.Electra, version.EPBS: default: return nil, errors.Wrapf(errUnsupportedVersion, "version=%s", version.String(s.Version)) } @@ -160,6 +160,11 @@ func (s *PremineGenesisConfig) empty() (state.BeaconState, error) { if err != nil { return nil, err } + case version.EPBS: + e, err = state_native.InitializeFromProtoEpbs(ðpb.BeaconStateEPBS{}) + if err != nil { + return nil, err + } default: return nil, errUnsupportedVersion } @@ -343,6 +348,8 @@ func (s *PremineGenesisConfig) setFork(g state.BeaconState) error { pv, cv = params.BeaconConfig().CapellaForkVersion, params.BeaconConfig().DenebForkVersion case version.Electra: pv, cv = params.BeaconConfig().ElectraForkVersion, params.BeaconConfig().ElectraForkVersion + case version.EPBS: + pv, cv = params.BeaconConfig().EPBSForkVersion, params.BeaconConfig().EPBSForkVersion default: return errUnsupportedVersion } @@ -564,6 +571,31 @@ func (s *PremineGenesisConfig) setLatestBlockHeader(g state.BeaconState) error { Consolidations: make([]*enginev1.ConsolidationRequest, 0), }, } + case version.EPBS: + body = ðpb.BeaconBlockBodyEpbs{ + RandaoReveal: make([]byte, 96), + Eth1Data: ðpb.Eth1Data{ + DepositRoot: make([]byte, 32), + BlockHash: make([]byte, 32), + }, + Graffiti: make([]byte, 32), + SyncAggregate: ðpb.SyncAggregate{ + SyncCommitteeBits: make([]byte, fieldparams.SyncCommitteeLength/8), + SyncCommitteeSignature: make([]byte, fieldparams.BLSSignatureLength), + }, + SignedExecutionPayloadHeader: &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: make([]byte, fieldparams.RootLength), + ParentBlockRoot: make([]byte, fieldparams.RootLength), + BlockHash: make([]byte, fieldparams.RootLength), + BlobKzgCommitmentsRoot: make([]byte, fieldparams.RootLength), + }, + Signature: make([]byte, fieldparams.BLSSignatureLength), + }, + BlsToExecutionChanges: make([]*ethpb.SignedBLSToExecutionChange, 0), + PayloadAttestations: make([]*ethpb.PayloadAttestation, 0), + } + default: return errUnsupportedVersion } @@ -712,6 +744,13 @@ func (s *PremineGenesisConfig) setExecutionPayload(g state.BeaconState) error { if err != nil { return err } + case version.EPBS: + return g.SetLatestExecutionPayloadHeaderEPBS(&enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: make([]byte, 32), + ParentBlockRoot: make([]byte, 32), + BlockHash: make([]byte, 32), + BlobKzgCommitmentsRoot: make([]byte, 32), + }) default: return errUnsupportedVersion } diff --git a/runtime/version/fork.go b/runtime/version/fork.go index 902393c8bc80..05d908118bb8 100644 --- a/runtime/version/fork.go +++ b/runtime/version/fork.go @@ -9,6 +9,7 @@ const ( Capella Deneb Electra + EPBS ) var versionToString = map[int]string{ @@ -18,6 +19,7 @@ var versionToString = map[int]string{ Capella: "capella", Deneb: "deneb", Electra: "electra", + EPBS: "epbs", } // stringToVersion and allVersions are populated in init() diff --git a/testing/mock/BUILD.bazel b/testing/mock/BUILD.bazel index ffbb688cae55..757fe7c52f96 100644 --- a/testing/mock/BUILD.bazel +++ b/testing/mock/BUILD.bazel @@ -15,6 +15,7 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/v5/testing/mock", visibility = ["//visibility:public"], deps = [ + "//proto/engine/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//metadata:go_default_library", diff --git a/testing/mock/beacon_validator_client_mock.go b/testing/mock/beacon_validator_client_mock.go index 233e91c8ffc6..d0f8a05b0efd 100644 --- a/testing/mock/beacon_validator_client_mock.go +++ b/testing/mock/beacon_validator_client_mock.go @@ -13,6 +13,7 @@ import ( context "context" reflect "reflect" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" gomock "go.uber.org/mock/gomock" grpc "google.golang.org/grpc" @@ -203,6 +204,26 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) GetFeeRecipientByPubKey(arg return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFeeRecipientByPubKey", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetFeeRecipientByPubKey), varargs...) } +// GetPayloadAttestationData mocks base method. +func (m *MockBeaconNodeValidatorClient) GetPayloadAttestationData(arg0 context.Context, arg1 *eth.GetPayloadAttestationDataRequest, arg2 ...grpc.CallOption) (*eth.PayloadAttestationData, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetPayloadAttestationData", varargs...) + ret0, _ := ret[0].(*eth.PayloadAttestationData) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetPayloadAttestationData indicates an expected call of GetPayloadAttestationData. +func (mr *MockBeaconNodeValidatorClientMockRecorder) GetPayloadAttestationData(arg0, arg1 any, arg2 ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPayloadAttestationData", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).GetPayloadAttestationData), varargs...) +} + // GetSyncCommitteeContribution mocks base method. func (m *MockBeaconNodeValidatorClient) GetSyncCommitteeContribution(arg0 context.Context, arg1 *eth.SyncCommitteeContributionRequest, arg2 ...grpc.CallOption) (*eth.SyncCommitteeContribution, error) { m.ctrl.T.Helper() @@ -463,6 +484,26 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitAggregateSelectionPro return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitAggregateSelectionProofElectra", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitAggregateSelectionProofElectra), varargs...) } +// SubmitPayloadAttestation mocks base method. +func (m *MockBeaconNodeValidatorClient) SubmitPayloadAttestation(arg0 context.Context, arg1 *eth.PayloadAttestationMessage, arg2 ...grpc.CallOption) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "SubmitPayloadAttestation", varargs...) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitPayloadAttestation indicates an expected call of SubmitPayloadAttestation. +func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitPayloadAttestation(arg0, arg1 any, arg2 ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitPayloadAttestation", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitPayloadAttestation), varargs...) +} + // SubmitSignedAggregateSelectionProof mocks base method. func (m *MockBeaconNodeValidatorClient) SubmitSignedAggregateSelectionProof(arg0 context.Context, arg1 *eth.SignedAggregateSubmitRequest, arg2 ...grpc.CallOption) (*eth.SignedAggregateSubmitResponse, error) { m.ctrl.T.Helper() @@ -523,6 +564,46 @@ func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedContributionAnd return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedContributionAndProof", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedContributionAndProof), varargs...) } +// SubmitSignedExecutionPayloadEnvelope mocks base method. +func (m *MockBeaconNodeValidatorClient) SubmitSignedExecutionPayloadEnvelope(arg0 context.Context, arg1 *enginev1.SignedExecutionPayloadEnvelope, arg2 ...grpc.CallOption) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "SubmitSignedExecutionPayloadEnvelope", varargs...) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitSignedExecutionPayloadEnvelope indicates an expected call of SubmitSignedExecutionPayloadEnvelope. +func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedExecutionPayloadEnvelope(arg0, arg1 any, arg2 ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedExecutionPayloadEnvelope), varargs...) +} + +// SubmitSignedExecutionPayloadHeader mocks base method. +func (m *MockBeaconNodeValidatorClient) SubmitSignedExecutionPayloadHeader(arg0 context.Context, arg1 *enginev1.SignedExecutionPayloadHeader, arg2 ...grpc.CallOption) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "SubmitSignedExecutionPayloadHeader", varargs...) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitSignedExecutionPayloadHeader indicates an expected call of SubmitSignedExecutionPayloadHeader. +func (mr *MockBeaconNodeValidatorClientMockRecorder) SubmitSignedExecutionPayloadHeader(arg0, arg1 any, arg2 ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedExecutionPayloadHeader", reflect.TypeOf((*MockBeaconNodeValidatorClient)(nil).SubmitSignedExecutionPayloadHeader), varargs...) +} + // SubmitSyncMessage mocks base method. func (m *MockBeaconNodeValidatorClient) SubmitSyncMessage(arg0 context.Context, arg1 *eth.SyncCommitteeMessage, arg2 ...grpc.CallOption) (*emptypb.Empty, error) { m.ctrl.T.Helper() diff --git a/testing/mock/beacon_validator_server_mock.go b/testing/mock/beacon_validator_server_mock.go index 9643784dfc27..7d3363c9bf0b 100644 --- a/testing/mock/beacon_validator_server_mock.go +++ b/testing/mock/beacon_validator_server_mock.go @@ -13,6 +13,7 @@ import ( context "context" reflect "reflect" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" eth "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" gomock "go.uber.org/mock/gomock" metadata "google.golang.org/grpc/metadata" @@ -162,6 +163,21 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) GetFeeRecipientByPubKey(arg return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFeeRecipientByPubKey", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetFeeRecipientByPubKey), arg0, arg1) } +// GetPayloadAttestationData mocks base method. +func (m *MockBeaconNodeValidatorServer) GetPayloadAttestationData(arg0 context.Context, arg1 *eth.GetPayloadAttestationDataRequest) (*eth.PayloadAttestationData, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPayloadAttestationData", arg0, arg1) + ret0, _ := ret[0].(*eth.PayloadAttestationData) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetPayloadAttestationData indicates an expected call of GetPayloadAttestationData. +func (mr *MockBeaconNodeValidatorServerMockRecorder) GetPayloadAttestationData(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPayloadAttestationData", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).GetPayloadAttestationData), arg0, arg1) +} + // GetSyncCommitteeContribution mocks base method. func (m *MockBeaconNodeValidatorServer) GetSyncCommitteeContribution(arg0 context.Context, arg1 *eth.SyncCommitteeContributionRequest) (*eth.SyncCommitteeContribution, error) { m.ctrl.T.Helper() @@ -355,6 +371,21 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitAggregateSelectionPro return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitAggregateSelectionProofElectra", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitAggregateSelectionProofElectra), arg0, arg1) } +// SubmitPayloadAttestation mocks base method. +func (m *MockBeaconNodeValidatorServer) SubmitPayloadAttestation(arg0 context.Context, arg1 *eth.PayloadAttestationMessage) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubmitPayloadAttestation", arg0, arg1) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitPayloadAttestation indicates an expected call of SubmitPayloadAttestation. +func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitPayloadAttestation(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitPayloadAttestation", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitPayloadAttestation), arg0, arg1) +} + // SubmitSignedAggregateSelectionProof mocks base method. func (m *MockBeaconNodeValidatorServer) SubmitSignedAggregateSelectionProof(arg0 context.Context, arg1 *eth.SignedAggregateSubmitRequest) (*eth.SignedAggregateSubmitResponse, error) { m.ctrl.T.Helper() @@ -400,6 +431,36 @@ func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitSignedContributionAnd return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedContributionAndProof", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitSignedContributionAndProof), arg0, arg1) } +// SubmitSignedExecutionPayloadEnvelope mocks base method. +func (m *MockBeaconNodeValidatorServer) SubmitSignedExecutionPayloadEnvelope(arg0 context.Context, arg1 *enginev1.SignedExecutionPayloadEnvelope) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubmitSignedExecutionPayloadEnvelope", arg0, arg1) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitSignedExecutionPayloadEnvelope indicates an expected call of SubmitSignedExecutionPayloadEnvelope. +func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitSignedExecutionPayloadEnvelope(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedExecutionPayloadEnvelope", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitSignedExecutionPayloadEnvelope), arg0, arg1) +} + +// SubmitSignedExecutionPayloadHeader mocks base method. +func (m *MockBeaconNodeValidatorServer) SubmitSignedExecutionPayloadHeader(arg0 context.Context, arg1 *enginev1.SignedExecutionPayloadHeader) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubmitSignedExecutionPayloadHeader", arg0, arg1) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitSignedExecutionPayloadHeader indicates an expected call of SubmitSignedExecutionPayloadHeader. +func (mr *MockBeaconNodeValidatorServerMockRecorder) SubmitSignedExecutionPayloadHeader(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitSignedExecutionPayloadHeader", reflect.TypeOf((*MockBeaconNodeValidatorServer)(nil).SubmitSignedExecutionPayloadHeader), arg0, arg1) +} + // SubmitSyncMessage mocks base method. func (m *MockBeaconNodeValidatorServer) SubmitSyncMessage(arg0 context.Context, arg1 *eth.SyncCommitteeMessage) (*emptypb.Empty, error) { m.ctrl.T.Helper() diff --git a/testing/spectest/mainnet/bellatrix/forkchoice/forkchoice_test.go b/testing/spectest/mainnet/bellatrix/forkchoice/forkchoice_test.go index 7ae7bf468cb1..b3b06022a9b7 100644 --- a/testing/spectest/mainnet/bellatrix/forkchoice/forkchoice_test.go +++ b/testing/spectest/mainnet/bellatrix/forkchoice/forkchoice_test.go @@ -8,5 +8,6 @@ import ( ) func TestMainnet_Bellatrix_Forkchoice(t *testing.T) { + t.Skip("forkchoice changed in ePBS") forkchoice.Run(t, "mainnet", version.Bellatrix) } diff --git a/testing/spectest/mainnet/capella/forkchoice/forkchoice_test.go b/testing/spectest/mainnet/capella/forkchoice/forkchoice_test.go index 21fdd1338506..4ec4f23cc35a 100644 --- a/testing/spectest/mainnet/capella/forkchoice/forkchoice_test.go +++ b/testing/spectest/mainnet/capella/forkchoice/forkchoice_test.go @@ -8,5 +8,6 @@ import ( ) func TestMainnet_Capella_Forkchoice(t *testing.T) { + t.Skip("forkchoice changed in ePBS") forkchoice.Run(t, "mainnet", version.Capella) } diff --git a/testing/spectest/mainnet/deneb/forkchoice/forkchoice_test.go b/testing/spectest/mainnet/deneb/forkchoice/forkchoice_test.go index 0e26a64dc101..c6067bb65ebf 100644 --- a/testing/spectest/mainnet/deneb/forkchoice/forkchoice_test.go +++ b/testing/spectest/mainnet/deneb/forkchoice/forkchoice_test.go @@ -8,5 +8,6 @@ import ( ) func TestMainnet_Deneb_Forkchoice(t *testing.T) { + t.Skip("forkchoice changed in ePBS") forkchoice.Run(t, "mainnet", version.Deneb) } diff --git a/testing/spectest/mainnet/electra/forkchoice/forkchoice_test.go b/testing/spectest/mainnet/electra/forkchoice/forkchoice_test.go index 50f73e858f6f..e52c45d104cb 100644 --- a/testing/spectest/mainnet/electra/forkchoice/forkchoice_test.go +++ b/testing/spectest/mainnet/electra/forkchoice/forkchoice_test.go @@ -8,5 +8,6 @@ import ( ) func TestMainnet_Electra_Forkchoice(t *testing.T) { + t.Skip("forkchoice changed in ePBS") forkchoice.Run(t, "mainnet", version.Electra) } diff --git a/testing/spectest/minimal/bellatrix/forkchoice/forkchoice_test.go b/testing/spectest/minimal/bellatrix/forkchoice/forkchoice_test.go index 662f377a875a..8b20e48f9317 100644 --- a/testing/spectest/minimal/bellatrix/forkchoice/forkchoice_test.go +++ b/testing/spectest/minimal/bellatrix/forkchoice/forkchoice_test.go @@ -8,5 +8,6 @@ import ( ) func TestMinimal_Bellatrix_Forkchoice(t *testing.T) { + t.Skip("forkchoice changed in ePBS") forkchoice.Run(t, "minimal", version.Bellatrix) } diff --git a/testing/spectest/minimal/capella/forkchoice/forkchoice_test.go b/testing/spectest/minimal/capella/forkchoice/forkchoice_test.go index fa8d1fb30b74..c9b62eb35a86 100644 --- a/testing/spectest/minimal/capella/forkchoice/forkchoice_test.go +++ b/testing/spectest/minimal/capella/forkchoice/forkchoice_test.go @@ -8,5 +8,6 @@ import ( ) func TestMinimal_Capella_Forkchoice(t *testing.T) { + t.Skip("forkchoice changed in ePBS") forkchoice.Run(t, "minimal", version.Capella) } diff --git a/testing/spectest/minimal/deneb/forkchoice/forkchoice_test.go b/testing/spectest/minimal/deneb/forkchoice/forkchoice_test.go index 89a192a14348..52096e9c7c07 100644 --- a/testing/spectest/minimal/deneb/forkchoice/forkchoice_test.go +++ b/testing/spectest/minimal/deneb/forkchoice/forkchoice_test.go @@ -8,5 +8,6 @@ import ( ) func TestMinimal_Deneb_Forkchoice(t *testing.T) { + t.Skip("forkchoice changed in ePBS") forkchoice.Run(t, "minimal", version.Deneb) } diff --git a/testing/spectest/minimal/electra/forkchoice/forkchoice_test.go b/testing/spectest/minimal/electra/forkchoice/forkchoice_test.go index 19c0acd78ad4..fb6470b6dd30 100644 --- a/testing/spectest/minimal/electra/forkchoice/forkchoice_test.go +++ b/testing/spectest/minimal/electra/forkchoice/forkchoice_test.go @@ -8,5 +8,6 @@ import ( ) func TestMinimal_Electra_Forkchoice(t *testing.T) { + t.Skip("forkchoice changed in ePBS") forkchoice.Run(t, "minimal", version.Electra) } diff --git a/testing/util/BUILD.bazel b/testing/util/BUILD.bazel index 16154398cf7e..7fc91294d2e3 100644 --- a/testing/util/BUILD.bazel +++ b/testing/util/BUILD.bazel @@ -19,6 +19,9 @@ go_library( "electra.go", "electra_block.go", "electra_state.go", + "epbs_block.go", + "epbs_state.go", + "execution_payload_header.go", "helpers.go", "lightclient.go", "logging.go", diff --git a/testing/util/block.go b/testing/util/block.go index bc6f21923133..e8f988662e37 100644 --- a/testing/util/block.go +++ b/testing/util/block.go @@ -42,9 +42,12 @@ type BlockGenConfig struct { FullSyncAggregate bool NumBLSChanges uint64 // Only for post Capella blocks NumWithdrawals uint64 - NumDepositRequests uint64 // Only for post Electra blocks - NumWithdrawalRequests uint64 // Only for post Electra blocks - NumConsolidationRequests uint64 // Only for post Electra blocks + NumDepositRequests uint64 // Only for post Electra blocks + NumWithdrawalRequests uint64 // Only for post Electra blocks + NumConsolidationRequests uint64 // Only for post Electra blocks + BuilderIndex primitives.ValidatorIndex // Only for post EIP-7732 blocks. + PayloadValue uint64 // Only for post EIP-7732 blocks + NumKzgCommitmens uint64 // Only for post EIP-7732 blocks } // DefaultBlockGenConfig returns the block config that utilizes the diff --git a/testing/util/epbs_block.go b/testing/util/epbs_block.go new file mode 100644 index 000000000000..b20d4818cfce --- /dev/null +++ b/testing/util/epbs_block.go @@ -0,0 +1,260 @@ +package util + +import ( + "context" + "crypto/rand" + "fmt" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/go-bitfield" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/time" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/transition" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + "github.com/prysmaticlabs/prysm/v5/encoding/ssz" + v1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" +) + +// GenerateFullBlockEpbs generates a fully valid Epbs block with the requested parameters. +// Use BlockGenConfig to declare the conditions you would like the block generated under. +// This function modifies the passed state as follows: +func GenerateFullBlockEpbs( + bState state.BeaconState, + privs []bls.SecretKey, + conf *BlockGenConfig, + slot primitives.Slot, +) (*ethpb.SignedBeaconBlockEpbs, error) { + ctx := context.Background() + currentSlot := bState.Slot() + if currentSlot > slot { + return nil, fmt.Errorf("current slot in state is larger than given slot. %d > %d", currentSlot, slot) + } + bState = bState.Copy() + + if conf == nil { + conf = &BlockGenConfig{} + } + + var err error + var pSlashings []*ethpb.ProposerSlashing + numToGen := conf.NumProposerSlashings + if numToGen > 0 { + pSlashings, err = generateProposerSlashings(bState, privs, numToGen) + if err != nil { + return nil, errors.Wrapf(err, "failed generating %d proposer slashings:", numToGen) + } + } + + numToGen = conf.NumAttesterSlashings + var aSlashings []*ethpb.AttesterSlashingElectra + if numToGen > 0 { + generated, err := generateAttesterSlashings(bState, privs, numToGen) + if err != nil { + return nil, errors.Wrapf(err, "failed generating %d attester slashings:", numToGen) + } + aSlashings = make([]*ethpb.AttesterSlashingElectra, len(generated)) + var ok bool + for i, s := range generated { + aSlashings[i], ok = s.(*ethpb.AttesterSlashingElectra) + if !ok { + return nil, fmt.Errorf("attester slashing has the wrong type (expected %T, got %T)", ðpb.AttesterSlashingElectra{}, s) + } + } + } + + numToGen = conf.NumAttestations + var atts []*ethpb.AttestationElectra + if numToGen > 0 { + generatedAtts, err := GenerateAttestations(bState, privs, numToGen, slot, false) + if err != nil { + return nil, errors.Wrapf(err, "failed generating %d attestations:", numToGen) + } + atts = make([]*ethpb.AttestationElectra, len(generatedAtts)) + var ok bool + for i, a := range generatedAtts { + atts[i], ok = a.(*ethpb.AttestationElectra) + if !ok { + return nil, fmt.Errorf("attestation has the wrong type (expected %T, got %T)", ðpb.AttestationElectra{}, a) + } + } + } + + numToGen = conf.NumDeposits + var newDeposits []*ethpb.Deposit + eth1Data := bState.Eth1Data() + if numToGen > 0 { + newDeposits, eth1Data, err = generateDepositsAndEth1Data(bState, numToGen) + if err != nil { + return nil, errors.Wrapf(err, "failed generating %d deposits:", numToGen) + } + } + + numToGen = conf.NumVoluntaryExits + var exits []*ethpb.SignedVoluntaryExit + if numToGen > 0 { + exits, err = generateVoluntaryExits(bState, privs, numToGen) + if err != nil { + return nil, errors.Wrapf(err, "failed generating %d attester slashings:", numToGen) + } + } + + numToGen = conf.NumTransactions + newTransactions := make([][]byte, numToGen) + for i := uint64(0); i < numToGen; i++ { + newTransactions[i] = bytesutil.Uint64ToBytesLittleEndian(i) + } + stCopy := bState.Copy() + stCopy, err = transition.ProcessSlots(context.Background(), stCopy, slot) + if err != nil { + return nil, err + } + + blockHash := indexToHash(uint64(slot)) + var syncCommitteeBits []byte + currSize := new(ethpb.SyncAggregate).SyncCommitteeBits.Len() + switch currSize { + case 512: + syncCommitteeBits = bitfield.NewBitvector512() + case 32: + syncCommitteeBits = bitfield.NewBitvector32() + default: + return nil, errors.New("invalid bit vector size") + } + newSyncAggregate := ðpb.SyncAggregate{ + SyncCommitteeBits: syncCommitteeBits, + SyncCommitteeSignature: append([]byte{0xC0}, make([]byte, 95)...), + } + + newHeader := bState.LatestBlockHeader() + prevStateRoot, err := bState.HashTreeRoot(ctx) + if err != nil { + return nil, errors.Wrap(err, "could not hash state") + } + newHeader.StateRoot = prevStateRoot[:] + parentRoot, err := newHeader.HashTreeRoot() + if err != nil { + return nil, errors.Wrap(err, "could not hash the new header") + } + + if slot == currentSlot { + slot = currentSlot + 1 + } + + reveal, err := RandaoReveal(stCopy, time.CurrentEpoch(stCopy), privs) + if err != nil { + return nil, errors.Wrap(err, "could not compute randao reveal") + } + + idx, err := helpers.BeaconProposerIndex(ctx, stCopy) + if err != nil { + return nil, errors.Wrap(err, "could not compute beacon proposer index") + } + + changes := make([]*ethpb.SignedBLSToExecutionChange, conf.NumBLSChanges) + for i := uint64(0); i < conf.NumBLSChanges; i++ { + changes[i], err = GenerateBLSToExecutionChange(bState, privs[i+1], primitives.ValidatorIndex(i)) + if err != nil { + return nil, err + } + } + parentExecution, err := stCopy.LatestExecutionPayloadHeader() + if err != nil { + return nil, err + } + parentHash, err := parentExecution.HashTreeRoot() + if err != nil { + return nil, err + } + kzgRoot, err := generateKzgCommitmentsRoot(conf.NumKzgCommitmens) + if err != nil { + return nil, err + } + newExecutionPayloadHeader := &v1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: parentHash[:], + ParentBlockRoot: parentRoot[:], + BlockHash: blockHash[:], + BuilderIndex: conf.BuilderIndex, + Slot: slot, + Value: conf.PayloadValue, + BlobKzgCommitmentsRoot: kzgRoot[:], + } + newSignedExecutionPayloadHeader, err := SignExecutionPayloadHeader(bState, privs[conf.BuilderIndex], newExecutionPayloadHeader) + if err != nil { + return nil, err + } + + block := ðpb.BeaconBlockEpbs{ + Slot: slot, + ParentRoot: parentRoot[:], + ProposerIndex: idx, + Body: ðpb.BeaconBlockBodyEpbs{ + Eth1Data: eth1Data, + RandaoReveal: reveal, + ProposerSlashings: pSlashings, + AttesterSlashings: aSlashings, + Attestations: atts, + VoluntaryExits: exits, + Deposits: newDeposits, + Graffiti: make([]byte, fieldparams.RootLength), + SyncAggregate: newSyncAggregate, + SignedExecutionPayloadHeader: newSignedExecutionPayloadHeader, + BlsToExecutionChanges: changes, + }, + } + + // The fork can change after processing the state + signature, err := BlockSignature(bState, block, privs) + if err != nil { + return nil, errors.Wrap(err, "could not compute block signature") + } + + return ðpb.SignedBeaconBlockEpbs{Block: block, Signature: signature.Marshal()}, nil +} + +// SignExecutionPayloadHeader generates a valid SignedExecutionPayloadHeader +func SignExecutionPayloadHeader( + st state.BeaconState, + priv bls.SecretKey, + message *v1.ExecutionPayloadHeaderEPBS, +) (*v1.SignedExecutionPayloadHeader, error) { + c := params.BeaconConfig() + domain, err := signing.ComputeDomain(c.DomainBeaconBuilder, c.GenesisForkVersion, st.GenesisValidatorsRoot()) + if err != nil { + return nil, err + } + sr, err := signing.ComputeSigningRoot(message, domain) + if err != nil { + return nil, err + } + signature := priv.Sign(sr[:]).Marshal() + return &v1.SignedExecutionPayloadHeader{ + Message: message, + Signature: signature, + }, nil +} +func generateKzgCommitments(n uint64) ([][]byte, error) { + kzgs := make([][]byte, n) + for i := range kzgs { + kzgs[i] = make([]byte, 48) + _, err := rand.Read(kzgs[i]) + if err != nil { + return nil, err + } + } + return kzgs, nil +} + +func generateKzgCommitmentsRoot(n uint64) ([32]byte, error) { + kzgs, err := generateKzgCommitments(n) + if err != nil { + return [32]byte{}, err + } + return ssz.KzgCommitmentsRoot(kzgs) +} diff --git a/testing/util/epbs_state.go b/testing/util/epbs_state.go new file mode 100644 index 000000000000..b1d0bab602ef --- /dev/null +++ b/testing/util/epbs_state.go @@ -0,0 +1,335 @@ +package util + +import ( + "context" + "testing" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/go-bitfield" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/helpers" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state" + state_native "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/state-native" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/stateutil" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/encoding/ssz" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/time/slots" +) + +// emptyGenesisStateEpbs returns an empty genesis state in ePBS format. +func emptyGenesisStateEpbs() (state.BeaconState, error) { + st := ðpb.BeaconStateEPBS{ + // Misc fields. + Slot: 0, + Fork: ðpb.Fork{ + PreviousVersion: params.BeaconConfig().BellatrixForkVersion, + CurrentVersion: params.BeaconConfig().DenebForkVersion, + Epoch: 0, + }, + // Validator registry fields. + Validators: []*ethpb.Validator{}, + Balances: []uint64{}, + InactivityScores: []uint64{}, + + JustificationBits: []byte{0}, + HistoricalRoots: [][]byte{}, + CurrentEpochParticipation: []byte{}, + PreviousEpochParticipation: []byte{}, + + // Eth1 data. + Eth1Data: ðpb.Eth1Data{}, + Eth1DataVotes: []*ethpb.Eth1Data{}, + Eth1DepositIndex: 0, + + LatestExecutionPayloadHeader: &enginev1.ExecutionPayloadHeaderEPBS{}, + + DepositBalanceToConsume: primitives.Gwei(0), + ExitBalanceToConsume: primitives.Gwei(0), + ConsolidationBalanceToConsume: primitives.Gwei(0), + } + return state_native.InitializeFromProtoEpbs(st) +} + +// genesisBeaconStateEpbs returns the genesis beacon state. +func genesisBeaconStateEpbs(ctx context.Context, deposits []*ethpb.Deposit, genesisTime uint64, eth1Data *ethpb.Eth1Data) (state.BeaconState, error) { + st, err := emptyGenesisStateEpbs() + if err != nil { + return nil, err + } + + // Process initial deposits. + st, err = helpers.UpdateGenesisEth1Data(st, deposits, eth1Data) + if err != nil { + return nil, err + } + + st, err = processPreGenesisDeposits(ctx, st, deposits) + if err != nil { + return nil, errors.Wrap(err, "could not process validator deposits") + } + + return buildGenesisBeaconStateEpbs(genesisTime, st, st.Eth1Data()) +} + +func buildGenesisBeaconStateEpbs(genesisTime uint64, preState state.BeaconState, eth1Data *ethpb.Eth1Data) (state.BeaconState, error) { + if eth1Data == nil { + return nil, errors.New("no eth1data provided for genesis state") + } + + randaoMixes := make([][]byte, params.BeaconConfig().EpochsPerHistoricalVector) + for i := 0; i < len(randaoMixes); i++ { + h := make([]byte, 32) + copy(h, eth1Data.BlockHash) + randaoMixes[i] = h + } + + zeroHash := params.BeaconConfig().ZeroHash[:] + + activeIndexRoots := make([][]byte, params.BeaconConfig().EpochsPerHistoricalVector) + for i := 0; i < len(activeIndexRoots); i++ { + activeIndexRoots[i] = zeroHash + } + + blockRoots := make([][]byte, params.BeaconConfig().SlotsPerHistoricalRoot) + for i := 0; i < len(blockRoots); i++ { + blockRoots[i] = zeroHash + } + + stateRoots := make([][]byte, params.BeaconConfig().SlotsPerHistoricalRoot) + for i := 0; i < len(stateRoots); i++ { + stateRoots[i] = zeroHash + } + + slashings := make([]uint64, params.BeaconConfig().EpochsPerSlashingsVector) + + genesisValidatorsRoot, err := stateutil.ValidatorRegistryRoot(preState.Validators()) + if err != nil { + return nil, errors.Wrapf(err, "could not hash tree root genesis validators %v", err) + } + + prevEpochParticipation, err := preState.PreviousEpochParticipation() + if err != nil { + return nil, err + } + currEpochParticipation, err := preState.CurrentEpochParticipation() + if err != nil { + return nil, err + } + scores, err := preState.InactivityScores() + if err != nil { + return nil, err + } + tab, err := helpers.TotalActiveBalance(preState) + if err != nil { + return nil, err + } + st := ðpb.BeaconStateEPBS{ + // Misc fields. + Slot: 0, + GenesisTime: genesisTime, + GenesisValidatorsRoot: genesisValidatorsRoot[:], + + Fork: ðpb.Fork{ + PreviousVersion: params.BeaconConfig().GenesisForkVersion, + CurrentVersion: params.BeaconConfig().GenesisForkVersion, + Epoch: 0, + }, + + // Validator registry fields. + Validators: preState.Validators(), + Balances: preState.Balances(), + PreviousEpochParticipation: prevEpochParticipation, + CurrentEpochParticipation: currEpochParticipation, + InactivityScores: scores, + + // Randomness and committees. + RandaoMixes: randaoMixes, + + // Finality. + PreviousJustifiedCheckpoint: ðpb.Checkpoint{ + Epoch: 0, + Root: params.BeaconConfig().ZeroHash[:], + }, + CurrentJustifiedCheckpoint: ðpb.Checkpoint{ + Epoch: 0, + Root: params.BeaconConfig().ZeroHash[:], + }, + JustificationBits: []byte{0}, + FinalizedCheckpoint: ðpb.Checkpoint{ + Epoch: 0, + Root: params.BeaconConfig().ZeroHash[:], + }, + + HistoricalRoots: [][]byte{}, + BlockRoots: blockRoots, + StateRoots: stateRoots, + Slashings: slashings, + + // Eth1 data. + Eth1Data: eth1Data, + Eth1DataVotes: []*ethpb.Eth1Data{}, + Eth1DepositIndex: preState.Eth1DepositIndex(), + + // Electra Data + DepositRequestsStartIndex: params.BeaconConfig().UnsetDepositRequestsStartIndex, + ExitBalanceToConsume: helpers.ActivationExitChurnLimit(primitives.Gwei(tab)), + EarliestConsolidationEpoch: helpers.ActivationExitEpoch(slots.ToEpoch(preState.Slot())), + ConsolidationBalanceToConsume: helpers.ConsolidationChurnLimit(primitives.Gwei(tab)), + PendingDeposits: make([]*ethpb.PendingDeposit, 0), + PendingPartialWithdrawals: make([]*ethpb.PendingPartialWithdrawal, 0), + PendingConsolidations: make([]*ethpb.PendingConsolidation, 0), + } + + var scBits [fieldparams.SyncAggregateSyncCommitteeBytesLength]byte + kzgs := make([][]byte, 0) + kzgRoot, err := ssz.KzgCommitmentsRoot(kzgs) + if err != nil { + return nil, err + } + bodyRoot, err := (ðpb.BeaconBlockBodyEpbs{ + RandaoReveal: make([]byte, 96), + Eth1Data: ðpb.Eth1Data{ + DepositRoot: make([]byte, 32), + BlockHash: make([]byte, 32), + }, + Graffiti: make([]byte, 32), + SyncAggregate: ðpb.SyncAggregate{ + SyncCommitteeBits: scBits[:], + SyncCommitteeSignature: make([]byte, 96), + }, + SignedExecutionPayloadHeader: &enginev1.SignedExecutionPayloadHeader{ + Message: &enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: make([]byte, 32), + ParentBlockRoot: make([]byte, 32), + BlockHash: make([]byte, 32), + BlobKzgCommitmentsRoot: kzgRoot[:], + }, + Signature: make([]byte, 96), + }, + BlsToExecutionChanges: make([]*ethpb.SignedBLSToExecutionChange, 0), + PayloadAttestations: make([]*ethpb.PayloadAttestation, 0), + }).HashTreeRoot() + if err != nil { + return nil, errors.Wrap(err, "could not hash tree root empty block body") + } + + st.LatestBlockHeader = ðpb.BeaconBlockHeader{ + ParentRoot: zeroHash, + StateRoot: zeroHash, + BodyRoot: bodyRoot[:], + } + + var pubKeys [][]byte + vals := preState.Validators() + for i := uint64(0); i < params.BeaconConfig().SyncCommitteeSize; i++ { + j := i % uint64(len(vals)) + pubKeys = append(pubKeys, vals[j].PublicKey) + } + aggregated, err := bls.AggregatePublicKeys(pubKeys) + if err != nil { + return nil, err + } + st.CurrentSyncCommittee = ðpb.SyncCommittee{ + Pubkeys: pubKeys, + AggregatePubkey: aggregated.Marshal(), + } + st.NextSyncCommittee = ðpb.SyncCommittee{ + Pubkeys: pubKeys, + AggregatePubkey: aggregated.Marshal(), + } + + st.LatestExecutionPayloadHeader = &enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: make([]byte, 32), + ParentBlockRoot: make([]byte, 32), + BlockHash: make([]byte, 32), + BlobKzgCommitmentsRoot: kzgRoot[:], + } + + return state_native.InitializeFromProtoEpbs(st) +} + +// DeterministicGenesisStateEpbs returns a genesis state in ePBS format made using the deterministic deposits. +func DeterministicGenesisStateEpbs(t testing.TB, numValidators uint64) (state.BeaconState, []bls.SecretKey) { + deposits, privKeys, err := DeterministicDepositsAndKeys(numValidators) + if err != nil { + t.Fatal(errors.Wrapf(err, "failed to get %d deposits", numValidators)) + } + eth1Data, err := DeterministicEth1Data(len(deposits)) + if err != nil { + t.Fatal(errors.Wrapf(err, "failed to get eth1data for %d deposits", numValidators)) + } + beaconState, err := genesisBeaconStateEpbs(context.Background(), deposits, uint64(0), eth1Data) + if err != nil { + t.Fatal(errors.Wrapf(err, "failed to get genesis beacon state of %d validators", numValidators)) + } + if err := setKeysToActive(beaconState); err != nil { + t.Fatal(errors.Wrapf(err, "failed to set keys to active")) + } + resetCache() + return beaconState, privKeys +} + +// NewBeaconStateEpbs creates a beacon state with minimum marshalable fields. +func NewBeaconStateEpbs(options ...func(state *ethpb.BeaconStateEPBS) error) (state.BeaconState, error) { + pubkeys := make([][]byte, 512) + for i := range pubkeys { + pubkeys[i] = make([]byte, 48) + } + + seed := ðpb.BeaconStateEPBS{ + BlockRoots: filledByteSlice2D(uint64(params.BeaconConfig().SlotsPerHistoricalRoot), 32), + StateRoots: filledByteSlice2D(uint64(params.BeaconConfig().SlotsPerHistoricalRoot), 32), + Slashings: make([]uint64, params.BeaconConfig().EpochsPerSlashingsVector), + RandaoMixes: filledByteSlice2D(uint64(params.BeaconConfig().EpochsPerHistoricalVector), 32), + Validators: make([]*ethpb.Validator, 0), + CurrentJustifiedCheckpoint: ðpb.Checkpoint{Root: make([]byte, fieldparams.RootLength)}, + Eth1Data: ðpb.Eth1Data{ + DepositRoot: make([]byte, fieldparams.RootLength), + BlockHash: make([]byte, 32), + }, + Fork: ðpb.Fork{ + PreviousVersion: make([]byte, 4), + CurrentVersion: make([]byte, 4), + }, + Eth1DataVotes: make([]*ethpb.Eth1Data, 0), + HistoricalRoots: make([][]byte, 0), + JustificationBits: bitfield.Bitvector4{0x0}, + FinalizedCheckpoint: ðpb.Checkpoint{Root: make([]byte, fieldparams.RootLength)}, + LatestBlockHeader: HydrateBeaconHeader(ðpb.BeaconBlockHeader{}), + PreviousJustifiedCheckpoint: ðpb.Checkpoint{Root: make([]byte, fieldparams.RootLength)}, + PreviousEpochParticipation: make([]byte, 0), + CurrentEpochParticipation: make([]byte, 0), + CurrentSyncCommittee: ðpb.SyncCommittee{ + Pubkeys: pubkeys, + AggregatePubkey: make([]byte, 48), + }, + NextSyncCommittee: ðpb.SyncCommittee{ + Pubkeys: pubkeys, + AggregatePubkey: make([]byte, 48), + }, + LatestExecutionPayloadHeader: &enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: make([]byte, 32), + ParentBlockRoot: make([]byte, 32), + BlockHash: make([]byte, 32), + BlobKzgCommitmentsRoot: make([]byte, 32), + }, + } + + for _, opt := range options { + err := opt(seed) + if err != nil { + return nil, err + } + } + + var st, err = state_native.InitializeFromProtoUnsafeEpbs(seed) + if err != nil { + return nil, err + } + + return st.Copy(), nil +} diff --git a/testing/util/execution_payload_header.go b/testing/util/execution_payload_header.go new file mode 100644 index 000000000000..bb36d3db3371 --- /dev/null +++ b/testing/util/execution_payload_header.go @@ -0,0 +1,26 @@ +package util + +import enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + +// HydrateSignedExecutionPayloadHeader hydrates a SignedExecutionPayloadHeader. +func HydrateSignedExecutionPayloadHeader(h *enginev1.SignedExecutionPayloadHeader) *enginev1.SignedExecutionPayloadHeader { + if h.Message == nil { + h.Message = &enginev1.ExecutionPayloadHeaderEPBS{} + } + if h.Signature == nil { + h.Signature = make([]byte, 96) + } + if h.Message.ParentBlockRoot == nil { + h.Message.ParentBlockRoot = make([]byte, 32) + } + if h.Message.ParentBlockHash == nil { + h.Message.ParentBlockHash = make([]byte, 32) + } + if h.Message.BlockHash == nil { + h.Message.BlockHash = make([]byte, 32) + } + if h.Message.BlobKzgCommitmentsRoot == nil { + h.Message.BlobKzgCommitmentsRoot = make([]byte, 32) + } + return h +} diff --git a/testing/util/helpers.go b/testing/util/helpers.go index b207813a0861..375376bcfbc8 100644 --- a/testing/util/helpers.go +++ b/testing/util/helpers.go @@ -59,6 +59,8 @@ func BlockSignature( wsb, err = blocks.NewSignedBeaconBlock(ðpb.SignedBeaconBlockDeneb{Block: b}) case *ethpb.BeaconBlockElectra: wsb, err = blocks.NewSignedBeaconBlock(ðpb.SignedBeaconBlockElectra{Block: b}) + case *ethpb.BeaconBlockEpbs: + wsb, err = blocks.NewSignedBeaconBlock(ðpb.SignedBeaconBlockEpbs{Block: b}) default: return nil, fmt.Errorf("unsupported block type %T", b) } @@ -83,6 +85,8 @@ func BlockSignature( b.StateRoot = s[:] case *ethpb.BeaconBlockElectra: b.StateRoot = s[:] + case *ethpb.BeaconBlockEpbs: + b.StateRoot = s[:] } // Temporarily increasing the beacon state slot here since BeaconProposerIndex is a @@ -101,6 +105,8 @@ func BlockSignature( blockSlot = b.Slot case *ethpb.BeaconBlockElectra: blockSlot = b.Slot + case *ethpb.BeaconBlockEpbs: + blockSlot = b.Slot } // process slots to get the right fork @@ -128,6 +134,8 @@ func BlockSignature( blockRoot, err = signing.ComputeSigningRoot(b, domain) case *ethpb.BeaconBlockElectra: blockRoot, err = signing.ComputeSigningRoot(b, domain) + case *ethpb.BeaconBlockEpbs: + blockRoot, err = signing.ComputeSigningRoot(b, domain) } if err != nil { return nil, err diff --git a/testing/util/random/BUILD.bazel b/testing/util/random/BUILD.bazel new file mode 100644 index 000000000000..3f7f483af3ad --- /dev/null +++ b/testing/util/random/BUILD.bazel @@ -0,0 +1,16 @@ +load("@prysm//tools/go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["epbs.go"], + importpath = "github.com/prysmaticlabs/prysm/v5/testing/util/random", + visibility = ["//visibility:public"], + deps = [ + "//config/fieldparams:go_default_library", + "//config/params:go_default_library", + "//consensus-types/primitives:go_default_library", + "//proto/engine/v1:go_default_library", + "//proto/prysm/v1alpha1:go_default_library", + "@com_github_prysmaticlabs_go_bitfield//:go_default_library", + ], +) diff --git a/testing/util/random/epbs.go b/testing/util/random/epbs.go new file mode 100644 index 000000000000..9fce454ebbcd --- /dev/null +++ b/testing/util/random/epbs.go @@ -0,0 +1,494 @@ +package random + +import ( + "crypto/rand" + "encoding/binary" + "math/big" + "testing" + + "github.com/prysmaticlabs/go-bitfield" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" +) + +// SignedBeaconBlock creates a random SignedBeaconBlockEPBS for testing purposes. +func SignedBeaconBlock(t *testing.T) *ethpb.SignedBeaconBlockEpbs { + return ðpb.SignedBeaconBlockEpbs{ + Block: BeaconBlock(t), + Signature: randomBytes(96, t), + } +} + +// BeaconBlock creates a random BeaconBlockEPBS for testing purposes. +func BeaconBlock(t *testing.T) *ethpb.BeaconBlockEpbs { + return ðpb.BeaconBlockEpbs{ + Slot: primitives.Slot(randomUint64(t)), + ProposerIndex: primitives.ValidatorIndex(randomUint64(t)), + ParentRoot: randomBytes(32, t), + StateRoot: randomBytes(32, t), + Body: BeaconBlockBody(t), + } +} + +// BeaconBlockBody creates a random BeaconBlockBodyEPBS for testing purposes. +func BeaconBlockBody(t *testing.T) *ethpb.BeaconBlockBodyEpbs { + return ðpb.BeaconBlockBodyEpbs{ + RandaoReveal: randomBytes(96, t), + Eth1Data: ðpb.Eth1Data{ + DepositRoot: randomBytes(32, t), + DepositCount: randomUint64(t), + BlockHash: randomBytes(32, t), + }, + Graffiti: randomBytes(32, t), + ProposerSlashings: []*ethpb.ProposerSlashing{ + {Header_1: SignedBeaconBlockHeader(t), + Header_2: SignedBeaconBlockHeader(t)}, + }, + AttesterSlashings: []*ethpb.AttesterSlashingElectra{ + { + Attestation_1: IndexedAttestation(t), + Attestation_2: IndexedAttestation(t), + }, + }, + Attestations: []*ethpb.AttestationElectra{Attestation(t), Attestation(t), Attestation(t)}, + Deposits: []*ethpb.Deposit{Deposit(t), Deposit(t), Deposit(t)}, + VoluntaryExits: []*ethpb.SignedVoluntaryExit{SignedVoluntaryExit(t), SignedVoluntaryExit(t)}, + SyncAggregate: ðpb.SyncAggregate{ + SyncCommitteeBits: bitfield.NewBitvector512(), + SyncCommitteeSignature: randomBytes(96, t), + }, + BlsToExecutionChanges: []*ethpb.SignedBLSToExecutionChange{SignedBLSToExecutionChange(t), SignedBLSToExecutionChange(t)}, + SignedExecutionPayloadHeader: SignedExecutionPayloadHeader(t), + PayloadAttestations: []*ethpb.PayloadAttestation{ + PayloadAttestation(t), PayloadAttestation(t), PayloadAttestation(t), PayloadAttestation(t), + }, + } +} + +// SignedBeaconBlockHeader creates a random SignedBeaconBlockHeader for testing purposes. +func SignedBeaconBlockHeader(t *testing.T) *ethpb.SignedBeaconBlockHeader { + return ðpb.SignedBeaconBlockHeader{ + Header: ðpb.BeaconBlockHeader{ + Slot: primitives.Slot(randomUint64(t)), + ProposerIndex: primitives.ValidatorIndex(randomUint64(t)), + ParentRoot: randomBytes(32, t), + StateRoot: randomBytes(32, t), + BodyRoot: randomBytes(32, t), + }, + Signature: randomBytes(96, t), + } +} + +// IndexedAttestation creates a random IndexedAttestation for testing purposes. +func IndexedAttestation(t *testing.T) *ethpb.IndexedAttestationElectra { + return ðpb.IndexedAttestationElectra{ + AttestingIndices: []uint64{randomUint64(t), randomUint64(t), randomUint64(t)}, + Data: AttestationData(t), + Signature: randomBytes(96, t), + } +} + +// Attestation creates a random Attestation for testing purposes. +func Attestation(t *testing.T) *ethpb.AttestationElectra { + return ðpb.AttestationElectra{ + AggregationBits: bitfield.NewBitlist(123), + Data: AttestationData(t), + Signature: randomBytes(96, t), + CommitteeBits: primitives.NewAttestationCommitteeBits(), + } +} + +// AttestationData creates a random AttestationData for testing purposes. +func AttestationData(t *testing.T) *ethpb.AttestationData { + return ðpb.AttestationData{ + Slot: primitives.Slot(randomUint64(t)), + CommitteeIndex: primitives.CommitteeIndex(randomUint64(t)), + BeaconBlockRoot: randomBytes(32, t), + Source: ðpb.Checkpoint{ + Epoch: primitives.Epoch(randomUint64(t)), + Root: randomBytes(32, t), + }, + Target: ðpb.Checkpoint{ + Epoch: primitives.Epoch(randomUint64(t)), + Root: randomBytes(32, t), + }, + } +} + +// Deposit creates a random Deposit for testing purposes. +func Deposit(t *testing.T) *ethpb.Deposit { + proof := make([][]byte, 33) + for i := 0; i < 33; i++ { + proof[i] = randomBytes(32, t) + } + return ðpb.Deposit{ + Proof: proof, + Data: DepositData(t), + } +} + +// DepositData creates a random DepositData for testing purposes. +func DepositData(t *testing.T) *ethpb.Deposit_Data { + return ðpb.Deposit_Data{ + PublicKey: randomBytes(48, t), + WithdrawalCredentials: randomBytes(32, t), + Amount: randomUint64(t), + Signature: randomBytes(96, t), + } +} + +// SignedBLSToExecutionChange creates a random SignedBLSToExecutionChange for testing purposes. +func SignedBLSToExecutionChange(t *testing.T) *ethpb.SignedBLSToExecutionChange { + return ðpb.SignedBLSToExecutionChange{ + Message: BLSToExecutionChange(t), + Signature: randomBytes(96, t), + } +} + +// BLSToExecutionChange creates a random BLSToExecutionChange for testing purposes. +func BLSToExecutionChange(t *testing.T) *ethpb.BLSToExecutionChange { + return ðpb.BLSToExecutionChange{ + ValidatorIndex: primitives.ValidatorIndex(randomUint64(t)), + FromBlsPubkey: randomBytes(48, t), + ToExecutionAddress: randomBytes(20, t), + } +} + +// SignedVoluntaryExit creates a random SignedVoluntaryExit for testing purposes. +func SignedVoluntaryExit(t *testing.T) *ethpb.SignedVoluntaryExit { + return ðpb.SignedVoluntaryExit{ + Exit: VoluntaryExit(t), + Signature: randomBytes(96, t), + } +} + +// VoluntaryExit creates a random VoluntaryExit for testing purposes. +func VoluntaryExit(t *testing.T) *ethpb.VoluntaryExit { + return ðpb.VoluntaryExit{ + Epoch: primitives.Epoch(randomUint64(t)), + ValidatorIndex: primitives.ValidatorIndex(randomUint64(t)), + } +} + +// BeaconState creates a random BeaconStateEPBS for testing purposes. +func BeaconState(t *testing.T) *ethpb.BeaconStateEPBS { + slashing := make([]uint64, params.BeaconConfig().EpochsPerSlashingsVector) + pubkeys := make([][]byte, 512) + for i := range pubkeys { + pubkeys[i] = randomBytes(48, t) + } + return ðpb.BeaconStateEPBS{ + GenesisTime: randomUint64(t), + GenesisValidatorsRoot: randomBytes(32, t), + Slot: primitives.Slot(randomUint64(t)), + Fork: ðpb.Fork{ + PreviousVersion: randomBytes(4, t), + CurrentVersion: randomBytes(4, t), + Epoch: primitives.Epoch(randomUint64(t)), + }, + LatestBlockHeader: ðpb.BeaconBlockHeader{ + Slot: primitives.Slot(randomUint64(t)), + ProposerIndex: primitives.ValidatorIndex(randomUint64(t)), + ParentRoot: randomBytes(32, t), + StateRoot: randomBytes(32, t), + BodyRoot: randomBytes(32, t), + }, + BlockRoots: [][]byte{randomBytes(32, t), randomBytes(32, t), randomBytes(32, t)}, + StateRoots: [][]byte{randomBytes(32, t), randomBytes(32, t), randomBytes(32, t)}, + HistoricalRoots: [][]byte{randomBytes(32, t), randomBytes(32, t), randomBytes(32, t)}, + Eth1Data: ðpb.Eth1Data{ + DepositRoot: randomBytes(32, t), + DepositCount: randomUint64(t), + BlockHash: randomBytes(32, t), + }, + Eth1DataVotes: []*ethpb.Eth1Data{{DepositRoot: randomBytes(32, t), DepositCount: randomUint64(t), BlockHash: randomBytes(32, t)}}, + Eth1DepositIndex: randomUint64(t), + Validators: []*ethpb.Validator{ + { + PublicKey: randomBytes(48, t), + WithdrawalCredentials: randomBytes(32, t), + EffectiveBalance: randomUint64(t), + ActivationEligibilityEpoch: primitives.Epoch(randomUint64(t)), + ActivationEpoch: primitives.Epoch(randomUint64(t)), + ExitEpoch: primitives.Epoch(randomUint64(t)), + WithdrawableEpoch: primitives.Epoch(randomUint64(t)), + }, + }, + Balances: []uint64{randomUint64(t)}, + RandaoMixes: [][]byte{randomBytes(32, t), randomBytes(32, t), randomBytes(32, t)}, + Slashings: slashing, + PreviousEpochParticipation: randomBytes(32, t), + CurrentEpochParticipation: randomBytes(32, t), + JustificationBits: randomBytes(1, t), + PreviousJustifiedCheckpoint: ðpb.Checkpoint{Epoch: primitives.Epoch(randomUint64(t)), Root: randomBytes(32, t)}, + CurrentJustifiedCheckpoint: ðpb.Checkpoint{Epoch: primitives.Epoch(randomUint64(t)), Root: randomBytes(32, t)}, + FinalizedCheckpoint: ðpb.Checkpoint{Epoch: primitives.Epoch(randomUint64(t)), Root: randomBytes(32, t)}, + InactivityScores: []uint64{randomUint64(t)}, + CurrentSyncCommittee: ðpb.SyncCommittee{ + Pubkeys: pubkeys, + AggregatePubkey: randomBytes(48, t), + }, + NextSyncCommittee: ðpb.SyncCommittee{ + Pubkeys: pubkeys, + AggregatePubkey: randomBytes(48, t), + }, + NextWithdrawalIndex: randomUint64(t), + NextWithdrawalValidatorIndex: primitives.ValidatorIndex(randomUint64(t)), + HistoricalSummaries: []*ethpb.HistoricalSummary{{ + BlockSummaryRoot: randomBytes(32, t), + StateSummaryRoot: randomBytes(32, t), + }}, + DepositRequestsStartIndex: randomUint64(t), + DepositBalanceToConsume: primitives.Gwei(randomUint64(t)), + ExitBalanceToConsume: primitives.Gwei(randomUint64(t)), + EarliestExitEpoch: primitives.Epoch(randomUint64(t)), + ConsolidationBalanceToConsume: primitives.Gwei(randomUint64(t)), + EarliestConsolidationEpoch: primitives.Epoch(randomUint64(t)), + PendingDeposits: []*ethpb.PendingDeposit{ + { + PublicKey: randomBytes(48, t), + WithdrawalCredentials: randomBytes(32, t), + Amount: randomUint64(t), + Signature: randomBytes(96, t), + Slot: primitives.Slot(randomUint64(t)), + }, + }, + PendingPartialWithdrawals: []*ethpb.PendingPartialWithdrawal{ + { + Index: primitives.ValidatorIndex(randomUint64(t)), + Amount: randomUint64(t), + WithdrawableEpoch: primitives.Epoch(randomUint64(t)), + }, + }, + PendingConsolidations: []*ethpb.PendingConsolidation{ + { + SourceIndex: primitives.ValidatorIndex(randomUint64(t)), + TargetIndex: primitives.ValidatorIndex(randomUint64(t)), + }, + }, + LatestBlockHash: randomBytes(32, t), + LatestFullSlot: primitives.Slot(randomUint64(t)), + LatestExecutionPayloadHeader: &enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: randomBytes(32, t), + ParentBlockRoot: randomBytes(32, t), + BlockHash: randomBytes(32, t), + BuilderIndex: primitives.ValidatorIndex(randomUint64(t)), + Slot: primitives.Slot(randomUint64(t)), + Value: randomUint64(t), + BlobKzgCommitmentsRoot: randomBytes(32, t), + GasLimit: randomUint64(t), + }, + LastWithdrawalsRoot: randomBytes(32, t), + } +} + +// SignedExecutionPayloadHeader creates a random SignedExecutionPayloadHeader for testing purposes. +func SignedExecutionPayloadHeader(t *testing.T) *enginev1.SignedExecutionPayloadHeader { + return &enginev1.SignedExecutionPayloadHeader{ + Message: ExecutionPayloadHeader(t), + Signature: randomBytes(96, t), + } +} + +// ExecutionPayloadHeader creates a random ExecutionPayloadHeaderEPBS for testing. +func ExecutionPayloadHeader(t *testing.T) *enginev1.ExecutionPayloadHeaderEPBS { + return &enginev1.ExecutionPayloadHeaderEPBS{ + ParentBlockHash: randomBytes(32, t), + ParentBlockRoot: randomBytes(32, t), + BlockHash: randomBytes(32, t), + BuilderIndex: primitives.ValidatorIndex(randomUint64(t)), + Slot: primitives.Slot(randomUint64(t)), + Value: randomUint64(t), + BlobKzgCommitmentsRoot: randomBytes(32, t), + GasLimit: randomUint64(t), + } +} + +// PayloadAttestation creates a random PayloadAttestation for testing purposes. +func PayloadAttestation(t *testing.T) *ethpb.PayloadAttestation { + bv := bitfield.NewBitvector512() + b := randomBytes(64, t) + copy(bv[:], b) + return ðpb.PayloadAttestation{ + AggregationBits: bv, + Data: PayloadAttestationData(t), + Signature: randomBytes(96, t), + } +} + +// PayloadAttestationData generates a random PayloadAttestationData for testing purposes. +func PayloadAttestationData(t *testing.T) *ethpb.PayloadAttestationData { + // Generate a random BeaconBlockRoot + randomBytes := make([]byte, fieldparams.RootLength) + _, err := rand.Read(randomBytes) + if err != nil { + t.Fatalf("Failed to generate random BeaconBlockRoot: %v", err) + } + + // Generate a random Slot value + randomSlot, err := rand.Int(rand.Reader, big.NewInt(10000)) + if err != nil { + t.Fatalf("Failed to generate random Slot: %v", err) + } + + payloadStatuses := []primitives.PTCStatus{ + primitives.PAYLOAD_ABSENT, + primitives.PAYLOAD_PRESENT, + primitives.PAYLOAD_WITHHELD, + } + // Select a random PayloadStatus + index, err := rand.Int(rand.Reader, big.NewInt(int64(len(payloadStatuses)))) + if err != nil { + t.Fatalf("Failed to select random PayloadStatus: %v", err) + } + randomPayloadStatus := payloadStatuses[index.Int64()] + + return ðpb.PayloadAttestationData{ + BeaconBlockRoot: randomBytes, + Slot: primitives.Slot(randomSlot.Uint64()), + PayloadStatus: randomPayloadStatus, + } +} + +// PayloadAttestationMessage creates a random PayloadAttestationMessage for testing purposes. +func PayloadAttestationMessage(t *testing.T) *ethpb.PayloadAttestationMessage { + return ðpb.PayloadAttestationMessage{ + ValidatorIndex: primitives.ValidatorIndex(randomUint64(t)), + Data: PayloadAttestationData(t), + Signature: randomBytes(96, t), + } +} + +// SignedExecutionPayloadEnvelope creates a random SignedExecutionPayloadEnvelope for testing purposes. +func SignedExecutionPayloadEnvelope(t *testing.T) *enginev1.SignedExecutionPayloadEnvelope { + return &enginev1.SignedExecutionPayloadEnvelope{ + Message: ExecutionPayloadEnvelope(t), + Signature: randomBytes(96, t), + } +} + +// ExecutionPayloadEnvelope creates a random ExecutionPayloadEnvelope for testing purposes. +func ExecutionPayloadEnvelope(t *testing.T) *enginev1.ExecutionPayloadEnvelope { + withheld := randomUint64(t)%2 == 0 + return &enginev1.ExecutionPayloadEnvelope{ + Payload: ExecutionPayload(t), + ExecutionRequests: ExecutionRequests(t), BuilderIndex: primitives.ValidatorIndex(randomUint64(t)), + BeaconBlockRoot: randomBytes(32, t), + BlobKzgCommitments: [][]byte{randomBytes(48, t), randomBytes(48, t), randomBytes(48, t)}, + PayloadWithheld: withheld, + StateRoot: randomBytes(32, t), + } +} + +// ExecutionRequests creates a random Execution request object for testing purposes +func ExecutionRequests(t *testing.T) *enginev1.ExecutionRequests { + return &enginev1.ExecutionRequests{ + Deposits: []*enginev1.DepositRequest{DepositRequest(t), DepositRequest(t), DepositRequest(t), DepositRequest(t)}, + Withdrawals: WithdrawalRequests(t), + Consolidations: []*enginev1.ConsolidationRequest{ConsolidationRequest(t)}, + } +} + +// ExecutionPayload creates a random ExecutionPayloadEPBS for testing purposes. +func ExecutionPayload(t *testing.T) *enginev1.ExecutionPayloadElectra { + return &enginev1.ExecutionPayloadElectra{ + ParentHash: randomBytes(32, t), + FeeRecipient: randomBytes(20, t), + StateRoot: randomBytes(32, t), + ReceiptsRoot: randomBytes(32, t), + LogsBloom: randomBytes(256, t), + PrevRandao: randomBytes(32, t), + BlockNumber: randomUint64(t), + GasLimit: randomUint64(t), + GasUsed: randomUint64(t), + Timestamp: randomUint64(t), + ExtraData: randomBytes(32, t), + BaseFeePerGas: randomBytes(32, t), + BlockHash: randomBytes(32, t), + Transactions: [][]byte{randomBytes(32, t), randomBytes(32, t), randomBytes(32, t)}, + Withdrawals: []*enginev1.Withdrawal{ + { + Index: randomUint64(t), + ValidatorIndex: primitives.ValidatorIndex(randomUint64(t)), + Address: randomBytes(20, t), + Amount: randomUint64(t), + }, + }, + BlobGasUsed: randomUint64(t), + ExcessBlobGas: randomUint64(t), + } +} + +func DepositRequest(t *testing.T) *enginev1.DepositRequest { + return &enginev1.DepositRequest{ + Pubkey: randomBytes(48, t), + WithdrawalCredentials: randomBytes(32, t), + Amount: randomUint64(t), + Signature: randomBytes(96, t), + Index: randomUint64(t), + } +} + +func WithdrawalRequests(t *testing.T) []*enginev1.WithdrawalRequest { + requests := make([]*enginev1.WithdrawalRequest, fieldparams.MaxWithdrawalRequestsPerPayload) + for i := range requests { + requests[i] = WithdrawalRequest(t) + } + return requests +} + +func WithdrawalRequest(t *testing.T) *enginev1.WithdrawalRequest { + return &enginev1.WithdrawalRequest{ + SourceAddress: randomBytes(20, t), + ValidatorPubkey: randomBytes(48, t), + Amount: randomUint64(t), + } +} + +func ConsolidationRequest(t *testing.T) *enginev1.ConsolidationRequest { + return &enginev1.ConsolidationRequest{ + SourceAddress: randomBytes(20, t), + SourcePubkey: randomBytes(48, t), + TargetPubkey: randomBytes(48, t), + } +} + +// SignedBlindPayloadEnvelope creates a random SignedBlindPayloadEnvelope for testing purposes. +func SignedBlindPayloadEnvelope(t *testing.T) *ethpb.SignedBlindPayloadEnvelope { + return ðpb.SignedBlindPayloadEnvelope{ + Message: BlindPayloadEnvelope(t), + Signature: randomBytes(96, t), + } +} + +// BlindPayloadEnvelope creates a random BlindPayloadEnvelope for testing purposes. +func BlindPayloadEnvelope(t *testing.T) *ethpb.BlindPayloadEnvelope { + withheld := randomUint64(t)%2 == 0 + return ðpb.BlindPayloadEnvelope{ + PayloadRoot: randomBytes(32, t), + BuilderIndex: primitives.ValidatorIndex(randomUint64(t)), + BeaconBlockRoot: randomBytes(32, t), + BlobKzgCommitments: [][]byte{randomBytes(48, t), randomBytes(48, t), randomBytes(48, t)}, + PayloadWithheld: withheld, + StateRoot: randomBytes(32, t), + } +} + +func randomBytes(n int, t *testing.T) []byte { + b := make([]byte, n) + _, err := rand.Read(b) + if err != nil { + t.Fatalf("Failed to generate random bytes: %v", err) + } + return b +} + +func randomUint64(t *testing.T) uint64 { + var num uint64 + b := randomBytes(8, t) + num = binary.BigEndian.Uint64(b) + return num +} diff --git a/testing/validator-mock/validator_client_mock.go b/testing/validator-mock/validator_client_mock.go index afbe08b5e2a3..c057dbef174c 100644 --- a/testing/validator-mock/validator_client_mock.go +++ b/testing/validator-mock/validator_client_mock.go @@ -178,6 +178,21 @@ func (mr *MockValidatorClientMockRecorder) FeeRecipientByPubKey(arg0, arg1 any) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FeeRecipientByPubKey", reflect.TypeOf((*MockValidatorClient)(nil).FeeRecipientByPubKey), arg0, arg1) } +// GetPayloadAttestationData mocks base method. +func (m *MockValidatorClient) GetPayloadAttestationData(arg0 context.Context, arg1 *eth.GetPayloadAttestationDataRequest) (*eth.PayloadAttestationData, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPayloadAttestationData", arg0, arg1) + ret0, _ := ret[0].(*eth.PayloadAttestationData) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetPayloadAttestationData indicates an expected call of GetPayloadAttestationData. +func (mr *MockValidatorClientMockRecorder) GetPayloadAttestationData(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPayloadAttestationData", reflect.TypeOf((*MockValidatorClient)(nil).GetPayloadAttestationData), arg0, arg1) +} + // Host mocks base method. func (m *MockValidatorClient) Host() string { m.ctrl.T.Helper() @@ -336,6 +351,21 @@ func (mr *MockValidatorClientMockRecorder) SubmitAggregateSelectionProofElectra( return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitAggregateSelectionProofElectra", reflect.TypeOf((*MockValidatorClient)(nil).SubmitAggregateSelectionProofElectra), arg0, arg1, arg2, arg3) } +// SubmitPayloadAttestation mocks base method. +func (m *MockValidatorClient) SubmitPayloadAttestation(arg0 context.Context, arg1 *eth.PayloadAttestationMessage) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubmitPayloadAttestation", arg0, arg1) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubmitPayloadAttestation indicates an expected call of SubmitPayloadAttestation. +func (mr *MockValidatorClientMockRecorder) SubmitPayloadAttestation(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitPayloadAttestation", reflect.TypeOf((*MockValidatorClient)(nil).SubmitPayloadAttestation), arg0, arg1) +} + // SubmitSignedAggregateSelectionProof mocks base method. func (m *MockValidatorClient) SubmitSignedAggregateSelectionProof(arg0 context.Context, arg1 *eth.SignedAggregateSubmitRequest) (*eth.SignedAggregateSubmitResponse, error) { m.ctrl.T.Helper() diff --git a/time/slots/slottime.go b/time/slots/slottime.go index 273b0f5f95fc..be7ca6d3b5e7 100644 --- a/time/slots/slottime.go +++ b/time/slots/slottime.go @@ -279,7 +279,12 @@ func TimeIntoSlot(genesisTime uint64) time.Duration { // WithinVotingWindow returns whether the current time is within the voting window // (eg. 4 seconds on mainnet) of the current slot. func WithinVotingWindow(genesisTime uint64, slot primitives.Slot) bool { - votingWindow := params.BeaconConfig().SecondsPerSlot / params.BeaconConfig().IntervalsPerSlot + var votingWindow uint64 + if ToEpoch(slot) >= params.BeaconConfig().EPBSForkEpoch { + votingWindow = params.BeaconConfig().SecondsPerSlot / params.BeaconConfig().IntervalsPerSlotEPBS + } else { + votingWindow = params.BeaconConfig().SecondsPerSlot / params.BeaconConfig().IntervalsPerSlot + } return time.Since(StartTime(genesisTime, slot)) < time.Duration(votingWindow)*time.Second } diff --git a/validator/accounts/testing/mock.go b/validator/accounts/testing/mock.go index a95d5b77e6c7..a02c24429fea 100644 --- a/validator/accounts/testing/mock.go +++ b/validator/accounts/testing/mock.go @@ -170,6 +170,10 @@ func (_ *Validator) SubmitSignedContributionAndProof(_ context.Context, _ primit panic("implement me") } +func (_ *Validator) SubmitPayloadAttestationMessage(_ context.Context, _ primitives.Slot, _ [48]byte) { + panic("implement me") +} + func (_ *Validator) LogSubmittedAtts(_ primitives.Slot) { panic("implement me") } diff --git a/validator/client/BUILD.bazel b/validator/client/BUILD.bazel index e873a131b3fe..733ec4105255 100644 --- a/validator/client/BUILD.bazel +++ b/validator/client/BUILD.bazel @@ -5,11 +5,15 @@ go_library( srcs = [ "aggregate.go", "attest.go", + "execution_payload.go", + "execution_payload_header.go", "key_reload.go", "log.go", "metrics.go", "multiple_endpoints_grpc_resolver.go", + "payload_attestation.go", "propose.go", + "propose_epbs.go", "registration.go", "runner.go", "service.go", @@ -50,6 +54,7 @@ go_library( "//monitoring/tracing:go_default_library", "//monitoring/tracing/trace:go_default_library", "//network/httputil:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/validator-client:go_default_library", "//runtime/version:go_default_library", @@ -103,8 +108,11 @@ go_test( srcs = [ "aggregate_test.go", "attest_test.go", + "execution_payload_header_test.go", + "execution_payload_test.go", "key_reload_test.go", "metrics_test.go", + "payload_attestation_test.go", "propose_test.go", "registration_test.go", "runner_test.go", @@ -145,6 +153,7 @@ go_test( "//testing/assert:go_default_library", "//testing/require:go_default_library", "//testing/util:go_default_library", + "//testing/util/random:go_default_library", "//testing/validator-mock:go_default_library", "//time:go_default_library", "//time/slots:go_default_library", diff --git a/validator/client/aggregate.go b/validator/client/aggregate.go index 43e54475a39c..5f06a88a59ac 100644 --- a/validator/client/aggregate.go +++ b/validator/client/aggregate.go @@ -78,7 +78,7 @@ func (v *validator) SubmitAggregateAndProof(ctx context.Context, slot primitives // As specified in spec, an aggregator should wait until two thirds of the way through slot // to broadcast the best aggregate to the global aggregate channel. // https://github.com/ethereum/consensus-specs/blob/v0.9.3/specs/validator/0_beacon-chain-validator.md#broadcast-aggregate - v.waitToSlotTwoThirds(ctx, slot) + v.waitAggregatorDuty(ctx, slot) postElectra := slots.ToEpoch(slot) >= params.BeaconConfig().ElectraForkEpoch @@ -199,16 +199,18 @@ func (v *validator) signSlotWithSelectionProof(ctx context.Context, pubKey [fiel return sig.Marshal(), nil } -// waitToSlotTwoThirds waits until two third through the current slot period -// such that any attestations from this slot have time to reach the beacon node -// before creating the aggregated attestation. -func (v *validator) waitToSlotTwoThirds(ctx context.Context, slot primitives.Slot) { - ctx, span := trace.StartSpan(ctx, "validator.waitToSlotTwoThirds") +// waitAggregatorDuty waits for aggregator duty given the slot intervals. +func (v *validator) waitAggregatorDuty(ctx context.Context, slot primitives.Slot) { + ctx, span := trace.StartSpan(ctx, "validator.waitAggregatorDuty") defer span.End() - oneThird := slots.DivideSlotBy(3 /* one third of slot duration */) - twoThird := oneThird + oneThird - delay := twoThird + var delay time.Duration + if slots.ToEpoch(slot) >= params.BeaconConfig().EPBSForkEpoch { + delay = slots.DivideSlotBy(int64(params.BeaconConfig().IntervalsPerSlotEPBS)) + } else { + delay = slots.DivideSlotBy(int64(params.BeaconConfig().IntervalsPerSlot)) + } + delay *= 2 startTime := slots.StartTime(v.genesisTime, slot) finalTime := startTime.Add(delay) diff --git a/validator/client/aggregate_test.go b/validator/client/aggregate_test.go index be61693530ba..45d29250a24b 100644 --- a/validator/client/aggregate_test.go +++ b/validator/client/aggregate_test.go @@ -261,13 +261,33 @@ func TestWaitForSlotTwoThird_WaitCorrectly(t *testing.T) { timeToSleep := oneThird + oneThird twoThirdTime := currentTime.Add(timeToSleep) - validator.waitToSlotTwoThirds(context.Background(), numOfSlots) + validator.waitAggregatorDuty(context.Background(), numOfSlots) currentTime = time.Now() assert.Equal(t, twoThirdTime.Unix(), currentTime.Unix()) }) } } +func TestServer_WaitAggregatorDutyEpbs_CanWait(t *testing.T) { + params.SetupTestConfigCleanup(t) + cfg := params.BeaconConfig() + cfg.EPBSForkEpoch = 0 + params.OverrideBeaconConfig(cfg) + + validator, _, _, finish := setup(t, true) + defer finish() + currentTime := time.Now() + numOfSlots := primitives.Slot(4) + validator.genesisTime = uint64(currentTime.Unix()) - uint64(numOfSlots.Mul(params.BeaconConfig().SecondsPerSlot)) + delay := slots.DivideSlotBy(int64(params.BeaconConfig().IntervalsPerSlotEPBS)) + timeToSleep := delay + delay + + twoThirdTime := currentTime.Add(timeToSleep) + validator.waitAggregatorDuty(context.Background(), numOfSlots) + currentTime = time.Now() + assert.Equal(t, twoThirdTime.Unix(), currentTime.Unix()) +} + func TestWaitForSlotTwoThird_DoneContext_ReturnsImmediately(t *testing.T) { for _, isSlashingProtectionMinimal := range [...]bool{false, true} { t.Run(fmt.Sprintf("SlashingProtectionMinimal:%v", isSlashingProtectionMinimal), func(t *testing.T) { @@ -280,7 +300,7 @@ func TestWaitForSlotTwoThird_DoneContext_ReturnsImmediately(t *testing.T) { expectedTime := time.Now() ctx, cancel := context.WithCancel(context.Background()) cancel() - validator.waitToSlotTwoThirds(ctx, numOfSlots) + validator.waitAggregatorDuty(ctx, numOfSlots) currentTime = time.Now() assert.Equal(t, expectedTime.Unix(), currentTime.Unix()) }) diff --git a/validator/client/attest.go b/validator/client/attest.go index 0c2f92a83cc6..f89d7829cf66 100644 --- a/validator/client/attest.go +++ b/validator/client/attest.go @@ -37,7 +37,7 @@ func (v *validator) SubmitAttestation(ctx context.Context, slot primitives.Slot, defer span.End() span.SetAttributes(trace.StringAttribute("validator", fmt.Sprintf("%#x", pubKey))) - v.waitOneThirdOrValidBlock(ctx, slot) + v.waitAttesterDuty(ctx, slot) var b strings.Builder if err := b.WriteByte(byte(iface.RoleAttester)); err != nil { @@ -282,12 +282,9 @@ func (v *validator) setHighestSlot(slot primitives.Slot) { } } -// waitOneThirdOrValidBlock waits until (a) or (b) whichever comes first: -// -// (a) the validator has received a valid block that is the same slot as input slot -// (b) one-third of the slot has transpired (SECONDS_PER_SLOT / 3 seconds after the start of slot) -func (v *validator) waitOneThirdOrValidBlock(ctx context.Context, slot primitives.Slot) { - ctx, span := trace.StartSpan(ctx, "validator.waitOneThirdOrValidBlock") +// waitAttesterDuty waits for attestor duty given the slot intervals and if current slot block has arrived. +func (v *validator) waitAttesterDuty(ctx context.Context, slot primitives.Slot) { + ctx, span := trace.StartSpan(ctx, "validator.waitAttesterDuty") defer span.End() // Don't need to wait if requested slot is the same as highest valid slot. @@ -295,7 +292,13 @@ func (v *validator) waitOneThirdOrValidBlock(ctx context.Context, slot primitive return } - delay := slots.DivideSlotBy(3 /* a third of the slot duration */) + var delay time.Duration + if slots.ToEpoch(slot) >= params.BeaconConfig().EPBSForkEpoch { + delay = slots.DivideSlotBy(int64(params.BeaconConfig().IntervalsPerSlotEPBS)) + } else { + delay = slots.DivideSlotBy(int64(params.BeaconConfig().IntervalsPerSlot)) + } + startTime := slots.StartTime(v.genesisTime, slot) finalTime := startTime.Add(delay) wait := prysmTime.Until(finalTime) diff --git a/validator/client/attest_test.go b/validator/client/attest_test.go index 68a5b2cce7ec..324cbd3b0100 100644 --- a/validator/client/attest_test.go +++ b/validator/client/attest_test.go @@ -614,13 +614,37 @@ func TestServer_WaitToSlotOneThird_CanWait(t *testing.T) { timeToSleep := params.BeaconConfig().SecondsPerSlot / 3 oneThird := currentTime + timeToSleep - v.waitOneThirdOrValidBlock(context.Background(), currentSlot) + v.waitAttesterDuty(context.Background(), currentSlot) if oneThird != uint64(time.Now().Unix()) { t.Errorf("Wanted %d time for slot one third but got %d", oneThird, currentTime) } } +func TestServer_WaitAttesterDutyEpbs_CanWait(t *testing.T) { + params.SetupTestConfigCleanup(t) + cfg := params.BeaconConfig() + cfg.EPBSForkEpoch = 0 + params.OverrideBeaconConfig(cfg) + + currentTime := uint64(time.Now().Unix()) + currentSlot := primitives.Slot(4) + genesisTime := currentTime - uint64(currentSlot.Mul(params.BeaconConfig().SecondsPerSlot)) + + v := &validator{ + genesisTime: genesisTime, + slotFeed: new(event.Feed), + } + + timeToSleep := params.BeaconConfig().SecondsPerSlot / params.BeaconConfig().IntervalsPerSlotEPBS + dutyTime := currentTime + timeToSleep + v.waitAttesterDuty(context.Background(), currentSlot) + + if dutyTime != uint64(time.Now().Unix()) { + t.Errorf("Wanted %d time for slot one third but got %d", dutyTime, currentTime) + } +} + func TestServer_WaitToSlotOneThird_SameReqSlot(t *testing.T) { currentTime := uint64(time.Now().Unix()) currentSlot := primitives.Slot(4) @@ -632,7 +656,7 @@ func TestServer_WaitToSlotOneThird_SameReqSlot(t *testing.T) { highestValidSlot: currentSlot, } - v.waitOneThirdOrValidBlock(context.Background(), currentSlot) + v.waitAttesterDuty(context.Background(), currentSlot) if currentTime != uint64(time.Now().Unix()) { t.Errorf("Wanted %d time for slot one third but got %d", uint64(time.Now().Unix()), currentTime) @@ -660,7 +684,7 @@ func TestServer_WaitToSlotOneThird_ReceiveBlockSlot(t *testing.T) { wg.Done() }() - v.waitOneThirdOrValidBlock(context.Background(), currentSlot) + v.waitAttesterDuty(context.Background(), currentSlot) if currentTime != uint64(time.Now().Unix()) { t.Errorf("Wanted %d time for slot one third but got %d", uint64(time.Now().Unix()), currentTime) diff --git a/validator/client/beacon-api/beacon_api_validator_client.go b/validator/client/beacon-api/beacon_api_validator_client.go index 3a202083cdfb..74803387c9f9 100644 --- a/validator/client/beacon-api/beacon_api_validator_client.go +++ b/validator/client/beacon-api/beacon_api_validator_client.go @@ -12,6 +12,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" "github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/v5/validator/client/iface" ) @@ -167,6 +168,22 @@ func (c *beaconApiValidatorClient) ProposeBeaconBlock(ctx context.Context, in *e }) } +func (c *beaconApiValidatorClient) GetLocalHeader(ctx context.Context, req *ethpb.HeaderRequest) (*enginev1.ExecutionPayloadHeaderEPBS, error) { + return nil, errors.New("not implemented") +} + +func (c *beaconApiValidatorClient) GetExecutionPayloadEnvelope(ctx context.Context, in *ethpb.PayloadEnvelopeRequest) (*enginev1.ExecutionPayloadEnvelope, error) { + return nil, errors.New("not implemented") +} + +func (c *beaconApiValidatorClient) SubmitSignedExecutionPayloadHeader(ctx context.Context, h *enginev1.SignedExecutionPayloadHeader) (*empty.Empty, error) { + return nil, errors.New("not implemented") +} + +func (c *beaconApiValidatorClient) SubmitSignedExecutionPayloadEnvelope(ctx context.Context, env *enginev1.SignedExecutionPayloadEnvelope) (*empty.Empty, error) { + return nil, errors.New("not implemented") +} + func (c *beaconApiValidatorClient) ProposeExit(ctx context.Context, in *ethpb.SignedVoluntaryExit) (*ethpb.ProposeExitResponse, error) { ctx, span := trace.StartSpan(ctx, "beacon-api.ProposeExit") defer span.End() @@ -300,6 +317,14 @@ func (c *beaconApiValidatorClient) AggregatedSyncSelections(ctx context.Context, }) } +func (c *beaconApiValidatorClient) GetPayloadAttestationData(ctx context.Context, in *ethpb.GetPayloadAttestationDataRequest) (*ethpb.PayloadAttestationData, error) { + return nil, errors.New("not implemented") +} + +func (c *beaconApiValidatorClient) SubmitPayloadAttestation(ctx context.Context, in *ethpb.PayloadAttestationMessage) (*empty.Empty, error) { + return nil, errors.New("not implemented") +} + func wrapInMetrics[Resp any](action string, f func() (Resp, error)) (Resp, error) { now := time.Now() resp, err := f() diff --git a/validator/client/execution_payload.go b/validator/client/execution_payload.go new file mode 100644 index 000000000000..4d128520acbb --- /dev/null +++ b/validator/client/execution_payload.go @@ -0,0 +1,53 @@ +package client + +import ( + "context" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/config/params" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + validatorpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1/validator-client" + "github.com/prysmaticlabs/prysm/v5/time/slots" +) + +func (v *validator) signExecutionPayloadEnvelope(ctx context.Context, p *enginev1.ExecutionPayloadEnvelope, pubKey [fieldparams.BLSPubkeyLength]byte) ([]byte, error) { + // Get domain data + currentSlot := slots.CurrentSlot(v.genesisTime) + epoch := slots.ToEpoch(currentSlot) + domain, err := v.domainData(ctx, epoch, params.BeaconConfig().DomainBeaconBuilder[:]) + if err != nil { + return nil, errors.Wrap(err, domainDataErr) + } + if domain == nil { + return nil, errors.New(domainDataErr) + } + + // Compute signing root + signingRoot, err := signing.ComputeSigningRoot(p, domain.SignatureDomain) + if err != nil { + return nil, errors.Wrap(err, signingRootErr) + } + + // Create signature request + signReq := &validatorpb.SignRequest{ + PublicKey: pubKey[:], + SigningRoot: signingRoot[:], + SignatureDomain: domain.SignatureDomain, + Object: &validatorpb.SignRequest_ExecutionPayloadEnvelope{ExecutionPayloadEnvelope: p}, + SigningSlot: currentSlot, + } + + // Sign the execution payload envelope. + m, err := v.Keymanager() + if err != nil { + return nil, errors.Wrap(err, "could not get key manager") + } + sig, err := m.Sign(ctx, signReq) + if err != nil { + return nil, errors.Wrap(err, "could not sign payload attestation") + } + + return sig.Marshal(), nil +} diff --git a/validator/client/execution_payload_header.go b/validator/client/execution_payload_header.go new file mode 100644 index 000000000000..b783107fdfee --- /dev/null +++ b/validator/client/execution_payload_header.go @@ -0,0 +1,53 @@ +package client + +import ( + "context" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/config/params" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + validatorpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1/validator-client" + "github.com/prysmaticlabs/prysm/v5/time/slots" +) + +func (v *validator) signExecutionPayloadHeader(ctx context.Context, p *enginev1.ExecutionPayloadHeaderEPBS, pubKey [fieldparams.BLSPubkeyLength]byte) ([]byte, error) { + // Get domain data + epoch := slots.ToEpoch(p.Slot) + domain, err := v.domainData(ctx, epoch, params.BeaconConfig().DomainBeaconBuilder[:]) + if err != nil { + return nil, errors.Wrap(err, domainDataErr) + } + if domain == nil { + return nil, errors.New(domainDataErr) + } + + // Compute signing root + signingRoot, err := signing.ComputeSigningRoot(p, domain.SignatureDomain) + if err != nil { + return nil, errors.Wrap(err, signingRootErr) + } + + // Create signature request + signReq := &validatorpb.SignRequest{ + PublicKey: pubKey[:], + SigningRoot: signingRoot[:], + SignatureDomain: domain.SignatureDomain, + Object: &validatorpb.SignRequest_ExecutionPayloadHeaderEpbs{ExecutionPayloadHeaderEpbs: p}, + SigningSlot: p.Slot, + } + + // Sign the payload attestation data + m, err := v.Keymanager() + if err != nil { + return nil, errors.Wrap(err, "could not get key manager") + } + sig, err := m.Sign(ctx, signReq) + if err != nil { + return nil, errors.Wrap(err, "could not sign payload attestation") + } + + // Marshal the signature into bytes + return sig.Marshal(), nil +} diff --git a/validator/client/execution_payload_header_test.go b/validator/client/execution_payload_header_test.go new file mode 100644 index 000000000000..c5403b5d71fa --- /dev/null +++ b/validator/client/execution_payload_header_test.go @@ -0,0 +1,51 @@ +package client + +import ( + "context" + "testing" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" + "go.uber.org/mock/gomock" +) + +func Test_validator_signExecutionPayloadHeader(t *testing.T) { + v, m, vk, finish := setup(t, false) + defer finish() + + // Define constants and mock expectations + e := primitives.Epoch(1000) + m.validatorClient.EXPECT(). + DomainData(gomock.Any(), // ctx + ðpb.DomainRequest{ + Epoch: e, + Domain: params.BeaconConfig().DomainBeaconBuilder[:], + }). // epoch + Return(ðpb.DomainResponse{ + SignatureDomain: bytesutil.PadTo([]byte("signatureDomain"), 32), + }, nil) + + // Generate random payload attestation data + h := random.ExecutionPayloadHeader(t) + h.Slot = primitives.Slot(e) * params.BeaconConfig().SlotsPerEpoch // Verify that go mock EXPECT() gets the correct epoch. + + // Perform the signature operation + ctx := context.Background() + sig, err := v.signExecutionPayloadHeader(ctx, h, [48]byte(vk.PublicKey().Marshal())) + require.NoError(t, err) + + // Verify the signature + pb, err := bls.PublicKeyFromBytes(vk.PublicKey().Marshal()) + require.NoError(t, err) + signature, err := bls.SignatureFromBytes(sig) + require.NoError(t, err) + sr, err := signing.ComputeSigningRoot(h, bytesutil.PadTo([]byte("signatureDomain"), 32)) + require.NoError(t, err) + require.Equal(t, true, signature.Verify(pb, sr[:])) +} diff --git a/validator/client/execution_payload_test.go b/validator/client/execution_payload_test.go new file mode 100644 index 000000000000..ae36e76b9d38 --- /dev/null +++ b/validator/client/execution_payload_test.go @@ -0,0 +1,49 @@ +package client + +import ( + "context" + "testing" + + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" + "github.com/prysmaticlabs/prysm/v5/time/slots" + "go.uber.org/mock/gomock" +) + +func Test_validator_signExecutionPayloadEnvelope(t *testing.T) { + v, m, vk, finish := setup(t, false) + defer finish() + + // Define constants and mock expectations + m.validatorClient.EXPECT(). + DomainData(gomock.Any(), // ctx + ðpb.DomainRequest{ + Epoch: slots.ToEpoch(slots.CurrentSlot(v.genesisTime)), + Domain: params.BeaconConfig().DomainBeaconBuilder[:], + }). // epoch + Return(ðpb.DomainResponse{ + SignatureDomain: bytesutil.PadTo([]byte("signatureDomain"), 32), + }, nil) + + // Generate random payload attestation data + env := random.ExecutionPayloadEnvelope(t) + + // Perform the signature operation + ctx := context.Background() + sig, err := v.signExecutionPayloadEnvelope(ctx, env, [48]byte(vk.PublicKey().Marshal())) + require.NoError(t, err) + + // Verify the signature + pb, err := bls.PublicKeyFromBytes(vk.PublicKey().Marshal()) + require.NoError(t, err) + signature, err := bls.SignatureFromBytes(sig) + require.NoError(t, err) + sr, err := signing.ComputeSigningRoot(env, bytesutil.PadTo([]byte("signatureDomain"), 32)) + require.NoError(t, err) + require.Equal(t, true, signature.Verify(pb, sr[:])) +} diff --git a/validator/client/grpc-api/BUILD.bazel b/validator/client/grpc-api/BUILD.bazel index 3dd77c8311cb..eb335587c87d 100644 --- a/validator/client/grpc-api/BUILD.bazel +++ b/validator/client/grpc-api/BUILD.bazel @@ -20,6 +20,7 @@ go_library( "//consensus-types/primitives:go_default_library", "//consensus-types/validator:go_default_library", "//monitoring/tracing/trace:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/eth/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//validator/client/iface:go_default_library", diff --git a/validator/client/grpc-api/grpc_validator_client.go b/validator/client/grpc-api/grpc_validator_client.go index 63eb07fa4c6d..bdfa0baf663b 100644 --- a/validator/client/grpc-api/grpc_validator_client.go +++ b/validator/client/grpc-api/grpc_validator_client.go @@ -12,6 +12,7 @@ import ( "github.com/prysmaticlabs/prysm/v5/api/server/structs" "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" "github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/v5/validator/client/iface" log "github.com/sirupsen/logrus" @@ -158,6 +159,30 @@ func (*grpcValidatorClient) AggregatedSyncSelections(context.Context, []iface.Sy return nil, iface.ErrNotSupported } +func (c *grpcValidatorClient) GetPayloadAttestationData(ctx context.Context, in *ethpb.GetPayloadAttestationDataRequest) (*ethpb.PayloadAttestationData, error) { + return c.beaconNodeValidatorClient.GetPayloadAttestationData(ctx, in) +} + +func (c *grpcValidatorClient) SubmitPayloadAttestation(ctx context.Context, in *ethpb.PayloadAttestationMessage) (*empty.Empty, error) { + return c.beaconNodeValidatorClient.SubmitPayloadAttestation(ctx, in) +} + +func (c *grpcValidatorClient) GetLocalHeader(ctx context.Context, req *ethpb.HeaderRequest) (*enginev1.ExecutionPayloadHeaderEPBS, error) { + return c.beaconNodeValidatorClient.GetLocalHeader(ctx, req) +} + +func (c *grpcValidatorClient) GetExecutionPayloadEnvelope(ctx context.Context, in *ethpb.PayloadEnvelopeRequest) (*enginev1.ExecutionPayloadEnvelope, error) { + return c.beaconNodeValidatorClient.GetExecutionPayloadEnvelope(ctx, in) +} + +func (c *grpcValidatorClient) SubmitSignedExecutionPayloadHeader(ctx context.Context, h *enginev1.SignedExecutionPayloadHeader) (*empty.Empty, error) { + return c.beaconNodeValidatorClient.SubmitSignedExecutionPayloadHeader(ctx, h) +} + +func (c *grpcValidatorClient) SubmitSignedExecutionPayloadEnvelope(ctx context.Context, env *enginev1.SignedExecutionPayloadEnvelope) (*empty.Empty, error) { + return c.beaconNodeValidatorClient.SubmitSignedExecutionPayloadEnvelope(ctx, env) +} + func NewGrpcValidatorClient(cc grpc.ClientConnInterface) iface.ValidatorClient { return &grpcValidatorClient{ethpb.NewBeaconNodeValidatorClient(cc), false} } diff --git a/validator/client/iface/BUILD.bazel b/validator/client/iface/BUILD.bazel index f94923543641..be76bddf3d6f 100644 --- a/validator/client/iface/BUILD.bazel +++ b/validator/client/iface/BUILD.bazel @@ -19,6 +19,7 @@ go_library( "//consensus-types/primitives:go_default_library", "//consensus-types/validator:go_default_library", "//crypto/bls:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/validator-client:go_default_library", "//validator/keymanager:go_default_library", diff --git a/validator/client/iface/validator.go b/validator/client/iface/validator.go index 354e92a5bf4e..47084205f44c 100644 --- a/validator/client/iface/validator.go +++ b/validator/client/iface/validator.go @@ -31,6 +31,8 @@ const ( RoleSyncCommittee // RoleSyncCommitteeAggregator means the validator should aggregate sync committee messages and submit a sync committee contribution. RoleSyncCommitteeAggregator + // RolePayloadTimelinessCommittee means the validator should submit a payload attestation message. + RolePayloadTimelinessCommittee ) // Validator interface defines the primary methods of a validator client. @@ -50,8 +52,10 @@ type Validator interface { SubmitAggregateAndProof(ctx context.Context, slot primitives.Slot, pubKey [fieldparams.BLSPubkeyLength]byte) SubmitSyncCommitteeMessage(ctx context.Context, slot primitives.Slot, pubKey [fieldparams.BLSPubkeyLength]byte) SubmitSignedContributionAndProof(ctx context.Context, slot primitives.Slot, pubKey [fieldparams.BLSPubkeyLength]byte) + SubmitPayloadAttestationMessage(ctx context.Context, slot primitives.Slot, pubKey [fieldparams.BLSPubkeyLength]byte) LogSubmittedAtts(slot primitives.Slot) LogSubmittedSyncCommitteeMessages() + LogPayloadAtts() UpdateDomainDataCaches(ctx context.Context, slot primitives.Slot) WaitForKeymanagerInitialization(ctx context.Context) error Keymanager() (keymanager.IKeymanager, error) diff --git a/validator/client/iface/validator_client.go b/validator/client/iface/validator_client.go index 0f5fc3c18c0a..8d5f025b0fcc 100644 --- a/validator/client/iface/validator_client.go +++ b/validator/client/iface/validator_client.go @@ -10,6 +10,7 @@ import ( "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/v5/api/client/event" "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" ) @@ -131,9 +132,15 @@ type ValidatorClient interface { ProposeBeaconBlock(ctx context.Context, in *ethpb.GenericSignedBeaconBlock) (*ethpb.ProposeResponse, error) PrepareBeaconProposer(ctx context.Context, in *ethpb.PrepareBeaconProposerRequest) (*empty.Empty, error) FeeRecipientByPubKey(ctx context.Context, in *ethpb.FeeRecipientByPubKeyRequest) (*ethpb.FeeRecipientByPubKeyResponse, error) + GetLocalHeader(ctx context.Context, req *ethpb.HeaderRequest) (*enginev1.ExecutionPayloadHeaderEPBS, error) + GetExecutionPayloadEnvelope(ctx context.Context, in *ethpb.PayloadEnvelopeRequest) (*enginev1.ExecutionPayloadEnvelope, error) + SubmitSignedExecutionPayloadHeader(ctx context.Context, h *enginev1.SignedExecutionPayloadHeader) (*empty.Empty, error) + SubmitSignedExecutionPayloadEnvelope(ctx context.Context, env *enginev1.SignedExecutionPayloadEnvelope) (*empty.Empty, error) AttestationData(ctx context.Context, in *ethpb.AttestationDataRequest) (*ethpb.AttestationData, error) ProposeAttestation(ctx context.Context, in *ethpb.Attestation) (*ethpb.AttestResponse, error) ProposeAttestationElectra(ctx context.Context, in *ethpb.AttestationElectra) (*ethpb.AttestResponse, error) + GetPayloadAttestationData(ctx context.Context, in *ethpb.GetPayloadAttestationDataRequest) (*ethpb.PayloadAttestationData, error) + SubmitPayloadAttestation(ctx context.Context, in *ethpb.PayloadAttestationMessage) (*empty.Empty, error) SubmitAggregateSelectionProof(ctx context.Context, in *ethpb.AggregateSelectionRequest, index primitives.ValidatorIndex, committeeLength uint64) (*ethpb.AggregateSelectionResponse, error) SubmitAggregateSelectionProofElectra(ctx context.Context, in *ethpb.AggregateSelectionRequest, _ primitives.ValidatorIndex, _ uint64) (*ethpb.AggregateSelectionElectraResponse, error) SubmitSignedAggregateSelectionProof(ctx context.Context, in *ethpb.SignedAggregateSubmitRequest) (*ethpb.SignedAggregateSubmitResponse, error) diff --git a/validator/client/log.go b/validator/client/log.go index 231d34341969..78b4deb276ae 100644 --- a/validator/client/log.go +++ b/validator/client/log.go @@ -86,6 +86,19 @@ func (v *validator) saveSubmittedAtt(data *ethpb.AttestationData, pubkey []byte, return nil } +func (v *validator) LogPayloadAtts() { + if v.payloadData == nil || len(v.payloadAttested) == 0 { + return + } + log.WithFields(logrus.Fields{ + "slot": v.payloadData.Slot, + "beaconBlockRoot": fmt.Sprintf("%#x", bytesutil.Trunc(v.payloadData.BeaconBlockRoot)), + "status": v.payloadData.PayloadStatus, + "validatorCount": len(v.payloadAttested), + }).Info("Submitted payload attestations") + v.payloadAttested = []primitives.ValidatorIndex{} +} + // LogSubmittedAtts logs info about submitted attestations. func (v *validator) LogSubmittedAtts(slot primitives.Slot) { v.attLogsLock.Lock() diff --git a/validator/client/payload_attestation.go b/validator/client/payload_attestation.go new file mode 100644 index 000000000000..797b2eed3082 --- /dev/null +++ b/validator/client/payload_attestation.go @@ -0,0 +1,120 @@ +package client + +import ( + "context" + "time" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/monitoring/tracing" + "github.com/prysmaticlabs/prysm/v5/monitoring/tracing/trace" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + validatorpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1/validator-client" + prysmTime "github.com/prysmaticlabs/prysm/v5/time" + "github.com/prysmaticlabs/prysm/v5/time/slots" +) + +// SubmitPayloadAttestationMessage submits a payload attestation message to the beacon node. +func (v *validator) SubmitPayloadAttestationMessage(ctx context.Context, slot primitives.Slot, pubKey [fieldparams.BLSPubkeyLength]byte) { + if params.BeaconConfig().EPBSForkEpoch > slots.ToEpoch(slot) { + return + } + v.waitUntilPtcDuty(ctx, slot) + + data, err := v.validatorClient.GetPayloadAttestationData(ctx, ðpb.GetPayloadAttestationDataRequest{Slot: slot}) + if err != nil { + log.WithError(err).Error("could not get payload attestation data") + return + } + + signature, err := v.signPayloadAttestation(ctx, data, pubKey) + if err != nil { + log.WithError(err).Error("could not sign payload attestation") + return + } + + status, found := v.pubkeyToStatus[pubKey] + if !found { + log.WithField("pubkey", pubKey).Error("could not find validator index for pubkey") + return + } + index := status.index + + message := ðpb.PayloadAttestationMessage{ + ValidatorIndex: index, + Data: data, + Signature: signature, + } + + if _, err := v.validatorClient.SubmitPayloadAttestation(ctx, message); err != nil { + log.WithError(err).Error("could not submit payload attestation") + } + + v.payloadData = data + v.payloadAttested = append(v.payloadAttested, index) +} + +func (v *validator) signPayloadAttestation(ctx context.Context, p *ethpb.PayloadAttestationData, pubKey [fieldparams.BLSPubkeyLength]byte) ([]byte, error) { + // Get domain data + epoch := slots.ToEpoch(p.Slot) + domain, err := v.domainData(ctx, epoch, params.BeaconConfig().DomainPTCAttester[:]) + if err != nil { + return nil, errors.Wrap(err, domainDataErr) + } + if domain == nil { + return nil, errors.New(domainDataErr) + } + + // Compute signing root + signingRoot, err := signing.ComputeSigningRoot(p, domain.SignatureDomain) + if err != nil { + return nil, errors.Wrap(err, signingRootErr) + } + + // Create signature request + signReq := &validatorpb.SignRequest{ + PublicKey: pubKey[:], + SigningRoot: signingRoot[:], + SignatureDomain: domain.SignatureDomain, + Object: &validatorpb.SignRequest_PayloadAttestationData{PayloadAttestationData: p}, + SigningSlot: p.Slot, + } + + // Sign the payload attestation data + m, err := v.Keymanager() + if err != nil { + return nil, errors.Wrap(err, "could not get key manager") + } + sig, err := m.Sign(ctx, signReq) + if err != nil { + return nil, errors.Wrap(err, "could not sign payload attestation") + } + + // Marshal the signature into bytes + return sig.Marshal(), nil +} + +// waitUntilPtcDuty waits until PTC duty time which is defined as 3/4 of slot time. +func (v *validator) waitUntilPtcDuty(ctx context.Context, slot primitives.Slot) { + ctx, span := trace.StartSpan(ctx, "validator.waitUntilPtcDuty") + defer span.End() + + startTime := slots.StartTime(v.genesisTime, slot) + dutyTime := startTime.Add(3 * slots.DivideSlotBy(4)) + wait := prysmTime.Until(dutyTime) + if wait <= 0 { + return + } + t := time.NewTimer(wait) + defer t.Stop() + select { + case <-ctx.Done(): + tracing.AnnotateError(span, ctx.Err()) + return + case <-t.C: + return + } +} diff --git a/validator/client/payload_attestation_test.go b/validator/client/payload_attestation_test.go new file mode 100644 index 000000000000..aa8fda6b615c --- /dev/null +++ b/validator/client/payload_attestation_test.go @@ -0,0 +1,148 @@ +package client + +import ( + "context" + "testing" + "time" + + "github.com/golang/protobuf/ptypes/empty" + "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/signing" + fieldparams "github.com/prysmaticlabs/prysm/v5/config/fieldparams" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v5/crypto/bls" + "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/testing/require" + "github.com/prysmaticlabs/prysm/v5/testing/util/random" + "github.com/prysmaticlabs/prysm/v5/time/slots" + "go.uber.org/mock/gomock" +) + +func TestValidator_SubmitPayloadAttestationMessage(t *testing.T) { + params.SetupTestConfigCleanup(t) + cfg := params.BeaconConfig() + cfg.EPBSForkEpoch = 0 + params.OverrideBeaconConfig(cfg) + + // Setup the test environment. + validator, m, validatorKey, finish := setup(t, true) + defer finish() + var pubKey [fieldparams.BLSPubkeyLength]byte + copy(pubKey[:], validatorKey.PublicKey().Marshal()) + + // Map to associate public keys with validator indices. + validator.pubkeyToStatus = make(map[[fieldparams.BLSPubkeyLength]byte]*validatorStatus) + validatorIndex := primitives.ValidatorIndex(1) + validator.pubkeyToStatus[pubKey] = &validatorStatus{index: validatorIndex} + + // Generate random payload attestation data for the test. + d := random.PayloadAttestationData(t) + slot := primitives.Slot(1000) + epoch := slots.ToEpoch(slot) + d.Slot = slot + + // Expectation for the mock validator client to return the generated payload attestation data. + m.validatorClient.EXPECT().GetPayloadAttestationData( + gomock.Any(), // Context + gomock.AssignableToTypeOf(ðpb.GetPayloadAttestationDataRequest{Slot: slot}), + ).Return(d, nil) + + // Expectation for the mock validator client to return the domain data for the given epoch and domain. + m.validatorClient.EXPECT().DomainData( + gomock.Any(), // Context + ðpb.DomainRequest{ + Epoch: epoch, + Domain: params.BeaconConfig().DomainPTCAttester[:], + }, + ).Return(ðpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil /*err*/) + + // Duplicate domain data request for computing the correct signature for matching expectations. + m.validatorClient.EXPECT().DomainData( + gomock.Any(), // Context + ðpb.DomainRequest{ + Epoch: epoch, + Domain: params.BeaconConfig().DomainPTCAttester[:], + }, + ).Return(ðpb.DomainResponse{SignatureDomain: make([]byte, 32)}, nil /*err*/) + + // Sign the payload attestation data using the validator's private key. + sig, err := validator.signPayloadAttestation(context.Background(), d, pubKey) + require.NoError(t, err) + + // Expectation for the mock validator client to submit the payload attestation with the signed data. + m.validatorClient.EXPECT().SubmitPayloadAttestation( + gomock.Any(), // Context + gomock.Eq(ðpb.PayloadAttestationMessage{ + ValidatorIndex: validatorIndex, + Data: d, + Signature: sig, + }), + ).Return(&empty.Empty{}, nil) + + validator.SubmitPayloadAttestationMessage(context.Background(), slot, pubKey) +} + +func Test_validator_signPayloadAttestation(t *testing.T) { + v, m, vk, finish := setup(t, false) + defer finish() + + // Define constants and mock expectations + e := primitives.Epoch(1000) + m.validatorClient.EXPECT(). + DomainData(gomock.Any(), // ctx + ðpb.DomainRequest{ + Epoch: e, + Domain: params.BeaconConfig().DomainPTCAttester[:], + }). // epoch + Return(ðpb.DomainResponse{ + SignatureDomain: bytesutil.PadTo([]byte("signatureDomain"), 32), + }, nil) + + // Generate random payload attestation data + pa := random.PayloadAttestationData(t) + pa.Slot = primitives.Slot(e) * params.BeaconConfig().SlotsPerEpoch // Verify that go mock EXPECT() gets the correct epoch. + + // Perform the signature operation + ctx := context.Background() + sig, err := v.signPayloadAttestation(ctx, pa, [48]byte(vk.PublicKey().Marshal())) + require.NoError(t, err) + + // Verify the signature + pb, err := bls.PublicKeyFromBytes(vk.PublicKey().Marshal()) + require.NoError(t, err) + signature, err := bls.SignatureFromBytes(sig) + require.NoError(t, err) + sr, err := signing.ComputeSigningRoot(pa, bytesutil.PadTo([]byte("signatureDomain"), 32)) + require.NoError(t, err) + require.Equal(t, true, signature.Verify(pb, sr[:])) +} + +func TestWaitUntilPtcDuty_Reached(t *testing.T) { + validator, _, _, finish := setup(t, true) + defer finish() + currentTime := time.Now() + numOfSlots := primitives.Slot(4) + validator.genesisTime = uint64(currentTime.Unix()) - uint64(numOfSlots.Mul(params.BeaconConfig().SecondsPerSlot)) + timeToSleep := 3 * slots.DivideSlotBy(4) + + threeQuartersTime := currentTime.Add(timeToSleep) + validator.waitUntilPtcDuty(context.Background(), numOfSlots) + currentTime = time.Now() + require.Equal(t, threeQuartersTime.Unix(), currentTime.Unix()) +} + +func TestWaitUntilPtcDuty_Return(t *testing.T) { + validator, _, _, finish := setup(t, true) + defer finish() + currentTime := time.Now() + numOfSlots := primitives.Slot(4) + validator.genesisTime = uint64(currentTime.Unix()) - 2*uint64(numOfSlots.Mul(params.BeaconConfig().SecondsPerSlot)) + + expectedTime := time.Now() + ctx, cancel := context.WithCancel(context.Background()) + cancel() + validator.waitUntilPtcDuty(ctx, numOfSlots) + currentTime = time.Now() + require.Equal(t, expectedTime.Unix(), currentTime.Unix()) +} diff --git a/validator/client/propose.go b/validator/client/propose.go index 3cf5a11fd1dc..8dcba71855ed 100644 --- a/validator/client/propose.go +++ b/validator/client/propose.go @@ -59,6 +59,13 @@ func (v *validator) ProposeBlock(ctx context.Context, slot primitives.Slot, pubK span.SetAttributes(trace.StringAttribute("validator", fmtKey)) log := log.WithField("pubkey", fmt.Sprintf("%#x", bytesutil.Trunc(pubKey[:]))) + if slots.ToEpoch(slot) >= params.BeaconConfig().EPBSForkEpoch { + if err := v.SubmitHeader(ctx, slot, pubKey); err != nil { + log.WithError(err).Error("Failed to submit header") + return + } + } + // Sign randao reveal, it's used to request block from beacon node epoch := primitives.Epoch(slot / params.BeaconConfig().SlotsPerEpoch) randaoReveal, err := v.signRandaoReveal(ctx, pubKey, epoch, slot) @@ -129,7 +136,7 @@ func (v *validator) ProposeBlock(ctx context.Context, slot primitives.Slot, pubK var genericSignedBlock *ethpb.GenericSignedBeaconBlock // Special handling for Deneb blocks and later version because of blob side cars. - if blk.Version() >= version.Deneb && !blk.IsBlinded() { + if blk.Version() >= version.Deneb && !blk.IsBlinded() && blk.Version() < version.EPBS { pb, err := blk.Proto() if err != nil { log.WithError(err).Error("Failed to get deneb block") @@ -171,11 +178,12 @@ func (v *validator) ProposeBlock(ctx context.Context, slot primitives.Slot, pubK return } - span.SetAttributes( - trace.StringAttribute("blockRoot", fmt.Sprintf("%#x", blkResp.BlockRoot)), - trace.Int64Attribute("numDeposits", int64(len(blk.Block().Body().Deposits()))), - trace.Int64Attribute("numAttestations", int64(len(blk.Block().Body().Attestations()))), - ) + if slots.ToEpoch(slot) >= params.BeaconConfig().EPBSForkEpoch { + if err := v.SubmitExecutionPayloadEnvelope(ctx, slot, pubKey); err != nil { + log.WithError(err).Error("Failed to submit payload") + return + } + } if err := logProposedBlock(log, blk, blkResp.BlockRoot); err != nil { log.WithError(err).Error("Failed to log proposed block") @@ -187,7 +195,7 @@ func (v *validator) ProposeBlock(ctx context.Context, slot primitives.Slot, pubK } func logProposedBlock(log *logrus.Entry, blk interfaces.SignedBeaconBlock, blkRoot []byte) error { - if blk.Version() >= version.Bellatrix { + if blk.Version() >= version.Bellatrix && blk.Version() < version.EPBS { p, err := blk.Block().Body().Execution() if err != nil { return errors.Wrap(err, "failed to get execution payload") @@ -223,6 +231,21 @@ func logProposedBlock(log *logrus.Entry, blk interfaces.SignedBeaconBlock, blkRo } } } + if blk.Version() >= version.EPBS { + signedHeader, err := blk.Block().Body().SignedExecutionPayloadHeader() + if err != nil { + return errors.Wrap(err, "failed to get signed header") + } + header, err := signedHeader.Header() + if err != nil { + return errors.Wrap(err, "failed to get header") + } + log = log.WithFields(logrus.Fields{ + "builderIndex": header.BuilderIndex(), + "value": header.Value(), + "kzgCommitmentRoot": fmt.Sprintf("%#x", header.BlobKzgCommitmentsRoot()), + }) + } br := fmt.Sprintf("%#x", bytesutil.Trunc(blkRoot)) graffiti := blk.Block().Body().Graffiti() diff --git a/validator/client/propose_epbs.go b/validator/client/propose_epbs.go new file mode 100644 index 000000000000..4a7693936e54 --- /dev/null +++ b/validator/client/propose_epbs.go @@ -0,0 +1,88 @@ +package client + +import ( + "context" + "fmt" + + "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/v5/config/params" + "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives" + enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1" + ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v5/time/slots" + "github.com/sirupsen/logrus" +) + +// SubmitHeader submits a signed execution payload header to the validator client. +func (v *validator) SubmitHeader(ctx context.Context, slot primitives.Slot, pubKey [48]byte) error { + if params.BeaconConfig().EPBSForkEpoch > slots.ToEpoch(slot) { + return nil + } + log.WithFields(logrus.Fields{ + "slot": slot, + "pubkey": fmt.Sprintf("%x", pubKey), + }).Info("Submitting header") + + proposerIndex, ok := v.pubkeyToStatus[pubKey] + if !ok { + return fmt.Errorf("validator index not found for pubkey %v", pubKey) + } + header, err := v.validatorClient.GetLocalHeader(ctx, ðpb.HeaderRequest{ + Slot: slot, + ProposerIndex: proposerIndex.index, + }) + if err != nil { + return errors.Wrap(err, "failed to get local header") + } + + sig, err := v.signExecutionPayloadHeader(ctx, header, pubKey) + if err != nil { + return errors.Wrap(err, "failed to sign execution payload header") + } + + if _, err := v.validatorClient.SubmitSignedExecutionPayloadHeader(ctx, &enginev1.SignedExecutionPayloadHeader{ + Message: header, + Signature: sig, + }); err != nil { + return errors.Wrap(err, "failed to submit signed execution payload header") + } + + return nil +} + +// SubmitExecutionPayloadEnvelope submits a signed execution payload envelope to the validator client. +func (v *validator) SubmitExecutionPayloadEnvelope(ctx context.Context, slot primitives.Slot, pubKey [48]byte) error { + if params.BeaconConfig().EPBSForkEpoch > slots.ToEpoch(slot) { + return nil + } + log.WithFields(logrus.Fields{ + "slot": slot, + "pubkey": fmt.Sprintf("%x", pubKey), + }).Info("Submitting payload envelope") + + proposerIndex, ok := v.pubkeyToStatus[pubKey] + if !ok { + return fmt.Errorf("validator index not found for pubkey %v", pubKey) + } + env, err := v.validatorClient.GetExecutionPayloadEnvelope(ctx, ðpb.PayloadEnvelopeRequest{ + Slot: slot, + ProposerIndex: proposerIndex.index, + }) + if err != nil { + return errors.Wrap(err, "failed to get execution payload envelope") + } + + sig, err := v.signExecutionPayloadEnvelope(ctx, env, pubKey) + if err != nil { + return errors.Wrap(err, "failed to sign execution payload envelope") + } + + if _, err := v.validatorClient.SubmitSignedExecutionPayloadEnvelope(ctx, &enginev1.SignedExecutionPayloadEnvelope{ + Message: env, + Signature: sig, + }); err != nil { + return errors.Wrap(err, "failed to submit signed execution payload envelope") + } + + return nil +} diff --git a/validator/client/runner.go b/validator/client/runner.go index 1a33b886ded1..b8f045412ae5 100644 --- a/validator/client/runner.go +++ b/validator/client/runner.go @@ -239,14 +239,16 @@ func performRoles(slotCtx context.Context, allRoles map[[48]byte][]iface.Validat v.ProposeBlock(slotCtx, slot, pubKey) case iface.RoleAggregator: v.SubmitAggregateAndProof(slotCtx, slot, pubKey) - case iface.RoleSyncCommittee: - v.SubmitSyncCommitteeMessage(slotCtx, slot, pubKey) - case iface.RoleSyncCommitteeAggregator: - v.SubmitSignedContributionAndProof(slotCtx, slot, pubKey) + //case iface.RoleSyncCommittee: + // v.SubmitSyncCommitteeMessage(slotCtx, slot, pubKey) + //case iface.RoleSyncCommitteeAggregator: + // v.SubmitSignedContributionAndProof(slotCtx, slot, pubKey) + case iface.RolePayloadTimelinessCommittee: + v.SubmitPayloadAttestationMessage(slotCtx, slot, pubKey) case iface.RoleUnknown: log.WithField("pubkey", fmt.Sprintf("%#x", bytesutil.Trunc(pubKey[:]))).Trace("No active roles, doing nothing") default: - log.Warnf("Unhandled role %v", role) + // log.Warnf("Unhandled role %v", role) } }(role, pubKey) } @@ -266,6 +268,7 @@ func performRoles(slotCtx context.Context, allRoles map[[48]byte][]iface.Validat // Log performance in the previous slot v.LogSubmittedAtts(slot) v.LogSubmittedSyncCommitteeMessages() + v.LogPayloadAtts() if err := v.LogValidatorGainsAndLosses(slotCtx, slot); err != nil { log.WithError(err).Error("Could not report validator's rewards/penalties") } diff --git a/validator/client/sync_committee.go b/validator/client/sync_committee.go index 0d67eedbd3d6..37e44fbe7197 100644 --- a/validator/client/sync_committee.go +++ b/validator/client/sync_committee.go @@ -30,7 +30,7 @@ func (v *validator) SubmitSyncCommitteeMessage(ctx context.Context, slot primiti defer span.End() span.SetAttributes(trace.StringAttribute("validator", fmt.Sprintf("%#x", pubKey))) - v.waitOneThirdOrValidBlock(ctx, slot) + v.waitAttesterDuty(ctx, slot) res, err := v.validatorClient.SyncMessageBlockRoot(ctx, &emptypb.Empty{}) if err != nil { @@ -125,7 +125,7 @@ func (v *validator) SubmitSignedContributionAndProof(ctx context.Context, slot p return } - v.waitToSlotTwoThirds(ctx, slot) + v.waitAggregatorDuty(ctx, slot) for i, comIdx := range indexRes.Indices { isAggregator, err := altair.IsSyncCommitteeAggregator(selectionProofs[i]) diff --git a/validator/client/testutil/mock_validator.go b/validator/client/testutil/mock_validator.go index e6a48d5b91c5..a8e656161690 100644 --- a/validator/client/testutil/mock_validator.go +++ b/validator/client/testutil/mock_validator.go @@ -197,6 +197,10 @@ func (*FakeValidator) SubmitAggregateAndProof(_ context.Context, _ primitives.Sl func (*FakeValidator) SubmitSyncCommitteeMessage(_ context.Context, _ primitives.Slot, _ [fieldparams.BLSPubkeyLength]byte) { } +// SubmitPayloadAttestationMessage for mocking. +func (*FakeValidator) SubmitPayloadAttestationMessage(_ context.Context, _ primitives.Slot, _ [fieldparams.BLSPubkeyLength]byte) { +} + // LogSubmittedAtts for mocking. func (*FakeValidator) LogSubmittedAtts(_ primitives.Slot) {} diff --git a/validator/client/validator.go b/validator/client/validator.go index 53628e99af16..2cca5e9c97d8 100644 --- a/validator/client/validator.go +++ b/validator/client/validator.go @@ -112,6 +112,8 @@ type validator struct { blacklistedPubkeysLock sync.RWMutex attSelectionLock sync.Mutex dutiesLock sync.RWMutex + payloadData *ethpb.PayloadAttestationData + payloadAttested []primitives.ValidatorIndex } type validatorStatus struct { @@ -743,6 +745,10 @@ func (v *validator) RolesAt(ctx context.Context, slot primitives.Slot) (map[[fie syncCommitteeValidators[duty.ValidatorIndex] = bytesutil.ToBytes48(duty.PublicKey) } + if duty.PtcSlot == slot { + roles = append(roles, iface.RolePayloadTimelinessCommittee) + } + if len(roles) == 0 { roles = append(roles, iface.RoleUnknown) } diff --git a/validator/client/validator_test.go b/validator/client/validator_test.go index ec2189ee36ed..9412a4f42e31 100644 --- a/validator/client/validator_test.go +++ b/validator/client/validator_test.go @@ -677,6 +677,7 @@ func TestRolesAt_OK(t *testing.T) { AttesterSlot: 1, PublicKey: validatorKey.PublicKey().Marshal(), IsSyncCommittee: true, + PtcSlot: 1, }, }, NextEpochDuties: []*ethpb.DutiesResponse_Duty{ @@ -685,6 +686,7 @@ func TestRolesAt_OK(t *testing.T) { AttesterSlot: 1, PublicKey: validatorKey.PublicKey().Marshal(), IsSyncCommittee: true, + PtcSlot: 1, }, }, } @@ -708,6 +710,7 @@ func TestRolesAt_OK(t *testing.T) { assert.Equal(t, iface.RoleAttester, roleMap[bytesutil.ToBytes48(validatorKey.PublicKey().Marshal())][0]) assert.Equal(t, iface.RoleAggregator, roleMap[bytesutil.ToBytes48(validatorKey.PublicKey().Marshal())][1]) assert.Equal(t, iface.RoleSyncCommittee, roleMap[bytesutil.ToBytes48(validatorKey.PublicKey().Marshal())][2]) + assert.Equal(t, iface.RolePayloadTimelinessCommittee, roleMap[bytesutil.ToBytes48(validatorKey.PublicKey().Marshal())][3]) // Test sync committee role at epoch boundary. v.duties = ðpb.DutiesResponse{