From b57effd096c9153b5329f7c09dd374ebd7c06d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kapka?= Date: Thu, 12 Oct 2023 19:53:33 +0200 Subject: [PATCH] HTTP Beacon APIs: 3 state endpoints (#13001) * HTTP Beacon APIs: 3 state endpoints * remove API middleware e2e evaluator * remove evaluator registrations * review feedback * compilation fix --- .../rpc/apimiddleware/custom_hooks.go | 37 - .../rpc/apimiddleware/custom_hooks_test.go | 25 - .../rpc/apimiddleware/endpoint_factory.go | 14 - beacon-chain/rpc/apimiddleware/structs.go | 29 - beacon-chain/rpc/eth/beacon/BUILD.bazel | 8 +- beacon-chain/rpc/eth/beacon/handlers.go | 8 +- beacon-chain/rpc/eth/beacon/handlers_state.go | 336 ++++++++ .../rpc/eth/beacon/handlers_state_test.go | 649 ++++++++++++++++ beacon-chain/rpc/eth/beacon/state.go | 137 ---- beacon-chain/rpc/eth/beacon/state_test.go | 234 ------ beacon-chain/rpc/eth/beacon/structs.go | 31 + beacon-chain/rpc/eth/beacon/sync_committee.go | 173 ----- .../rpc/eth/beacon/sync_committee_test.go | 340 --------- beacon-chain/rpc/service.go | 3 + proto/eth/service/beacon_chain_service.pb.go | 505 +++++------- .../eth/service/beacon_chain_service.pb.gw.go | 339 --------- proto/eth/service/beacon_chain_service.proto | 32 - proto/eth/v1/beacon_chain.pb.go | 720 +++++++----------- proto/eth/v1/beacon_chain.proto | 11 - proto/eth/v1/node.pb.go | 65 +- proto/eth/v1/node.proto | 2 - proto/eth/v2/beacon_state.pb.go | 378 ++------- proto/eth/v2/beacon_state.proto | 15 - proto/eth/v2/sync_committee.pb.go | 354 +-------- proto/eth/v2/sync_committee.proto | 27 - testing/endtoend/endtoend_setup_test.go | 4 - testing/endtoend/evaluators/BUILD.bazel | 1 - testing/endtoend/evaluators/api_middleware.go | 93 --- .../beaconapi_evaluators/beacon_api.go | 4 +- 29 files changed, 1611 insertions(+), 2963 deletions(-) create mode 100644 beacon-chain/rpc/eth/beacon/handlers_state.go create mode 100644 beacon-chain/rpc/eth/beacon/handlers_state_test.go delete mode 100644 beacon-chain/rpc/eth/beacon/state.go delete mode 100644 beacon-chain/rpc/eth/beacon/state_test.go delete mode 100644 beacon-chain/rpc/eth/beacon/sync_committee.go delete mode 100644 beacon-chain/rpc/eth/beacon/sync_committee_test.go delete mode 100644 testing/endtoend/evaluators/api_middleware.go diff --git a/beacon-chain/rpc/apimiddleware/custom_hooks.go b/beacon-chain/rpc/apimiddleware/custom_hooks.go index c1b122abc7..9df36dd849 100644 --- a/beacon-chain/rpc/apimiddleware/custom_hooks.go +++ b/beacon-chain/rpc/apimiddleware/custom_hooks.go @@ -279,43 +279,6 @@ func preparePublishedBlindedBlock(endpoint *apimiddleware.Endpoint, _ http.Respo return apimiddleware.InternalServerError(errors.New("unsupported block type")) } -type tempSyncCommitteesResponseJson struct { - Data *tempSyncCommitteeValidatorsJson `json:"data"` -} - -type tempSyncCommitteeValidatorsJson struct { - Validators []string `json:"validators"` - ValidatorAggregates []*tempSyncSubcommitteeValidatorsJson `json:"validator_aggregates"` -} - -type tempSyncSubcommitteeValidatorsJson struct { - Validators []string `json:"validators"` -} - -// https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.0.0#/Beacon/getEpochSyncCommittees returns validator_aggregates as a nested array. -// grpc-gateway returns a struct with nested fields which we have to transform into a plain 2D array. -func prepareValidatorAggregates(body []byte, responseContainer interface{}) (apimiddleware.RunDefault, apimiddleware.ErrorJson) { - tempContainer := &tempSyncCommitteesResponseJson{} - if err := json.Unmarshal(body, tempContainer); err != nil { - return false, apimiddleware.InternalServerErrorWithMessage(err, "could not unmarshal response into temp container") - } - container, ok := responseContainer.(*SyncCommitteesResponseJson) - if !ok { - return false, apimiddleware.InternalServerError(errors.New("container is not of the correct type")) - } - - container.Data = &SyncCommitteeValidatorsJson{} - container.Data.Validators = tempContainer.Data.Validators - container.Data.ValidatorAggregates = make([][]string, len(tempContainer.Data.ValidatorAggregates)) - for i, srcValAgg := range tempContainer.Data.ValidatorAggregates { - dstValAgg := make([]string, len(srcValAgg.Validators)) - copy(dstValAgg, tempContainer.Data.ValidatorAggregates[i].Validators) - container.Data.ValidatorAggregates[i] = dstValAgg - } - - return false, nil -} - type phase0BlockResponseJson struct { Version string `json:"version" enum:"true"` Data *SignedBeaconBlockJson `json:"data"` diff --git a/beacon-chain/rpc/apimiddleware/custom_hooks_test.go b/beacon-chain/rpc/apimiddleware/custom_hooks_test.go index d55d6c04aa..bd105ba4fe 100644 --- a/beacon-chain/rpc/apimiddleware/custom_hooks_test.go +++ b/beacon-chain/rpc/apimiddleware/custom_hooks_test.go @@ -360,31 +360,6 @@ func TestPreparePublishedBlindedBlock(t *testing.T) { }) } -func TestPrepareValidatorAggregates(t *testing.T) { - body := &tempSyncCommitteesResponseJson{ - Data: &tempSyncCommitteeValidatorsJson{ - Validators: []string{"1", "2"}, - ValidatorAggregates: []*tempSyncSubcommitteeValidatorsJson{ - { - Validators: []string{"3", "4"}, - }, - { - Validators: []string{"5"}, - }, - }, - }, - } - bodyJson, err := json.Marshal(body) - require.NoError(t, err) - - container := &SyncCommitteesResponseJson{} - runDefault, errJson := prepareValidatorAggregates(bodyJson, container) - require.Equal(t, nil, errJson) - require.Equal(t, apimiddleware.RunDefault(false), runDefault) - assert.DeepEqual(t, []string{"1", "2"}, container.Data.Validators) - require.DeepEqual(t, [][]string{{"3", "4"}, {"5"}}, container.Data.ValidatorAggregates) -} - func TestSerializeV2Block(t *testing.T) { t.Run("Phase 0", func(t *testing.T) { response := &BlockV2ResponseJson{ diff --git a/beacon-chain/rpc/apimiddleware/endpoint_factory.go b/beacon-chain/rpc/apimiddleware/endpoint_factory.go index d8c09f7a3a..6366411725 100644 --- a/beacon-chain/rpc/apimiddleware/endpoint_factory.go +++ b/beacon-chain/rpc/apimiddleware/endpoint_factory.go @@ -16,9 +16,6 @@ func (f *BeaconEndpointFactory) IsNil() bool { // Paths is a collection of all valid beacon chain API paths. func (_ *BeaconEndpointFactory) Paths() []string { return []string{ - "/eth/v1/beacon/states/{state_id}/root", - "/eth/v1/beacon/states/{state_id}/sync_committees", - "/eth/v1/beacon/states/{state_id}/randao", "/eth/v1/beacon/blinded_blocks", "/eth/v1/beacon/blocks/{block_id}", "/eth/v2/beacon/blocks/{block_id}", @@ -45,17 +42,6 @@ func (_ *BeaconEndpointFactory) Paths() []string { func (_ *BeaconEndpointFactory) Create(path string) (*apimiddleware.Endpoint, error) { endpoint := apimiddleware.DefaultEndpoint() switch path { - case "/eth/v1/beacon/states/{state_id}/root": - endpoint.GetResponse = &StateRootResponseJson{} - case "/eth/v1/beacon/states/{state_id}/sync_committees": - endpoint.RequestQueryParams = []apimiddleware.QueryParam{{Name: "epoch"}} - endpoint.GetResponse = &SyncCommitteesResponseJson{} - endpoint.Hooks = apimiddleware.HookCollection{ - OnPreDeserializeGrpcResponseBodyIntoContainer: prepareValidatorAggregates, - } - case "/eth/v1/beacon/states/{state_id}/randao": - endpoint.RequestQueryParams = []apimiddleware.QueryParam{{Name: "epoch"}} - endpoint.GetResponse = &RandaoResponseJson{} case "/eth/v1/beacon/blocks/{block_id}": endpoint.GetResponse = &BlockResponseJson{} endpoint.CustomHandlers = []apimiddleware.CustomHandler{handleGetBeaconBlockSSZ} diff --git a/beacon-chain/rpc/apimiddleware/structs.go b/beacon-chain/rpc/apimiddleware/structs.go index 511464ed10..b7cff92552 100644 --- a/beacon-chain/rpc/apimiddleware/structs.go +++ b/beacon-chain/rpc/apimiddleware/structs.go @@ -20,30 +20,6 @@ type WeakSubjectivityResponse struct { } `json:"data"` } -type StateRootResponseJson struct { - Data *StateRootResponse_StateRootJson `json:"data"` - ExecutionOptimistic bool `json:"execution_optimistic"` - Finalized bool `json:"finalized"` -} - -type StateRootResponse_StateRootJson struct { - StateRoot string `json:"root" hex:"true"` -} - -type SyncCommitteesResponseJson struct { - Data *SyncCommitteeValidatorsJson `json:"data"` - ExecutionOptimistic bool `json:"execution_optimistic"` - Finalized bool `json:"finalized"` -} - -type RandaoResponseJson struct { - Data *struct { - Randao string `json:"randao" hex:"true"` - } `json:"data"` - ExecutionOptimistic bool `json:"execution_optimistic"` - Finalized bool `json:"finalized"` -} - type BlockResponseJson struct { Data *SignedBeaconBlockJson `json:"data"` } @@ -872,11 +848,6 @@ type SyncCommitteeJson struct { AggregatePubkey string `json:"aggregate_pubkey" hex:"true"` } -type SyncCommitteeValidatorsJson struct { - Validators []string `json:"validators"` - ValidatorAggregates [][]string `json:"validator_aggregates"` -} - type PendingAttestationJson struct { AggregationBits string `json:"aggregation_bits" hex:"true"` Data *AttestationDataJson `json:"data"` diff --git a/beacon-chain/rpc/eth/beacon/BUILD.bazel b/beacon-chain/rpc/eth/beacon/BUILD.bazel index 27e198881b..83c8ddf0ca 100644 --- a/beacon-chain/rpc/eth/beacon/BUILD.bazel +++ b/beacon-chain/rpc/eth/beacon/BUILD.bazel @@ -8,13 +8,12 @@ go_library( "config.go", "handlers.go", "handlers_pool.go", + "handlers_state.go", "handlers_validator.go", "log.go", "pool.go", "server.go", - "state.go", "structs.go", - "sync_committee.go", ], importpath = "github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/eth/beacon", visibility = ["//visibility:public"], @@ -83,13 +82,12 @@ go_test( "blocks_test.go", "config_test.go", "handlers_pool_test.go", + "handlers_state_test.go", "handlers_test.go", "handlers_validators_test.go", "init_test.go", "pool_test.go", "server_test.go", - "state_test.go", - "sync_committee_test.go", ], embed = [":go_default_library"], deps = [ @@ -149,8 +147,6 @@ go_test( "@com_github_prysmaticlabs_go_bitfield//:go_default_library", "@com_github_stretchr_testify//mock:go_default_library", "@org_golang_google_grpc//:go_default_library", - "@org_golang_google_grpc//codes:go_default_library", - "@org_golang_google_grpc//status:go_default_library", "@org_golang_google_protobuf//types/known/emptypb:go_default_library", ], ) diff --git a/beacon-chain/rpc/eth/beacon/handlers.go b/beacon-chain/rpc/eth/beacon/handlers.go index 4f0b10f2c0..89607de170 100644 --- a/beacon-chain/rpc/eth/beacon/handlers.go +++ b/beacon-chain/rpc/eth/beacon/handlers.go @@ -664,13 +664,13 @@ func (s *Server) GetStateFork(w http.ResponseWriter, r *http.Request) { } st, err := s.Stater.State(ctx, []byte(stateId)) if err != nil { - http2.HandleError(w, err.Error(), http.StatusInternalServerError) + shared.WriteStateFetchError(w, err) return } fork := st.Fork() isOptimistic, err := helpers.IsOptimistic(ctx, []byte(stateId), s.OptimisticModeFetcher, s.Stater, s.ChainInfoFetcher, s.BeaconDB) if err != nil { - http2.HandleError(w, errors.Wrap(err, "Could not check if slot's block is optimistic").Error(), http.StatusInternalServerError) + http2.HandleError(w, "Could not check optimistic status"+err.Error(), http.StatusInternalServerError) return } blockRoot, err := st.LatestBlockHeader().HashTreeRoot() @@ -772,7 +772,7 @@ func (s *Server) GetCommittees(w http.ResponseWriter, r *http.Request) { isOptimistic, err := helpers.IsOptimistic(ctx, []byte(stateId), s.OptimisticModeFetcher, s.Stater, s.ChainInfoFetcher, s.BeaconDB) if err != nil { - http2.HandleError(w, "Could not check if slot's block is optimistic: "+err.Error(), http.StatusInternalServerError) + http2.HandleError(w, "Could not check optimistic status: "+err.Error(), http.StatusInternalServerError) return } @@ -967,7 +967,7 @@ func (s *Server) GetFinalityCheckpoints(w http.ResponseWriter, r *http.Request) } isOptimistic, err := helpers.IsOptimistic(ctx, []byte(stateId), s.OptimisticModeFetcher, s.Stater, s.ChainInfoFetcher, s.BeaconDB) if err != nil { - http2.HandleError(w, "Could not check if slot's block is optimistic: "+err.Error(), http.StatusInternalServerError) + http2.HandleError(w, "Could not check optimistic status: "+err.Error(), http.StatusInternalServerError) return } blockRoot, err := st.LatestBlockHeader().HashTreeRoot() diff --git a/beacon-chain/rpc/eth/beacon/handlers_state.go b/beacon-chain/rpc/eth/beacon/handlers_state.go new file mode 100644 index 0000000000..5163b8b86e --- /dev/null +++ b/beacon-chain/rpc/eth/beacon/handlers_state.go @@ -0,0 +1,336 @@ +package beacon + +import ( + "context" + "fmt" + "net/http" + "strconv" + + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/gorilla/mux" + "github.com/prysmaticlabs/prysm/v4/beacon-chain/core/altair" + "github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/eth/helpers" + "github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/eth/shared" + "github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/lookup" + "github.com/prysmaticlabs/prysm/v4/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v4/config/params" + "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v4/encoding/bytesutil" + http2 "github.com/prysmaticlabs/prysm/v4/network/http" + ethpbalpha "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v4/time/slots" + "go.opencensus.io/trace" +) + +type syncCommitteeStateRequest struct { + epoch *primitives.Epoch + stateId []byte +} + +// GetStateRoot calculates HashTreeRoot for state with given 'stateId'. If stateId is root, same value will be returned. +func (s *Server) GetStateRoot(w http.ResponseWriter, r *http.Request) { + ctx, span := trace.StartSpan(r.Context(), "beacon.GetStateRoot") + defer span.End() + + stateId := mux.Vars(r)["state_id"] + if stateId == "" { + http2.HandleError(w, "state_id is required in URL params", http.StatusBadRequest) + return + } + + stateRoot, err := s.Stater.StateRoot(ctx, []byte(stateId)) + if err != nil { + if rootNotFoundErr, ok := err.(*lookup.StateRootNotFoundError); ok { + http2.HandleError(w, "State root not found: "+rootNotFoundErr.Error(), http.StatusNotFound) + return + } else if parseErr, ok := err.(*lookup.StateIdParseError); ok { + http2.HandleError(w, "Invalid state ID: "+parseErr.Error(), http.StatusBadRequest) + return + } + http2.HandleError(w, "Could not get state root: "+err.Error(), http.StatusInternalServerError) + return + } + st, err := s.Stater.State(ctx, []byte(stateId)) + if err != nil { + shared.WriteStateFetchError(w, err) + return + } + isOptimistic, err := helpers.IsOptimistic(ctx, []byte(stateId), s.OptimisticModeFetcher, s.Stater, s.ChainInfoFetcher, s.BeaconDB) + if err != nil { + http2.HandleError(w, "Could not check optimistic status: "+err.Error(), http.StatusInternalServerError) + return + } + blockRoot, err := st.LatestBlockHeader().HashTreeRoot() + if err != nil { + http2.HandleError(w, "Could not calculate root of latest block header: "+err.Error(), http.StatusInternalServerError) + return + } + isFinalized := s.FinalizationFetcher.IsFinalized(ctx, blockRoot) + + resp := &GetStateRootResponse{ + Data: &StateRoot{ + Root: hexutil.Encode(stateRoot), + }, + ExecutionOptimistic: isOptimistic, + Finalized: isFinalized, + } + http2.WriteJson(w, resp) +} + +// GetRandao fetches the RANDAO mix for the requested epoch from the state identified by state_id. +// If an epoch is not specified then the RANDAO mix for the state's current epoch will be returned. +// By adjusting the state_id parameter you can query for any historic value of the RANDAO mix. +// Ordinarily states from the same epoch will mutate the RANDAO mix for that epoch as blocks are applied. +func (s *Server) GetRandao(w http.ResponseWriter, r *http.Request) { + ctx, span := trace.StartSpan(r.Context(), "beacon.GetRandao") + defer span.End() + + stateId := mux.Vars(r)["state_id"] + if stateId == "" { + http2.HandleError(w, "state_id is required in URL params", http.StatusBadRequest) + return + } + ok, rawEpoch, e := shared.UintFromQuery(w, r, "epoch") + if !ok { + return + } + + st, err := s.Stater.State(ctx, []byte(stateId)) + if err != nil { + shared.WriteStateFetchError(w, err) + return + } + + stEpoch := slots.ToEpoch(st.Slot()) + epoch := stEpoch + if rawEpoch != "" { + epoch = primitives.Epoch(e) + } + + // future epochs and epochs too far back are not supported. + randaoEpochLowerBound := uint64(0) + // Lower bound should not underflow. + if uint64(stEpoch) > uint64(st.RandaoMixesLength()) { + randaoEpochLowerBound = uint64(stEpoch) - uint64(st.RandaoMixesLength()) + } + if epoch > stEpoch || uint64(epoch) < randaoEpochLowerBound+1 { + http2.HandleError(w, "Epoch is out of range for the randao mixes of the state", http.StatusBadRequest) + return + } + idx := epoch % params.BeaconConfig().EpochsPerHistoricalVector + randao, err := st.RandaoMixAtIndex(uint64(idx)) + if err != nil { + http2.HandleError(w, fmt.Sprintf("Could not get randao mix at index %d: %v", idx, err), http.StatusInternalServerError) + return + } + + isOptimistic, err := helpers.IsOptimistic(ctx, []byte(stateId), s.OptimisticModeFetcher, s.Stater, s.ChainInfoFetcher, s.BeaconDB) + if err != nil { + http2.HandleError(w, "Could not check optimistic status: "+err.Error(), http.StatusInternalServerError) + return + } + + blockRoot, err := st.LatestBlockHeader().HashTreeRoot() + if err != nil { + http2.HandleError(w, "Could not calculate root of latest block header: "+err.Error(), http.StatusInternalServerError) + return + } + isFinalized := s.FinalizationFetcher.IsFinalized(ctx, blockRoot) + + resp := &GetRandaoResponse{ + Data: &Randao{Randao: hexutil.Encode(randao)}, + ExecutionOptimistic: isOptimistic, + Finalized: isFinalized, + } + http2.WriteJson(w, resp) +} + +// GetSyncCommittees retrieves the sync committees for the given epoch. +// If the epoch is not passed in, then the sync committees for the epoch of the state will be obtained. +func (s *Server) GetSyncCommittees(w http.ResponseWriter, r *http.Request) { + ctx, span := trace.StartSpan(r.Context(), "beacon.GetSyncCommittees") + defer span.End() + + stateId := mux.Vars(r)["state_id"] + if stateId == "" { + http2.HandleError(w, "state_id is required in URL params", http.StatusBadRequest) + return + } + ok, rawEpoch, e := shared.UintFromQuery(w, r, "epoch") + if !ok { + return + } + epoch := primitives.Epoch(e) + + currentSlot := s.GenesisTimeFetcher.CurrentSlot() + currentEpoch := slots.ToEpoch(currentSlot) + currentPeriodStartEpoch, err := slots.SyncCommitteePeriodStartEpoch(currentEpoch) + if err != nil { + http2.HandleError(w, fmt.Sprintf("Could not calculate start period for slot %d: %v", currentSlot, err), http.StatusInternalServerError) + return + } + + requestNextCommittee := false + if rawEpoch != "" { + reqPeriodStartEpoch, err := slots.SyncCommitteePeriodStartEpoch(epoch) + if err != nil { + http2.HandleError(w, fmt.Sprintf("Could not calculate start period for epoch %d: %v", e, err), http.StatusInternalServerError) + return + } + if reqPeriodStartEpoch > currentPeriodStartEpoch+params.BeaconConfig().EpochsPerSyncCommitteePeriod { + http2.HandleError( + w, + fmt.Sprintf("Could not fetch sync committee too far in the future (requested epoch %d, current epoch %d)", e, currentEpoch), + http.StatusBadRequest, + ) + return + } + if reqPeriodStartEpoch > currentPeriodStartEpoch { + requestNextCommittee = true + epoch = currentPeriodStartEpoch + } + } + + syncCommitteeReq := &syncCommitteeStateRequest{ + epoch: nil, + stateId: []byte(stateId), + } + if rawEpoch != "" { + syncCommitteeReq.epoch = &epoch + } + st, ok := s.stateForSyncCommittee(ctx, w, syncCommitteeReq) + if !ok { + return + } + + var committeeIndices []string + var committee *ethpbalpha.SyncCommittee + if requestNextCommittee { + // Get the next sync committee and sync committee indices from the state. + committeeIndices, committee, err = nextCommitteeIndicesFromState(st) + if err != nil { + http2.HandleError(w, "Could not get next sync committee indices: "+err.Error(), http.StatusInternalServerError) + return + } + } else { + // Get the current sync committee and sync committee indices from the state. + committeeIndices, committee, err = currentCommitteeIndicesFromState(st) + if err != nil { + http2.HandleError(w, "Could not get current sync committee indices: "+err.Error(), http.StatusInternalServerError) + return + } + } + subcommittees, err := extractSyncSubcommittees(st, committee) + if err != nil { + http2.HandleError(w, "Could not extract sync subcommittees: "+err.Error(), http.StatusInternalServerError) + return + } + + isOptimistic, err := helpers.IsOptimistic(ctx, []byte(stateId), s.OptimisticModeFetcher, s.Stater, s.ChainInfoFetcher, s.BeaconDB) + if err != nil { + http2.HandleError(w, "Could not check optimistic status: "+err.Error(), http.StatusInternalServerError) + return + } + + blockRoot, err := st.LatestBlockHeader().HashTreeRoot() + if err != nil { + http2.HandleError(w, "Could not calculate root of latest block header: "+err.Error(), http.StatusInternalServerError) + return + } + isFinalized := s.FinalizationFetcher.IsFinalized(ctx, blockRoot) + + resp := GetSyncCommitteeResponse{ + Data: &SyncCommitteeValidators{ + Validators: committeeIndices, + ValidatorAggregates: subcommittees, + }, + ExecutionOptimistic: isOptimistic, + Finalized: isFinalized, + } + http2.WriteJson(w, resp) +} + +func committeeIndicesFromState(st state.BeaconState, committee *ethpbalpha.SyncCommittee) ([]string, *ethpbalpha.SyncCommittee, error) { + committeeIndices := make([]string, len(committee.Pubkeys)) + for i, key := range committee.Pubkeys { + index, ok := st.ValidatorIndexByPubkey(bytesutil.ToBytes48(key)) + if !ok { + return nil, nil, fmt.Errorf( + "validator index not found for pubkey %#x", + bytesutil.Trunc(key), + ) + } + committeeIndices[i] = strconv.FormatUint(uint64(index), 10) + } + return committeeIndices, committee, nil +} + +func currentCommitteeIndicesFromState(st state.BeaconState) ([]string, *ethpbalpha.SyncCommittee, error) { + committee, err := st.CurrentSyncCommittee() + if err != nil { + return nil, nil, fmt.Errorf( + "could not get sync committee: %v", err, + ) + } + + return committeeIndicesFromState(st, committee) +} + +func nextCommitteeIndicesFromState(st state.BeaconState) ([]string, *ethpbalpha.SyncCommittee, error) { + committee, err := st.NextSyncCommittee() + if err != nil { + return nil, nil, fmt.Errorf( + "could not get sync committee: %v", err, + ) + } + + return committeeIndicesFromState(st, committee) +} + +func extractSyncSubcommittees(st state.BeaconState, committee *ethpbalpha.SyncCommittee) ([][]string, error) { + subcommitteeCount := params.BeaconConfig().SyncCommitteeSubnetCount + subcommittees := make([][]string, subcommitteeCount) + for i := uint64(0); i < subcommitteeCount; i++ { + pubkeys, err := altair.SyncSubCommitteePubkeys(committee, primitives.CommitteeIndex(i)) + if err != nil { + return nil, fmt.Errorf( + "failed to get subcommittee pubkeys: %v", err, + ) + } + subcommittee := make([]string, len(pubkeys)) + for j, key := range pubkeys { + index, ok := st.ValidatorIndexByPubkey(bytesutil.ToBytes48(key)) + if !ok { + return nil, fmt.Errorf( + "validator index not found for pubkey %#x", + bytesutil.Trunc(key), + ) + } + subcommittee[j] = strconv.FormatUint(uint64(index), 10) + } + subcommittees[i] = subcommittee + } + return subcommittees, nil +} + +func (s *Server) stateForSyncCommittee(ctx context.Context, w http.ResponseWriter, req *syncCommitteeStateRequest) (state.BeaconState, bool) { + if req.epoch != nil { + slot, err := slots.EpochStart(*req.epoch) + if err != nil { + http2.HandleError(w, fmt.Sprintf("Could not calculate start slot for epoch %d: %v", *req.epoch, err), http.StatusInternalServerError) + return nil, false + } + st, err := s.Stater.State(ctx, []byte(strconv.FormatUint(uint64(slot), 10))) + if err != nil { + shared.WriteStateFetchError(w, err) + return nil, false + } + return st, true + } + st, err := s.Stater.State(ctx, req.stateId) + if err != nil { + shared.WriteStateFetchError(w, err) + return nil, false + } + return st, true +} diff --git a/beacon-chain/rpc/eth/beacon/handlers_state_test.go b/beacon-chain/rpc/eth/beacon/handlers_state_test.go new file mode 100644 index 0000000000..a93621ebc5 --- /dev/null +++ b/beacon-chain/rpc/eth/beacon/handlers_state_test.go @@ -0,0 +1,649 @@ +package beacon + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "net/http" + "net/http/httptest" + "strconv" + "testing" + "time" + + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/gorilla/mux" + chainMock "github.com/prysmaticlabs/prysm/v4/beacon-chain/blockchain/testing" + dbTest "github.com/prysmaticlabs/prysm/v4/beacon-chain/db/testing" + "github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/testutil" + "github.com/prysmaticlabs/prysm/v4/beacon-chain/state" + "github.com/prysmaticlabs/prysm/v4/config/params" + "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v4/encoding/bytesutil" + http2 "github.com/prysmaticlabs/prysm/v4/network/http" + ethpbalpha "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/v4/testing/assert" + "github.com/prysmaticlabs/prysm/v4/testing/require" + "github.com/prysmaticlabs/prysm/v4/testing/util" +) + +func TestGetStateRoot(t *testing.T) { + ctx := context.Background() + fakeState, err := util.NewBeaconState() + require.NoError(t, err) + stateRoot, err := fakeState.HashTreeRoot(ctx) + require.NoError(t, err) + db := dbTest.SetupDB(t) + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + util.SaveBlock(t, ctx, db, blk) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + + chainService := &chainMock.ChainService{} + s := &Server{ + Stater: &testutil.MockStater{ + BeaconStateRoot: stateRoot[:], + BeaconState: fakeState, + }, + HeadFetcher: chainService, + OptimisticModeFetcher: chainService, + FinalizationFetcher: chainService, + BeaconDB: db, + } + + request := httptest.NewRequest(http.MethodGet, "http://example.com//eth/v1/beacon/states/{state_id}/root", nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetStateRoot(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetStateRootResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + assert.Equal(t, hexutil.Encode(stateRoot[:]), resp.Data.Root) + + t.Run("execution optimistic", func(t *testing.T) { + chainService := &chainMock.ChainService{Optimistic: true} + s := &Server{ + Stater: &testutil.MockStater{ + BeaconStateRoot: stateRoot[:], + BeaconState: fakeState, + }, + HeadFetcher: chainService, + OptimisticModeFetcher: chainService, + FinalizationFetcher: chainService, + BeaconDB: db, + } + + request := httptest.NewRequest(http.MethodGet, "http://example.com//eth/v1/beacon/states/{state_id}/root", nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetStateRoot(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetStateRootResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + assert.DeepEqual(t, true, resp.ExecutionOptimistic) + }) + + t.Run("finalized", func(t *testing.T) { + headerRoot, err := fakeState.LatestBlockHeader().HashTreeRoot() + require.NoError(t, err) + chainService := &chainMock.ChainService{ + FinalizedRoots: map[[32]byte]bool{ + headerRoot: true, + }, + } + s := &Server{ + Stater: &testutil.MockStater{ + BeaconStateRoot: stateRoot[:], + BeaconState: fakeState, + }, + HeadFetcher: chainService, + OptimisticModeFetcher: chainService, + FinalizationFetcher: chainService, + BeaconDB: db, + } + + request := httptest.NewRequest(http.MethodGet, "http://example.com//eth/v1/beacon/states/{state_id}/root", nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetStateRoot(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetStateRootResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + assert.DeepEqual(t, true, resp.Finalized) + }) +} + +func TestGetRandao(t *testing.T) { + mixCurrent := bytesutil.ToBytes32([]byte("current")) + mixOld := bytesutil.ToBytes32([]byte("old")) + epochCurrent := primitives.Epoch(100000) + epochOld := 100000 - params.BeaconConfig().EpochsPerHistoricalVector + 1 + + ctx := context.Background() + st, err := util.NewBeaconState() + require.NoError(t, err) + // Set slot to epoch 100000 + require.NoError(t, st.SetSlot(params.BeaconConfig().SlotsPerEpoch*100000)) + require.NoError(t, st.UpdateRandaoMixesAtIndex(uint64(epochCurrent%params.BeaconConfig().EpochsPerHistoricalVector), mixCurrent)) + require.NoError(t, st.UpdateRandaoMixesAtIndex(uint64(epochOld%params.BeaconConfig().EpochsPerHistoricalVector), mixOld)) + + headEpoch := primitives.Epoch(1) + headSt, err := util.NewBeaconState() + require.NoError(t, err) + require.NoError(t, headSt.SetSlot(params.BeaconConfig().SlotsPerEpoch)) + headRandao := bytesutil.ToBytes32([]byte("head")) + require.NoError(t, headSt.UpdateRandaoMixesAtIndex(uint64(headEpoch), headRandao)) + + db := dbTest.SetupDB(t) + chainService := &chainMock.ChainService{} + s := &Server{ + Stater: &testutil.MockStater{ + BeaconState: st, + }, + HeadFetcher: chainService, + OptimisticModeFetcher: chainService, + FinalizationFetcher: chainService, + BeaconDB: db, + } + + t.Run("no epoch requested", func(t *testing.T) { + request := httptest.NewRequest(http.MethodGet, "http://example.com//eth/v1/beacon/states/{state_id}/randao", nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetRandao(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetRandaoResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + assert.Equal(t, hexutil.Encode(mixCurrent[:]), resp.Data.Randao) + }) + t.Run("current epoch requested", func(t *testing.T) { + request := httptest.NewRequest(http.MethodGet, fmt.Sprintf("http://example.com//eth/v1/beacon/states/{state_id}/randao?epoch=%d", epochCurrent), nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetRandao(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetRandaoResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + assert.Equal(t, hexutil.Encode(mixCurrent[:]), resp.Data.Randao) + }) + t.Run("old epoch requested", func(t *testing.T) { + request := httptest.NewRequest(http.MethodGet, fmt.Sprintf("http://example.com//eth/v1/beacon/states/{state_id}/randao?epoch=%d", epochOld), nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetRandao(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetRandaoResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + assert.Equal(t, hexutil.Encode(mixOld[:]), resp.Data.Randao) + }) + t.Run("head state below `EpochsPerHistoricalVector`", func(t *testing.T) { + s.Stater = &testutil.MockStater{ + BeaconState: headSt, + } + + request := httptest.NewRequest(http.MethodGet, "http://example.com//eth/v1/beacon/states/{state_id}/randao", nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetRandao(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetRandaoResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + assert.Equal(t, hexutil.Encode(headRandao[:]), resp.Data.Randao) + }) + t.Run("epoch too old", func(t *testing.T) { + epochTooOld := primitives.Epoch(100000 - st.RandaoMixesLength()) + request := httptest.NewRequest(http.MethodGet, fmt.Sprintf("http://example.com//eth/v1/beacon/states/{state_id}/randao?epoch=%d", epochTooOld), nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetRandao(writer, request) + require.Equal(t, http.StatusBadRequest, writer.Code) + e := &http2.DefaultErrorJson{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), e)) + assert.Equal(t, http.StatusBadRequest, e.Code) + require.StringContains(t, "Epoch is out of range for the randao mixes of the state", e.Message) + }) + t.Run("epoch in the future", func(t *testing.T) { + futureEpoch := primitives.Epoch(100000 + 1) + request := httptest.NewRequest(http.MethodGet, fmt.Sprintf("http://example.com//eth/v1/beacon/states/{state_id}/randao?epoch=%d", futureEpoch), nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetRandao(writer, request) + require.Equal(t, http.StatusBadRequest, writer.Code) + e := &http2.DefaultErrorJson{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), e)) + assert.Equal(t, http.StatusBadRequest, e.Code) + require.StringContains(t, "Epoch is out of range for the randao mixes of the state", e.Message) + }) + t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + util.SaveBlock(t, ctx, db, blk) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + + chainService := &chainMock.ChainService{Optimistic: true} + s := &Server{ + Stater: &testutil.MockStater{ + BeaconState: st, + }, + HeadFetcher: chainService, + OptimisticModeFetcher: chainService, + FinalizationFetcher: chainService, + BeaconDB: db, + } + + request := httptest.NewRequest(http.MethodGet, "http://example.com//eth/v1/beacon/states/{state_id}/randao", nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetRandao(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetRandaoResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + assert.DeepEqual(t, true, resp.ExecutionOptimistic) + }) + t.Run("finalized", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + util.SaveBlock(t, ctx, db, blk) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + + headerRoot, err := headSt.LatestBlockHeader().HashTreeRoot() + require.NoError(t, err) + chainService := &chainMock.ChainService{ + FinalizedRoots: map[[32]byte]bool{ + headerRoot: true, + }, + } + s := &Server{ + Stater: &testutil.MockStater{ + BeaconState: st, + }, + HeadFetcher: chainService, + OptimisticModeFetcher: chainService, + FinalizationFetcher: chainService, + BeaconDB: db, + } + + request := httptest.NewRequest(http.MethodGet, "http://example.com//eth/v1/beacon/states/{state_id}/randao", nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetRandao(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetRandaoResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + assert.DeepEqual(t, true, resp.Finalized) + }) +} + +func Test_currentCommitteeIndicesFromState(t *testing.T) { + st, _ := util.DeterministicGenesisStateAltair(t, params.BeaconConfig().SyncCommitteeSize) + vals := st.Validators() + wantedCommittee := make([][]byte, params.BeaconConfig().SyncCommitteeSize) + wantedIndices := make([]string, len(wantedCommittee)) + for i := 0; i < len(wantedCommittee); i++ { + wantedIndices[i] = strconv.FormatUint(uint64(i), 10) + wantedCommittee[i] = vals[i].PublicKey + } + require.NoError(t, st.SetCurrentSyncCommittee(ðpbalpha.SyncCommittee{ + Pubkeys: wantedCommittee, + AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), + })) + + t.Run("OK", func(t *testing.T) { + indices, committee, err := currentCommitteeIndicesFromState(st) + require.NoError(t, err) + require.DeepEqual(t, wantedIndices, indices) + require.DeepEqual(t, wantedCommittee, committee.Pubkeys) + }) + t.Run("validator in committee not found in state", func(t *testing.T) { + wantedCommittee[0] = bytesutil.PadTo([]byte("fakepubkey"), 48) + require.NoError(t, st.SetCurrentSyncCommittee(ðpbalpha.SyncCommittee{ + Pubkeys: wantedCommittee, + AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), + })) + _, _, err := currentCommitteeIndicesFromState(st) + require.ErrorContains(t, "index not found for pubkey", err) + }) +} + +func Test_nextCommitteeIndicesFromState(t *testing.T) { + st, _ := util.DeterministicGenesisStateAltair(t, params.BeaconConfig().SyncCommitteeSize) + vals := st.Validators() + wantedCommittee := make([][]byte, params.BeaconConfig().SyncCommitteeSize) + wantedIndices := make([]string, len(wantedCommittee)) + for i := 0; i < len(wantedCommittee); i++ { + wantedIndices[i] = strconv.FormatUint(uint64(i), 10) + wantedCommittee[i] = vals[i].PublicKey + } + require.NoError(t, st.SetNextSyncCommittee(ðpbalpha.SyncCommittee{ + Pubkeys: wantedCommittee, + AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), + })) + + t.Run("OK", func(t *testing.T) { + indices, committee, err := nextCommitteeIndicesFromState(st) + require.NoError(t, err) + require.DeepEqual(t, wantedIndices, indices) + require.DeepEqual(t, wantedCommittee, committee.Pubkeys) + }) + t.Run("validator in committee not found in state", func(t *testing.T) { + wantedCommittee[0] = bytesutil.PadTo([]byte("fakepubkey"), 48) + require.NoError(t, st.SetNextSyncCommittee(ðpbalpha.SyncCommittee{ + Pubkeys: wantedCommittee, + AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), + })) + _, _, err := nextCommitteeIndicesFromState(st) + require.ErrorContains(t, "index not found for pubkey", err) + }) +} + +func Test_extractSyncSubcommittees(t *testing.T) { + st, _ := util.DeterministicGenesisStateAltair(t, params.BeaconConfig().SyncCommitteeSize) + vals := st.Validators() + syncCommittee := make([][]byte, params.BeaconConfig().SyncCommitteeSize) + for i := 0; i < len(syncCommittee); i++ { + syncCommittee[i] = vals[i].PublicKey + } + require.NoError(t, st.SetCurrentSyncCommittee(ðpbalpha.SyncCommittee{ + Pubkeys: syncCommittee, + AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), + })) + + commSize := params.BeaconConfig().SyncCommitteeSize + subCommSize := params.BeaconConfig().SyncCommitteeSize / params.BeaconConfig().SyncCommitteeSubnetCount + wantedSubcommitteeValidators := make([][]string, 0) + + for i := uint64(0); i < commSize; i += subCommSize { + sub := make([]string, 0) + start := i + end := i + subCommSize + if end > commSize { + end = commSize + } + for j := start; j < end; j++ { + sub = append(sub, strconv.FormatUint(j, 10)) + } + wantedSubcommitteeValidators = append(wantedSubcommitteeValidators, sub) + } + + t.Run("OK", func(t *testing.T) { + committee, err := st.CurrentSyncCommittee() + require.NoError(t, err) + subcommittee, err := extractSyncSubcommittees(st, committee) + require.NoError(t, err) + for i, got := range subcommittee { + want := wantedSubcommitteeValidators[i] + require.DeepEqual(t, want, got) + } + }) + t.Run("validator in subcommittee not found in state", func(t *testing.T) { + syncCommittee[0] = bytesutil.PadTo([]byte("fakepubkey"), 48) + require.NoError(t, st.SetCurrentSyncCommittee(ðpbalpha.SyncCommittee{ + Pubkeys: syncCommittee, + AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), + })) + committee, err := st.CurrentSyncCommittee() + require.NoError(t, err) + _, err = extractSyncSubcommittees(st, committee) + require.ErrorContains(t, "index not found for pubkey", err) + }) +} + +func TestGetSyncCommittees(t *testing.T) { + ctx := context.Background() + st, _ := util.DeterministicGenesisStateAltair(t, params.BeaconConfig().SyncCommitteeSize) + syncCommittee := make([][]byte, params.BeaconConfig().SyncCommitteeSize) + vals := st.Validators() + for i := 0; i < len(syncCommittee); i++ { + syncCommittee[i] = vals[i].PublicKey + } + require.NoError(t, st.SetCurrentSyncCommittee(ðpbalpha.SyncCommittee{ + Pubkeys: syncCommittee, + AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), + })) + stRoot, err := st.HashTreeRoot(ctx) + require.NoError(t, err) + db := dbTest.SetupDB(t) + + stSlot := st.Slot() + chainService := &chainMock.ChainService{Slot: &stSlot} + s := &Server{ + GenesisTimeFetcher: &testutil.MockGenesisTimeFetcher{ + Genesis: time.Now(), + }, + Stater: &testutil.MockStater{ + BeaconState: st, + }, + HeadFetcher: chainService, + OptimisticModeFetcher: chainService, + FinalizationFetcher: chainService, + BeaconDB: db, + ChainInfoFetcher: chainService, + } + + request := httptest.NewRequest(http.MethodGet, "http://example.com//eth/v1/beacon/states/{state_id}/sync_committees", nil) + request = mux.SetURLVars(request, map[string]string{"state_id": hexutil.Encode(stRoot[:])}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetSyncCommittees(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetSyncCommitteeResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + committeeVals := resp.Data.Validators + require.Equal(t, params.BeaconConfig().SyncCommitteeSize, uint64(len(committeeVals))) + for i := uint64(0); i < params.BeaconConfig().SyncCommitteeSize; i++ { + assert.Equal(t, strconv.FormatUint(i, 10), committeeVals[i]) + } + require.Equal(t, params.BeaconConfig().SyncCommitteeSubnetCount, uint64(len(resp.Data.ValidatorAggregates))) + for i := uint64(0); i < params.BeaconConfig().SyncCommitteeSubnetCount; i++ { + vStartIndex := primitives.ValidatorIndex(params.BeaconConfig().SyncCommitteeSize / params.BeaconConfig().SyncCommitteeSubnetCount * i) + vEndIndex := primitives.ValidatorIndex(params.BeaconConfig().SyncCommitteeSize/params.BeaconConfig().SyncCommitteeSubnetCount*(i+1) - 1) + j := 0 + for vIndex := vStartIndex; vIndex <= vEndIndex; vIndex++ { + assert.Equal(t, strconv.FormatUint(uint64(vIndex), 10), resp.Data.ValidatorAggregates[i][j]) + j++ + } + } + + t.Run("execution optimistic", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + util.SaveBlock(t, ctx, db, blk) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + + stSlot := st.Slot() + chainService := &chainMock.ChainService{Optimistic: true, Slot: &stSlot} + s := &Server{ + GenesisTimeFetcher: &testutil.MockGenesisTimeFetcher{ + Genesis: time.Now(), + }, + Stater: &testutil.MockStater{ + BeaconState: st, + }, + HeadFetcher: chainService, + OptimisticModeFetcher: chainService, + FinalizationFetcher: chainService, + BeaconDB: db, + ChainInfoFetcher: chainService, + } + + request := httptest.NewRequest(http.MethodGet, "http://example.com//eth/v1/beacon/states/{state_id}/sync_committees", nil) + request = mux.SetURLVars(request, map[string]string{"state_id": hexutil.Encode(stRoot[:])}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetSyncCommittees(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetSyncCommitteeResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + assert.Equal(t, true, resp.ExecutionOptimistic) + }) + + t.Run("finalized", func(t *testing.T) { + parentRoot := [32]byte{'a'} + blk := util.NewBeaconBlock() + blk.Block.ParentRoot = parentRoot[:] + root, err := blk.Block.HashTreeRoot() + require.NoError(t, err) + util.SaveBlock(t, ctx, db, blk) + require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) + + headerRoot, err := st.LatestBlockHeader().HashTreeRoot() + require.NoError(t, err) + stSlot := st.Slot() + chainService := &chainMock.ChainService{ + FinalizedRoots: map[[32]byte]bool{ + headerRoot: true, + }, + Slot: &stSlot, + } + s := &Server{ + GenesisTimeFetcher: &testutil.MockGenesisTimeFetcher{ + Genesis: time.Now(), + }, + Stater: &testutil.MockStater{ + BeaconState: st, + }, + HeadFetcher: chainService, + OptimisticModeFetcher: chainService, + FinalizationFetcher: chainService, + BeaconDB: db, + ChainInfoFetcher: chainService, + } + + request := httptest.NewRequest(http.MethodGet, "http://example.com//eth/v1/beacon/states/{state_id}/sync_committees", nil) + request = mux.SetURLVars(request, map[string]string{"state_id": hexutil.Encode(stRoot[:])}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + + s.GetSyncCommittees(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetSyncCommitteeResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + assert.Equal(t, true, resp.Finalized) + }) +} + +type futureSyncMockFetcher struct { + BeaconState state.BeaconState + BeaconStateRoot []byte +} + +func (m *futureSyncMockFetcher) State(_ context.Context, stateId []byte) (state.BeaconState, error) { + expectedRequest := []byte(strconv.FormatUint(uint64(0), 10)) + res := bytes.Compare(stateId, expectedRequest) + if res != 0 { + return nil, fmt.Errorf( + "requested wrong epoch for next sync committee (expected %#x, received %#x)", + expectedRequest, + stateId, + ) + } + return m.BeaconState, nil +} +func (m *futureSyncMockFetcher) StateRoot(context.Context, []byte) ([]byte, error) { + return m.BeaconStateRoot, nil +} + +func (m *futureSyncMockFetcher) StateBySlot(context.Context, primitives.Slot) (state.BeaconState, error) { + return m.BeaconState, nil +} + +func TestGetSyncCommittees_Future(t *testing.T) { + st, _ := util.DeterministicGenesisStateAltair(t, params.BeaconConfig().SyncCommitteeSize) + syncCommittee := make([][]byte, params.BeaconConfig().SyncCommitteeSize) + vals := st.Validators() + for i := 0; i < len(syncCommittee); i++ { + syncCommittee[i] = vals[i].PublicKey + } + require.NoError(t, st.SetNextSyncCommittee(ðpbalpha.SyncCommittee{ + Pubkeys: syncCommittee, + AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), + })) + db := dbTest.SetupDB(t) + + chainService := &chainMock.ChainService{} + s := &Server{ + GenesisTimeFetcher: &testutil.MockGenesisTimeFetcher{ + Genesis: time.Now(), + }, + Stater: &futureSyncMockFetcher{ + BeaconState: st, + }, + HeadFetcher: chainService, + OptimisticModeFetcher: chainService, + FinalizationFetcher: chainService, + BeaconDB: db, + } + + epoch := 2 * params.BeaconConfig().EpochsPerSyncCommitteePeriod + request := httptest.NewRequest(http.MethodGet, fmt.Sprintf("http://example.com//eth/v1/beacon/states/{state_id}/sync_committees?epoch=%d", epoch), nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer := httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + s.GetSyncCommittees(writer, request) + require.Equal(t, http.StatusBadRequest, writer.Code) + e := &http2.DefaultErrorJson{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), e)) + assert.Equal(t, http.StatusBadRequest, e.Code) + assert.StringContains(t, "Could not fetch sync committee too far in the future", e.Message) + + epoch = 2*params.BeaconConfig().EpochsPerSyncCommitteePeriod - 1 + request = httptest.NewRequest(http.MethodGet, fmt.Sprintf("http://example.com//eth/v1/beacon/states/{state_id}/sync_committees?epoch=%d", epoch), nil) + request = mux.SetURLVars(request, map[string]string{"state_id": "head"}) + writer = httptest.NewRecorder() + writer.Body = &bytes.Buffer{} + s.GetSyncCommittees(writer, request) + require.Equal(t, http.StatusOK, writer.Code) + resp := &GetSyncCommitteeResponse{} + require.NoError(t, json.Unmarshal(writer.Body.Bytes(), resp)) + committeeVals := resp.Data.Validators + require.Equal(t, params.BeaconConfig().SyncCommitteeSize, uint64(len(committeeVals))) + for i := uint64(0); i < params.BeaconConfig().SyncCommitteeSize; i++ { + assert.Equal(t, strconv.FormatUint(i, 10), committeeVals[i]) + } + require.Equal(t, params.BeaconConfig().SyncCommitteeSubnetCount, uint64(len(resp.Data.ValidatorAggregates))) + for i := uint64(0); i < params.BeaconConfig().SyncCommitteeSubnetCount; i++ { + vStartIndex := primitives.ValidatorIndex(params.BeaconConfig().SyncCommitteeSize / params.BeaconConfig().SyncCommitteeSubnetCount * i) + vEndIndex := primitives.ValidatorIndex(params.BeaconConfig().SyncCommitteeSize/params.BeaconConfig().SyncCommitteeSubnetCount*(i+1) - 1) + j := 0 + for vIndex := vStartIndex; vIndex <= vEndIndex; vIndex++ { + assert.Equal(t, strconv.FormatUint(uint64(vIndex), 10), resp.Data.ValidatorAggregates[i][j]) + j++ + } + } +} diff --git a/beacon-chain/rpc/eth/beacon/state.go b/beacon-chain/rpc/eth/beacon/state.go deleted file mode 100644 index bf2df960c5..0000000000 --- a/beacon-chain/rpc/eth/beacon/state.go +++ /dev/null @@ -1,137 +0,0 @@ -package beacon - -import ( - "context" - "strconv" - - "github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/eth/helpers" - "github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/lookup" - "github.com/prysmaticlabs/prysm/v4/beacon-chain/state" - "github.com/prysmaticlabs/prysm/v4/config/params" - "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives" - ethpb "github.com/prysmaticlabs/prysm/v4/proto/eth/v1" - eth2 "github.com/prysmaticlabs/prysm/v4/proto/eth/v2" - "github.com/prysmaticlabs/prysm/v4/time/slots" - "go.opencensus.io/trace" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -type stateRequest struct { - epoch *primitives.Epoch - stateId []byte -} - -// GetStateRoot calculates HashTreeRoot for state with given 'stateId'. If stateId is root, same value will be returned. -func (bs *Server) GetStateRoot(ctx context.Context, req *ethpb.StateRequest) (*ethpb.StateRootResponse, error) { - ctx, span := trace.StartSpan(ctx, "beacon.GetStateRoot") - defer span.End() - - stateRoot, err := bs.Stater.StateRoot(ctx, req.StateId) - if err != nil { - if rootNotFoundErr, ok := err.(*lookup.StateRootNotFoundError); ok { - return nil, status.Errorf(codes.NotFound, "State root not found: %v", rootNotFoundErr) - } else if parseErr, ok := err.(*lookup.StateIdParseError); ok { - return nil, status.Errorf(codes.InvalidArgument, "Invalid state ID: %v", parseErr) - } - return nil, status.Errorf(codes.Internal, "Could not get state root: %v", err) - } - st, err := bs.Stater.State(ctx, req.StateId) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get state: %v", err) - } - isOptimistic, err := helpers.IsOptimistic(ctx, req.StateId, bs.OptimisticModeFetcher, bs.Stater, bs.ChainInfoFetcher, bs.BeaconDB) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) - } - blockRoot, err := st.LatestBlockHeader().HashTreeRoot() - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not calculate root of latest block header") - } - isFinalized := bs.FinalizationFetcher.IsFinalized(ctx, blockRoot) - - return ðpb.StateRootResponse{ - Data: ðpb.StateRootResponse_StateRoot{ - Root: stateRoot, - }, - ExecutionOptimistic: isOptimistic, - Finalized: isFinalized, - }, nil -} - -// GetRandao fetches the RANDAO mix for the requested epoch from the state identified by state_id. -// If an epoch is not specified then the RANDAO mix for the state's current epoch will be returned. -// By adjusting the state_id parameter you can query for any historic value of the RANDAO mix. -// Ordinarily states from the same epoch will mutate the RANDAO mix for that epoch as blocks are applied. -func (bs *Server) GetRandao(ctx context.Context, req *eth2.RandaoRequest) (*eth2.RandaoResponse, error) { - ctx, span := trace.StartSpan(ctx, "beacon.GetRandao") - defer span.End() - - st, err := bs.Stater.State(ctx, req.StateId) - if err != nil { - return nil, helpers.PrepareStateFetchGRPCError(err) - } - - stEpoch := slots.ToEpoch(st.Slot()) - epoch := stEpoch - if req.Epoch != nil { - epoch = *req.Epoch - } - - // future epochs and epochs too far back are not supported. - randaoEpochLowerBound := uint64(0) - // Lower bound should not underflow. - if uint64(stEpoch) > uint64(st.RandaoMixesLength()) { - randaoEpochLowerBound = uint64(stEpoch) - uint64(st.RandaoMixesLength()) - } - if epoch > stEpoch || uint64(epoch) < randaoEpochLowerBound+1 { - return nil, status.Errorf(codes.InvalidArgument, "Epoch is out of range for the randao mixes of the state") - } - idx := epoch % params.BeaconConfig().EpochsPerHistoricalVector - randao, err := st.RandaoMixAtIndex(uint64(idx)) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get randao mix at index %d", idx) - } - - isOptimistic, err := helpers.IsOptimistic(ctx, req.StateId, bs.OptimisticModeFetcher, bs.Stater, bs.ChainInfoFetcher, bs.BeaconDB) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) - } - - blockRoot, err := st.LatestBlockHeader().HashTreeRoot() - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not calculate root of latest block header") - } - isFinalized := bs.FinalizationFetcher.IsFinalized(ctx, blockRoot) - - return ð2.RandaoResponse{ - Data: ð2.RandaoResponse_Randao{Randao: randao}, - ExecutionOptimistic: isOptimistic, - Finalized: isFinalized, - }, nil -} - -func (bs *Server) stateFromRequest(ctx context.Context, req *stateRequest) (state.BeaconState, error) { - if req.epoch != nil { - slot, err := slots.EpochStart(*req.epoch) - if err != nil { - return nil, status.Errorf( - codes.Internal, - "Could not calculate start slot for epoch %d: %v", - *req.epoch, - err, - ) - } - st, err := bs.Stater.State(ctx, []byte(strconv.FormatUint(uint64(slot), 10))) - if err != nil { - return nil, helpers.PrepareStateFetchGRPCError(err) - } - return st, nil - } - var err error - st, err := bs.Stater.State(ctx, req.stateId) - if err != nil { - return nil, helpers.PrepareStateFetchGRPCError(err) - } - return st, nil -} diff --git a/beacon-chain/rpc/eth/beacon/state_test.go b/beacon-chain/rpc/eth/beacon/state_test.go deleted file mode 100644 index 3c261fab25..0000000000 --- a/beacon-chain/rpc/eth/beacon/state_test.go +++ /dev/null @@ -1,234 +0,0 @@ -package beacon - -import ( - "context" - "testing" - - chainMock "github.com/prysmaticlabs/prysm/v4/beacon-chain/blockchain/testing" - dbTest "github.com/prysmaticlabs/prysm/v4/beacon-chain/db/testing" - "github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/testutil" - "github.com/prysmaticlabs/prysm/v4/config/params" - "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives" - "github.com/prysmaticlabs/prysm/v4/encoding/bytesutil" - eth "github.com/prysmaticlabs/prysm/v4/proto/eth/v1" - eth2 "github.com/prysmaticlabs/prysm/v4/proto/eth/v2" - "github.com/prysmaticlabs/prysm/v4/testing/assert" - "github.com/prysmaticlabs/prysm/v4/testing/require" - "github.com/prysmaticlabs/prysm/v4/testing/util" -) - -func TestGetStateRoot(t *testing.T) { - ctx := context.Background() - fakeState, err := util.NewBeaconState() - require.NoError(t, err) - stateRoot, err := fakeState.HashTreeRoot(ctx) - require.NoError(t, err) - db := dbTest.SetupDB(t) - - chainService := &chainMock.ChainService{} - server := &Server{ - Stater: &testutil.MockStater{ - BeaconStateRoot: stateRoot[:], - BeaconState: fakeState, - }, - HeadFetcher: chainService, - OptimisticModeFetcher: chainService, - FinalizationFetcher: chainService, - BeaconDB: db, - } - - resp, err := server.GetStateRoot(context.Background(), ð.StateRequest{ - StateId: []byte("head"), - }) - require.NoError(t, err) - assert.NotNil(t, resp) - assert.DeepEqual(t, stateRoot[:], resp.Data.Root) - - t.Run("execution optimistic", func(t *testing.T) { - parentRoot := [32]byte{'a'} - blk := util.NewBeaconBlock() - blk.Block.ParentRoot = parentRoot[:] - root, err := blk.Block.HashTreeRoot() - require.NoError(t, err) - util.SaveBlock(t, ctx, db, blk) - require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) - - chainService := &chainMock.ChainService{Optimistic: true} - server := &Server{ - Stater: &testutil.MockStater{ - BeaconStateRoot: stateRoot[:], - BeaconState: fakeState, - }, - HeadFetcher: chainService, - OptimisticModeFetcher: chainService, - FinalizationFetcher: chainService, - BeaconDB: db, - } - resp, err := server.GetStateRoot(context.Background(), ð.StateRequest{ - StateId: []byte("head"), - }) - require.NoError(t, err) - assert.NotNil(t, resp) - assert.DeepEqual(t, true, resp.ExecutionOptimistic) - }) - - t.Run("finalized", func(t *testing.T) { - parentRoot := [32]byte{'a'} - blk := util.NewBeaconBlock() - blk.Block.ParentRoot = parentRoot[:] - root, err := blk.Block.HashTreeRoot() - require.NoError(t, err) - util.SaveBlock(t, ctx, db, blk) - require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) - - headerRoot, err := fakeState.LatestBlockHeader().HashTreeRoot() - require.NoError(t, err) - chainService := &chainMock.ChainService{ - FinalizedRoots: map[[32]byte]bool{ - headerRoot: true, - }, - } - server := &Server{ - Stater: &testutil.MockStater{ - BeaconStateRoot: stateRoot[:], - BeaconState: fakeState, - }, - HeadFetcher: chainService, - OptimisticModeFetcher: chainService, - FinalizationFetcher: chainService, - BeaconDB: db, - } - resp, err := server.GetStateRoot(context.Background(), ð.StateRequest{ - StateId: []byte("head"), - }) - require.NoError(t, err) - assert.NotNil(t, resp) - assert.DeepEqual(t, true, resp.Finalized) - }) -} - -func TestGetRandao(t *testing.T) { - mixCurrent := bytesutil.ToBytes32([]byte("current")) - mixOld := bytesutil.ToBytes32([]byte("old")) - epochCurrent := primitives.Epoch(100000) - epochOld := 100000 - params.BeaconConfig().EpochsPerHistoricalVector + 1 - - ctx := context.Background() - st, err := util.NewBeaconState() - require.NoError(t, err) - // Set slot to epoch 100000 - require.NoError(t, st.SetSlot(params.BeaconConfig().SlotsPerEpoch*100000)) - require.NoError(t, st.UpdateRandaoMixesAtIndex(uint64(epochCurrent%params.BeaconConfig().EpochsPerHistoricalVector), mixCurrent)) - require.NoError(t, st.UpdateRandaoMixesAtIndex(uint64(epochOld%params.BeaconConfig().EpochsPerHistoricalVector), mixOld)) - - headEpoch := primitives.Epoch(1) - headSt, err := util.NewBeaconState() - require.NoError(t, err) - require.NoError(t, headSt.SetSlot(params.BeaconConfig().SlotsPerEpoch)) - headRandao := bytesutil.ToBytes32([]byte("head")) - require.NoError(t, headSt.UpdateRandaoMixesAtIndex(uint64(headEpoch), headRandao)) - - db := dbTest.SetupDB(t) - chainService := &chainMock.ChainService{} - server := &Server{ - Stater: &testutil.MockStater{ - BeaconState: st, - }, - HeadFetcher: chainService, - OptimisticModeFetcher: chainService, - FinalizationFetcher: chainService, - BeaconDB: db, - } - - t.Run("no epoch requested", func(t *testing.T) { - resp, err := server.GetRandao(ctx, ð2.RandaoRequest{StateId: []byte("head")}) - require.NoError(t, err) - assert.DeepEqual(t, mixCurrent[:], resp.Data.Randao) - }) - t.Run("current epoch requested", func(t *testing.T) { - resp, err := server.GetRandao(ctx, ð2.RandaoRequest{StateId: []byte("head"), Epoch: &epochCurrent}) - require.NoError(t, err) - assert.DeepEqual(t, mixCurrent[:], resp.Data.Randao) - }) - t.Run("old epoch requested", func(t *testing.T) { - resp, err := server.GetRandao(ctx, ð2.RandaoRequest{StateId: []byte("head"), Epoch: &epochOld}) - require.NoError(t, err) - assert.DeepEqual(t, mixOld[:], resp.Data.Randao) - }) - t.Run("head state below `EpochsPerHistoricalVector`", func(t *testing.T) { - server.Stater = &testutil.MockStater{ - BeaconState: headSt, - } - resp, err := server.GetRandao(ctx, ð2.RandaoRequest{StateId: []byte("head")}) - require.NoError(t, err) - assert.DeepEqual(t, headRandao[:], resp.Data.Randao) - }) - t.Run("epoch too old", func(t *testing.T) { - epochTooOld := primitives.Epoch(100000 - st.RandaoMixesLength()) - _, err := server.GetRandao(ctx, ð2.RandaoRequest{StateId: make([]byte, 0), Epoch: &epochTooOld}) - require.ErrorContains(t, "Epoch is out of range for the randao mixes of the state", err) - }) - t.Run("epoch in the future", func(t *testing.T) { - futureEpoch := primitives.Epoch(100000 + 1) - _, err := server.GetRandao(ctx, ð2.RandaoRequest{StateId: make([]byte, 0), Epoch: &futureEpoch}) - require.ErrorContains(t, "Epoch is out of range for the randao mixes of the state", err) - }) - t.Run("execution optimistic", func(t *testing.T) { - parentRoot := [32]byte{'a'} - blk := util.NewBeaconBlock() - blk.Block.ParentRoot = parentRoot[:] - root, err := blk.Block.HashTreeRoot() - require.NoError(t, err) - util.SaveBlock(t, ctx, db, blk) - require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) - - chainService := &chainMock.ChainService{Optimistic: true} - server := &Server{ - Stater: &testutil.MockStater{ - BeaconState: st, - }, - HeadFetcher: chainService, - OptimisticModeFetcher: chainService, - FinalizationFetcher: chainService, - BeaconDB: db, - } - resp, err := server.GetRandao(context.Background(), ð2.RandaoRequest{ - StateId: []byte("head"), - }) - require.NoError(t, err) - assert.NotNil(t, resp) - assert.DeepEqual(t, true, resp.ExecutionOptimistic) - }) - t.Run("finalized", func(t *testing.T) { - parentRoot := [32]byte{'a'} - blk := util.NewBeaconBlock() - blk.Block.ParentRoot = parentRoot[:] - root, err := blk.Block.HashTreeRoot() - require.NoError(t, err) - util.SaveBlock(t, ctx, db, blk) - require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) - - headerRoot, err := headSt.LatestBlockHeader().HashTreeRoot() - require.NoError(t, err) - chainService := &chainMock.ChainService{ - FinalizedRoots: map[[32]byte]bool{ - headerRoot: true, - }, - } - server := &Server{ - Stater: &testutil.MockStater{ - BeaconState: st, - }, - HeadFetcher: chainService, - OptimisticModeFetcher: chainService, - FinalizationFetcher: chainService, - BeaconDB: db, - } - resp, err := server.GetRandao(context.Background(), ð2.RandaoRequest{ - StateId: []byte("head"), - }) - require.NoError(t, err) - assert.NotNil(t, resp) - assert.DeepEqual(t, true, resp.Finalized) - }) -} diff --git a/beacon-chain/rpc/eth/beacon/structs.go b/beacon-chain/rpc/eth/beacon/structs.go index 4be684dce6..2b0308a222 100644 --- a/beacon-chain/rpc/eth/beacon/structs.go +++ b/beacon-chain/rpc/eth/beacon/structs.go @@ -122,6 +122,37 @@ type ValidatorBalance struct { Balance string `json:"balance"` } +type GetStateRootResponse struct { + ExecutionOptimistic bool `json:"execution_optimistic"` + Finalized bool `json:"finalized"` + Data *StateRoot `json:"data"` +} + +type StateRoot struct { + Root string `json:"root"` +} + +type GetRandaoResponse struct { + ExecutionOptimistic bool `json:"execution_optimistic"` + Finalized bool `json:"finalized"` + Data *Randao `json:"data"` +} + +type Randao struct { + Randao string `json:"randao"` +} + +type GetSyncCommitteeResponse struct { + ExecutionOptimistic bool `json:"execution_optimistic"` + Finalized bool `json:"finalized"` + Data *SyncCommitteeValidators `json:"data"` +} + +type SyncCommitteeValidators struct { + Validators []string `json:"validators"` + ValidatorAggregates [][]string `json:"validator_aggregates"` +} + type BLSToExecutionChangesPoolResponse struct { Data []*shared.SignedBLSToExecutionChange `json:"data"` } diff --git a/beacon-chain/rpc/eth/beacon/sync_committee.go b/beacon-chain/rpc/eth/beacon/sync_committee.go deleted file mode 100644 index 59d6c8bcbf..0000000000 --- a/beacon-chain/rpc/eth/beacon/sync_committee.go +++ /dev/null @@ -1,173 +0,0 @@ -package beacon - -import ( - "context" - "fmt" - - "github.com/prysmaticlabs/prysm/v4/beacon-chain/core/altair" - "github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/eth/helpers" - "github.com/prysmaticlabs/prysm/v4/beacon-chain/state" - "github.com/prysmaticlabs/prysm/v4/config/params" - "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives" - "github.com/prysmaticlabs/prysm/v4/encoding/bytesutil" - ethpbv2 "github.com/prysmaticlabs/prysm/v4/proto/eth/v2" - ethpbalpha "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1" - "github.com/prysmaticlabs/prysm/v4/time/slots" - "go.opencensus.io/trace" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -// ListSyncCommittees retrieves the sync committees for the given epoch. -// If the epoch is not passed in, then the sync committees for the epoch of the state will be obtained. -func (bs *Server) ListSyncCommittees(ctx context.Context, req *ethpbv2.StateSyncCommitteesRequest) (*ethpbv2.StateSyncCommitteesResponse, error) { - ctx, span := trace.StartSpan(ctx, "beacon.ListSyncCommittees") - defer span.End() - - currentSlot := bs.GenesisTimeFetcher.CurrentSlot() - currentEpoch := slots.ToEpoch(currentSlot) - currentPeriodStartEpoch, err := slots.SyncCommitteePeriodStartEpoch(currentEpoch) - if err != nil { - return nil, status.Errorf( - codes.Internal, - "Could not calculate start period for slot %d: %v", - currentSlot, - err, - ) - } - - requestNextCommittee := false - if req.Epoch != nil { - reqPeriodStartEpoch, err := slots.SyncCommitteePeriodStartEpoch(*req.Epoch) - if err != nil { - return nil, status.Errorf( - codes.Internal, - "Could not calculate start period for epoch %d: %v", - *req.Epoch, - err, - ) - } - if reqPeriodStartEpoch > currentPeriodStartEpoch+params.BeaconConfig().EpochsPerSyncCommitteePeriod { - return nil, status.Errorf( - codes.Internal, - "Could not fetch sync committee too far in the future. Requested epoch: %d, current epoch: %d", - *req.Epoch, currentEpoch, - ) - } - if reqPeriodStartEpoch > currentPeriodStartEpoch { - requestNextCommittee = true - req.Epoch = ¤tPeriodStartEpoch - } - } - - st, err := bs.stateFromRequest(ctx, &stateRequest{ - epoch: req.Epoch, - stateId: req.StateId, - }) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not fetch beacon state using request: %v", err) - } - - var committeeIndices []primitives.ValidatorIndex - var committee *ethpbalpha.SyncCommittee - if requestNextCommittee { - // Get the next sync committee and sync committee indices from the state. - committeeIndices, committee, err = nextCommitteeIndicesFromState(st) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get next sync committee indices: %v", err) - } - } else { - // Get the current sync committee and sync committee indices from the state. - committeeIndices, committee, err = currentCommitteeIndicesFromState(st) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get current sync committee indices: %v", err) - } - } - subcommittees, err := extractSyncSubcommittees(st, committee) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not extract sync subcommittees: %v", err) - } - - isOptimistic, err := helpers.IsOptimistic(ctx, req.StateId, bs.OptimisticModeFetcher, bs.Stater, bs.ChainInfoFetcher, bs.BeaconDB) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not check if slot's block is optimistic: %v", err) - } - - blockRoot, err := st.LatestBlockHeader().HashTreeRoot() - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not calculate root of latest block header") - } - isFinalized := bs.FinalizationFetcher.IsFinalized(ctx, blockRoot) - - return ðpbv2.StateSyncCommitteesResponse{ - Data: ðpbv2.SyncCommitteeValidators{ - Validators: committeeIndices, - ValidatorAggregates: subcommittees, - }, - ExecutionOptimistic: isOptimistic, - Finalized: isFinalized, - }, nil -} - -func committeeIndicesFromState(st state.BeaconState, committee *ethpbalpha.SyncCommittee) ([]primitives.ValidatorIndex, *ethpbalpha.SyncCommittee, error) { - committeeIndices := make([]primitives.ValidatorIndex, len(committee.Pubkeys)) - for i, key := range committee.Pubkeys { - index, ok := st.ValidatorIndexByPubkey(bytesutil.ToBytes48(key)) - if !ok { - return nil, nil, fmt.Errorf( - "validator index not found for pubkey %#x", - bytesutil.Trunc(key), - ) - } - committeeIndices[i] = index - } - return committeeIndices, committee, nil -} - -func currentCommitteeIndicesFromState(st state.BeaconState) ([]primitives.ValidatorIndex, *ethpbalpha.SyncCommittee, error) { - committee, err := st.CurrentSyncCommittee() - if err != nil { - return nil, nil, fmt.Errorf( - "could not get sync committee: %v", err, - ) - } - - return committeeIndicesFromState(st, committee) -} - -func nextCommitteeIndicesFromState(st state.BeaconState) ([]primitives.ValidatorIndex, *ethpbalpha.SyncCommittee, error) { - committee, err := st.NextSyncCommittee() - if err != nil { - return nil, nil, fmt.Errorf( - "could not get sync committee: %v", err, - ) - } - - return committeeIndicesFromState(st, committee) -} - -func extractSyncSubcommittees(st state.BeaconState, committee *ethpbalpha.SyncCommittee) ([]*ethpbv2.SyncSubcommitteeValidators, error) { - subcommitteeCount := params.BeaconConfig().SyncCommitteeSubnetCount - subcommittees := make([]*ethpbv2.SyncSubcommitteeValidators, subcommitteeCount) - for i := uint64(0); i < subcommitteeCount; i++ { - pubkeys, err := altair.SyncSubCommitteePubkeys(committee, primitives.CommitteeIndex(i)) - if err != nil { - return nil, fmt.Errorf( - "failed to get subcommittee pubkeys: %v", err, - ) - } - subcommittee := ðpbv2.SyncSubcommitteeValidators{Validators: make([]primitives.ValidatorIndex, len(pubkeys))} - for j, key := range pubkeys { - index, ok := st.ValidatorIndexByPubkey(bytesutil.ToBytes48(key)) - if !ok { - return nil, fmt.Errorf( - "validator index not found for pubkey %#x", - bytesutil.Trunc(key), - ) - } - subcommittee.Validators[j] = index - } - subcommittees[i] = subcommittee - } - return subcommittees, nil -} diff --git a/beacon-chain/rpc/eth/beacon/sync_committee_test.go b/beacon-chain/rpc/eth/beacon/sync_committee_test.go deleted file mode 100644 index 2bb1ca7b74..0000000000 --- a/beacon-chain/rpc/eth/beacon/sync_committee_test.go +++ /dev/null @@ -1,340 +0,0 @@ -package beacon - -import ( - "bytes" - "context" - "strconv" - "testing" - "time" - - mock "github.com/prysmaticlabs/prysm/v4/beacon-chain/blockchain/testing" - dbTest "github.com/prysmaticlabs/prysm/v4/beacon-chain/db/testing" - "github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/testutil" - "github.com/prysmaticlabs/prysm/v4/beacon-chain/state" - "github.com/prysmaticlabs/prysm/v4/config/params" - "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives" - "github.com/prysmaticlabs/prysm/v4/encoding/bytesutil" - ethpbv2 "github.com/prysmaticlabs/prysm/v4/proto/eth/v2" - ethpbalpha "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1" - "github.com/prysmaticlabs/prysm/v4/testing/assert" - "github.com/prysmaticlabs/prysm/v4/testing/require" - "github.com/prysmaticlabs/prysm/v4/testing/util" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func Test_currentCommitteeIndicesFromState(t *testing.T) { - st, _ := util.DeterministicGenesisStateAltair(t, params.BeaconConfig().SyncCommitteeSize) - vals := st.Validators() - wantedCommittee := make([][]byte, params.BeaconConfig().SyncCommitteeSize) - wantedIndices := make([]primitives.ValidatorIndex, len(wantedCommittee)) - for i := 0; i < len(wantedCommittee); i++ { - wantedIndices[i] = primitives.ValidatorIndex(i) - wantedCommittee[i] = vals[i].PublicKey - } - require.NoError(t, st.SetCurrentSyncCommittee(ðpbalpha.SyncCommittee{ - Pubkeys: wantedCommittee, - AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), - })) - - t.Run("OK", func(t *testing.T) { - indices, committee, err := currentCommitteeIndicesFromState(st) - require.NoError(t, err) - require.DeepEqual(t, wantedIndices, indices) - require.DeepEqual(t, wantedCommittee, committee.Pubkeys) - }) - t.Run("validator in committee not found in state", func(t *testing.T) { - wantedCommittee[0] = bytesutil.PadTo([]byte("fakepubkey"), 48) - require.NoError(t, st.SetCurrentSyncCommittee(ðpbalpha.SyncCommittee{ - Pubkeys: wantedCommittee, - AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), - })) - _, _, err := currentCommitteeIndicesFromState(st) - require.ErrorContains(t, "index not found for pubkey", err) - }) -} - -func Test_nextCommitteeIndicesFromState(t *testing.T) { - st, _ := util.DeterministicGenesisStateAltair(t, params.BeaconConfig().SyncCommitteeSize) - vals := st.Validators() - wantedCommittee := make([][]byte, params.BeaconConfig().SyncCommitteeSize) - wantedIndices := make([]primitives.ValidatorIndex, len(wantedCommittee)) - for i := 0; i < len(wantedCommittee); i++ { - wantedIndices[i] = primitives.ValidatorIndex(i) - wantedCommittee[i] = vals[i].PublicKey - } - require.NoError(t, st.SetNextSyncCommittee(ðpbalpha.SyncCommittee{ - Pubkeys: wantedCommittee, - AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), - })) - - t.Run("OK", func(t *testing.T) { - indices, committee, err := nextCommitteeIndicesFromState(st) - require.NoError(t, err) - require.DeepEqual(t, wantedIndices, indices) - require.DeepEqual(t, wantedCommittee, committee.Pubkeys) - }) - t.Run("validator in committee not found in state", func(t *testing.T) { - wantedCommittee[0] = bytesutil.PadTo([]byte("fakepubkey"), 48) - require.NoError(t, st.SetNextSyncCommittee(ðpbalpha.SyncCommittee{ - Pubkeys: wantedCommittee, - AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), - })) - _, _, err := nextCommitteeIndicesFromState(st) - require.ErrorContains(t, "index not found for pubkey", err) - }) -} - -func Test_extractSyncSubcommittees(t *testing.T) { - st, _ := util.DeterministicGenesisStateAltair(t, params.BeaconConfig().SyncCommitteeSize) - vals := st.Validators() - syncCommittee := make([][]byte, params.BeaconConfig().SyncCommitteeSize) - for i := 0; i < len(syncCommittee); i++ { - syncCommittee[i] = vals[i].PublicKey - } - require.NoError(t, st.SetCurrentSyncCommittee(ðpbalpha.SyncCommittee{ - Pubkeys: syncCommittee, - AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), - })) - - commSize := params.BeaconConfig().SyncCommitteeSize - subCommSize := params.BeaconConfig().SyncCommitteeSize / params.BeaconConfig().SyncCommitteeSubnetCount - wantedSubcommitteeValidators := make([][]primitives.ValidatorIndex, 0) - - for i := uint64(0); i < commSize; i += subCommSize { - sub := make([]primitives.ValidatorIndex, 0) - start := i - end := i + subCommSize - if end > commSize { - end = commSize - } - for j := start; j < end; j++ { - sub = append(sub, primitives.ValidatorIndex(j)) - } - wantedSubcommitteeValidators = append(wantedSubcommitteeValidators, sub) - } - - t.Run("OK", func(t *testing.T) { - committee, err := st.CurrentSyncCommittee() - require.NoError(t, err) - subcommittee, err := extractSyncSubcommittees(st, committee) - require.NoError(t, err) - for i, got := range subcommittee { - want := wantedSubcommitteeValidators[i] - require.DeepEqual(t, want, got.Validators) - } - }) - t.Run("validator in subcommittee not found in state", func(t *testing.T) { - syncCommittee[0] = bytesutil.PadTo([]byte("fakepubkey"), 48) - require.NoError(t, st.SetCurrentSyncCommittee(ðpbalpha.SyncCommittee{ - Pubkeys: syncCommittee, - AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), - })) - committee, err := st.CurrentSyncCommittee() - require.NoError(t, err) - _, err = extractSyncSubcommittees(st, committee) - require.ErrorContains(t, "index not found for pubkey", err) - }) -} - -func TestListSyncCommittees(t *testing.T) { - ctx := context.Background() - st, _ := util.DeterministicGenesisStateAltair(t, params.BeaconConfig().SyncCommitteeSize) - syncCommittee := make([][]byte, params.BeaconConfig().SyncCommitteeSize) - vals := st.Validators() - for i := 0; i < len(syncCommittee); i++ { - syncCommittee[i] = vals[i].PublicKey - } - require.NoError(t, st.SetCurrentSyncCommittee(ðpbalpha.SyncCommittee{ - Pubkeys: syncCommittee, - AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), - })) - stRoot, err := st.HashTreeRoot(ctx) - require.NoError(t, err) - db := dbTest.SetupDB(t) - - stSlot := st.Slot() - chainService := &mock.ChainService{Slot: &stSlot} - s := &Server{ - GenesisTimeFetcher: &testutil.MockGenesisTimeFetcher{ - Genesis: time.Now(), - }, - Stater: &testutil.MockStater{ - BeaconState: st, - }, - HeadFetcher: chainService, - OptimisticModeFetcher: chainService, - FinalizationFetcher: chainService, - BeaconDB: db, - ChainInfoFetcher: chainService, - } - req := ðpbv2.StateSyncCommitteesRequest{StateId: stRoot[:]} - resp, err := s.ListSyncCommittees(ctx, req) - require.NoError(t, err) - require.NotNil(t, resp.Data) - committeeVals := resp.Data.Validators - require.NotNil(t, committeeVals) - require.Equal(t, params.BeaconConfig().SyncCommitteeSize, uint64(len(committeeVals)), "incorrect committee size") - for i := uint64(0); i < params.BeaconConfig().SyncCommitteeSize; i++ { - assert.Equal(t, primitives.ValidatorIndex(i), committeeVals[i]) - } - require.NotNil(t, resp.Data.ValidatorAggregates) - assert.Equal(t, params.BeaconConfig().SyncCommitteeSubnetCount, uint64(len(resp.Data.ValidatorAggregates))) - for i := uint64(0); i < params.BeaconConfig().SyncCommitteeSubnetCount; i++ { - vStartIndex := primitives.ValidatorIndex(params.BeaconConfig().SyncCommitteeSize / params.BeaconConfig().SyncCommitteeSubnetCount * i) - vEndIndex := primitives.ValidatorIndex(params.BeaconConfig().SyncCommitteeSize/params.BeaconConfig().SyncCommitteeSubnetCount*(i+1) - 1) - j := 0 - for vIndex := vStartIndex; vIndex <= vEndIndex; vIndex++ { - assert.Equal(t, vIndex, resp.Data.ValidatorAggregates[i].Validators[j]) - j++ - } - } - - t.Run("execution optimistic", func(t *testing.T) { - parentRoot := [32]byte{'a'} - blk := util.NewBeaconBlock() - blk.Block.ParentRoot = parentRoot[:] - root, err := blk.Block.HashTreeRoot() - require.NoError(t, err) - util.SaveBlock(t, ctx, db, blk) - require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) - - stSlot := st.Slot() - chainService := &mock.ChainService{Optimistic: true, Slot: &stSlot} - s := &Server{ - GenesisTimeFetcher: &testutil.MockGenesisTimeFetcher{ - Genesis: time.Now(), - }, - Stater: &testutil.MockStater{ - BeaconState: st, - }, - HeadFetcher: chainService, - OptimisticModeFetcher: chainService, - FinalizationFetcher: chainService, - BeaconDB: db, - ChainInfoFetcher: chainService, - } - resp, err := s.ListSyncCommittees(ctx, req) - require.NoError(t, err) - assert.Equal(t, true, resp.ExecutionOptimistic) - }) - - t.Run("finalized", func(t *testing.T) { - parentRoot := [32]byte{'a'} - blk := util.NewBeaconBlock() - blk.Block.ParentRoot = parentRoot[:] - root, err := blk.Block.HashTreeRoot() - require.NoError(t, err) - util.SaveBlock(t, ctx, db, blk) - require.NoError(t, db.SaveGenesisBlockRoot(ctx, root)) - - headerRoot, err := st.LatestBlockHeader().HashTreeRoot() - require.NoError(t, err) - stSlot := st.Slot() - chainService := &mock.ChainService{ - FinalizedRoots: map[[32]byte]bool{ - headerRoot: true, - }, - Slot: &stSlot, - } - s := &Server{ - GenesisTimeFetcher: &testutil.MockGenesisTimeFetcher{ - Genesis: time.Now(), - }, - Stater: &testutil.MockStater{ - BeaconState: st, - }, - HeadFetcher: chainService, - OptimisticModeFetcher: chainService, - FinalizationFetcher: chainService, - BeaconDB: db, - ChainInfoFetcher: chainService, - } - resp, err := s.ListSyncCommittees(ctx, req) - require.NoError(t, err) - assert.Equal(t, true, resp.Finalized) - }) -} - -type futureSyncMockFetcher struct { - BeaconState state.BeaconState - BeaconStateRoot []byte -} - -func (m *futureSyncMockFetcher) State(_ context.Context, stateId []byte) (state.BeaconState, error) { - expectedRequest := []byte(strconv.FormatUint(uint64(0), 10)) - res := bytes.Compare(stateId, expectedRequest) - if res != 0 { - return nil, status.Errorf( - codes.Internal, - "Requested wrong epoch for next sync committee, expected: %#x, received: %#x", - expectedRequest, - stateId, - ) - } - return m.BeaconState, nil -} -func (m *futureSyncMockFetcher) StateRoot(context.Context, []byte) ([]byte, error) { - return m.BeaconStateRoot, nil -} - -func (m *futureSyncMockFetcher) StateBySlot(context.Context, primitives.Slot) (state.BeaconState, error) { - return m.BeaconState, nil -} - -func TestListSyncCommitteesFuture(t *testing.T) { - ctx := context.Background() - st, _ := util.DeterministicGenesisStateAltair(t, params.BeaconConfig().SyncCommitteeSize) - syncCommittee := make([][]byte, params.BeaconConfig().SyncCommitteeSize) - vals := st.Validators() - for i := 0; i < len(syncCommittee); i++ { - syncCommittee[i] = vals[i].PublicKey - } - require.NoError(t, st.SetNextSyncCommittee(ðpbalpha.SyncCommittee{ - Pubkeys: syncCommittee, - AggregatePubkey: bytesutil.PadTo([]byte{}, params.BeaconConfig().BLSPubkeyLength), - })) - db := dbTest.SetupDB(t) - - chainService := &mock.ChainService{} - s := &Server{ - GenesisTimeFetcher: &testutil.MockGenesisTimeFetcher{ - Genesis: time.Now(), - }, - Stater: &futureSyncMockFetcher{ - BeaconState: st, - }, - HeadFetcher: chainService, - OptimisticModeFetcher: chainService, - FinalizationFetcher: chainService, - BeaconDB: db, - } - req := ðpbv2.StateSyncCommitteesRequest{StateId: []byte("head")} - epoch := 2 * params.BeaconConfig().EpochsPerSyncCommitteePeriod - req.Epoch = &epoch - _, err := s.ListSyncCommittees(ctx, req) - require.ErrorContains(t, "Could not fetch sync committee too far in the future", err) - - epoch = 2*params.BeaconConfig().EpochsPerSyncCommitteePeriod - 1 - resp, err := s.ListSyncCommittees(ctx, req) - require.NoError(t, err) - - require.NotNil(t, resp.Data) - committeeVals := resp.Data.Validators - require.NotNil(t, committeeVals) - require.Equal(t, params.BeaconConfig().SyncCommitteeSize, uint64(len(committeeVals)), "incorrect committee size") - for i := uint64(0); i < params.BeaconConfig().SyncCommitteeSize; i++ { - assert.Equal(t, primitives.ValidatorIndex(i), committeeVals[i]) - } - require.NotNil(t, resp.Data.ValidatorAggregates) - assert.Equal(t, params.BeaconConfig().SyncCommitteeSubnetCount, uint64(len(resp.Data.ValidatorAggregates))) - for i := uint64(0); i < params.BeaconConfig().SyncCommitteeSubnetCount; i++ { - vStartIndex := primitives.ValidatorIndex(params.BeaconConfig().SyncCommitteeSize / params.BeaconConfig().SyncCommitteeSubnetCount * i) - vEndIndex := primitives.ValidatorIndex(params.BeaconConfig().SyncCommitteeSize/params.BeaconConfig().SyncCommitteeSubnetCount*(i+1) - 1) - j := 0 - for vIndex := vStartIndex; vIndex <= vEndIndex; vIndex++ { - assert.Equal(t, vIndex, resp.Data.ValidatorAggregates[i].Validators[j]) - j++ - } - } -} diff --git a/beacon-chain/rpc/service.go b/beacon-chain/rpc/service.go index 92271a8f8f..1bb85b3852 100644 --- a/beacon-chain/rpc/service.go +++ b/beacon-chain/rpc/service.go @@ -439,6 +439,9 @@ func (s *Service) Start() { s.cfg.Router.HandleFunc("/eth/v1/beacon/states/{state_id}/validator_count", httpServer.GetValidatorCount).Methods(http.MethodGet) s.cfg.Router.HandleFunc("/eth/v1/beacon/states/{state_id}/committees", beaconChainServerV1.GetCommittees).Methods(http.MethodGet) s.cfg.Router.HandleFunc("/eth/v1/beacon/states/{state_id}/fork", beaconChainServerV1.GetStateFork).Methods(http.MethodGet) + s.cfg.Router.HandleFunc("/eth/v1/beacon/states/{state_id}/root", beaconChainServerV1.GetStateRoot).Methods(http.MethodGet) + s.cfg.Router.HandleFunc("/eth/v1/beacon/states/{state_id}/sync_committees", beaconChainServerV1.GetSyncCommittees).Methods(http.MethodGet) + s.cfg.Router.HandleFunc("/eth/v1/beacon/states/{state_id}/randao", beaconChainServerV1.GetRandao).Methods(http.MethodGet) s.cfg.Router.HandleFunc("/eth/v1/beacon/blocks", beaconChainServerV1.PublishBlock).Methods(http.MethodPost) s.cfg.Router.HandleFunc("/eth/v1/beacon/blinded_blocks", beaconChainServerV1.PublishBlindedBlock).Methods(http.MethodPost) s.cfg.Router.HandleFunc("/eth/v2/beacon/blocks", beaconChainServerV1.PublishBlockV2).Methods(http.MethodPost) diff --git a/proto/eth/service/beacon_chain_service.pb.go b/proto/eth/service/beacon_chain_service.pb.go index 07ed3ba0a7..3572cb5d72 100755 --- a/proto/eth/service/beacon_chain_service.pb.go +++ b/proto/eth/service/beacon_chain_service.pb.go @@ -48,240 +48,195 @@ var file_proto_eth_service_beacon_chain_service_proto_rawDesc = []byte{ 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, - 0x76, 0x32, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, - 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x73, 0x7a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x79, 0x6e, 0x63, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x32, 0x9b, 0x13, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x12, 0x8e, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x65, 0x61, 0x6b, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x57, 0x65, 0x61, 0x6b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, - 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x77, 0x65, 0x61, - 0x6b, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x88, 0x02, - 0x01, 0x12, 0x89, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, - 0x6f, 0x74, 0x12, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, - 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0xb2, 0x01, - 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, - 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, - 0x65, 0x73, 0x12, 0x86, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x61, 0x6f, - 0x12, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x32, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x32, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x12, 0x7f, 0x0a, 0x08, 0x47, - 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, + 0x76, 0x32, 0x2f, 0x73, 0x73, 0x7a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xd1, 0x0f, 0x0a, + 0x0b, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x8e, 0x01, 0x0a, + 0x13, 0x47, 0x65, 0x74, 0x57, 0x65, 0x61, 0x6b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x69, 0x74, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x29, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x57, + 0x65, 0x61, 0x6b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, + 0x29, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, + 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x77, 0x65, 0x61, 0x6b, 0x5f, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x88, 0x02, 0x01, 0x12, 0x7f, 0x0a, + 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, + 0x12, 0x29, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, + 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x7d, 0x88, 0x02, 0x01, 0x12, 0x89, + 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x53, 0x5a, 0x12, 0x1d, + 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x53, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, + 0x6e, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x73, 0x7a, 0x88, 0x02, 0x01, 0x12, 0x82, 0x01, 0x0a, 0x0a, 0x47, + 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x32, 0x12, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x32, 0x1a, 0x20, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x32, 0x22, 0x31, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x7d, 0x12, + 0x92, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x33, 0x12, 0x31, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x62, 0x6c, 0x69, 0x6e, 0x64, + 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x69, 0x6e, + 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x53, 0x5a, 0x12, 0x1d, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x53, 0x5a, + 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x37, 0x12, 0x35, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x62, 0x6c, 0x69, 0x6e, 0x64, + 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x73, 0x7a, 0x12, 0x86, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x53, 0x5a, 0x56, 0x32, 0x12, 0x1f, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x32, 0x1a, 0x1d, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x53, + 0x5a, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, + 0x68, 0x2f, 0x76, 0x32, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x73, + 0x7a, 0x12, 0xa2, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x7b, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x7d, 0x88, 0x02, 0x01, 0x12, 0x89, 0x01, 0x0a, - 0x0b, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x53, 0x5a, 0x12, 0x1d, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x53, 0x53, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, - 0x7d, 0x2f, 0x73, 0x73, 0x7a, 0x88, 0x02, 0x01, 0x12, 0x82, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x32, 0x12, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x32, 0x1a, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x32, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, - 0x68, 0x2f, 0x76, 0x32, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, - 0x31, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, - 0x64, 0x7d, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x69, 0x6e, 0x64, 0x65, - 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x53, 0x5a, 0x12, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x53, 0x5a, 0x43, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, - 0x35, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x62, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x64, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x73, 0x73, 0x7a, 0x12, 0x86, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x53, 0x53, 0x5a, 0x56, 0x32, 0x12, 0x1f, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x32, 0x1a, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x53, 0x5a, 0x43, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, - 0x12, 0x2d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, - 0x76, 0x32, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, - 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x73, 0x7a, 0x12, - 0xa2, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, - 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x2f, 0x7b, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x9c, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6f, - 0x6c, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2e, 0x2e, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x6f, - 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, - 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, - 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x21, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 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, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x34, 0x3a, 0x01, 0x2a, 0x22, 0x2f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x9c, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x6f, 0x6f, 0x6c, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2e, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, + 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x9b, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, - 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2d, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x6f, - 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, - 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, - 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x21, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, - 0x67, 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, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x34, 0x3a, 0x01, 0x2a, 0x22, 0x2f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, + 0x12, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 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, 0x3a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x34, 0x3a, 0x01, 0x2a, 0x22, 0x2f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, + 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x6c, + 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x9b, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, + 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2d, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, + 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, 0x61, 0x73, - 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x7f, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x6b, - 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, - 0x25, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x6f, 0x72, 0x6b, 0x5f, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x66, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, - 0x63, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1d, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x65, 0x63, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, - 0x12, 0x1c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, - 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x42, 0x98, - 0x01, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, - 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x17, 0x42, 0x65, 0x61, - 0x63, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 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, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x65, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xaa, 0x02, 0x14, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0xca, 0x02, 0x14, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, - 0x68, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, + 0x12, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 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, 0x3a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x34, 0x3a, 0x01, 0x2a, 0x22, 0x2f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x2f, + 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6c, + 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x7f, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x46, 0x6f, + 0x72, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x27, 0x12, 0x25, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x6f, 0x72, 0x6b, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x66, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1d, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, + 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, + 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x73, 0x70, 0x65, 0x63, + 0x42, 0x98, 0x01, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x17, 0x42, + 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 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, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xaa, 0x02, 0x14, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x14, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, + 0x45, 0x74, 0x68, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var file_proto_eth_service_beacon_chain_service_proto_goTypes = []interface{}{ (*emptypb.Empty)(nil), // 0: google.protobuf.Empty - (*v1.StateRequest)(nil), // 1: ethereum.eth.v1.StateRequest - (*v2.StateSyncCommitteesRequest)(nil), // 2: ethereum.eth.v2.StateSyncCommitteesRequest - (*v2.RandaoRequest)(nil), // 3: ethereum.eth.v2.RandaoRequest - (*v1.BlockRequest)(nil), // 4: ethereum.eth.v1.BlockRequest - (*v2.BlockRequestV2)(nil), // 5: ethereum.eth.v2.BlockRequestV2 - (*v1.AttesterSlashing)(nil), // 6: ethereum.eth.v1.AttesterSlashing - (*v1.ProposerSlashing)(nil), // 7: ethereum.eth.v1.ProposerSlashing - (*v1.WeakSubjectivityResponse)(nil), // 8: ethereum.eth.v1.WeakSubjectivityResponse - (*v1.StateRootResponse)(nil), // 9: ethereum.eth.v1.StateRootResponse - (*v2.StateSyncCommitteesResponse)(nil), // 10: ethereum.eth.v2.StateSyncCommitteesResponse - (*v2.RandaoResponse)(nil), // 11: ethereum.eth.v2.RandaoResponse - (*v1.BlockResponse)(nil), // 12: ethereum.eth.v1.BlockResponse - (*v1.BlockSSZResponse)(nil), // 13: ethereum.eth.v1.BlockSSZResponse - (*v2.BlockResponseV2)(nil), // 14: ethereum.eth.v2.BlockResponseV2 - (*v2.BlindedBlockResponse)(nil), // 15: ethereum.eth.v2.BlindedBlockResponse - (*v2.SSZContainer)(nil), // 16: ethereum.eth.v2.SSZContainer - (*v1.BlockAttestationsResponse)(nil), // 17: ethereum.eth.v1.BlockAttestationsResponse - (*v1.AttesterSlashingsPoolResponse)(nil), // 18: ethereum.eth.v1.AttesterSlashingsPoolResponse - (*v1.ProposerSlashingPoolResponse)(nil), // 19: ethereum.eth.v1.ProposerSlashingPoolResponse - (*v1.ForkScheduleResponse)(nil), // 20: ethereum.eth.v1.ForkScheduleResponse - (*v1.SpecResponse)(nil), // 21: ethereum.eth.v1.SpecResponse + (*v1.BlockRequest)(nil), // 1: ethereum.eth.v1.BlockRequest + (*v2.BlockRequestV2)(nil), // 2: ethereum.eth.v2.BlockRequestV2 + (*v1.AttesterSlashing)(nil), // 3: ethereum.eth.v1.AttesterSlashing + (*v1.ProposerSlashing)(nil), // 4: ethereum.eth.v1.ProposerSlashing + (*v1.WeakSubjectivityResponse)(nil), // 5: ethereum.eth.v1.WeakSubjectivityResponse + (*v1.BlockResponse)(nil), // 6: ethereum.eth.v1.BlockResponse + (*v1.BlockSSZResponse)(nil), // 7: ethereum.eth.v1.BlockSSZResponse + (*v2.BlockResponseV2)(nil), // 8: ethereum.eth.v2.BlockResponseV2 + (*v2.BlindedBlockResponse)(nil), // 9: ethereum.eth.v2.BlindedBlockResponse + (*v2.SSZContainer)(nil), // 10: ethereum.eth.v2.SSZContainer + (*v1.BlockAttestationsResponse)(nil), // 11: ethereum.eth.v1.BlockAttestationsResponse + (*v1.AttesterSlashingsPoolResponse)(nil), // 12: ethereum.eth.v1.AttesterSlashingsPoolResponse + (*v1.ProposerSlashingPoolResponse)(nil), // 13: ethereum.eth.v1.ProposerSlashingPoolResponse + (*v1.ForkScheduleResponse)(nil), // 14: ethereum.eth.v1.ForkScheduleResponse + (*v1.SpecResponse)(nil), // 15: ethereum.eth.v1.SpecResponse } var file_proto_eth_service_beacon_chain_service_proto_depIdxs = []int32{ 0, // 0: ethereum.eth.service.BeaconChain.GetWeakSubjectivity:input_type -> google.protobuf.Empty - 1, // 1: ethereum.eth.service.BeaconChain.GetStateRoot:input_type -> ethereum.eth.v1.StateRequest - 2, // 2: ethereum.eth.service.BeaconChain.ListSyncCommittees:input_type -> ethereum.eth.v2.StateSyncCommitteesRequest - 3, // 3: ethereum.eth.service.BeaconChain.GetRandao:input_type -> ethereum.eth.v2.RandaoRequest - 4, // 4: ethereum.eth.service.BeaconChain.GetBlock:input_type -> ethereum.eth.v1.BlockRequest - 4, // 5: ethereum.eth.service.BeaconChain.GetBlockSSZ:input_type -> ethereum.eth.v1.BlockRequest - 5, // 6: ethereum.eth.service.BeaconChain.GetBlockV2:input_type -> ethereum.eth.v2.BlockRequestV2 - 4, // 7: ethereum.eth.service.BeaconChain.GetBlindedBlock:input_type -> ethereum.eth.v1.BlockRequest - 4, // 8: ethereum.eth.service.BeaconChain.GetBlindedBlockSSZ:input_type -> ethereum.eth.v1.BlockRequest - 5, // 9: ethereum.eth.service.BeaconChain.GetBlockSSZV2:input_type -> ethereum.eth.v2.BlockRequestV2 - 4, // 10: ethereum.eth.service.BeaconChain.ListBlockAttestations:input_type -> ethereum.eth.v1.BlockRequest - 0, // 11: ethereum.eth.service.BeaconChain.ListPoolAttesterSlashings:input_type -> google.protobuf.Empty - 6, // 12: ethereum.eth.service.BeaconChain.SubmitAttesterSlashing:input_type -> ethereum.eth.v1.AttesterSlashing - 0, // 13: ethereum.eth.service.BeaconChain.ListPoolProposerSlashings:input_type -> google.protobuf.Empty - 7, // 14: ethereum.eth.service.BeaconChain.SubmitProposerSlashing:input_type -> ethereum.eth.v1.ProposerSlashing - 0, // 15: ethereum.eth.service.BeaconChain.GetForkSchedule:input_type -> google.protobuf.Empty - 0, // 16: ethereum.eth.service.BeaconChain.GetSpec:input_type -> google.protobuf.Empty - 8, // 17: ethereum.eth.service.BeaconChain.GetWeakSubjectivity:output_type -> ethereum.eth.v1.WeakSubjectivityResponse - 9, // 18: ethereum.eth.service.BeaconChain.GetStateRoot:output_type -> ethereum.eth.v1.StateRootResponse - 10, // 19: ethereum.eth.service.BeaconChain.ListSyncCommittees:output_type -> ethereum.eth.v2.StateSyncCommitteesResponse - 11, // 20: ethereum.eth.service.BeaconChain.GetRandao:output_type -> ethereum.eth.v2.RandaoResponse - 12, // 21: ethereum.eth.service.BeaconChain.GetBlock:output_type -> ethereum.eth.v1.BlockResponse - 13, // 22: ethereum.eth.service.BeaconChain.GetBlockSSZ:output_type -> ethereum.eth.v1.BlockSSZResponse - 14, // 23: ethereum.eth.service.BeaconChain.GetBlockV2:output_type -> ethereum.eth.v2.BlockResponseV2 - 15, // 24: ethereum.eth.service.BeaconChain.GetBlindedBlock:output_type -> ethereum.eth.v2.BlindedBlockResponse - 16, // 25: ethereum.eth.service.BeaconChain.GetBlindedBlockSSZ:output_type -> ethereum.eth.v2.SSZContainer - 16, // 26: ethereum.eth.service.BeaconChain.GetBlockSSZV2:output_type -> ethereum.eth.v2.SSZContainer - 17, // 27: ethereum.eth.service.BeaconChain.ListBlockAttestations:output_type -> ethereum.eth.v1.BlockAttestationsResponse - 18, // 28: ethereum.eth.service.BeaconChain.ListPoolAttesterSlashings:output_type -> ethereum.eth.v1.AttesterSlashingsPoolResponse - 0, // 29: ethereum.eth.service.BeaconChain.SubmitAttesterSlashing:output_type -> google.protobuf.Empty - 19, // 30: ethereum.eth.service.BeaconChain.ListPoolProposerSlashings:output_type -> ethereum.eth.v1.ProposerSlashingPoolResponse - 0, // 31: ethereum.eth.service.BeaconChain.SubmitProposerSlashing:output_type -> google.protobuf.Empty - 20, // 32: ethereum.eth.service.BeaconChain.GetForkSchedule:output_type -> ethereum.eth.v1.ForkScheduleResponse - 21, // 33: ethereum.eth.service.BeaconChain.GetSpec:output_type -> ethereum.eth.v1.SpecResponse - 17, // [17:34] is the sub-list for method output_type - 0, // [0:17] is the sub-list for method input_type + 1, // 1: ethereum.eth.service.BeaconChain.GetBlock:input_type -> ethereum.eth.v1.BlockRequest + 1, // 2: ethereum.eth.service.BeaconChain.GetBlockSSZ:input_type -> ethereum.eth.v1.BlockRequest + 2, // 3: ethereum.eth.service.BeaconChain.GetBlockV2:input_type -> ethereum.eth.v2.BlockRequestV2 + 1, // 4: ethereum.eth.service.BeaconChain.GetBlindedBlock:input_type -> ethereum.eth.v1.BlockRequest + 1, // 5: ethereum.eth.service.BeaconChain.GetBlindedBlockSSZ:input_type -> ethereum.eth.v1.BlockRequest + 2, // 6: ethereum.eth.service.BeaconChain.GetBlockSSZV2:input_type -> ethereum.eth.v2.BlockRequestV2 + 1, // 7: ethereum.eth.service.BeaconChain.ListBlockAttestations:input_type -> ethereum.eth.v1.BlockRequest + 0, // 8: ethereum.eth.service.BeaconChain.ListPoolAttesterSlashings:input_type -> google.protobuf.Empty + 3, // 9: ethereum.eth.service.BeaconChain.SubmitAttesterSlashing:input_type -> ethereum.eth.v1.AttesterSlashing + 0, // 10: ethereum.eth.service.BeaconChain.ListPoolProposerSlashings:input_type -> google.protobuf.Empty + 4, // 11: ethereum.eth.service.BeaconChain.SubmitProposerSlashing:input_type -> ethereum.eth.v1.ProposerSlashing + 0, // 12: ethereum.eth.service.BeaconChain.GetForkSchedule:input_type -> google.protobuf.Empty + 0, // 13: ethereum.eth.service.BeaconChain.GetSpec:input_type -> google.protobuf.Empty + 5, // 14: ethereum.eth.service.BeaconChain.GetWeakSubjectivity:output_type -> ethereum.eth.v1.WeakSubjectivityResponse + 6, // 15: ethereum.eth.service.BeaconChain.GetBlock:output_type -> ethereum.eth.v1.BlockResponse + 7, // 16: ethereum.eth.service.BeaconChain.GetBlockSSZ:output_type -> ethereum.eth.v1.BlockSSZResponse + 8, // 17: ethereum.eth.service.BeaconChain.GetBlockV2:output_type -> ethereum.eth.v2.BlockResponseV2 + 9, // 18: ethereum.eth.service.BeaconChain.GetBlindedBlock:output_type -> ethereum.eth.v2.BlindedBlockResponse + 10, // 19: ethereum.eth.service.BeaconChain.GetBlindedBlockSSZ:output_type -> ethereum.eth.v2.SSZContainer + 10, // 20: ethereum.eth.service.BeaconChain.GetBlockSSZV2:output_type -> ethereum.eth.v2.SSZContainer + 11, // 21: ethereum.eth.service.BeaconChain.ListBlockAttestations:output_type -> ethereum.eth.v1.BlockAttestationsResponse + 12, // 22: ethereum.eth.service.BeaconChain.ListPoolAttesterSlashings:output_type -> ethereum.eth.v1.AttesterSlashingsPoolResponse + 0, // 23: ethereum.eth.service.BeaconChain.SubmitAttesterSlashing:output_type -> google.protobuf.Empty + 13, // 24: ethereum.eth.service.BeaconChain.ListPoolProposerSlashings:output_type -> ethereum.eth.v1.ProposerSlashingPoolResponse + 0, // 25: ethereum.eth.service.BeaconChain.SubmitProposerSlashing:output_type -> google.protobuf.Empty + 14, // 26: ethereum.eth.service.BeaconChain.GetForkSchedule:output_type -> ethereum.eth.v1.ForkScheduleResponse + 15, // 27: ethereum.eth.service.BeaconChain.GetSpec:output_type -> ethereum.eth.v1.SpecResponse + 14, // [14:28] is the sub-list for method output_type + 0, // [0:14] 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 @@ -325,9 +280,6 @@ const _ = grpc.SupportPackageIsVersion6 type BeaconChainClient interface { // Deprecated: Do not use. GetWeakSubjectivity(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.WeakSubjectivityResponse, error) - GetStateRoot(ctx context.Context, in *v1.StateRequest, opts ...grpc.CallOption) (*v1.StateRootResponse, error) - ListSyncCommittees(ctx context.Context, in *v2.StateSyncCommitteesRequest, opts ...grpc.CallOption) (*v2.StateSyncCommitteesResponse, error) - GetRandao(ctx context.Context, in *v2.RandaoRequest, opts ...grpc.CallOption) (*v2.RandaoResponse, error) // Deprecated: Do not use. GetBlock(ctx context.Context, in *v1.BlockRequest, opts ...grpc.CallOption) (*v1.BlockResponse, error) // Deprecated: Do not use. @@ -363,33 +315,6 @@ func (c *beaconChainClient) GetWeakSubjectivity(ctx context.Context, in *emptypb return out, nil } -func (c *beaconChainClient) GetStateRoot(ctx context.Context, in *v1.StateRequest, opts ...grpc.CallOption) (*v1.StateRootResponse, error) { - out := new(v1.StateRootResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.service.BeaconChain/GetStateRoot", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconChainClient) ListSyncCommittees(ctx context.Context, in *v2.StateSyncCommitteesRequest, opts ...grpc.CallOption) (*v2.StateSyncCommitteesResponse, error) { - out := new(v2.StateSyncCommitteesResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.service.BeaconChain/ListSyncCommittees", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *beaconChainClient) GetRandao(ctx context.Context, in *v2.RandaoRequest, opts ...grpc.CallOption) (*v2.RandaoResponse, error) { - out := new(v2.RandaoResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.service.BeaconChain/GetRandao", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // Deprecated: Do not use. func (c *beaconChainClient) GetBlock(ctx context.Context, in *v1.BlockRequest, opts ...grpc.CallOption) (*v1.BlockResponse, error) { out := new(v1.BlockResponse) @@ -513,9 +438,6 @@ func (c *beaconChainClient) GetSpec(ctx context.Context, in *emptypb.Empty, opts type BeaconChainServer interface { // Deprecated: Do not use. GetWeakSubjectivity(context.Context, *emptypb.Empty) (*v1.WeakSubjectivityResponse, error) - GetStateRoot(context.Context, *v1.StateRequest) (*v1.StateRootResponse, error) - ListSyncCommittees(context.Context, *v2.StateSyncCommitteesRequest) (*v2.StateSyncCommitteesResponse, error) - GetRandao(context.Context, *v2.RandaoRequest) (*v2.RandaoResponse, error) // Deprecated: Do not use. GetBlock(context.Context, *v1.BlockRequest) (*v1.BlockResponse, error) // Deprecated: Do not use. @@ -540,15 +462,6 @@ type UnimplementedBeaconChainServer struct { func (*UnimplementedBeaconChainServer) GetWeakSubjectivity(context.Context, *emptypb.Empty) (*v1.WeakSubjectivityResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetWeakSubjectivity not implemented") } -func (*UnimplementedBeaconChainServer) GetStateRoot(context.Context, *v1.StateRequest) (*v1.StateRootResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStateRoot not implemented") -} -func (*UnimplementedBeaconChainServer) ListSyncCommittees(context.Context, *v2.StateSyncCommitteesRequest) (*v2.StateSyncCommitteesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListSyncCommittees not implemented") -} -func (*UnimplementedBeaconChainServer) GetRandao(context.Context, *v2.RandaoRequest) (*v2.RandaoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRandao not implemented") -} func (*UnimplementedBeaconChainServer) GetBlock(context.Context, *v1.BlockRequest) (*v1.BlockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") } @@ -611,60 +524,6 @@ func _BeaconChain_GetWeakSubjectivity_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } -func _BeaconChain_GetStateRoot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(v1.StateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).GetStateRoot(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.service.BeaconChain/GetStateRoot", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).GetStateRoot(ctx, req.(*v1.StateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconChain_ListSyncCommittees_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(v2.StateSyncCommitteesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).ListSyncCommittees(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.service.BeaconChain/ListSyncCommittees", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).ListSyncCommittees(ctx, req.(*v2.StateSyncCommitteesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BeaconChain_GetRandao_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(v2.RandaoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BeaconChainServer).GetRandao(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.service.BeaconChain/GetRandao", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconChainServer).GetRandao(ctx, req.(*v2.RandaoRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _BeaconChain_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.BlockRequest) if err := dec(in); err != nil { @@ -907,18 +766,6 @@ var _BeaconChain_serviceDesc = grpc.ServiceDesc{ MethodName: "GetWeakSubjectivity", Handler: _BeaconChain_GetWeakSubjectivity_Handler, }, - { - MethodName: "GetStateRoot", - Handler: _BeaconChain_GetStateRoot_Handler, - }, - { - MethodName: "ListSyncCommittees", - Handler: _BeaconChain_ListSyncCommittees_Handler, - }, - { - MethodName: "GetRandao", - Handler: _BeaconChain_GetRandao_Handler, - }, { MethodName: "GetBlock", Handler: _BeaconChain_GetBlock_Handler, diff --git a/proto/eth/service/beacon_chain_service.pb.gw.go b/proto/eth/service/beacon_chain_service.pb.gw.go index 514ba3f43f..ef40ab4e0d 100755 --- a/proto/eth/service/beacon_chain_service.pb.gw.go +++ b/proto/eth/service/beacon_chain_service.pb.gw.go @@ -55,204 +55,6 @@ func local_request_BeaconChain_GetWeakSubjectivity_0(ctx context.Context, marsha } -func request_BeaconChain_GetStateRoot_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconChainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.StateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["state_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "state_id") - } - - state_id, err := runtime.Bytes(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "state_id", err) - } - protoReq.StateId = (state_id) - - msg, err := client.GetStateRoot(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_BeaconChain_GetStateRoot_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconChainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.StateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["state_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "state_id") - } - - state_id, err := runtime.Bytes(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "state_id", err) - } - protoReq.StateId = (state_id) - - msg, err := server.GetStateRoot(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_BeaconChain_ListSyncCommittees_0 = &utilities.DoubleArray{Encoding: map[string]int{"state_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_BeaconChain_ListSyncCommittees_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconChainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq eth.StateSyncCommitteesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["state_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "state_id") - } - - state_id, err := runtime.Bytes(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "state_id", err) - } - protoReq.StateId = (state_id) - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconChain_ListSyncCommittees_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListSyncCommittees(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_BeaconChain_ListSyncCommittees_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconChainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq eth.StateSyncCommitteesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["state_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "state_id") - } - - state_id, err := runtime.Bytes(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "state_id", err) - } - protoReq.StateId = (state_id) - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconChain_ListSyncCommittees_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListSyncCommittees(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_BeaconChain_GetRandao_0 = &utilities.DoubleArray{Encoding: map[string]int{"state_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_BeaconChain_GetRandao_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconChainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq eth.RandaoRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["state_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "state_id") - } - - state_id, err := runtime.Bytes(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "state_id", err) - } - protoReq.StateId = (state_id) - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconChain_GetRandao_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetRandao(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_BeaconChain_GetRandao_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconChainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq eth.RandaoRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["state_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "state_id") - } - - state_id, err := runtime.Bytes(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "state_id", err) - } - protoReq.StateId = (state_id) - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconChain_GetRandao_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetRandao(ctx, &protoReq) - return msg, metadata, err - -} - func request_BeaconChain_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconChainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq v1.BlockRequest var metadata runtime.ServerMetadata @@ -800,75 +602,6 @@ func RegisterBeaconChainHandlerServer(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("GET", pattern_BeaconChain_GetStateRoot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.service.BeaconChain/GetStateRoot") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_BeaconChain_GetStateRoot_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_BeaconChain_GetStateRoot_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_BeaconChain_ListSyncCommittees_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.service.BeaconChain/ListSyncCommittees") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_BeaconChain_ListSyncCommittees_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_BeaconChain_ListSyncCommittees_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_BeaconChain_GetRandao_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.service.BeaconChain/GetRandao") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_BeaconChain_GetRandao_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_BeaconChain_GetRandao_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_BeaconChain_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1229,66 +962,6 @@ func RegisterBeaconChainHandlerClient(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("GET", pattern_BeaconChain_GetStateRoot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.service.BeaconChain/GetStateRoot") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_BeaconChain_GetStateRoot_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_BeaconChain_GetStateRoot_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_BeaconChain_ListSyncCommittees_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.service.BeaconChain/ListSyncCommittees") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_BeaconChain_ListSyncCommittees_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_BeaconChain_ListSyncCommittees_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_BeaconChain_GetRandao_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.service.BeaconChain/GetRandao") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_BeaconChain_GetRandao_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_BeaconChain_GetRandao_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_BeaconChain_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1555,12 +1228,6 @@ func RegisterBeaconChainHandlerClient(ctx context.Context, mux *runtime.ServeMux var ( pattern_BeaconChain_GetWeakSubjectivity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"internal", "eth", "v1", "beacon", "weak_subjectivity"}, "")) - pattern_BeaconChain_GetStateRoot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"internal", "eth", "v1", "beacon", "states", "state_id", "root"}, "")) - - pattern_BeaconChain_ListSyncCommittees_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"internal", "eth", "v1", "beacon", "states", "state_id", "sync_committees"}, "")) - - pattern_BeaconChain_GetRandao_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"internal", "eth", "v1", "beacon", "states", "state_id", "randao"}, "")) - pattern_BeaconChain_GetBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"internal", "eth", "v1", "beacon", "blocks", "block_id"}, "")) pattern_BeaconChain_GetBlockSSZ_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"internal", "eth", "v1", "beacon", "blocks", "block_id", "ssz"}, "")) @@ -1591,12 +1258,6 @@ var ( var ( forward_BeaconChain_GetWeakSubjectivity_0 = runtime.ForwardResponseMessage - forward_BeaconChain_GetStateRoot_0 = runtime.ForwardResponseMessage - - forward_BeaconChain_ListSyncCommittees_0 = runtime.ForwardResponseMessage - - forward_BeaconChain_GetRandao_0 = runtime.ForwardResponseMessage - forward_BeaconChain_GetBlock_0 = runtime.ForwardResponseMessage forward_BeaconChain_GetBlockSSZ_0 = runtime.ForwardResponseMessage diff --git a/proto/eth/service/beacon_chain_service.proto b/proto/eth/service/beacon_chain_service.proto index b8e30613b6..1373d8670f 100644 --- a/proto/eth/service/beacon_chain_service.proto +++ b/proto/eth/service/beacon_chain_service.proto @@ -22,9 +22,7 @@ import "google/protobuf/empty.proto"; import "proto/eth/v1/beacon_block.proto"; import "proto/eth/v1/beacon_chain.proto"; import "proto/eth/v2/beacon_block.proto"; -import "proto/eth/v2/beacon_state.proto"; import "proto/eth/v2/ssz.proto"; -import "proto/eth/v2/sync_committee.proto"; option csharp_namespace = "Ethereum.Eth.Service"; option go_package = "github.com/prysmaticlabs/prysm/v4/proto/eth/service"; @@ -50,36 +48,6 @@ service BeaconChain { option (google.api.http) = {get: "/internal/eth/v1/beacon/weak_subjectivity"}; } - // GetStateRoot calculates HashTreeRoot for state with given 'stateId'. If stateId is root, same value will be returned. - // - // Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Beacon/getStateRoot - rpc GetStateRoot(v1.StateRequest) returns (v1.StateRootResponse) { - option (google.api.http) = { - get: "/internal/eth/v1/beacon/states/{state_id}/root" - }; - } - - // ListSyncCommittees retrieves the sync committees for the given state at the given epoch. - // - // Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Beacon/getEpochSyncCommittees - rpc ListSyncCommittees(v2.StateSyncCommitteesRequest) returns (v2.StateSyncCommitteesResponse) { - option (google.api.http) = { - get: "/internal/eth/v1/beacon/states/{state_id}/sync_committees" - }; - } - - // GetRandao fetches the RANDAO mix for the requested epoch from the state identified by state_id. - // If an epoch is not specified then the RANDAO mix for the state's current epoch will be returned. - // By adjusting the state_id parameter you can query for any historic value of the RANDAO mix. - // Ordinarily states from the same epoch will mutate the RANDAO mix for that epoch as blocks are applied. - // - // Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Beacon/getStateRandao - rpc GetRandao(v2.RandaoRequest) returns (v2.RandaoResponse) { - option (google.api.http) = { - get: "/internal/eth/v1/beacon/states/{state_id}/randao" - }; - } - // GetBlock retrieves block details for given block id. // // Spec: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v2.3.0#/Beacon/getBlock diff --git a/proto/eth/v1/beacon_chain.pb.go b/proto/eth/v1/beacon_chain.pb.go index 5b879dec15..d4d5cc881f 100755 --- a/proto/eth/v1/beacon_chain.pb.go +++ b/proto/eth/v1/beacon_chain.pb.go @@ -120,69 +120,6 @@ func (x *StateRequest) GetStateId() []byte { return nil } -type StateRootResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data *StateRootResponse_StateRoot `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` - Finalized bool `protobuf:"varint,3,opt,name=finalized,proto3" json:"finalized,omitempty"` -} - -func (x *StateRootResponse) Reset() { - *x = StateRootResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StateRootResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StateRootResponse) ProtoMessage() {} - -func (x *StateRootResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_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 StateRootResponse.ProtoReflect.Descriptor instead. -func (*StateRootResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{1} -} - -func (x *StateRootResponse) GetData() *StateRootResponse_StateRoot { - if x != nil { - return x.Data - } - return nil -} - -func (x *StateRootResponse) GetExecutionOptimistic() bool { - if x != nil { - return x.ExecutionOptimistic - } - return false -} - -func (x *StateRootResponse) GetFinalized() bool { - if x != nil { - return x.Finalized - } - return false -} - type BlockAttestationsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -196,7 +133,7 @@ type BlockAttestationsResponse struct { func (x *BlockAttestationsResponse) Reset() { *x = BlockAttestationsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[2] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -209,7 +146,7 @@ func (x *BlockAttestationsResponse) String() string { func (*BlockAttestationsResponse) ProtoMessage() {} func (x *BlockAttestationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[2] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -222,7 +159,7 @@ func (x *BlockAttestationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockAttestationsResponse.ProtoReflect.Descriptor instead. func (*BlockAttestationsResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{2} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{1} } func (x *BlockAttestationsResponse) GetData() []*Attestation { @@ -257,7 +194,7 @@ type BlockRequest struct { func (x *BlockRequest) Reset() { *x = BlockRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[3] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -270,7 +207,7 @@ func (x *BlockRequest) String() string { func (*BlockRequest) ProtoMessage() {} func (x *BlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[3] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -283,7 +220,7 @@ func (x *BlockRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockRequest.ProtoReflect.Descriptor instead. func (*BlockRequest) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{3} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{2} } func (x *BlockRequest) GetBlockId() []byte { @@ -304,7 +241,7 @@ type BlockResponse struct { func (x *BlockResponse) Reset() { *x = BlockResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[4] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -317,7 +254,7 @@ func (x *BlockResponse) String() string { func (*BlockResponse) ProtoMessage() {} func (x *BlockResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[4] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -330,7 +267,7 @@ func (x *BlockResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockResponse.ProtoReflect.Descriptor instead. func (*BlockResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{4} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{3} } func (x *BlockResponse) GetData() *BeaconBlockContainer { @@ -351,7 +288,7 @@ type BlockSSZResponse struct { func (x *BlockSSZResponse) Reset() { *x = BlockSSZResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[5] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -364,7 +301,7 @@ func (x *BlockSSZResponse) String() string { func (*BlockSSZResponse) ProtoMessage() {} func (x *BlockSSZResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[5] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -377,7 +314,7 @@ func (x *BlockSSZResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockSSZResponse.ProtoReflect.Descriptor instead. func (*BlockSSZResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{5} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{4} } func (x *BlockSSZResponse) GetData() []byte { @@ -399,7 +336,7 @@ type BeaconBlockContainer struct { func (x *BeaconBlockContainer) Reset() { *x = BeaconBlockContainer{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[6] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -412,7 +349,7 @@ func (x *BeaconBlockContainer) String() string { func (*BeaconBlockContainer) ProtoMessage() {} func (x *BeaconBlockContainer) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[6] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -425,7 +362,7 @@ func (x *BeaconBlockContainer) ProtoReflect() protoreflect.Message { // Deprecated: Use BeaconBlockContainer.ProtoReflect.Descriptor instead. func (*BeaconBlockContainer) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{6} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{5} } func (x *BeaconBlockContainer) GetMessage() *BeaconBlock { @@ -453,7 +390,7 @@ type AttesterSlashingsPoolResponse struct { func (x *AttesterSlashingsPoolResponse) Reset() { *x = AttesterSlashingsPoolResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[7] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -466,7 +403,7 @@ func (x *AttesterSlashingsPoolResponse) String() string { func (*AttesterSlashingsPoolResponse) ProtoMessage() {} func (x *AttesterSlashingsPoolResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[7] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -479,7 +416,7 @@ func (x *AttesterSlashingsPoolResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AttesterSlashingsPoolResponse.ProtoReflect.Descriptor instead. func (*AttesterSlashingsPoolResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{7} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{6} } func (x *AttesterSlashingsPoolResponse) GetData() []*AttesterSlashing { @@ -500,7 +437,7 @@ type ProposerSlashingPoolResponse struct { func (x *ProposerSlashingPoolResponse) Reset() { *x = ProposerSlashingPoolResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[8] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -513,7 +450,7 @@ func (x *ProposerSlashingPoolResponse) String() string { func (*ProposerSlashingPoolResponse) ProtoMessage() {} func (x *ProposerSlashingPoolResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[8] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -526,7 +463,7 @@ func (x *ProposerSlashingPoolResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ProposerSlashingPoolResponse.ProtoReflect.Descriptor instead. func (*ProposerSlashingPoolResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{8} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{7} } func (x *ProposerSlashingPoolResponse) GetData() []*ProposerSlashing { @@ -547,7 +484,7 @@ type ForkScheduleResponse struct { func (x *ForkScheduleResponse) Reset() { *x = ForkScheduleResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[9] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -560,7 +497,7 @@ func (x *ForkScheduleResponse) String() string { func (*ForkScheduleResponse) ProtoMessage() {} func (x *ForkScheduleResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[9] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -573,7 +510,7 @@ func (x *ForkScheduleResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ForkScheduleResponse.ProtoReflect.Descriptor instead. func (*ForkScheduleResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{9} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{8} } func (x *ForkScheduleResponse) GetData() []*Fork { @@ -594,7 +531,7 @@ type SpecResponse struct { func (x *SpecResponse) Reset() { *x = SpecResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[10] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -607,7 +544,7 @@ func (x *SpecResponse) String() string { func (*SpecResponse) ProtoMessage() {} func (x *SpecResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[10] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -620,7 +557,7 @@ func (x *SpecResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SpecResponse.ProtoReflect.Descriptor instead. func (*SpecResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{10} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{9} } func (x *SpecResponse) GetData() map[string]string { @@ -641,7 +578,7 @@ type DepositContractResponse struct { func (x *DepositContractResponse) Reset() { *x = DepositContractResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[11] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -654,7 +591,7 @@ func (x *DepositContractResponse) String() string { func (*DepositContractResponse) ProtoMessage() {} func (x *DepositContractResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[11] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -667,7 +604,7 @@ func (x *DepositContractResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DepositContractResponse.ProtoReflect.Descriptor instead. func (*DepositContractResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{11} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{10} } func (x *DepositContractResponse) GetData() *DepositContract { @@ -689,7 +626,7 @@ type DepositContract struct { func (x *DepositContract) Reset() { *x = DepositContract{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[12] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -702,7 +639,7 @@ func (x *DepositContract) String() string { func (*DepositContract) ProtoMessage() {} func (x *DepositContract) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[12] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -715,7 +652,7 @@ func (x *DepositContract) ProtoReflect() protoreflect.Message { // Deprecated: Use DepositContract.ProtoReflect.Descriptor instead. func (*DepositContract) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{12} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{11} } func (x *DepositContract) GetChainId() uint64 { @@ -744,7 +681,7 @@ type WeakSubjectivityResponse struct { func (x *WeakSubjectivityResponse) Reset() { *x = WeakSubjectivityResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[13] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -757,7 +694,7 @@ func (x *WeakSubjectivityResponse) String() string { func (*WeakSubjectivityResponse) ProtoMessage() {} func (x *WeakSubjectivityResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[13] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -770,7 +707,7 @@ func (x *WeakSubjectivityResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use WeakSubjectivityResponse.ProtoReflect.Descriptor instead. func (*WeakSubjectivityResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{13} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{12} } func (x *WeakSubjectivityResponse) GetData() *WeakSubjectivityData { @@ -793,7 +730,7 @@ type WeakSubjectivityData struct { func (x *WeakSubjectivityData) Reset() { *x = WeakSubjectivityData{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[14] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -806,7 +743,7 @@ func (x *WeakSubjectivityData) String() string { func (*WeakSubjectivityData) ProtoMessage() {} func (x *WeakSubjectivityData) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[14] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -819,7 +756,7 @@ func (x *WeakSubjectivityData) ProtoReflect() protoreflect.Message { // Deprecated: Use WeakSubjectivityData.ProtoReflect.Descriptor instead. func (*WeakSubjectivityData) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{14} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{13} } func (x *WeakSubjectivityData) GetWsCheckpoint() *Checkpoint { @@ -854,7 +791,7 @@ type ForkChoiceDump struct { func (x *ForkChoiceDump) Reset() { *x = ForkChoiceDump{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[15] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -867,7 +804,7 @@ func (x *ForkChoiceDump) String() string { func (*ForkChoiceDump) ProtoMessage() {} func (x *ForkChoiceDump) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[15] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -880,7 +817,7 @@ func (x *ForkChoiceDump) ProtoReflect() protoreflect.Message { // Deprecated: Use ForkChoiceDump.ProtoReflect.Descriptor instead. func (*ForkChoiceDump) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{15} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{14} } func (x *ForkChoiceDump) GetJustifiedCheckpoint() *Checkpoint { @@ -962,7 +899,7 @@ type ForkChoiceNode struct { func (x *ForkChoiceNode) Reset() { *x = ForkChoiceNode{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[16] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -975,7 +912,7 @@ func (x *ForkChoiceNode) String() string { func (*ForkChoiceNode) ProtoMessage() {} func (x *ForkChoiceNode) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[16] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -988,7 +925,7 @@ func (x *ForkChoiceNode) ProtoReflect() protoreflect.Message { // Deprecated: Use ForkChoiceNode.ProtoReflect.Descriptor instead. func (*ForkChoiceNode) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{16} + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{15} } func (x *ForkChoiceNode) GetSlot() github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Slot { @@ -1082,53 +1019,6 @@ func (x *ForkChoiceNode) GetValidity() ForkChoiceNodeValidity { return ForkChoiceNodeValidity_VALID } -type StateRootResponse_StateRoot struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Root []byte `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty" ssz-size:"32"` -} - -func (x *StateRootResponse_StateRoot) Reset() { - *x = StateRootResponse_StateRoot{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StateRootResponse_StateRoot) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StateRootResponse_StateRoot) ProtoMessage() {} - -func (x *StateRootResponse_StateRoot) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[17] - 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 StateRootResponse_StateRoot.ProtoReflect.Descriptor instead. -func (*StateRootResponse_StateRoot) Descriptor() ([]byte, []int) { - return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *StateRootResponse_StateRoot) GetRoot() []byte { - if x != nil { - return x.Root - } - return nil -} - var File_proto_eth_v1_beacon_chain_proto protoreflect.FileDescriptor var file_proto_eth_v1_beacon_chain_proto_rawDesc = []byte{ @@ -1147,205 +1037,192 @@ var file_proto_eth_v1_beacon_chain_proto_rawDesc = []byte{ 0x2f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0xcf, - 0x01, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 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, 0x02, - 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, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x6e, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x66, 0x69, - 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x1a, 0x27, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x6f, 0x6f, 0x74, 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, 0x9e, 0x01, 0x0a, 0x19, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 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, 0x02, 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, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x64, 0x22, 0x29, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x0d, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, - 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x10, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x53, 0x53, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x74, 0x0a, 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0x9e, + 0x01, 0x0a, 0x19, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 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, 0x02, 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, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x22, + 0x29, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x0d, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 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, 0x56, 0x0a, 0x1d, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, - 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x55, - 0x0a, 0x1c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x41, 0x0a, 0x14, 0x46, 0x6f, 0x72, 0x6b, 0x53, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, - 0x72, 0x6b, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x53, 0x70, 0x65, - 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x4f, 0x0a, 0x17, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x46, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x59, 0x0a, 0x18, 0x57, 0x65, 0x61, 0x6b, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x61, 0x6b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, - 0x02, 0x18, 0x01, 0x22, 0x7b, 0x0a, 0x14, 0x57, 0x65, 0x61, 0x6b, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0d, 0x77, - 0x73, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, - 0x0c, 0x77, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x3a, 0x02, 0x18, 0x01, - 0x22, 0xf3, 0x04, 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x44, - 0x75, 0x6d, 0x70, 0x12, 0x4e, 0x0a, 0x14, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, - 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, - 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 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, 0x63, 0x0a, 0x1f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x64, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1d, 0x75, 0x6e, 0x72, 0x65, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x63, 0x0a, 0x1f, 0x75, 0x6e, 0x72, 0x65, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, - 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1d, - 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x36, 0x0a, - 0x13, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x5f, - 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, - 0x33, 0x32, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x73, - 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x47, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, - 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x6f, 0x73, 0x74, - 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, - 0x02, 0x33, 0x32, 0x52, 0x19, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x23, - 0x0a, 0x09, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x68, 0x65, 0x61, 0x64, 0x52, - 0x6f, 0x6f, 0x74, 0x12, 0x4b, 0x0a, 0x11, 0x66, 0x6f, 0x72, 0x6b, 0x5f, 0x63, 0x68, 0x6f, 0x69, - 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x0f, 0x66, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, - 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xad, 0x07, 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x6b, 0x43, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 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, 0x34, 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, 0x25, 0x0a, 0x0a, 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, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 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, 0x6f, 0x0a, 0x0f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x64, 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, 0x34, 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, 0x0e, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x6f, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x64, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x05, 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, 0x34, 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, 0x0e, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x84, 0x01, 0x0a, 0x1a, 0x75, 0x6e, 0x72, 0x65, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0x82, 0xb5, 0x18, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x10, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, + 0x53, 0x5a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x74, + 0x0a, 0x14, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 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, 0x56, 0x0a, 0x1d, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6c, + 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x55, 0x0a, 0x1c, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, + 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x41, 0x0a, 0x14, 0x46, 0x6f, 0x72, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4f, 0x0a, + 0x17, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x46, + 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x59, 0x0a, 0x18, 0x57, 0x65, 0x61, 0x6b, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x57, 0x65, 0x61, 0x6b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x02, 0x18, + 0x01, 0x22, 0x7b, 0x0a, 0x14, 0x57, 0x65, 0x61, 0x6b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0d, 0x77, 0x73, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0c, 0x77, + 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xf3, + 0x04, 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x44, 0x75, 0x6d, + 0x70, 0x12, 0x4e, 0x0a, 0x14, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, 0x6a, 0x75, + 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x12, 0x4e, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 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, 0x63, 0x0a, 0x1f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, + 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1d, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x63, 0x0a, 0x1f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x1d, 0x75, 0x6e, + 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x13, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x6f, + 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, + 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x52, + 0x6f, 0x6f, 0x74, 0x12, 0x47, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, + 0x32, 0x52, 0x19, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x23, 0x0a, 0x09, + 0x68, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x08, 0x68, 0x65, 0x61, 0x64, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x4b, 0x0a, 0x11, 0x66, 0x6f, 0x72, 0x6b, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0f, 0x66, + 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x04, + 0x08, 0x03, 0x10, 0x04, 0x22, 0xad, 0x07, 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 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, 0x34, 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, 0x25, 0x0a, 0x0a, 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, 0x09, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, 0x6f, 0x74, 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, 0x6f, 0x0a, 0x0f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 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, 0x34, 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, 0x18, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4a, - 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x84, 0x01, - 0x0a, 0x1a, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6e, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 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, 0x34, 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, 0x18, 0x75, 0x6e, 0x72, 0x65, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x45, - 0x70, 0x6f, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, - 0x77, 0x65, 0x69, 0x67, 0x68, 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, 0x0a, - 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, 0x12, 0x38, 0x0a, 0x14, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, - 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x43, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x08, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x2a, 0x40, 0x0a, 0x16, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x12, 0x09, 0x0a, 0x05, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, - 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x54, 0x49, - 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43, 0x10, 0x02, 0x42, 0x7d, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, - 0x10, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 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, 0x34, 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, + 0x6f, 0x63, 0x68, 0x52, 0x0e, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x70, + 0x6f, 0x63, 0x68, 0x12, 0x6f, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x05, 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, 0x34, 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, 0x0e, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x45, + 0x70, 0x6f, 0x63, 0x68, 0x12, 0x84, 0x01, 0x0a, 0x1a, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x5f, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x65, 0x70, + 0x6f, 0x63, 0x68, 0x18, 0x06, 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, 0x34, + 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, 0x18, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4a, 0x75, 0x73, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x84, 0x01, 0x0a, 0x1a, + 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x64, 0x5f, 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, 0x34, 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, 0x18, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x77, 0x65, + 0x69, 0x67, 0x68, 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, 0x0a, 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, 0x12, 0x38, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, 0x52, 0x12, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x43, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x27, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4e, 0x6f, + 0x64, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x2a, 0x40, 0x0a, 0x16, 0x46, 0x6f, 0x72, 0x6b, 0x43, 0x68, 0x6f, 0x69, + 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x09, + 0x0a, 0x05, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, + 0x41, 0x4c, 0x49, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, + 0x53, 0x54, 0x49, 0x43, 0x10, 0x02, 0x42, 0x7d, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x42, + 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 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, 0x34, 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 ( @@ -1361,58 +1238,55 @@ func file_proto_eth_v1_beacon_chain_proto_rawDescGZIP() []byte { } var file_proto_eth_v1_beacon_chain_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_eth_v1_beacon_chain_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_proto_eth_v1_beacon_chain_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_proto_eth_v1_beacon_chain_proto_goTypes = []interface{}{ (ForkChoiceNodeValidity)(0), // 0: ethereum.eth.v1.ForkChoiceNodeValidity (*StateRequest)(nil), // 1: ethereum.eth.v1.StateRequest - (*StateRootResponse)(nil), // 2: ethereum.eth.v1.StateRootResponse - (*BlockAttestationsResponse)(nil), // 3: ethereum.eth.v1.BlockAttestationsResponse - (*BlockRequest)(nil), // 4: ethereum.eth.v1.BlockRequest - (*BlockResponse)(nil), // 5: ethereum.eth.v1.BlockResponse - (*BlockSSZResponse)(nil), // 6: ethereum.eth.v1.BlockSSZResponse - (*BeaconBlockContainer)(nil), // 7: ethereum.eth.v1.BeaconBlockContainer - (*AttesterSlashingsPoolResponse)(nil), // 8: ethereum.eth.v1.AttesterSlashingsPoolResponse - (*ProposerSlashingPoolResponse)(nil), // 9: ethereum.eth.v1.ProposerSlashingPoolResponse - (*ForkScheduleResponse)(nil), // 10: ethereum.eth.v1.ForkScheduleResponse - (*SpecResponse)(nil), // 11: ethereum.eth.v1.SpecResponse - (*DepositContractResponse)(nil), // 12: ethereum.eth.v1.DepositContractResponse - (*DepositContract)(nil), // 13: ethereum.eth.v1.DepositContract - (*WeakSubjectivityResponse)(nil), // 14: ethereum.eth.v1.WeakSubjectivityResponse - (*WeakSubjectivityData)(nil), // 15: ethereum.eth.v1.WeakSubjectivityData - (*ForkChoiceDump)(nil), // 16: ethereum.eth.v1.ForkChoiceDump - (*ForkChoiceNode)(nil), // 17: ethereum.eth.v1.ForkChoiceNode - (*StateRootResponse_StateRoot)(nil), // 18: ethereum.eth.v1.StateRootResponse.StateRoot - nil, // 19: ethereum.eth.v1.SpecResponse.DataEntry - (*Attestation)(nil), // 20: ethereum.eth.v1.Attestation - (*BeaconBlock)(nil), // 21: ethereum.eth.v1.BeaconBlock - (*AttesterSlashing)(nil), // 22: ethereum.eth.v1.AttesterSlashing - (*ProposerSlashing)(nil), // 23: ethereum.eth.v1.ProposerSlashing - (*Fork)(nil), // 24: ethereum.eth.v1.Fork - (*Checkpoint)(nil), // 25: ethereum.eth.v1.Checkpoint + (*BlockAttestationsResponse)(nil), // 2: ethereum.eth.v1.BlockAttestationsResponse + (*BlockRequest)(nil), // 3: ethereum.eth.v1.BlockRequest + (*BlockResponse)(nil), // 4: ethereum.eth.v1.BlockResponse + (*BlockSSZResponse)(nil), // 5: ethereum.eth.v1.BlockSSZResponse + (*BeaconBlockContainer)(nil), // 6: ethereum.eth.v1.BeaconBlockContainer + (*AttesterSlashingsPoolResponse)(nil), // 7: ethereum.eth.v1.AttesterSlashingsPoolResponse + (*ProposerSlashingPoolResponse)(nil), // 8: ethereum.eth.v1.ProposerSlashingPoolResponse + (*ForkScheduleResponse)(nil), // 9: ethereum.eth.v1.ForkScheduleResponse + (*SpecResponse)(nil), // 10: ethereum.eth.v1.SpecResponse + (*DepositContractResponse)(nil), // 11: ethereum.eth.v1.DepositContractResponse + (*DepositContract)(nil), // 12: ethereum.eth.v1.DepositContract + (*WeakSubjectivityResponse)(nil), // 13: ethereum.eth.v1.WeakSubjectivityResponse + (*WeakSubjectivityData)(nil), // 14: ethereum.eth.v1.WeakSubjectivityData + (*ForkChoiceDump)(nil), // 15: ethereum.eth.v1.ForkChoiceDump + (*ForkChoiceNode)(nil), // 16: ethereum.eth.v1.ForkChoiceNode + nil, // 17: ethereum.eth.v1.SpecResponse.DataEntry + (*Attestation)(nil), // 18: ethereum.eth.v1.Attestation + (*BeaconBlock)(nil), // 19: ethereum.eth.v1.BeaconBlock + (*AttesterSlashing)(nil), // 20: ethereum.eth.v1.AttesterSlashing + (*ProposerSlashing)(nil), // 21: ethereum.eth.v1.ProposerSlashing + (*Fork)(nil), // 22: ethereum.eth.v1.Fork + (*Checkpoint)(nil), // 23: ethereum.eth.v1.Checkpoint } var file_proto_eth_v1_beacon_chain_proto_depIdxs = []int32{ - 18, // 0: ethereum.eth.v1.StateRootResponse.data:type_name -> ethereum.eth.v1.StateRootResponse.StateRoot - 20, // 1: ethereum.eth.v1.BlockAttestationsResponse.data:type_name -> ethereum.eth.v1.Attestation - 7, // 2: ethereum.eth.v1.BlockResponse.data:type_name -> ethereum.eth.v1.BeaconBlockContainer - 21, // 3: ethereum.eth.v1.BeaconBlockContainer.message:type_name -> ethereum.eth.v1.BeaconBlock - 22, // 4: ethereum.eth.v1.AttesterSlashingsPoolResponse.data:type_name -> ethereum.eth.v1.AttesterSlashing - 23, // 5: ethereum.eth.v1.ProposerSlashingPoolResponse.data:type_name -> ethereum.eth.v1.ProposerSlashing - 24, // 6: ethereum.eth.v1.ForkScheduleResponse.data:type_name -> ethereum.eth.v1.Fork - 19, // 7: ethereum.eth.v1.SpecResponse.data:type_name -> ethereum.eth.v1.SpecResponse.DataEntry - 13, // 8: ethereum.eth.v1.DepositContractResponse.data:type_name -> ethereum.eth.v1.DepositContract - 15, // 9: ethereum.eth.v1.WeakSubjectivityResponse.data:type_name -> ethereum.eth.v1.WeakSubjectivityData - 25, // 10: ethereum.eth.v1.WeakSubjectivityData.ws_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 25, // 11: ethereum.eth.v1.ForkChoiceDump.justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 25, // 12: ethereum.eth.v1.ForkChoiceDump.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 25, // 13: ethereum.eth.v1.ForkChoiceDump.unrealized_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 25, // 14: ethereum.eth.v1.ForkChoiceDump.unrealized_finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 17, // 15: ethereum.eth.v1.ForkChoiceDump.fork_choice_nodes:type_name -> ethereum.eth.v1.ForkChoiceNode - 0, // 16: ethereum.eth.v1.ForkChoiceNode.validity:type_name -> ethereum.eth.v1.ForkChoiceNodeValidity - 17, // [17:17] is the sub-list for method output_type - 17, // [17:17] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 18, // 0: ethereum.eth.v1.BlockAttestationsResponse.data:type_name -> ethereum.eth.v1.Attestation + 6, // 1: ethereum.eth.v1.BlockResponse.data:type_name -> ethereum.eth.v1.BeaconBlockContainer + 19, // 2: ethereum.eth.v1.BeaconBlockContainer.message:type_name -> ethereum.eth.v1.BeaconBlock + 20, // 3: ethereum.eth.v1.AttesterSlashingsPoolResponse.data:type_name -> ethereum.eth.v1.AttesterSlashing + 21, // 4: ethereum.eth.v1.ProposerSlashingPoolResponse.data:type_name -> ethereum.eth.v1.ProposerSlashing + 22, // 5: ethereum.eth.v1.ForkScheduleResponse.data:type_name -> ethereum.eth.v1.Fork + 17, // 6: ethereum.eth.v1.SpecResponse.data:type_name -> ethereum.eth.v1.SpecResponse.DataEntry + 12, // 7: ethereum.eth.v1.DepositContractResponse.data:type_name -> ethereum.eth.v1.DepositContract + 14, // 8: ethereum.eth.v1.WeakSubjectivityResponse.data:type_name -> ethereum.eth.v1.WeakSubjectivityData + 23, // 9: ethereum.eth.v1.WeakSubjectivityData.ws_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 23, // 10: ethereum.eth.v1.ForkChoiceDump.justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 23, // 11: ethereum.eth.v1.ForkChoiceDump.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 23, // 12: ethereum.eth.v1.ForkChoiceDump.unrealized_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 23, // 13: ethereum.eth.v1.ForkChoiceDump.unrealized_finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 16, // 14: ethereum.eth.v1.ForkChoiceDump.fork_choice_nodes:type_name -> ethereum.eth.v1.ForkChoiceNode + 0, // 15: ethereum.eth.v1.ForkChoiceNode.validity:type_name -> ethereum.eth.v1.ForkChoiceNodeValidity + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_proto_eth_v1_beacon_chain_proto_init() } @@ -1437,18 +1311,6 @@ func file_proto_eth_v1_beacon_chain_proto_init() { } } file_proto_eth_v1_beacon_chain_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateRootResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_v1_beacon_chain_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlockAttestationsResponse); i { case 0: return &v.state @@ -1460,7 +1322,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlockRequest); i { case 0: return &v.state @@ -1472,7 +1334,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlockResponse); i { case 0: return &v.state @@ -1484,7 +1346,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlockSSZResponse); i { case 0: return &v.state @@ -1496,7 +1358,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BeaconBlockContainer); i { case 0: return &v.state @@ -1508,7 +1370,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AttesterSlashingsPoolResponse); i { case 0: return &v.state @@ -1520,7 +1382,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProposerSlashingPoolResponse); i { case 0: return &v.state @@ -1532,7 +1394,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ForkScheduleResponse); i { case 0: return &v.state @@ -1544,7 +1406,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SpecResponse); i { case 0: return &v.state @@ -1556,7 +1418,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DepositContractResponse); i { case 0: return &v.state @@ -1568,7 +1430,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DepositContract); i { case 0: return &v.state @@ -1580,7 +1442,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WeakSubjectivityResponse); i { case 0: return &v.state @@ -1592,7 +1454,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WeakSubjectivityData); i { case 0: return &v.state @@ -1604,7 +1466,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ForkChoiceDump); i { case 0: return &v.state @@ -1616,7 +1478,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_v1_beacon_chain_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ForkChoiceNode); i { case 0: return &v.state @@ -1628,18 +1490,6 @@ func file_proto_eth_v1_beacon_chain_proto_init() { return nil } } - file_proto_eth_v1_beacon_chain_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateRootResponse_StateRoot); 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{ @@ -1647,7 +1497,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_eth_v1_beacon_chain_proto_rawDesc, NumEnums: 1, - NumMessages: 19, + NumMessages: 17, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/eth/v1/beacon_chain.proto b/proto/eth/v1/beacon_chain.proto index 57a728b939..34fcdc78cc 100644 --- a/proto/eth/v1/beacon_chain.proto +++ b/proto/eth/v1/beacon_chain.proto @@ -37,17 +37,6 @@ message StateRequest { bytes state_id = 1; } -message StateRootResponse { - StateRoot data = 1; - bool execution_optimistic = 2; - bool finalized = 3; - - message StateRoot { - // SSZ encoded state root for the requested state. - bytes root = 1 [(ethereum.eth.ext.ssz_size) = "32"]; - } -} - // Beacon Block API related messages. message BlockAttestationsResponse { diff --git a/proto/eth/v1/node.pb.go b/proto/eth/v1/node.pb.go index dea10cd75f..7f443a0533 100755 --- a/proto/eth/v1/node.pb.go +++ b/proto/eth/v1/node.pb.go @@ -10,8 +10,6 @@ import ( reflect "reflect" sync "sync" - _ "github.com/golang/protobuf/protoc-gen-go/descriptor" - _ "github.com/prysmaticlabs/prysm/v4/proto/eth/ext" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/descriptorpb" @@ -208,39 +206,38 @@ var file_proto_eth_v1_node_proto_rawDesc = []byte{ 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x67, 0x6f, 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, 0xda, 0x01, 0x0a, 0x04, 0x50, 0x65, - 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, - 0x6e, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x72, 0x12, 0x31, 0x0a, - 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x65, 0x6e, 0x5f, 0x70, 0x32, 0x70, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6c, 0x61, - 0x73, 0x74, 0x53, 0x65, 0x65, 0x6e, 0x50, 0x32, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x36, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, - 0x65, 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x2a, 0x0a, 0x0d, 0x50, 0x65, 0x65, 0x72, 0x44, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x42, 0x4f, 0x55, - 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, - 0x10, 0x01, 0x2a, 0x55, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x4e, 0x4e, - 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x4e, 0x4e, 0x45, - 0x43, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4e, 0x4e, 0x45, - 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x4e, - 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x7c, 0x0a, 0x13, 0x6f, 0x72, 0x67, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x01, 0x0a, + 0x04, 0x50, 0x65, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, + 0x0a, 0x03, 0x65, 0x6e, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x72, + 0x12, 0x31, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x65, 0x6e, 0x5f, 0x70, 0x32, + 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x12, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x65, 0x6e, 0x50, 0x32, 0x70, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x36, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x42, 0x0f, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 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, 0x34, 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, + 0x2e, 0x50, 0x65, 0x65, 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x2a, 0x0a, 0x0d, 0x50, 0x65, 0x65, + 0x72, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, + 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x55, 0x54, 0x42, 0x4f, + 0x55, 0x4e, 0x44, 0x10, 0x01, 0x2a, 0x55, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x49, 0x53, 0x43, + 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, + 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, + 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x49, 0x53, + 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x7c, 0x0a, 0x13, + 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 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, 0x34, 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 ( diff --git a/proto/eth/v1/node.proto b/proto/eth/v1/node.proto index 386d336cf1..69d18a6a15 100644 --- a/proto/eth/v1/node.proto +++ b/proto/eth/v1/node.proto @@ -17,8 +17,6 @@ package ethereum.eth.v1; import "google/protobuf/descriptor.proto"; -import "proto/eth/ext/options.proto"; - option csharp_namespace = "Ethereum.Eth.V1"; option go_package = "github.com/prysmaticlabs/prysm/v4/proto/eth/v1"; option java_multiple_files = true; diff --git a/proto/eth/v2/beacon_state.pb.go b/proto/eth/v2/beacon_state.pb.go index 892234f396..ea1b9e1c81 100755 --- a/proto/eth/v2/beacon_state.pb.go +++ b/proto/eth/v2/beacon_state.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.30.0 // protoc v4.23.3 // source: proto/eth/v2/beacon_state.proto @@ -1483,171 +1483,6 @@ func (x *ForkChoiceHead) GetExecutionOptimistic() bool { return false } -type RandaoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StateId []byte `protobuf:"bytes,1,opt,name=state_id,json=stateId,proto3" json:"state_id,omitempty"` - Epoch *github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch `protobuf:"varint,2,opt,name=epoch,proto3,oneof" json:"epoch,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Epoch"` -} - -func (x *RandaoRequest) Reset() { - *x = RandaoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v2_beacon_state_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RandaoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RandaoRequest) ProtoMessage() {} - -func (x *RandaoRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v2_beacon_state_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RandaoRequest.ProtoReflect.Descriptor instead. -func (*RandaoRequest) Descriptor() ([]byte, []int) { - return file_proto_eth_v2_beacon_state_proto_rawDescGZIP(), []int{11} -} - -func (x *RandaoRequest) GetStateId() []byte { - if x != nil { - return x.StateId - } - return nil -} - -func (x *RandaoRequest) GetEpoch() github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch { - if x != nil && x.Epoch != nil { - return *x.Epoch - } - return github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch(0) -} - -type RandaoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data *RandaoResponse_Randao `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` - Finalized bool `protobuf:"varint,3,opt,name=finalized,proto3" json:"finalized,omitempty"` -} - -func (x *RandaoResponse) Reset() { - *x = RandaoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v2_beacon_state_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RandaoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RandaoResponse) ProtoMessage() {} - -func (x *RandaoResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v2_beacon_state_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RandaoResponse.ProtoReflect.Descriptor instead. -func (*RandaoResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_v2_beacon_state_proto_rawDescGZIP(), []int{12} -} - -func (x *RandaoResponse) GetData() *RandaoResponse_Randao { - if x != nil { - return x.Data - } - return nil -} - -func (x *RandaoResponse) GetExecutionOptimistic() bool { - if x != nil { - return x.ExecutionOptimistic - } - return false -} - -func (x *RandaoResponse) GetFinalized() bool { - if x != nil { - return x.Finalized - } - return false -} - -type RandaoResponse_Randao struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Randao []byte `protobuf:"bytes,1,opt,name=randao,proto3" json:"randao,omitempty" ssz-size:"32"` -} - -func (x *RandaoResponse_Randao) Reset() { - *x = RandaoResponse_Randao{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v2_beacon_state_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RandaoResponse_Randao) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RandaoResponse_Randao) ProtoMessage() {} - -func (x *RandaoResponse_Randao) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v2_beacon_state_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RandaoResponse_Randao.ProtoReflect.Descriptor instead. -func (*RandaoResponse_Randao) Descriptor() ([]byte, []int) { - return file_proto_eth_v2_beacon_state_proto_rawDescGZIP(), []int{12, 0} -} - -func (x *RandaoResponse_Randao) GetRandao() []byte { - if x != nil { - return x.Randao - } - return nil -} - var File_proto_eth_v2_beacon_state_proto protoreflect.FileDescriptor var file_proto_eth_v2_beacon_state_proto_rawDesc = []byte{ @@ -2226,38 +2061,16 @@ var file_proto_eth_v2_beacon_state_proto_rawDesc = []byte{ 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, 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, 0x97, 0x01, 0x0a, 0x0d, 0x52, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, - 0x64, 0x12, 0x61, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 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, 0x34, 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, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0xc7, - 0x01, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, - 0x32, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 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, 0x02, 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, - 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x1a, 0x28, - 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x12, 0x1e, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x64, - 0x61, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0x8a, 0xb5, 0x18, 0x02, 0x33, 0x32, - 0x52, 0x06, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x6f, 0x42, 0x83, 0x01, 0x0a, 0x13, 0x6f, 0x72, 0x67, - 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, - 0x42, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 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, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0f, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x32, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x69, 0x63, 0x42, 0x83, 0x01, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x12, 0x53, 0x79, + 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x32, 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, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, + 0x76, 0x32, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -2272,7 +2085,7 @@ func file_proto_eth_v2_beacon_state_proto_rawDescGZIP() []byte { return file_proto_eth_v2_beacon_state_proto_rawDescData } -var file_proto_eth_v2_beacon_state_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_proto_eth_v2_beacon_state_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_proto_eth_v2_beacon_state_proto_goTypes = []interface{}{ (*BeaconState)(nil), // 0: ethereum.eth.v2.BeaconState (*BeaconStateBellatrix)(nil), // 1: ethereum.eth.v2.BeaconStateBellatrix @@ -2285,82 +2098,78 @@ var file_proto_eth_v2_beacon_state_proto_goTypes = []interface{}{ (*BeaconStateContainer)(nil), // 8: ethereum.eth.v2.BeaconStateContainer (*ForkChoiceHeadsResponse)(nil), // 9: ethereum.eth.v2.ForkChoiceHeadsResponse (*ForkChoiceHead)(nil), // 10: ethereum.eth.v2.ForkChoiceHead - (*RandaoRequest)(nil), // 11: ethereum.eth.v2.RandaoRequest - (*RandaoResponse)(nil), // 12: ethereum.eth.v2.RandaoResponse - (*RandaoResponse_Randao)(nil), // 13: ethereum.eth.v2.RandaoResponse.Randao - (*v1.Fork)(nil), // 14: ethereum.eth.v1.Fork - (*v1.BeaconBlockHeader)(nil), // 15: ethereum.eth.v1.BeaconBlockHeader - (*v1.Eth1Data)(nil), // 16: ethereum.eth.v1.Eth1Data - (*v1.Validator)(nil), // 17: ethereum.eth.v1.Validator - (*v1.Checkpoint)(nil), // 18: ethereum.eth.v1.Checkpoint - (*SyncCommittee)(nil), // 19: ethereum.eth.v2.SyncCommittee - (*v11.ExecutionPayloadHeader)(nil), // 20: ethereum.engine.v1.ExecutionPayloadHeader - (*v11.ExecutionPayloadHeaderCapella)(nil), // 21: ethereum.engine.v1.ExecutionPayloadHeaderCapella - (*v11.ExecutionPayloadHeaderDeneb)(nil), // 22: ethereum.engine.v1.ExecutionPayloadHeaderDeneb - (Version)(0), // 23: ethereum.eth.v2.Version - (*v1.BeaconState)(nil), // 24: ethereum.eth.v1.BeaconState + (*v1.Fork)(nil), // 11: ethereum.eth.v1.Fork + (*v1.BeaconBlockHeader)(nil), // 12: ethereum.eth.v1.BeaconBlockHeader + (*v1.Eth1Data)(nil), // 13: ethereum.eth.v1.Eth1Data + (*v1.Validator)(nil), // 14: ethereum.eth.v1.Validator + (*v1.Checkpoint)(nil), // 15: ethereum.eth.v1.Checkpoint + (*SyncCommittee)(nil), // 16: ethereum.eth.v2.SyncCommittee + (*v11.ExecutionPayloadHeader)(nil), // 17: ethereum.engine.v1.ExecutionPayloadHeader + (*v11.ExecutionPayloadHeaderCapella)(nil), // 18: ethereum.engine.v1.ExecutionPayloadHeaderCapella + (*v11.ExecutionPayloadHeaderDeneb)(nil), // 19: ethereum.engine.v1.ExecutionPayloadHeaderDeneb + (Version)(0), // 20: ethereum.eth.v2.Version + (*v1.BeaconState)(nil), // 21: ethereum.eth.v1.BeaconState } var file_proto_eth_v2_beacon_state_proto_depIdxs = []int32{ - 14, // 0: ethereum.eth.v2.BeaconState.fork:type_name -> ethereum.eth.v1.Fork - 15, // 1: ethereum.eth.v2.BeaconState.latest_block_header:type_name -> ethereum.eth.v1.BeaconBlockHeader - 16, // 2: ethereum.eth.v2.BeaconState.eth1_data:type_name -> ethereum.eth.v1.Eth1Data - 16, // 3: ethereum.eth.v2.BeaconState.eth1_data_votes:type_name -> ethereum.eth.v1.Eth1Data - 17, // 4: ethereum.eth.v2.BeaconState.validators:type_name -> ethereum.eth.v1.Validator - 18, // 5: ethereum.eth.v2.BeaconState.previous_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 18, // 6: ethereum.eth.v2.BeaconState.current_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 18, // 7: ethereum.eth.v2.BeaconState.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 19, // 8: ethereum.eth.v2.BeaconState.current_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee - 19, // 9: ethereum.eth.v2.BeaconState.next_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee - 14, // 10: ethereum.eth.v2.BeaconStateBellatrix.fork:type_name -> ethereum.eth.v1.Fork - 15, // 11: ethereum.eth.v2.BeaconStateBellatrix.latest_block_header:type_name -> ethereum.eth.v1.BeaconBlockHeader - 16, // 12: ethereum.eth.v2.BeaconStateBellatrix.eth1_data:type_name -> ethereum.eth.v1.Eth1Data - 16, // 13: ethereum.eth.v2.BeaconStateBellatrix.eth1_data_votes:type_name -> ethereum.eth.v1.Eth1Data - 17, // 14: ethereum.eth.v2.BeaconStateBellatrix.validators:type_name -> ethereum.eth.v1.Validator - 18, // 15: ethereum.eth.v2.BeaconStateBellatrix.previous_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 18, // 16: ethereum.eth.v2.BeaconStateBellatrix.current_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 18, // 17: ethereum.eth.v2.BeaconStateBellatrix.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 19, // 18: ethereum.eth.v2.BeaconStateBellatrix.current_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee - 19, // 19: ethereum.eth.v2.BeaconStateBellatrix.next_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee - 20, // 20: ethereum.eth.v2.BeaconStateBellatrix.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeader - 14, // 21: ethereum.eth.v2.BeaconStateCapella.fork:type_name -> ethereum.eth.v1.Fork - 15, // 22: ethereum.eth.v2.BeaconStateCapella.latest_block_header:type_name -> ethereum.eth.v1.BeaconBlockHeader - 16, // 23: ethereum.eth.v2.BeaconStateCapella.eth1_data:type_name -> ethereum.eth.v1.Eth1Data - 16, // 24: ethereum.eth.v2.BeaconStateCapella.eth1_data_votes:type_name -> ethereum.eth.v1.Eth1Data - 17, // 25: ethereum.eth.v2.BeaconStateCapella.validators:type_name -> ethereum.eth.v1.Validator - 18, // 26: ethereum.eth.v2.BeaconStateCapella.previous_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 18, // 27: ethereum.eth.v2.BeaconStateCapella.current_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 18, // 28: ethereum.eth.v2.BeaconStateCapella.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 19, // 29: ethereum.eth.v2.BeaconStateCapella.current_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee - 19, // 30: ethereum.eth.v2.BeaconStateCapella.next_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee - 21, // 31: ethereum.eth.v2.BeaconStateCapella.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderCapella + 11, // 0: ethereum.eth.v2.BeaconState.fork:type_name -> ethereum.eth.v1.Fork + 12, // 1: ethereum.eth.v2.BeaconState.latest_block_header:type_name -> ethereum.eth.v1.BeaconBlockHeader + 13, // 2: ethereum.eth.v2.BeaconState.eth1_data:type_name -> ethereum.eth.v1.Eth1Data + 13, // 3: ethereum.eth.v2.BeaconState.eth1_data_votes:type_name -> ethereum.eth.v1.Eth1Data + 14, // 4: ethereum.eth.v2.BeaconState.validators:type_name -> ethereum.eth.v1.Validator + 15, // 5: ethereum.eth.v2.BeaconState.previous_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 15, // 6: ethereum.eth.v2.BeaconState.current_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 15, // 7: ethereum.eth.v2.BeaconState.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 16, // 8: ethereum.eth.v2.BeaconState.current_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee + 16, // 9: ethereum.eth.v2.BeaconState.next_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee + 11, // 10: ethereum.eth.v2.BeaconStateBellatrix.fork:type_name -> ethereum.eth.v1.Fork + 12, // 11: ethereum.eth.v2.BeaconStateBellatrix.latest_block_header:type_name -> ethereum.eth.v1.BeaconBlockHeader + 13, // 12: ethereum.eth.v2.BeaconStateBellatrix.eth1_data:type_name -> ethereum.eth.v1.Eth1Data + 13, // 13: ethereum.eth.v2.BeaconStateBellatrix.eth1_data_votes:type_name -> ethereum.eth.v1.Eth1Data + 14, // 14: ethereum.eth.v2.BeaconStateBellatrix.validators:type_name -> ethereum.eth.v1.Validator + 15, // 15: ethereum.eth.v2.BeaconStateBellatrix.previous_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 15, // 16: ethereum.eth.v2.BeaconStateBellatrix.current_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 15, // 17: ethereum.eth.v2.BeaconStateBellatrix.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 16, // 18: ethereum.eth.v2.BeaconStateBellatrix.current_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee + 16, // 19: ethereum.eth.v2.BeaconStateBellatrix.next_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee + 17, // 20: ethereum.eth.v2.BeaconStateBellatrix.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeader + 11, // 21: ethereum.eth.v2.BeaconStateCapella.fork:type_name -> ethereum.eth.v1.Fork + 12, // 22: ethereum.eth.v2.BeaconStateCapella.latest_block_header:type_name -> ethereum.eth.v1.BeaconBlockHeader + 13, // 23: ethereum.eth.v2.BeaconStateCapella.eth1_data:type_name -> ethereum.eth.v1.Eth1Data + 13, // 24: ethereum.eth.v2.BeaconStateCapella.eth1_data_votes:type_name -> ethereum.eth.v1.Eth1Data + 14, // 25: ethereum.eth.v2.BeaconStateCapella.validators:type_name -> ethereum.eth.v1.Validator + 15, // 26: ethereum.eth.v2.BeaconStateCapella.previous_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 15, // 27: ethereum.eth.v2.BeaconStateCapella.current_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 15, // 28: ethereum.eth.v2.BeaconStateCapella.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 16, // 29: ethereum.eth.v2.BeaconStateCapella.current_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee + 16, // 30: ethereum.eth.v2.BeaconStateCapella.next_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee + 18, // 31: ethereum.eth.v2.BeaconStateCapella.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderCapella 4, // 32: ethereum.eth.v2.BeaconStateCapella.historical_summaries:type_name -> ethereum.eth.v2.HistoricalSummary - 14, // 33: ethereum.eth.v2.BeaconStateDeneb.fork:type_name -> ethereum.eth.v1.Fork - 15, // 34: ethereum.eth.v2.BeaconStateDeneb.latest_block_header:type_name -> ethereum.eth.v1.BeaconBlockHeader - 16, // 35: ethereum.eth.v2.BeaconStateDeneb.eth1_data:type_name -> ethereum.eth.v1.Eth1Data - 16, // 36: ethereum.eth.v2.BeaconStateDeneb.eth1_data_votes:type_name -> ethereum.eth.v1.Eth1Data - 17, // 37: ethereum.eth.v2.BeaconStateDeneb.validators:type_name -> ethereum.eth.v1.Validator - 18, // 38: ethereum.eth.v2.BeaconStateDeneb.previous_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 18, // 39: ethereum.eth.v2.BeaconStateDeneb.current_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 18, // 40: ethereum.eth.v2.BeaconStateDeneb.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 19, // 41: ethereum.eth.v2.BeaconStateDeneb.current_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee - 19, // 42: ethereum.eth.v2.BeaconStateDeneb.next_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee - 22, // 43: ethereum.eth.v2.BeaconStateDeneb.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb + 11, // 33: ethereum.eth.v2.BeaconStateDeneb.fork:type_name -> ethereum.eth.v1.Fork + 12, // 34: ethereum.eth.v2.BeaconStateDeneb.latest_block_header:type_name -> ethereum.eth.v1.BeaconBlockHeader + 13, // 35: ethereum.eth.v2.BeaconStateDeneb.eth1_data:type_name -> ethereum.eth.v1.Eth1Data + 13, // 36: ethereum.eth.v2.BeaconStateDeneb.eth1_data_votes:type_name -> ethereum.eth.v1.Eth1Data + 14, // 37: ethereum.eth.v2.BeaconStateDeneb.validators:type_name -> ethereum.eth.v1.Validator + 15, // 38: ethereum.eth.v2.BeaconStateDeneb.previous_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 15, // 39: ethereum.eth.v2.BeaconStateDeneb.current_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 15, // 40: ethereum.eth.v2.BeaconStateDeneb.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 16, // 41: ethereum.eth.v2.BeaconStateDeneb.current_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee + 16, // 42: ethereum.eth.v2.BeaconStateDeneb.next_sync_committee:type_name -> ethereum.eth.v2.SyncCommittee + 19, // 43: ethereum.eth.v2.BeaconStateDeneb.latest_execution_payload_header:type_name -> ethereum.engine.v1.ExecutionPayloadHeaderDeneb 4, // 44: ethereum.eth.v2.BeaconStateDeneb.historical_summaries:type_name -> ethereum.eth.v2.HistoricalSummary - 23, // 45: ethereum.eth.v2.BeaconStateResponseV2.version:type_name -> ethereum.eth.v2.Version + 20, // 45: ethereum.eth.v2.BeaconStateResponseV2.version:type_name -> ethereum.eth.v2.Version 8, // 46: ethereum.eth.v2.BeaconStateResponseV2.data:type_name -> ethereum.eth.v2.BeaconStateContainer - 23, // 47: ethereum.eth.v2.BeaconStateSSZResponseV2.version:type_name -> ethereum.eth.v2.Version - 24, // 48: ethereum.eth.v2.BeaconStateContainer.phase0_state:type_name -> ethereum.eth.v1.BeaconState + 20, // 47: ethereum.eth.v2.BeaconStateSSZResponseV2.version:type_name -> ethereum.eth.v2.Version + 21, // 48: ethereum.eth.v2.BeaconStateContainer.phase0_state:type_name -> ethereum.eth.v1.BeaconState 0, // 49: ethereum.eth.v2.BeaconStateContainer.altair_state:type_name -> ethereum.eth.v2.BeaconState 1, // 50: ethereum.eth.v2.BeaconStateContainer.bellatrix_state:type_name -> ethereum.eth.v2.BeaconStateBellatrix 2, // 51: ethereum.eth.v2.BeaconStateContainer.capella_state:type_name -> ethereum.eth.v2.BeaconStateCapella 3, // 52: ethereum.eth.v2.BeaconStateContainer.deneb_state:type_name -> ethereum.eth.v2.BeaconStateDeneb 10, // 53: ethereum.eth.v2.ForkChoiceHeadsResponse.data:type_name -> ethereum.eth.v2.ForkChoiceHead - 13, // 54: ethereum.eth.v2.RandaoResponse.data:type_name -> ethereum.eth.v2.RandaoResponse.Randao - 55, // [55:55] is the sub-list for method output_type - 55, // [55:55] is the sub-list for method input_type - 55, // [55:55] is the sub-list for extension type_name - 55, // [55:55] is the sub-list for extension extendee - 0, // [0:55] is the sub-list for field type_name + 54, // [54:54] is the sub-list for method output_type + 54, // [54:54] is the sub-list for method input_type + 54, // [54:54] is the sub-list for extension type_name + 54, // [54:54] is the sub-list for extension extendee + 0, // [0:54] is the sub-list for field type_name } func init() { file_proto_eth_v2_beacon_state_proto_init() } @@ -2503,42 +2312,6 @@ func file_proto_eth_v2_beacon_state_proto_init() { return nil } } - file_proto_eth_v2_beacon_state_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RandaoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_v2_beacon_state_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RandaoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_v2_beacon_state_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RandaoResponse_Randao); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_proto_eth_v2_beacon_state_proto_msgTypes[8].OneofWrappers = []interface{}{ (*BeaconStateContainer_Phase0State)(nil), @@ -2547,14 +2320,13 @@ func file_proto_eth_v2_beacon_state_proto_init() { (*BeaconStateContainer_CapellaState)(nil), (*BeaconStateContainer_DenebState)(nil), } - file_proto_eth_v2_beacon_state_proto_msgTypes[11].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_eth_v2_beacon_state_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/eth/v2/beacon_state.proto b/proto/eth/v2/beacon_state.proto index e554721c42..29b12ca329 100644 --- a/proto/eth/v2/beacon_state.proto +++ b/proto/eth/v2/beacon_state.proto @@ -264,18 +264,3 @@ message ForkChoiceHead { uint64 slot = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Slot"]; bool execution_optimistic = 3; } - -message RandaoRequest { - bytes state_id = 1; - optional uint64 epoch = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Epoch"]; -} - -message RandaoResponse { - Randao data = 1; - bool execution_optimistic = 2; - bool finalized = 3; - - message Randao { - bytes randao = 1 [(ethereum.eth.ext.ssz_size) = "32"]; - } -} diff --git a/proto/eth/v2/sync_committee.pb.go b/proto/eth/v2/sync_committee.pb.go index 9dc8392ece..5d5017271c 100755 --- a/proto/eth/v2/sync_committee.pb.go +++ b/proto/eth/v2/sync_committee.pb.go @@ -196,226 +196,6 @@ func (x *SyncCommitteeMessage) GetSignature() []byte { return nil } -type StateSyncCommitteesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StateId []byte `protobuf:"bytes,1,opt,name=state_id,json=stateId,proto3" json:"state_id,omitempty"` - Epoch *github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch `protobuf:"varint,2,opt,name=epoch,proto3,oneof" json:"epoch,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Epoch"` -} - -func (x *StateSyncCommitteesRequest) Reset() { - *x = StateSyncCommitteesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v2_sync_committee_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StateSyncCommitteesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StateSyncCommitteesRequest) ProtoMessage() {} - -func (x *StateSyncCommitteesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v2_sync_committee_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 StateSyncCommitteesRequest.ProtoReflect.Descriptor instead. -func (*StateSyncCommitteesRequest) Descriptor() ([]byte, []int) { - return file_proto_eth_v2_sync_committee_proto_rawDescGZIP(), []int{3} -} - -func (x *StateSyncCommitteesRequest) GetStateId() []byte { - if x != nil { - return x.StateId - } - return nil -} - -func (x *StateSyncCommitteesRequest) GetEpoch() github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch { - if x != nil && x.Epoch != nil { - return *x.Epoch - } - return github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.Epoch(0) -} - -type StateSyncCommitteesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data *SyncCommitteeValidators `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - ExecutionOptimistic bool `protobuf:"varint,2,opt,name=execution_optimistic,json=executionOptimistic,proto3" json:"execution_optimistic,omitempty"` - Finalized bool `protobuf:"varint,3,opt,name=finalized,proto3" json:"finalized,omitempty"` -} - -func (x *StateSyncCommitteesResponse) Reset() { - *x = StateSyncCommitteesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v2_sync_committee_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StateSyncCommitteesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StateSyncCommitteesResponse) ProtoMessage() {} - -func (x *StateSyncCommitteesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v2_sync_committee_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 StateSyncCommitteesResponse.ProtoReflect.Descriptor instead. -func (*StateSyncCommitteesResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_v2_sync_committee_proto_rawDescGZIP(), []int{4} -} - -func (x *StateSyncCommitteesResponse) GetData() *SyncCommitteeValidators { - if x != nil { - return x.Data - } - return nil -} - -func (x *StateSyncCommitteesResponse) GetExecutionOptimistic() bool { - if x != nil { - return x.ExecutionOptimistic - } - return false -} - -func (x *StateSyncCommitteesResponse) GetFinalized() bool { - if x != nil { - return x.Finalized - } - return false -} - -type SyncCommitteeValidators struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Validators []github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.ValidatorIndex `protobuf:"varint,1,rep,packed,name=validators,proto3" json:"validators,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.ValidatorIndex"` - ValidatorAggregates []*SyncSubcommitteeValidators `protobuf:"bytes,2,rep,name=validator_aggregates,json=validatorAggregates,proto3" json:"validator_aggregates,omitempty"` -} - -func (x *SyncCommitteeValidators) Reset() { - *x = SyncCommitteeValidators{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v2_sync_committee_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SyncCommitteeValidators) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SyncCommitteeValidators) ProtoMessage() {} - -func (x *SyncCommitteeValidators) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v2_sync_committee_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 SyncCommitteeValidators.ProtoReflect.Descriptor instead. -func (*SyncCommitteeValidators) Descriptor() ([]byte, []int) { - return file_proto_eth_v2_sync_committee_proto_rawDescGZIP(), []int{5} -} - -func (x *SyncCommitteeValidators) GetValidators() []github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.ValidatorIndex { - if x != nil { - return x.Validators - } - return []github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.ValidatorIndex(nil) -} - -func (x *SyncCommitteeValidators) GetValidatorAggregates() []*SyncSubcommitteeValidators { - if x != nil { - return x.ValidatorAggregates - } - return nil -} - -type SyncSubcommitteeValidators struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Validators []github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.ValidatorIndex `protobuf:"varint,1,rep,packed,name=validators,proto3" json:"validators,omitempty" cast-type:"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.ValidatorIndex"` -} - -func (x *SyncSubcommitteeValidators) Reset() { - *x = SyncSubcommitteeValidators{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v2_sync_committee_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SyncSubcommitteeValidators) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SyncSubcommitteeValidators) ProtoMessage() {} - -func (x *SyncSubcommitteeValidators) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v2_sync_committee_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 SyncSubcommitteeValidators.ProtoReflect.Descriptor instead. -func (*SyncSubcommitteeValidators) Descriptor() ([]byte, []int) { - return file_proto_eth_v2_sync_committee_proto_rawDescGZIP(), []int{6} -} - -func (x *SyncSubcommitteeValidators) GetValidators() []github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.ValidatorIndex { - if x != nil { - return x.Validators - } - return []github_com_prysmaticlabs_prysm_v4_consensus_types_primitives.ValidatorIndex(nil) -} - var File_proto_eth_v2_sync_committee_proto protoreflect.FileDescriptor var file_proto_eth_v2_sync_committee_proto_rawDesc = []byte{ @@ -457,61 +237,16 @@ var file_proto_eth_v2_sync_committee_proto_rawDesc = []byte{ 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 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, 0xa4, 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x65, 0x49, 0x64, - 0x12, 0x61, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 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, 0x34, 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, - 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0xac, 0x01, - 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x74, 0x65, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, - 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 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, 0x02, 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, 0x12, 0x1c, - 0x0a, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x22, 0xea, 0x01, 0x0a, - 0x17, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x6f, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 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, 0x34, 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, 0x0a, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x5e, 0x0a, 0x14, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, - 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x52, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x1a, 0x53, 0x79, - 0x6e, 0x63, 0x53, 0x75, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x6f, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 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, 0x34, 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, 0x0a, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x42, 0x83, 0x01, 0x0a, 0x13, 0x6f, 0x72, - 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, - 0x32, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 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, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x0f, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0f, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x32, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x83, 0x01, 0x0a, 0x13, 0x6f, 0x72, 0x67, 0x2e, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x12, + 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 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, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, + 0x68, 0x2f, 0x76, 0x32, 0x3b, 0x65, 0x74, 0x68, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -526,25 +261,19 @@ func file_proto_eth_v2_sync_committee_proto_rawDescGZIP() []byte { return file_proto_eth_v2_sync_committee_proto_rawDescData } -var file_proto_eth_v2_sync_committee_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_proto_eth_v2_sync_committee_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_proto_eth_v2_sync_committee_proto_goTypes = []interface{}{ (*SubmitSyncCommitteeSignaturesRequest)(nil), // 0: ethereum.eth.v2.SubmitSyncCommitteeSignaturesRequest (*SyncCommittee)(nil), // 1: ethereum.eth.v2.SyncCommittee (*SyncCommitteeMessage)(nil), // 2: ethereum.eth.v2.SyncCommitteeMessage - (*StateSyncCommitteesRequest)(nil), // 3: ethereum.eth.v2.StateSyncCommitteesRequest - (*StateSyncCommitteesResponse)(nil), // 4: ethereum.eth.v2.StateSyncCommitteesResponse - (*SyncCommitteeValidators)(nil), // 5: ethereum.eth.v2.SyncCommitteeValidators - (*SyncSubcommitteeValidators)(nil), // 6: ethereum.eth.v2.SyncSubcommitteeValidators } var file_proto_eth_v2_sync_committee_proto_depIdxs = []int32{ 2, // 0: ethereum.eth.v2.SubmitSyncCommitteeSignaturesRequest.data:type_name -> ethereum.eth.v2.SyncCommitteeMessage - 5, // 1: ethereum.eth.v2.StateSyncCommitteesResponse.data:type_name -> ethereum.eth.v2.SyncCommitteeValidators - 6, // 2: ethereum.eth.v2.SyncCommitteeValidators.validator_aggregates:type_name -> ethereum.eth.v2.SyncSubcommitteeValidators - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_proto_eth_v2_sync_committee_proto_init() } @@ -589,63 +318,14 @@ func file_proto_eth_v2_sync_committee_proto_init() { return nil } } - file_proto_eth_v2_sync_committee_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateSyncCommitteesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_v2_sync_committee_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateSyncCommitteesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_v2_sync_committee_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncCommitteeValidators); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_v2_sync_committee_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncSubcommitteeValidators); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } - file_proto_eth_v2_sync_committee_proto_msgTypes[3].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_eth_v2_sync_committee_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/eth/v2/sync_committee.proto b/proto/eth/v2/sync_committee.proto index ae2a09e453..e21ea17896 100644 --- a/proto/eth/v2/sync_committee.proto +++ b/proto/eth/v2/sync_committee.proto @@ -48,30 +48,3 @@ message SyncCommitteeMessage { // Signature by the validator over the block root of `slot`. bytes signature = 4 [(ethereum.eth.ext.ssz_size) = "96"]; } - -message StateSyncCommitteesRequest { - // The state id which can be any of: "head" (canonical head in node's view), - // "genesis", "finalized", "justified", , . - bytes state_id = 1; - - // The epoch to retrieve the committees of. - optional uint64 epoch = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.Epoch"]; -} - -message StateSyncCommitteesResponse { - SyncCommitteeValidators data = 1; - bool execution_optimistic = 2; - bool finalized = 3; -} - -message SyncCommitteeValidators { - // All of the validator indices in the current sync committee. - repeated uint64 validators = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.ValidatorIndex"]; - - repeated SyncSubcommitteeValidators validator_aggregates = 2; -} - -message SyncSubcommitteeValidators { - // Subcommittee slices of the current sync committee. - repeated uint64 validators = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.ValidatorIndex"]; -} diff --git a/testing/endtoend/endtoend_setup_test.go b/testing/endtoend/endtoend_setup_test.go index 7782a76750..17cfcf2fd8 100644 --- a/testing/endtoend/endtoend_setup_test.go +++ b/testing/endtoend/endtoend_setup_test.go @@ -57,7 +57,6 @@ func e2eMinimal(t *testing.T, v int, cfgo ...types.E2EConfigOpt) *testRunner { ev.BellatrixForkTransition, ev.CapellaForkTransition, // ev.DenebForkTransition, // TODO(12750): Enable this when geth main branch's engine API support. - ev.APIMiddlewareVerifyIntegrity, ev.APIGatewayV1Alpha1VerifyIntegrity, ev.FinishedSyncing, ev.AllNodesHaveSameHead, @@ -134,7 +133,6 @@ func e2eMainnet(t *testing.T, usePrysmSh, useMultiClient bool, cfg *params.Beaco ev.BellatrixForkTransition, ev.CapellaForkTransition, // ev.DenebForkTransition, // TODO(12750): Enable this when geth main branch's engine API support. - ev.APIMiddlewareVerifyIntegrity, ev.APIGatewayV1Alpha1VerifyIntegrity, ev.FinishedSyncing, ev.AllNodesHaveSameHead, @@ -191,7 +189,6 @@ func scenarioEvals() []types.Evaluator { ev.BellatrixForkTransition, ev.CapellaForkTransition, // ev.DenebForkTransition, // TODO(12750): Enable this when geth main branch's engine API support. - ev.APIMiddlewareVerifyIntegrity, ev.APIGatewayV1Alpha1VerifyIntegrity, ev.FinishedSyncing, ev.AllNodesHaveSameHead, @@ -213,7 +210,6 @@ func scenarioEvalsMulti() []types.Evaluator { ev.BellatrixForkTransition, ev.CapellaForkTransition, // ev.DenebForkTransition, // TODO(12750): Enable this when geth main branch's engine API support. - ev.APIMiddlewareVerifyIntegrity, ev.APIGatewayV1Alpha1VerifyIntegrity, ev.FinishedSyncing, ev.AllNodesHaveSameHead, diff --git a/testing/endtoend/evaluators/BUILD.bazel b/testing/endtoend/evaluators/BUILD.bazel index a085dfbfb2..9bfd9e9420 100644 --- a/testing/endtoend/evaluators/BUILD.bazel +++ b/testing/endtoend/evaluators/BUILD.bazel @@ -5,7 +5,6 @@ go_library( testonly = True, srcs = [ "api_gateway_v1alpha1.go", - "api_middleware.go", "builder.go", "data.go", "execution_engine.go", diff --git a/testing/endtoend/evaluators/api_middleware.go b/testing/endtoend/evaluators/api_middleware.go deleted file mode 100644 index be1fbae3c2..0000000000 --- a/testing/endtoend/evaluators/api_middleware.go +++ /dev/null @@ -1,93 +0,0 @@ -package evaluators - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - - "github.com/prysmaticlabs/prysm/v4/proto/eth/service" - ethpbv2 "github.com/prysmaticlabs/prysm/v4/proto/eth/v2" - "github.com/prysmaticlabs/prysm/v4/testing/endtoend/helpers" - "github.com/prysmaticlabs/prysm/v4/testing/endtoend/params" - "github.com/prysmaticlabs/prysm/v4/testing/endtoend/policies" - e2etypes "github.com/prysmaticlabs/prysm/v4/testing/endtoend/types" - "google.golang.org/grpc" -) - -// APIMiddlewareVerifyIntegrity tests our API Middleware for the official Ethereum API. -// This ensures our API Middleware returns good data compared to gRPC. -var APIMiddlewareVerifyIntegrity = e2etypes.Evaluator{ - Name: "api_middleware_verify_integrity_epoch_%d", - Policy: policies.OnEpoch(helpers.AltairE2EForkEpoch), - Evaluation: apiMiddlewareVerify, -} - -const ( - v1MiddlewarePathTemplate = "http://localhost:%d/eth/v1" -) - -func apiMiddlewareVerify(_ *e2etypes.EvaluationContext, conns ...*grpc.ClientConn) error { - for beaconNodeIdx, conn := range conns { - if err := runAPIComparisonFunctions( - beaconNodeIdx, - conn, - withCompareSyncCommittee, - ); err != nil { - return err - } - } - return nil -} - -func withCompareSyncCommittee(beaconNodeIdx int, conn *grpc.ClientConn) error { - type syncCommitteeValidatorsJson struct { - Validators []string `json:"validators"` - ValidatorAggregates [][]string `json:"validator_aggregates"` - } - type syncCommitteesResponseJson struct { - Data *syncCommitteeValidatorsJson `json:"data"` - } - ctx := context.Background() - beaconClient := service.NewBeaconChainClient(conn) - resp, err := beaconClient.ListSyncCommittees(ctx, ðpbv2.StateSyncCommitteesRequest{ - StateId: []byte("head"), - }) - if err != nil { - return err - } - respJSON := &syncCommitteesResponseJson{} - if err := doMiddlewareJSONGetRequestV1( - "/beacon/states/head/sync_committees", - beaconNodeIdx, - respJSON, - ); err != nil { - return err - } - if len(respJSON.Data.Validators) != len(resp.Data.Validators) { - return fmt.Errorf( - "API Middleware number of validators %d does not match gRPC %d", - len(respJSON.Data.Validators), - len(resp.Data.Validators), - ) - } - if len(respJSON.Data.ValidatorAggregates) != len(resp.Data.ValidatorAggregates) { - return fmt.Errorf( - "API Middleware number of validator aggregates %d does not match gRPC %d", - len(respJSON.Data.ValidatorAggregates), - len(resp.Data.ValidatorAggregates), - ) - } - return nil -} - -func doMiddlewareJSONGetRequestV1(requestPath string, beaconNodeIdx int, dst interface{}) error { - basePath := fmt.Sprintf(v1MiddlewarePathTemplate, params.TestParams.Ports.PrysmBeaconNodeGatewayPort+beaconNodeIdx) - httpResp, err := http.Get( - basePath + requestPath, - ) - if err != nil { - return err - } - return json.NewDecoder(httpResp.Body).Decode(&dst) -} diff --git a/testing/endtoend/evaluators/beaconapi_evaluators/beacon_api.go b/testing/endtoend/evaluators/beaconapi_evaluators/beacon_api.go index 44564a72cf..26b9b25914 100644 --- a/testing/endtoend/evaluators/beaconapi_evaluators/beacon_api.go +++ b/testing/endtoend/evaluators/beaconapi_evaluators/beacon_api.go @@ -50,10 +50,10 @@ var beaconPathsAndObjects = map[string]metadata{ return []string{"head"} }, prysmResps: map[string]interface{}{ - "json": &apimiddleware.StateRootResponseJson{}, + "json": &beacon.GetStateRootResponse{}, }, lighthouseResps: map[string]interface{}{ - "json": &apimiddleware.StateRootResponseJson{}, + "json": &beacon.GetStateRootResponse{}, }, }, "/beacon/states/{param1}/finality_checkpoints": {