From b180a7de810df3413f874f86bbece3b60cd7d013 Mon Sep 17 00:00:00 2001 From: james-prysm <90280386+james-prysm@users.noreply.github.com> Date: Tue, 14 Mar 2023 21:04:31 -0500 Subject: [PATCH] Prysm V4: SSE api adding payload_attributes (#12102) --- beacon-chain/rpc/apimiddleware/BUILD.bazel | 1 + .../rpc/apimiddleware/custom_handlers.go | 19 + beacon-chain/rpc/apimiddleware/structs.go | 41 ++ beacon-chain/rpc/eth/events/BUILD.bazel | 14 + beacon-chain/rpc/eth/events/events.go | 106 ++- beacon-chain/rpc/eth/events/events_test.go | 205 ++++++ beacon-chain/rpc/eth/events/server.go | 2 + beacon-chain/rpc/service.go | 1 + proto/eth/v1/BUILD.bazel | 4 + proto/eth/v1/events.pb.go | 620 +++++++++++++++--- proto/eth/v1/events.proto | 58 ++ 11 files changed, 966 insertions(+), 105 deletions(-) diff --git a/beacon-chain/rpc/apimiddleware/BUILD.bazel b/beacon-chain/rpc/apimiddleware/BUILD.bazel index 2569d3b1614f..2e4439cfb33f 100644 --- a/beacon-chain/rpc/apimiddleware/BUILD.bazel +++ b/beacon-chain/rpc/apimiddleware/BUILD.bazel @@ -19,6 +19,7 @@ go_library( "//config/params:go_default_library", "//consensus-types/primitives:go_default_library", "//proto/eth/v2:go_default_library", + "//runtime/version:go_default_library", "//time/slots:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_r3labs_sse//:go_default_library", diff --git a/beacon-chain/rpc/apimiddleware/custom_handlers.go b/beacon-chain/rpc/apimiddleware/custom_handlers.go index 91d384224e80..f6f47466b390 100644 --- a/beacon-chain/rpc/apimiddleware/custom_handlers.go +++ b/beacon-chain/rpc/apimiddleware/custom_handlers.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/base64" "encoding/json" + "errors" "fmt" "io" "net/http" @@ -14,6 +15,7 @@ import ( "github.com/prysmaticlabs/prysm/v3/api/gateway/apimiddleware" "github.com/prysmaticlabs/prysm/v3/api/grpc" "github.com/prysmaticlabs/prysm/v3/beacon-chain/rpc/eth/events" + "github.com/prysmaticlabs/prysm/v3/runtime/version" "github.com/r3labs/sse" ) @@ -364,6 +366,10 @@ func handleEvents(m *apimiddleware.ApiProxyMiddleware, _ apimiddleware.Endpoint, return true } +type dataSubset struct { + Version string `json:"version"` +} + func receiveEvents(eventChan <-chan *sse.Event, w http.ResponseWriter, req *http.Request) apimiddleware.ErrorJson { for { select { @@ -418,6 +424,19 @@ func receiveEvents(eventChan <-chan *sse.Event, w http.ResponseWriter, req *http data = &SignedContributionAndProofJson{} case events.BLSToExecutionChangeTopic: data = &SignedBLSToExecutionChangeJson{} + case events.PayloadAttributesTopic: + dataSubset := &dataSubset{} + if err := json.Unmarshal(msg.Data, dataSubset); err != nil { + return apimiddleware.InternalServerError(err) + } + switch dataSubset.Version { + case version.String(version.Capella): + data = &EventPayloadAttributeStreamV2Json{} + case version.String(version.Bellatrix): + data = &EventPayloadAttributeStreamV1Json{} + default: + return apimiddleware.InternalServerError(errors.New("payload version unsupported")) + } case "error": data = &EventErrorJson{} default: diff --git a/beacon-chain/rpc/apimiddleware/structs.go b/beacon-chain/rpc/apimiddleware/structs.go index fed59db71ace..07be83b6ccfb 100644 --- a/beacon-chain/rpc/apimiddleware/structs.go +++ b/beacon-chain/rpc/apimiddleware/structs.go @@ -1160,6 +1160,47 @@ type EventChainReorgJson struct { ExecutionOptimistic bool `json:"execution_optimistic"` } +type EventPayloadAttributeStreamV1Json struct { + Version string `json:"version"` + Data *EventPayloadAttributeV1Json +} + +type EventPayloadAttributeStreamV2Json struct { + Version string `json:"version"` + Data *EventPayloadAttributeV2Json +} + +type EventPayloadAttributeV1Json struct { + ProposerIndex string `json:"proposer_index"` + ProposalSlot string `json:"proposal_slot"` + ParentBlockNumber string `json:"parent_block_number"` + ParentBlockRoot string `json:"parent_block_root" hex:"true"` + ParentBlockHash string `json:"parent_block_hash" hex:"true"` + PayloadAttributes *PayloadAttributesV1Json `json:"payload_attributes"` +} + +type EventPayloadAttributeV2Json struct { + ProposerIndex string `json:"proposer_index"` + ProposalSlot string `json:"proposal_slot"` + ParentBlockNumber string `json:"parent_block_number"` + ParentBlockRoot string `json:"parent_block_root" hex:"true"` + ParentBlockHash string `json:"parent_block_hash" hex:"true"` + PayloadAttributes *PayloadAttributesV2Json `json:"payload_attributes_v2"` +} + +type PayloadAttributesV1Json struct { + Timestamp string `json:"timestamp"` + Random string `json:"prev_randao" hex:"true"` + SuggestedFeeRecipient string `json:"suggested_fee_recipient" hex:"true"` +} + +type PayloadAttributesV2Json struct { + Timestamp string `json:"timestamp"` + Random string `json:"prev_randao" hex:"true"` + SuggestedFeeRecipient string `json:"suggested_fee_recipient" hex:"true"` + Withdrawals []*WithdrawalJson `json:"withdrawals"` +} + // --------------- // Error handling. // --------------- diff --git a/beacon-chain/rpc/eth/events/BUILD.bazel b/beacon-chain/rpc/eth/events/BUILD.bazel index 4bfea54505c5..8bcd1550dd09 100644 --- a/beacon-chain/rpc/eth/events/BUILD.bazel +++ b/beacon-chain/rpc/eth/events/BUILD.bazel @@ -9,15 +9,22 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/v3/beacon-chain/rpc/eth/events", visibility = ["//beacon-chain:__subpackages__"], deps = [ + "//beacon-chain/blockchain: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/time:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/eth/service:go_default_library", "//proto/eth/v1:go_default_library", "//proto/migration:go_default_library", + "//runtime/version:go_default_library", + "//time/slots:go_default_library", "@com_github_grpc_ecosystem_grpc_gateway_v2//proto/gateway:go_default_library", "@com_github_pkg_errors//:go_default_library", + "@com_github_sirupsen_logrus//: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", @@ -32,18 +39,25 @@ go_test( deps = [ "//async/event:go_default_library", "//beacon-chain/blockchain/testing:go_default_library", + "//beacon-chain/core/blocks: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/time:go_default_library", + "//config/fieldparams:go_default_library", "//consensus-types/blocks:go_default_library", + "//proto/engine/v1:go_default_library", "//proto/eth/v1:go_default_library", "//proto/migration:go_default_library", "//proto/prysm/v1alpha1: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", + "@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", "@com_github_golang_mock//gomock:go_default_library", "@com_github_grpc_ecosystem_grpc_gateway_v2//proto/gateway:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", diff --git a/beacon-chain/rpc/eth/events/events.go b/beacon-chain/rpc/eth/events/events.go index 0ebf40093a6d..3fb37a4aca7e 100644 --- a/beacon-chain/rpc/eth/events/events.go +++ b/beacon-chain/rpc/eth/events/events.go @@ -9,9 +9,15 @@ import ( blockfeed "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/feed/block" "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/feed/operation" statefeed "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/feed/state" + "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/helpers" + "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/time" + enginev1 "github.com/prysmaticlabs/prysm/v3/proto/engine/v1" ethpbservice "github.com/prysmaticlabs/prysm/v3/proto/eth/service" ethpb "github.com/prysmaticlabs/prysm/v3/proto/eth/v1" "github.com/prysmaticlabs/prysm/v3/proto/migration" + "github.com/prysmaticlabs/prysm/v3/runtime/version" + "github.com/prysmaticlabs/prysm/v3/time/slots" + log "github.com/sirupsen/logrus" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" @@ -35,6 +41,8 @@ const ( SyncCommitteeContributionTopic = "contribution_and_proof" // BLSToExecutionChangeTopic represents a new received BLS to execution change event topic. BLSToExecutionChangeTopic = "bls_to_execution_change" + // PayloadAttributesTopic represents a new payload attributes for execution payload building event topic. + PayloadAttributesTopic = "payload_attributes" ) var casesHandled = map[string]bool{ @@ -46,6 +54,7 @@ var casesHandled = map[string]bool{ ChainReorgTopic: true, SyncCommitteeContributionTopic: true, BLSToExecutionChangeTopic: true, + PayloadAttributesTopic: true, } // StreamEvents allows requesting all events from a set of topics defined in the Ethereum consensus API standard. @@ -95,7 +104,7 @@ func (s *Server) StreamEvents( return status.Errorf(codes.Internal, "Could not handle block operations event: %v", err) } case event := <-stateChan: - if err := handleStateEvents(stream, requestedTopics, event); err != nil { + if err := s.handleStateEvents(stream, requestedTopics, event); err != nil { return status.Errorf(codes.Internal, "Could not handle state event: %v", err) } case <-s.Ctx.Done(): @@ -191,24 +200,31 @@ func handleBlockOperationEvents( } v2Change := migration.V1Alpha1SignedBLSToExecChangeToV2(changeData.Change) return streamData(stream, BLSToExecutionChangeTopic, v2Change) + default: return nil } } -func handleStateEvents( +func (s *Server) handleStateEvents( stream ethpbservice.Events_StreamEventsServer, requestedTopics map[string]bool, event *feed.Event, ) error { switch event.Type { case statefeed.NewHead: - if _, ok := requestedTopics[HeadTopic]; !ok { - return nil + if _, ok := requestedTopics[HeadTopic]; ok { + head, ok := event.Data.(*ethpb.EventHead) + if !ok { + return nil + } + return streamData(stream, HeadTopic, head) } - head, ok := event.Data.(*ethpb.EventHead) - if !ok { + if _, ok := requestedTopics[PayloadAttributesTopic]; ok { + if err := s.streamPayloadAttributes(stream); err != nil { + log.WithError(err).Error("Unable to obtain stream payload attributes") + } return nil } - return streamData(stream, HeadTopic, head) + return nil case statefeed.FinalizedCheckpoint: if _, ok := requestedTopics[FinalizedCheckpointTopic]; !ok { return nil @@ -232,6 +248,82 @@ func handleStateEvents( } } +// streamPayloadAttributes on new head event. +// This event stream is intended to be used by builders and relays. +func (s *Server) streamPayloadAttributes(stream ethpbservice.Events_StreamEventsServer) error { + headState, err := s.HeadFetcher.HeadStateReadOnly(s.Ctx) + if err != nil { + return err + } + + headBlock, err := s.HeadFetcher.HeadBlock(s.Ctx) + if err != nil { + return err + } + + headRoot, err := s.HeadFetcher.HeadRoot(s.Ctx) + if err != nil { + return err + } + + headPayload, err := headBlock.Block().Body().Execution() + if err != nil { + return err + } + + t, err := slots.ToTime(uint64(headState.GenesisTime()), headState.Slot()) + if err != nil { + return err + } + + prevRando, err := helpers.RandaoMix(headState, time.CurrentEpoch(headState)) + if err != nil { + return err + } + + switch headState.Version() { + case version.Bellatrix: + return streamData(stream, PayloadAttributesTopic, ðpb.EventPayloadAttributeV1{ + Version: version.String(headState.Version()), + Data: ðpb.EventPayloadAttributeV1_BasePayloadAttribute{ + ProposerIndex: headBlock.Block().ProposerIndex(), + ProposalSlot: headState.Slot(), + ParentBlockNumber: headPayload.BlockNumber(), + ParentBlockRoot: headRoot, + ParentBlockHash: headPayload.BlockHash(), + PayloadAttributes: &enginev1.PayloadAttributes{ + Timestamp: uint64(t.Unix()), + PrevRandao: prevRando, + SuggestedFeeRecipient: headPayload.FeeRecipient(), + }, + }, + }) + case version.Capella: + withdrawals, err := headState.ExpectedWithdrawals() + if err != nil { + return err + } + return streamData(stream, PayloadAttributesTopic, ðpb.EventPayloadAttributeV2{ + Version: version.String(headState.Version()), + Data: ðpb.EventPayloadAttributeV2_BasePayloadAttribute{ + ProposerIndex: headBlock.Block().ProposerIndex(), + ProposalSlot: headState.Slot(), + ParentBlockNumber: headPayload.BlockNumber(), + ParentBlockRoot: headRoot, + ParentBlockHash: headPayload.BlockHash(), + PayloadAttributesV2: &enginev1.PayloadAttributesV2{ + Timestamp: uint64(t.Unix()), + PrevRandao: prevRando, + SuggestedFeeRecipient: headPayload.FeeRecipient(), + Withdrawals: withdrawals, + }, + }, + }) + default: + return errors.New("payload version is not supported") + } +} + func streamData(stream ethpbservice.Events_StreamEventsServer, name string, data proto.Message) error { returnData, err := anypb.New(data) if err != nil { diff --git a/beacon-chain/rpc/eth/events/events_test.go b/beacon-chain/rpc/eth/events/events_test.go index 2d0355523a27..7c77825548d4 100644 --- a/beacon-chain/rpc/eth/events/events_test.go +++ b/beacon-chain/rpc/eth/events/events_test.go @@ -3,20 +3,28 @@ package events import ( "context" "testing" + "time" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/golang/mock/gomock" "github.com/grpc-ecosystem/grpc-gateway/v2/proto/gateway" "github.com/prysmaticlabs/go-bitfield" "github.com/prysmaticlabs/prysm/v3/async/event" mockChain "github.com/prysmaticlabs/prysm/v3/beacon-chain/blockchain/testing" + b "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/blocks" "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/feed" blockfeed "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/feed/block" "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/feed/operation" statefeed "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/feed/state" + "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/helpers" + prysmtime "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/time" + fieldparams "github.com/prysmaticlabs/prysm/v3/config/fieldparams" "github.com/prysmaticlabs/prysm/v3/consensus-types/blocks" + enginev1 "github.com/prysmaticlabs/prysm/v3/proto/engine/v1" ethpb "github.com/prysmaticlabs/prysm/v3/proto/eth/v1" "github.com/prysmaticlabs/prysm/v3/proto/migration" eth "github.com/prysmaticlabs/prysm/v3/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v3/runtime/version" "github.com/prysmaticlabs/prysm/v3/testing/assert" "github.com/prysmaticlabs/prysm/v3/testing/mock" "github.com/prysmaticlabs/prysm/v3/testing/require" @@ -312,6 +320,203 @@ func TestStreamEvents_StateEvents(t *testing.T) { feed: srv.StateNotifier.StateFeed(), }) }) + t.Run(PayloadAttributesTopic+"_bellatrix", func(t *testing.T) { + ctx := context.Background() + + beaconState, _ := util.DeterministicGenesisStateBellatrix(t, 1) + err := beaconState.SetSlot(2) + require.NoError(t, err, "Count not set slot") + stateRoot, err := beaconState.HashTreeRoot(ctx) + require.NoError(t, err, "Could not hash genesis state") + + genesis := b.NewGenesisBlock(stateRoot[:]) + + parentRoot, err := genesis.Block.HashTreeRoot() + require.NoError(t, err, "Could not get signing root") + + var scBits [fieldparams.SyncAggregateSyncCommitteeBytesLength]byte + blk := ð.SignedBeaconBlockBellatrix{ + Block: ð.BeaconBlockBellatrix{ + ProposerIndex: 1, + Slot: 1, + ParentRoot: parentRoot[:], + StateRoot: genesis.Block.StateRoot, + Body: ð.BeaconBlockBodyBellatrix{ + RandaoReveal: genesis.Block.Body.RandaoReveal, + Graffiti: genesis.Block.Body.Graffiti, + Eth1Data: genesis.Block.Body.Eth1Data, + SyncAggregate: ð.SyncAggregate{SyncCommitteeBits: scBits[:], SyncCommitteeSignature: make([]byte, 96)}, + ExecutionPayload: &enginev1.ExecutionPayload{ + BlockNumber: 1, + ParentHash: make([]byte, fieldparams.RootLength), + FeeRecipient: make([]byte, fieldparams.FeeRecipientLength), + StateRoot: make([]byte, fieldparams.RootLength), + ReceiptsRoot: make([]byte, fieldparams.RootLength), + LogsBloom: make([]byte, fieldparams.LogsBloomLength), + PrevRandao: make([]byte, fieldparams.RootLength), + BaseFeePerGas: make([]byte, fieldparams.RootLength), + BlockHash: make([]byte, fieldparams.RootLength), + }, + }, + }, + Signature: genesis.Signature, + } + signedBlk, err := blocks.NewSignedBeaconBlock(blk) + require.NoError(t, err) + srv, ctrl, mockStream := setupServer(ctx, t) + defer ctrl.Finish() + srv.HeadFetcher = &mockChain.ChainService{ + Genesis: time.Now(), + State: beaconState, + Block: signedBlk, + Root: make([]byte, 32), + ValidatorsRoot: [32]byte{}, + } + + prevRando, err := helpers.RandaoMix(beaconState, prysmtime.CurrentEpoch(beaconState)) + require.NoError(t, err) + + wantedPayload := ðpb.EventPayloadAttributeV1{ + Version: version.String(version.Bellatrix), + Data: ðpb.EventPayloadAttributeV1_BasePayloadAttribute{ + ProposerIndex: 1, + ProposalSlot: 2, + ParentBlockNumber: 1, + ParentBlockRoot: make([]byte, 32), + ParentBlockHash: make([]byte, 32), + PayloadAttributes: &enginev1.PayloadAttributes{ + Timestamp: 24, + PrevRandao: prevRando, + SuggestedFeeRecipient: make([]byte, 20), + }, + }, + } + genericResponse, err := anypb.New(wantedPayload) + require.NoError(t, err) + wantedMessage := &gateway.EventSource{ + Event: PayloadAttributesTopic, + Data: genericResponse, + } + + assertFeedSendAndReceive(ctx, &assertFeedArgs{ + t: t, + srv: srv, + topics: []string{PayloadAttributesTopic}, + stream: mockStream, + shouldReceive: wantedMessage, + itemToSend: &feed.Event{ + Type: statefeed.NewHead, + Data: wantedPayload, + }, + feed: srv.StateNotifier.StateFeed(), + }) + }) + t.Run(PayloadAttributesTopic+"_capella", func(t *testing.T) { + ctx := context.Background() + beaconState, _ := util.DeterministicGenesisStateCapella(t, 1) + validator, err := beaconState.ValidatorAtIndex(0) + require.NoError(t, err, "Could not get validator") + by, err := hexutil.Decode("0x010000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b") + require.NoError(t, err) + validator.WithdrawalCredentials = by + err = beaconState.UpdateValidatorAtIndex(0, validator) + require.NoError(t, err) + err = beaconState.SetSlot(2) + require.NoError(t, err, "Count not set slot") + err = beaconState.SetNextWithdrawalValidatorIndex(0) + require.NoError(t, err, "Could not set withdrawal index") + err = beaconState.SetBalances([]uint64{33000000000}) + require.NoError(t, err, "Could not set validator balance") + stateRoot, err := beaconState.HashTreeRoot(ctx) + require.NoError(t, err, "Could not hash genesis state") + + genesis := b.NewGenesisBlock(stateRoot[:]) + + parentRoot, err := genesis.Block.HashTreeRoot() + require.NoError(t, err, "Could not get signing root") + + withdrawals, err := beaconState.ExpectedWithdrawals() + require.NoError(t, err, "Could get expected withdrawals") + require.NotEqual(t, len(withdrawals), 0) + var scBits [fieldparams.SyncAggregateSyncCommitteeBytesLength]byte + blk := ð.SignedBeaconBlockCapella{ + Block: ð.BeaconBlockCapella{ + ProposerIndex: 1, + Slot: 1, + ParentRoot: parentRoot[:], + StateRoot: genesis.Block.StateRoot, + Body: ð.BeaconBlockBodyCapella{ + RandaoReveal: genesis.Block.Body.RandaoReveal, + Graffiti: genesis.Block.Body.Graffiti, + Eth1Data: genesis.Block.Body.Eth1Data, + SyncAggregate: ð.SyncAggregate{SyncCommitteeBits: scBits[:], SyncCommitteeSignature: make([]byte, 96)}, + ExecutionPayload: &enginev1.ExecutionPayloadCapella{ + BlockNumber: 1, + ParentHash: make([]byte, fieldparams.RootLength), + FeeRecipient: make([]byte, fieldparams.FeeRecipientLength), + StateRoot: make([]byte, fieldparams.RootLength), + ReceiptsRoot: make([]byte, fieldparams.RootLength), + LogsBloom: make([]byte, fieldparams.LogsBloomLength), + PrevRandao: make([]byte, fieldparams.RootLength), + BaseFeePerGas: make([]byte, fieldparams.RootLength), + BlockHash: make([]byte, fieldparams.RootLength), + Withdrawals: withdrawals, + }, + }, + }, + Signature: genesis.Signature, + } + signedBlk, err := blocks.NewSignedBeaconBlock(blk) + require.NoError(t, err) + srv, ctrl, mockStream := setupServer(ctx, t) + defer ctrl.Finish() + srv.HeadFetcher = &mockChain.ChainService{ + Genesis: time.Now(), + State: beaconState, + Block: signedBlk, + Root: make([]byte, 32), + ValidatorsRoot: [32]byte{}, + } + + prevRando, err := helpers.RandaoMix(beaconState, prysmtime.CurrentEpoch(beaconState)) + require.NoError(t, err) + + wantedPayload := ðpb.EventPayloadAttributeV2{ + Version: version.String(version.Capella), + Data: ðpb.EventPayloadAttributeV2_BasePayloadAttribute{ + ProposerIndex: 1, + ProposalSlot: 2, + ParentBlockNumber: 1, + ParentBlockRoot: make([]byte, 32), + ParentBlockHash: make([]byte, 32), + PayloadAttributesV2: &enginev1.PayloadAttributesV2{ + Timestamp: 24, + PrevRandao: prevRando, + SuggestedFeeRecipient: make([]byte, 20), + Withdrawals: withdrawals, + }, + }, + } + genericResponse, err := anypb.New(wantedPayload) + require.NoError(t, err) + wantedMessage := &gateway.EventSource{ + Event: PayloadAttributesTopic, + Data: genericResponse, + } + + assertFeedSendAndReceive(ctx, &assertFeedArgs{ + t: t, + srv: srv, + topics: []string{PayloadAttributesTopic}, + stream: mockStream, + shouldReceive: wantedMessage, + itemToSend: &feed.Event{ + Type: statefeed.NewHead, + Data: wantedPayload, + }, + feed: srv.StateNotifier.StateFeed(), + }) + }) t.Run(FinalizedCheckpointTopic, func(t *testing.T) { ctx := context.Background() srv, ctrl, mockStream := setupServer(ctx, t) diff --git a/beacon-chain/rpc/eth/events/server.go b/beacon-chain/rpc/eth/events/server.go index f587936799ce..dfa809c530bd 100644 --- a/beacon-chain/rpc/eth/events/server.go +++ b/beacon-chain/rpc/eth/events/server.go @@ -6,6 +6,7 @@ package events import ( "context" + "github.com/prysmaticlabs/prysm/v3/beacon-chain/blockchain" blockfeed "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/feed/block" opfeed "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/feed/operation" statefeed "github.com/prysmaticlabs/prysm/v3/beacon-chain/core/feed/state" @@ -18,4 +19,5 @@ type Server struct { StateNotifier statefeed.Notifier BlockNotifier blockfeed.Notifier OperationNotifier opfeed.Notifier + HeadFetcher blockchain.HeadFetcher } diff --git a/beacon-chain/rpc/service.go b/beacon-chain/rpc/service.go index ca48c50500c0..07a45b780af9 100644 --- a/beacon-chain/rpc/service.go +++ b/beacon-chain/rpc/service.go @@ -335,6 +335,7 @@ func (s *Service) Start() { StateNotifier: s.cfg.StateNotifier, BlockNotifier: s.cfg.BlockNotifier, OperationNotifier: s.cfg.OperationNotifier, + HeadFetcher: s.cfg.HeadFetcher, }) if s.cfg.EnableDebugRPCEndpoints { log.Info("Enabled debug gRPC endpoints") diff --git a/proto/eth/v1/BUILD.bazel b/proto/eth/v1/BUILD.bazel index ed2b5d419556..0ffed2e3f147 100644 --- a/proto/eth/v1/BUILD.bazel +++ b/proto/eth/v1/BUILD.bazel @@ -18,6 +18,7 @@ proto_library( visibility = ["//visibility:public"], deps = [ "//proto/eth/ext:proto", + "//proto/engine/v1:proto", "@com_google_protobuf//:descriptor_proto", "@com_google_protobuf//:timestamp_proto", ], @@ -36,6 +37,7 @@ ssz_gen_marshal( go_proto = ":go_proto", includes = [ "//consensus-types/primitives:go_default_library", + "//proto/engine/v1:go_default_library", ], objs = [ "AggregateAttestationAndProof", @@ -70,10 +72,12 @@ go_proto_library( visibility = ["//visibility:public"], deps = [ "//proto/eth/ext:go_default_library", + "//proto/engine/v1:go_default_library", "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", "@com_github_golang_protobuf//proto:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", # keep "//consensus-types/primitives:go_default_library", + "@io_bazel_rules_go//proto/wkt:timestamp_go_proto", "@org_golang_google_protobuf//types/known/timestamppb:go_default_library", ], ) diff --git a/proto/eth/v1/events.pb.go b/proto/eth/v1/events.pb.go index 3bfb6b7d5c7b..08246001f2c4 100755 --- a/proto/eth/v1/events.pb.go +++ b/proto/eth/v1/events.pb.go @@ -12,6 +12,7 @@ import ( _ "github.com/golang/protobuf/protoc-gen-go/descriptor" github_com_prysmaticlabs_prysm_v3_consensus_types_primitives "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives" + v1 "github.com/prysmaticlabs/prysm/v3/proto/engine/v1" _ "github.com/prysmaticlabs/prysm/v3/proto/eth/ext" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -403,6 +404,290 @@ func (x *EventFinalizedCheckpoint) GetExecutionOptimistic() bool { return false } +type EventPayloadAttributeV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Data *EventPayloadAttributeV1_BasePayloadAttribute `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *EventPayloadAttributeV1) Reset() { + *x = EventPayloadAttributeV1{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_v1_events_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventPayloadAttributeV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventPayloadAttributeV1) ProtoMessage() {} + +func (x *EventPayloadAttributeV1) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_v1_events_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 EventPayloadAttributeV1.ProtoReflect.Descriptor instead. +func (*EventPayloadAttributeV1) Descriptor() ([]byte, []int) { + return file_proto_eth_v1_events_proto_rawDescGZIP(), []int{5} +} + +func (x *EventPayloadAttributeV1) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *EventPayloadAttributeV1) GetData() *EventPayloadAttributeV1_BasePayloadAttribute { + if x != nil { + return x.Data + } + return nil +} + +type EventPayloadAttributeV2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Data *EventPayloadAttributeV2_BasePayloadAttribute `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *EventPayloadAttributeV2) Reset() { + *x = EventPayloadAttributeV2{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_v1_events_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventPayloadAttributeV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventPayloadAttributeV2) ProtoMessage() {} + +func (x *EventPayloadAttributeV2) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_v1_events_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventPayloadAttributeV2.ProtoReflect.Descriptor instead. +func (*EventPayloadAttributeV2) Descriptor() ([]byte, []int) { + return file_proto_eth_v1_events_proto_rawDescGZIP(), []int{6} +} + +func (x *EventPayloadAttributeV2) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *EventPayloadAttributeV2) GetData() *EventPayloadAttributeV2_BasePayloadAttribute { + if x != nil { + return x.Data + } + return nil +} + +type EventPayloadAttributeV1_BasePayloadAttribute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProposalSlot github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.Slot `protobuf:"varint,3,opt,name=proposal_slot,json=proposalSlot,proto3" json:"proposal_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v3/consensus-types/primitives.Slot"` + ParentBlockNumber uint64 `protobuf:"varint,4,opt,name=parent_block_number,json=parentBlockNumber,proto3" json:"parent_block_number,omitempty"` + ParentBlockRoot []byte `protobuf:"bytes,5,opt,name=parent_block_root,json=parentBlockRoot,proto3" json:"parent_block_root,omitempty" ssz-size:"32"` + ParentBlockHash []byte `protobuf:"bytes,6,opt,name=parent_block_hash,json=parentBlockHash,proto3" json:"parent_block_hash,omitempty" ssz-size:"32"` + ProposerIndex github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.ValidatorIndex `protobuf:"varint,7,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v3/consensus-types/primitives.ValidatorIndex"` + PayloadAttributes *v1.PayloadAttributes `protobuf:"bytes,8,opt,name=payload_attributes,json=payloadAttributes,proto3" json:"payload_attributes,omitempty"` +} + +func (x *EventPayloadAttributeV1_BasePayloadAttribute) Reset() { + *x = EventPayloadAttributeV1_BasePayloadAttribute{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_v1_events_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventPayloadAttributeV1_BasePayloadAttribute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventPayloadAttributeV1_BasePayloadAttribute) ProtoMessage() {} + +func (x *EventPayloadAttributeV1_BasePayloadAttribute) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_v1_events_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventPayloadAttributeV1_BasePayloadAttribute.ProtoReflect.Descriptor instead. +func (*EventPayloadAttributeV1_BasePayloadAttribute) Descriptor() ([]byte, []int) { + return file_proto_eth_v1_events_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *EventPayloadAttributeV1_BasePayloadAttribute) GetProposalSlot() github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.Slot { + if x != nil { + return x.ProposalSlot + } + return github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.Slot(0) +} + +func (x *EventPayloadAttributeV1_BasePayloadAttribute) GetParentBlockNumber() uint64 { + if x != nil { + return x.ParentBlockNumber + } + return 0 +} + +func (x *EventPayloadAttributeV1_BasePayloadAttribute) GetParentBlockRoot() []byte { + if x != nil { + return x.ParentBlockRoot + } + return nil +} + +func (x *EventPayloadAttributeV1_BasePayloadAttribute) GetParentBlockHash() []byte { + if x != nil { + return x.ParentBlockHash + } + return nil +} + +func (x *EventPayloadAttributeV1_BasePayloadAttribute) GetProposerIndex() github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.ValidatorIndex { + if x != nil { + return x.ProposerIndex + } + return github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.ValidatorIndex(0) +} + +func (x *EventPayloadAttributeV1_BasePayloadAttribute) GetPayloadAttributes() *v1.PayloadAttributes { + if x != nil { + return x.PayloadAttributes + } + return nil +} + +type EventPayloadAttributeV2_BasePayloadAttribute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProposalSlot github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.Slot `protobuf:"varint,3,opt,name=proposal_slot,json=proposalSlot,proto3" json:"proposal_slot,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v3/consensus-types/primitives.Slot"` + ParentBlockNumber uint64 `protobuf:"varint,4,opt,name=parent_block_number,json=parentBlockNumber,proto3" json:"parent_block_number,omitempty"` + ParentBlockRoot []byte `protobuf:"bytes,5,opt,name=parent_block_root,json=parentBlockRoot,proto3" json:"parent_block_root,omitempty" ssz-size:"32"` + ParentBlockHash []byte `protobuf:"bytes,6,opt,name=parent_block_hash,json=parentBlockHash,proto3" json:"parent_block_hash,omitempty" ssz-size:"32"` + ProposerIndex github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.ValidatorIndex `protobuf:"varint,7,opt,name=proposer_index,json=proposerIndex,proto3" json:"proposer_index,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v3/consensus-types/primitives.ValidatorIndex"` + PayloadAttributesV2 *v1.PayloadAttributesV2 `protobuf:"bytes,8,opt,name=payload_attributes_v2,json=payloadAttributesV2,proto3" json:"payload_attributes_v2,omitempty"` +} + +func (x *EventPayloadAttributeV2_BasePayloadAttribute) Reset() { + *x = EventPayloadAttributeV2_BasePayloadAttribute{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_v1_events_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventPayloadAttributeV2_BasePayloadAttribute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventPayloadAttributeV2_BasePayloadAttribute) ProtoMessage() {} + +func (x *EventPayloadAttributeV2_BasePayloadAttribute) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_v1_events_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventPayloadAttributeV2_BasePayloadAttribute.ProtoReflect.Descriptor instead. +func (*EventPayloadAttributeV2_BasePayloadAttribute) Descriptor() ([]byte, []int) { + return file_proto_eth_v1_events_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *EventPayloadAttributeV2_BasePayloadAttribute) GetProposalSlot() github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.Slot { + if x != nil { + return x.ProposalSlot + } + return github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.Slot(0) +} + +func (x *EventPayloadAttributeV2_BasePayloadAttribute) GetParentBlockNumber() uint64 { + if x != nil { + return x.ParentBlockNumber + } + return 0 +} + +func (x *EventPayloadAttributeV2_BasePayloadAttribute) GetParentBlockRoot() []byte { + if x != nil { + return x.ParentBlockRoot + } + return nil +} + +func (x *EventPayloadAttributeV2_BasePayloadAttribute) GetParentBlockHash() []byte { + if x != nil { + return x.ParentBlockHash + } + return nil +} + +func (x *EventPayloadAttributeV2_BasePayloadAttribute) GetProposerIndex() github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.ValidatorIndex { + if x != nil { + return x.ProposerIndex + } + return github_com_prysmaticlabs_prysm_v3_consensus_types_primitives.ValidatorIndex(0) +} + +func (x *EventPayloadAttributeV2_BasePayloadAttribute) GetPayloadAttributesV2() *v1.PayloadAttributesV2 { + if x != nil { + return x.PayloadAttributesV2 + } + return nil +} + var File_proto_eth_v1_events_proto protoreflect.FileDescriptor var file_proto_eth_v1_events_proto_rawDesc = []byte{ @@ -412,99 +697,180 @@ var file_proto_eth_v1_events_proto_rawDesc = []byte{ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 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, 0x22, 0x2d, 0x0a, 0x13, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x22, 0x90, 0x03, 0x0a, 0x09, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x12, 0x59, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, 0x67, 0x69, 0x74, 0x68, + 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, 0x22, 0x2d, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, + 0x70, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x73, 0x22, 0x90, 0x03, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, + 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, 0x33, 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, 0x1c, 0x0a, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, + 0x33, 0x32, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x64, + 0x75, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, + 0x6f, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, + 0x52, 0x19, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x44, 0x75, 0x74, 0x79, 0x44, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x45, 0x0a, 0x1b, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x75, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x18, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x44, 0x75, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x6f, + 0x6f, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0xb8, 0x01, 0x0a, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, 0x33, 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, + 0x1c, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, + 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x31, 0x0a, + 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, + 0x22, 0xcb, 0x03, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, + 0x65, 0x6f, 0x72, 0x67, 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, 0x33, 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, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, + 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x68, 0x65, 0x61, + 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, + 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0c, 0x6f, 0x6c, 0x64, 0x48, 0x65, 0x61, 0x64, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x12, 0x2c, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, + 0x02, 0x33, 0x32, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x48, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x2c, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, + 0x32, 0x52, 0x0c, 0x6f, 0x6c, 0x64, 0x48, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x2c, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, + 0x0c, 0x6e, 0x65, 0x77, 0x48, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x5c, 0x0a, + 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x07, 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, 0x33, 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, 0x31, 0x0a, 0x14, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0xe7, + 0x01, 0x0a, 0x18, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, + 0x33, 0x32, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 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, 0x33, 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, 0x1c, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x1c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x29, 0x0a, 0x10, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x1c, 0x70, 0x72, - 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x64, 0x75, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x19, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, - 0x75, 0x73, 0x44, 0x75, 0x74, 0x79, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x52, - 0x6f, 0x6f, 0x74, 0x12, 0x45, 0x0a, 0x1b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x64, - 0x75, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, - 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, - 0x52, 0x18, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x44, 0x75, 0x74, 0x79, 0x44, 0x65, 0x70, - 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, - 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0xb8, 0x01, - 0x0a, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, - 0x33, 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, 0x1c, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x03, 0x20, + 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x05, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, - 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0xcb, 0x03, 0x0a, 0x0f, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x6f, 0x72, 0x67, 0x12, 0x59, 0x0a, 0x04, - 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x45, 0x82, 0xb5, 0x18, 0x41, + 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0xf1, 0x04, 0x0a, 0x17, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x56, 0x31, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x51, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x56, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x1a, 0xe8, 0x03, 0x0a, 0x14, 0x42, 0x61, 0x73, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x6a, 0x0a, 0x0d, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 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, 0x33, 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, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x05, 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, 0x32, 0x0a, 0x11, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x06, 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, 0x76, + 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 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, 0x33, 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, 0x54, 0x0a, 0x12, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x08, 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, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x11, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xf8, 0x04, 0x0a, + 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x32, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x32, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xef, 0x03, 0x0a, 0x14, 0x42, 0x61, 0x73, 0x65, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x6a, + 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 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, 0x33, 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, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x11, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, + 0x05, 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, 0x32, + 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x06, 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, 0x76, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 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, 0x33, 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, 0x64, 0x65, 0x70, 0x74, 0x68, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x2c, 0x0a, - 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0c, 0x6f, - 0x6c, 0x64, 0x48, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2c, 0x0a, 0x0e, 0x6e, - 0x65, 0x77, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0c, 0x6e, 0x65, 0x77, - 0x48, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x2c, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0c, 0x6f, 0x6c, 0x64, 0x48, 0x65, - 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x48, 0x65, 0x61, 0x64, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x5c, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x07, - 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, 0x33, 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, 0x31, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, - 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0xe7, 0x01, 0x0a, 0x18, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x1c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 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, 0x33, 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, 0x31, 0x0a, - 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x69, 0x73, 0x74, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, - 0x42, 0x7e, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 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, 0x33, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x0f, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 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, 0x5b, 0x0a, 0x15, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x5f, 0x76, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x56, 0x32, 0x52, 0x13, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x56, 0x32, 0x42, 0x7e, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x11, + 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x2e, 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, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, + 0x74, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -519,20 +885,30 @@ func file_proto_eth_v1_events_proto_rawDescGZIP() []byte { return file_proto_eth_v1_events_proto_rawDescData } -var file_proto_eth_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_proto_eth_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_proto_eth_v1_events_proto_goTypes = []interface{}{ - (*StreamEventsRequest)(nil), // 0: ethereum.eth.v1.StreamEventsRequest - (*EventHead)(nil), // 1: ethereum.eth.v1.EventHead - (*EventBlock)(nil), // 2: ethereum.eth.v1.EventBlock - (*EventChainReorg)(nil), // 3: ethereum.eth.v1.EventChainReorg - (*EventFinalizedCheckpoint)(nil), // 4: ethereum.eth.v1.EventFinalizedCheckpoint + (*StreamEventsRequest)(nil), // 0: ethereum.eth.v1.StreamEventsRequest + (*EventHead)(nil), // 1: ethereum.eth.v1.EventHead + (*EventBlock)(nil), // 2: ethereum.eth.v1.EventBlock + (*EventChainReorg)(nil), // 3: ethereum.eth.v1.EventChainReorg + (*EventFinalizedCheckpoint)(nil), // 4: ethereum.eth.v1.EventFinalizedCheckpoint + (*EventPayloadAttributeV1)(nil), // 5: ethereum.eth.v1.EventPayloadAttributeV1 + (*EventPayloadAttributeV2)(nil), // 6: ethereum.eth.v1.EventPayloadAttributeV2 + (*EventPayloadAttributeV1_BasePayloadAttribute)(nil), // 7: ethereum.eth.v1.EventPayloadAttributeV1.BasePayloadAttribute + (*EventPayloadAttributeV2_BasePayloadAttribute)(nil), // 8: ethereum.eth.v1.EventPayloadAttributeV2.BasePayloadAttribute + (*v1.PayloadAttributes)(nil), // 9: ethereum.engine.v1.PayloadAttributes + (*v1.PayloadAttributesV2)(nil), // 10: ethereum.engine.v1.PayloadAttributesV2 } var file_proto_eth_v1_events_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 7, // 0: ethereum.eth.v1.EventPayloadAttributeV1.data:type_name -> ethereum.eth.v1.EventPayloadAttributeV1.BasePayloadAttribute + 8, // 1: ethereum.eth.v1.EventPayloadAttributeV2.data:type_name -> ethereum.eth.v1.EventPayloadAttributeV2.BasePayloadAttribute + 9, // 2: ethereum.eth.v1.EventPayloadAttributeV1.BasePayloadAttribute.payload_attributes:type_name -> ethereum.engine.v1.PayloadAttributes + 10, // 3: ethereum.eth.v1.EventPayloadAttributeV2.BasePayloadAttribute.payload_attributes_v2:type_name -> ethereum.engine.v1.PayloadAttributesV2 + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_proto_eth_v1_events_proto_init() } @@ -601,6 +977,54 @@ func file_proto_eth_v1_events_proto_init() { return nil } } + file_proto_eth_v1_events_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventPayloadAttributeV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_v1_events_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventPayloadAttributeV2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_v1_events_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventPayloadAttributeV1_BasePayloadAttribute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_eth_v1_events_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventPayloadAttributeV2_BasePayloadAttribute); 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{ @@ -608,7 +1032,7 @@ func file_proto_eth_v1_events_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_eth_v1_events_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/eth/v1/events.proto b/proto/eth/v1/events.proto index 6129cc88d124..df48ddb6f9ce 100644 --- a/proto/eth/v1/events.proto +++ b/proto/eth/v1/events.proto @@ -17,6 +17,7 @@ package ethereum.eth.v1; import "google/protobuf/descriptor.proto"; import "proto/eth/ext/options.proto"; +import "proto/engine/v1/execution_engine.proto"; option csharp_namespace = "Ethereum.Eth.V1"; option go_package = "github.com/prysmaticlabs/prysm/v3/proto/eth/v1"; @@ -104,3 +105,60 @@ message EventFinalizedCheckpoint { // Information about optimistic sync. bool execution_optimistic = 4; } + +message EventPayloadAttributeV1 { + // the identifier of the beacon hard fork at `proposal_slot`, e.g.`"bellatrix"`. + string version = 1; + BasePayloadAttribute data = 2; + message BasePayloadAttribute { + // The slot at which a block using these payload attributes may be built. + uint64 proposal_slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives.Slot"]; + + // The execution block number of the parent block. + uint64 parent_block_number = 4; + + // The beacon block root of the parent block to be built upon. + bytes parent_block_root = 5 [(ethereum.eth.ext.ssz_size) = "32"]; + + // The execution block hash of the parent block. + bytes parent_block_hash = 6 [(ethereum.eth.ext.ssz_size) = "32"]; + + // The validator index of the proposer at proposal_slot on the chain identified by parent_block_root. + uint64 proposer_index = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives.ValidatorIndex"]; + + // payload_attributes: beacon API encoding of PayloadAttributesV as defined by the execution-apis specification. + // The version N must match the payload attributes for the hard fork matching version. + // The beacon API encoded object must have equivalent fields to its counterpart in execution-apis with two differences: + // 1) snake_case identifiers must be used rather than camelCase; 2) integers must be encoded as quoted decimals rather than big-endian hex. + engine.v1.PayloadAttributes payload_attributes = 8; + } +} + + +message EventPayloadAttributeV2 { + // the identifier of the beacon hard fork at `proposal_slot`, e.g.`"bellatrix"`. + string version = 1; + BasePayloadAttribute data = 2; + message BasePayloadAttribute { + // The slot at which a block using these payload attributes may be built. + uint64 proposal_slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives.Slot"]; + + // The execution block number of the parent block. + uint64 parent_block_number = 4; + + // The beacon block root of the parent block to be built upon. + bytes parent_block_root = 5 [(ethereum.eth.ext.ssz_size) = "32"]; + + // The execution block hash of the parent block. + bytes parent_block_hash = 6 [(ethereum.eth.ext.ssz_size) = "32"]; + + // The validator index of the proposer at proposal_slot on the chain identified by parent_block_root. + uint64 proposer_index = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives.ValidatorIndex"]; + + // payload_attributes: beacon API encoding of PayloadAttributesV as defined by the execution-apis specification. + // The version N must match the payload attributes for the hard fork matching version. + // The beacon API encoded object must have equivalent fields to its counterpart in execution-apis with two differences: + // 1) snake_case identifiers must be used rather than camelCase; 2) integers must be encoded as quoted decimals rather than big-endian hex. + engine.v1.PayloadAttributesV2 payload_attributes_v2 = 8; + } +} \ No newline at end of file