diff --git a/beacon-chain/rpc/apimiddleware/custom_handlers.go b/beacon-chain/rpc/apimiddleware/custom_handlers.go index 9f3420024d44..76ecbbd0d398 100644 --- a/beacon-chain/rpc/apimiddleware/custom_handlers.go +++ b/beacon-chain/rpc/apimiddleware/custom_handlers.go @@ -211,6 +211,14 @@ func handlePostSSZ(m *apimiddleware.ApiProxyMiddleware, endpoint apimiddleware.E return true } +func handleGetBlobsSidecarSSZ(m *apimiddleware.ApiProxyMiddleware, endpoint apimiddleware.Endpoint, w http.ResponseWriter, req *http.Request) (handled bool) { + config := sszConfig{ + fileName: "blobs_sidecar.ssz", + responseJson: &SszResponseJson{}, + } + return handleGetSSZ(m, endpoint, w, req, config) +} + func sszRequested(req *http.Request) (bool, error) { accept := req.Header.Values("Accept") if len(accept) == 0 { diff --git a/beacon-chain/rpc/apimiddleware/custom_hooks.go b/beacon-chain/rpc/apimiddleware/custom_hooks.go index 6f3d4563db5a..d0ae5cddc358 100644 --- a/beacon-chain/rpc/apimiddleware/custom_hooks.go +++ b/beacon-chain/rpc/apimiddleware/custom_hooks.go @@ -763,6 +763,40 @@ type bellatrixProduceBlindedBlockResponseJson struct { Data *BlindedBeaconBlockBellatrixJson `json:"data"` } +type tempBlobJson struct { + Data string `json:"data"` +} + +type tempBlobsSidecarJson struct { + BeaconBlockRoot string `json:"beacon_block_root"` + BeaconBlockSlot string `json:"beacon_block_slot"` + Blobs []tempBlobJson `json:"blobs"` + AggregatedProof string `json:"kzg_aggregated_proof"` +} + +// This takes the blobs list and exposes the data field of each blob as the blob content itself in the json +func prepareBlobsResponse(body []byte, responseContainer interface{}) (apimiddleware.RunDefault, apimiddleware.ErrorJson) { + tempContainer := &tempBlobsSidecarJson{} + if err := json.Unmarshal(body, tempContainer); err != nil { + return false, apimiddleware.InternalServerErrorWithMessage(err, "could not unmarshal response into temp container") + } + container, ok := responseContainer.(*blobsSidecarResponseJson) + if !ok { + return false, apimiddleware.InternalServerError(errors.New("container is not of the correct type")) + } + + container.Data = &blobsSidecarJson{ + BeaconBlockRoot: tempContainer.BeaconBlockRoot, + BeaconBlockSlot: tempContainer.BeaconBlockSlot, + Blobs: make([]string, len(tempContainer.Blobs)), + AggregatedProof: tempContainer.AggregatedProof, + } + for i, blob := range tempContainer.Blobs { + container.Data.Blobs[i] = blob.Data + } + return false, nil +} + func serializeProducedV2Block(response interface{}) (apimiddleware.RunDefault, []byte, apimiddleware.ErrorJson) { respContainer, ok := response.(*ProduceBlockResponseV2Json) if !ok { diff --git a/beacon-chain/rpc/apimiddleware/endpoint_factory.go b/beacon-chain/rpc/apimiddleware/endpoint_factory.go index 6da4925decaf..17df3cd8f674 100644 --- a/beacon-chain/rpc/apimiddleware/endpoint_factory.go +++ b/beacon-chain/rpc/apimiddleware/endpoint_factory.go @@ -75,6 +75,7 @@ func (_ *BeaconEndpointFactory) Paths() []string { "/eth/v1/validator/prepare_beacon_proposer", "/eth/v1/validator/register_validator", "/eth/v1/validator/liveness/{epoch}", + "/eth/v1/beacon/blobs_sidecars/{block_id}", } } @@ -136,6 +137,12 @@ func (_ *BeaconEndpointFactory) Create(path string) (*apimiddleware.Endpoint, er OnPreSerializeMiddlewareResponseIntoJson: serializeV2Block, } endpoint.CustomHandlers = []apimiddleware.CustomHandler{handleGetBeaconBlockSSZV2} + case " eth/v1/beacon/blobs_sidecars/{block_id}": + endpoint.GetResponse = &blobsSidecarResponseJson{} + endpoint.CustomHandlers = []apimiddleware.CustomHandler{handleGetBlobsSidecarSSZ} + endpoint.Hooks = apimiddleware.HookCollection{ + OnPreDeserializeGrpcResponseBodyIntoContainer: prepareBlobsResponse, + } case "/eth/v1/beacon/blocks/{block_id}/root": endpoint.GetResponse = &BlockRootResponseJson{} case "/eth/v1/beacon/blocks/{block_id}/attestations": diff --git a/beacon-chain/rpc/apimiddleware/structs.go b/beacon-chain/rpc/apimiddleware/structs.go index 7ff0f1aadfa7..53d573857190 100644 --- a/beacon-chain/rpc/apimiddleware/structs.go +++ b/beacon-chain/rpc/apimiddleware/structs.go @@ -1298,3 +1298,14 @@ type EventErrorJson struct { StatusCode int `json:"status_code"` Message string `json:"message"` } + +type blobsSidecarJson struct { + BeaconBlockRoot string `json:"beacon_block_root" hex:"true"` + BeaconBlockSlot string `json:"beacon_block_slot"` + Blobs []string `json:"blobs" hex:"true"` + AggregatedProof string `json:"kzg_aggregated_proof" hex:"true"` +} + +type blobsSidecarResponseJson struct { + Data *blobsSidecarJson `json:"data"` +} diff --git a/beacon-chain/rpc/eth/beacon/BUILD.bazel b/beacon-chain/rpc/eth/beacon/BUILD.bazel index 8692911892a2..9fd4e517aec2 100644 --- a/beacon-chain/rpc/eth/beacon/BUILD.bazel +++ b/beacon-chain/rpc/eth/beacon/BUILD.bazel @@ -4,6 +4,7 @@ go_library( name = "go_default_library", srcs = [ "blinded_blocks.go", + "blobs.go", "blocks.go", "config.go", "log.go", diff --git a/beacon-chain/rpc/eth/beacon/blobs.go b/beacon-chain/rpc/eth/beacon/blobs.go new file mode 100644 index 000000000000..364c6a18143e --- /dev/null +++ b/beacon-chain/rpc/eth/beacon/blobs.go @@ -0,0 +1,45 @@ +package beacon + +import ( + "context" + "fmt" + + "github.com/pkg/errors" + ethpbv1 "github.com/prysmaticlabs/prysm/v3/proto/eth/v1" +) + +func (bs *Server) GetBlobsSidecar(ctx context.Context, req *ethpbv1.BlobsRequest) (*ethpbv1.BlobsResponse, error) { + sblk, err := bs.blockFromBlockID(ctx, req.BlockId) + err = handleGetBlockError(sblk, err) + if err != nil { + return nil, errors.Wrap(err, "GetBlobs") + } + block := sblk.Block() + root, err := block.HashTreeRoot() + if err != nil { + return nil, errors.Wrap(err, "failed to htr block") + } + sidecar, err := bs.BeaconDB.BlobsSidecar(ctx, root) + if err != nil { + return nil, fmt.Errorf("failed to get blobs sidecar for block %x", root) + } + var blobs []*ethpbv1.Blob + var aggregatedProof []byte + if sidecar != nil { + aggregatedProof = sidecar.AggregatedProof + for _, b := range sidecar.Blobs { + var data []byte + // go through each element, concat them + for _, el := range b.Data { + data = append(data, el) + } + blobs = append(blobs, ðpbv1.Blob{Data: data}) + } + } + return ðpbv1.BlobsResponse{ + BeaconBlockRoot: root[:], + BeaconBlockSlot: uint64(block.Slot()), + Blobs: blobs, + AggregatedProof: aggregatedProof, + }, nil +} diff --git a/proto/eth/service/beacon_chain_service.pb.go b/proto/eth/service/beacon_chain_service.pb.go index 9dcdd81ee687..fa4f10795cdb 100755 --- a/proto/eth/service/beacon_chain_service.pb.go +++ b/proto/eth/service/beacon_chain_service.pb.go @@ -58,7 +58,7 @@ var file_proto_eth_service_beacon_chain_service_proto_rawDesc = []byte{ 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x32, 0x94, 0x2d, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, + 0x6f, 0x32, 0x8e, 0x2e, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x6f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 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, 0x20, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, @@ -419,17 +419,25 @@ var file_proto_eth_service_beacon_chain_service_proto_rawDesc = []byte{ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 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, 0x33, 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, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x78, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, + 0x6c, 0x6f, 0x62, 0x73, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x12, 0x1d, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, + 0x6f, 0x62, 0x73, 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, + 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, + 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x63, + 0x61, 0x72, 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, 0x33, 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{}{ @@ -454,33 +462,35 @@ var file_proto_eth_service_beacon_chain_service_proto_goTypes = []interface{}{ (*v1.SignedVoluntaryExit)(nil), // 18: ethereum.eth.v1.SignedVoluntaryExit (*v2.SubmitBLSToExecutionChangesRequest)(nil), // 19: ethereum.eth.v2.SubmitBLSToExecutionChangesRequest (*v2.SubmitPoolSyncCommitteeSignatures)(nil), // 20: ethereum.eth.v2.SubmitPoolSyncCommitteeSignatures - (*v1.GenesisResponse)(nil), // 21: ethereum.eth.v1.GenesisResponse - (*v1.WeakSubjectivityResponse)(nil), // 22: ethereum.eth.v1.WeakSubjectivityResponse - (*v1.StateRootResponse)(nil), // 23: ethereum.eth.v1.StateRootResponse - (*v1.StateForkResponse)(nil), // 24: ethereum.eth.v1.StateForkResponse - (*v1.StateFinalityCheckpointResponse)(nil), // 25: ethereum.eth.v1.StateFinalityCheckpointResponse - (*v1.StateValidatorsResponse)(nil), // 26: ethereum.eth.v1.StateValidatorsResponse - (*v1.StateValidatorResponse)(nil), // 27: ethereum.eth.v1.StateValidatorResponse - (*v1.ValidatorBalancesResponse)(nil), // 28: ethereum.eth.v1.ValidatorBalancesResponse - (*v1.StateCommitteesResponse)(nil), // 29: ethereum.eth.v1.StateCommitteesResponse - (*v2.StateSyncCommitteesResponse)(nil), // 30: ethereum.eth.v2.StateSyncCommitteesResponse - (*v2.RandaoResponse)(nil), // 31: ethereum.eth.v2.RandaoResponse - (*v1.BlockHeadersResponse)(nil), // 32: ethereum.eth.v1.BlockHeadersResponse - (*v1.BlockHeaderResponse)(nil), // 33: ethereum.eth.v1.BlockHeaderResponse - (*v1.BlockRootResponse)(nil), // 34: ethereum.eth.v1.BlockRootResponse - (*v1.BlockResponse)(nil), // 35: ethereum.eth.v1.BlockResponse - (*v1.BlockSSZResponse)(nil), // 36: ethereum.eth.v1.BlockSSZResponse - (*v2.BlockResponseV2)(nil), // 37: ethereum.eth.v2.BlockResponseV2 - (*v2.BlindedBlockResponse)(nil), // 38: ethereum.eth.v2.BlindedBlockResponse - (*v1.BlockAttestationsResponse)(nil), // 39: ethereum.eth.v1.BlockAttestationsResponse - (*v1.AttestationsPoolResponse)(nil), // 40: ethereum.eth.v1.AttestationsPoolResponse - (*v1.AttesterSlashingsPoolResponse)(nil), // 41: ethereum.eth.v1.AttesterSlashingsPoolResponse - (*v1.ProposerSlashingPoolResponse)(nil), // 42: ethereum.eth.v1.ProposerSlashingPoolResponse - (*v1.VoluntaryExitsPoolResponse)(nil), // 43: ethereum.eth.v1.VoluntaryExitsPoolResponse - (*v2.BLSToExecutionChangesPoolResponse)(nil), // 44: ethereum.eth.v2.BLSToExecutionChangesPoolResponse - (*v1.ForkScheduleResponse)(nil), // 45: ethereum.eth.v1.ForkScheduleResponse - (*v1.SpecResponse)(nil), // 46: ethereum.eth.v1.SpecResponse - (*v1.DepositContractResponse)(nil), // 47: ethereum.eth.v1.DepositContractResponse + (*v1.BlobsRequest)(nil), // 21: ethereum.eth.v1.BlobsRequest + (*v1.GenesisResponse)(nil), // 22: ethereum.eth.v1.GenesisResponse + (*v1.WeakSubjectivityResponse)(nil), // 23: ethereum.eth.v1.WeakSubjectivityResponse + (*v1.StateRootResponse)(nil), // 24: ethereum.eth.v1.StateRootResponse + (*v1.StateForkResponse)(nil), // 25: ethereum.eth.v1.StateForkResponse + (*v1.StateFinalityCheckpointResponse)(nil), // 26: ethereum.eth.v1.StateFinalityCheckpointResponse + (*v1.StateValidatorsResponse)(nil), // 27: ethereum.eth.v1.StateValidatorsResponse + (*v1.StateValidatorResponse)(nil), // 28: ethereum.eth.v1.StateValidatorResponse + (*v1.ValidatorBalancesResponse)(nil), // 29: ethereum.eth.v1.ValidatorBalancesResponse + (*v1.StateCommitteesResponse)(nil), // 30: ethereum.eth.v1.StateCommitteesResponse + (*v2.StateSyncCommitteesResponse)(nil), // 31: ethereum.eth.v2.StateSyncCommitteesResponse + (*v2.RandaoResponse)(nil), // 32: ethereum.eth.v2.RandaoResponse + (*v1.BlockHeadersResponse)(nil), // 33: ethereum.eth.v1.BlockHeadersResponse + (*v1.BlockHeaderResponse)(nil), // 34: ethereum.eth.v1.BlockHeaderResponse + (*v1.BlockRootResponse)(nil), // 35: ethereum.eth.v1.BlockRootResponse + (*v1.BlockResponse)(nil), // 36: ethereum.eth.v1.BlockResponse + (*v1.BlockSSZResponse)(nil), // 37: ethereum.eth.v1.BlockSSZResponse + (*v2.BlockResponseV2)(nil), // 38: ethereum.eth.v2.BlockResponseV2 + (*v2.BlindedBlockResponse)(nil), // 39: ethereum.eth.v2.BlindedBlockResponse + (*v1.BlockAttestationsResponse)(nil), // 40: ethereum.eth.v1.BlockAttestationsResponse + (*v1.AttestationsPoolResponse)(nil), // 41: ethereum.eth.v1.AttestationsPoolResponse + (*v1.AttesterSlashingsPoolResponse)(nil), // 42: ethereum.eth.v1.AttesterSlashingsPoolResponse + (*v1.ProposerSlashingPoolResponse)(nil), // 43: ethereum.eth.v1.ProposerSlashingPoolResponse + (*v1.VoluntaryExitsPoolResponse)(nil), // 44: ethereum.eth.v1.VoluntaryExitsPoolResponse + (*v2.BLSToExecutionChangesPoolResponse)(nil), // 45: ethereum.eth.v2.BLSToExecutionChangesPoolResponse + (*v1.ForkScheduleResponse)(nil), // 46: ethereum.eth.v1.ForkScheduleResponse + (*v1.SpecResponse)(nil), // 47: ethereum.eth.v1.SpecResponse + (*v1.DepositContractResponse)(nil), // 48: ethereum.eth.v1.DepositContractResponse + (*v1.BlobsResponse)(nil), // 49: ethereum.eth.v1.BlobsResponse } var file_proto_eth_service_beacon_chain_service_proto_depIdxs = []int32{ 0, // 0: ethereum.eth.service.BeaconChain.GetGenesis:input_type -> google.protobuf.Empty @@ -522,47 +532,49 @@ var file_proto_eth_service_beacon_chain_service_proto_depIdxs = []int32{ 0, // 36: ethereum.eth.service.BeaconChain.GetForkSchedule:input_type -> google.protobuf.Empty 0, // 37: ethereum.eth.service.BeaconChain.GetSpec:input_type -> google.protobuf.Empty 0, // 38: ethereum.eth.service.BeaconChain.GetDepositContract:input_type -> google.protobuf.Empty - 21, // 39: ethereum.eth.service.BeaconChain.GetGenesis:output_type -> ethereum.eth.v1.GenesisResponse - 22, // 40: ethereum.eth.service.BeaconChain.GetWeakSubjectivity:output_type -> ethereum.eth.v1.WeakSubjectivityResponse - 23, // 41: ethereum.eth.service.BeaconChain.GetStateRoot:output_type -> ethereum.eth.v1.StateRootResponse - 24, // 42: ethereum.eth.service.BeaconChain.GetStateFork:output_type -> ethereum.eth.v1.StateForkResponse - 25, // 43: ethereum.eth.service.BeaconChain.GetFinalityCheckpoints:output_type -> ethereum.eth.v1.StateFinalityCheckpointResponse - 26, // 44: ethereum.eth.service.BeaconChain.ListValidators:output_type -> ethereum.eth.v1.StateValidatorsResponse - 27, // 45: ethereum.eth.service.BeaconChain.GetValidator:output_type -> ethereum.eth.v1.StateValidatorResponse - 28, // 46: ethereum.eth.service.BeaconChain.ListValidatorBalances:output_type -> ethereum.eth.v1.ValidatorBalancesResponse - 29, // 47: ethereum.eth.service.BeaconChain.ListCommittees:output_type -> ethereum.eth.v1.StateCommitteesResponse - 30, // 48: ethereum.eth.service.BeaconChain.ListSyncCommittees:output_type -> ethereum.eth.v2.StateSyncCommitteesResponse - 31, // 49: ethereum.eth.service.BeaconChain.GetRandao:output_type -> ethereum.eth.v2.RandaoResponse - 32, // 50: ethereum.eth.service.BeaconChain.ListBlockHeaders:output_type -> ethereum.eth.v1.BlockHeadersResponse - 33, // 51: ethereum.eth.service.BeaconChain.GetBlockHeader:output_type -> ethereum.eth.v1.BlockHeaderResponse - 0, // 52: ethereum.eth.service.BeaconChain.SubmitBlock:output_type -> google.protobuf.Empty - 0, // 53: ethereum.eth.service.BeaconChain.SubmitBlockSSZ:output_type -> google.protobuf.Empty - 0, // 54: ethereum.eth.service.BeaconChain.SubmitBlindedBlock:output_type -> google.protobuf.Empty - 0, // 55: ethereum.eth.service.BeaconChain.SubmitBlindedBlockSSZ:output_type -> google.protobuf.Empty - 34, // 56: ethereum.eth.service.BeaconChain.GetBlockRoot:output_type -> ethereum.eth.v1.BlockRootResponse - 35, // 57: ethereum.eth.service.BeaconChain.GetBlock:output_type -> ethereum.eth.v1.BlockResponse - 36, // 58: ethereum.eth.service.BeaconChain.GetBlockSSZ:output_type -> ethereum.eth.v1.BlockSSZResponse - 37, // 59: ethereum.eth.service.BeaconChain.GetBlockV2:output_type -> ethereum.eth.v2.BlockResponseV2 - 38, // 60: ethereum.eth.service.BeaconChain.GetBlindedBlock:output_type -> ethereum.eth.v2.BlindedBlockResponse - 11, // 61: ethereum.eth.service.BeaconChain.GetBlindedBlockSSZ:output_type -> ethereum.eth.v2.SSZContainer - 11, // 62: ethereum.eth.service.BeaconChain.GetBlockSSZV2:output_type -> ethereum.eth.v2.SSZContainer - 39, // 63: ethereum.eth.service.BeaconChain.ListBlockAttestations:output_type -> ethereum.eth.v1.BlockAttestationsResponse - 40, // 64: ethereum.eth.service.BeaconChain.ListPoolAttestations:output_type -> ethereum.eth.v1.AttestationsPoolResponse - 0, // 65: ethereum.eth.service.BeaconChain.SubmitAttestations:output_type -> google.protobuf.Empty - 41, // 66: ethereum.eth.service.BeaconChain.ListPoolAttesterSlashings:output_type -> ethereum.eth.v1.AttesterSlashingsPoolResponse - 0, // 67: ethereum.eth.service.BeaconChain.SubmitAttesterSlashing:output_type -> google.protobuf.Empty - 42, // 68: ethereum.eth.service.BeaconChain.ListPoolProposerSlashings:output_type -> ethereum.eth.v1.ProposerSlashingPoolResponse - 0, // 69: ethereum.eth.service.BeaconChain.SubmitProposerSlashing:output_type -> google.protobuf.Empty - 43, // 70: ethereum.eth.service.BeaconChain.ListPoolVoluntaryExits:output_type -> ethereum.eth.v1.VoluntaryExitsPoolResponse - 0, // 71: ethereum.eth.service.BeaconChain.SubmitVoluntaryExit:output_type -> google.protobuf.Empty - 0, // 72: ethereum.eth.service.BeaconChain.SubmitSignedBLSToExecutionChanges:output_type -> google.protobuf.Empty - 0, // 73: ethereum.eth.service.BeaconChain.SubmitPoolSyncCommitteeSignatures:output_type -> google.protobuf.Empty - 44, // 74: ethereum.eth.service.BeaconChain.ListBLSToExecutionChanges:output_type -> ethereum.eth.v2.BLSToExecutionChangesPoolResponse - 45, // 75: ethereum.eth.service.BeaconChain.GetForkSchedule:output_type -> ethereum.eth.v1.ForkScheduleResponse - 46, // 76: ethereum.eth.service.BeaconChain.GetSpec:output_type -> ethereum.eth.v1.SpecResponse - 47, // 77: ethereum.eth.service.BeaconChain.GetDepositContract:output_type -> ethereum.eth.v1.DepositContractResponse - 39, // [39:78] is the sub-list for method output_type - 0, // [0:39] is the sub-list for method input_type + 21, // 39: ethereum.eth.service.BeaconChain.GetBlobsSidecar:input_type -> ethereum.eth.v1.BlobsRequest + 22, // 40: ethereum.eth.service.BeaconChain.GetGenesis:output_type -> ethereum.eth.v1.GenesisResponse + 23, // 41: ethereum.eth.service.BeaconChain.GetWeakSubjectivity:output_type -> ethereum.eth.v1.WeakSubjectivityResponse + 24, // 42: ethereum.eth.service.BeaconChain.GetStateRoot:output_type -> ethereum.eth.v1.StateRootResponse + 25, // 43: ethereum.eth.service.BeaconChain.GetStateFork:output_type -> ethereum.eth.v1.StateForkResponse + 26, // 44: ethereum.eth.service.BeaconChain.GetFinalityCheckpoints:output_type -> ethereum.eth.v1.StateFinalityCheckpointResponse + 27, // 45: ethereum.eth.service.BeaconChain.ListValidators:output_type -> ethereum.eth.v1.StateValidatorsResponse + 28, // 46: ethereum.eth.service.BeaconChain.GetValidator:output_type -> ethereum.eth.v1.StateValidatorResponse + 29, // 47: ethereum.eth.service.BeaconChain.ListValidatorBalances:output_type -> ethereum.eth.v1.ValidatorBalancesResponse + 30, // 48: ethereum.eth.service.BeaconChain.ListCommittees:output_type -> ethereum.eth.v1.StateCommitteesResponse + 31, // 49: ethereum.eth.service.BeaconChain.ListSyncCommittees:output_type -> ethereum.eth.v2.StateSyncCommitteesResponse + 32, // 50: ethereum.eth.service.BeaconChain.GetRandao:output_type -> ethereum.eth.v2.RandaoResponse + 33, // 51: ethereum.eth.service.BeaconChain.ListBlockHeaders:output_type -> ethereum.eth.v1.BlockHeadersResponse + 34, // 52: ethereum.eth.service.BeaconChain.GetBlockHeader:output_type -> ethereum.eth.v1.BlockHeaderResponse + 0, // 53: ethereum.eth.service.BeaconChain.SubmitBlock:output_type -> google.protobuf.Empty + 0, // 54: ethereum.eth.service.BeaconChain.SubmitBlockSSZ:output_type -> google.protobuf.Empty + 0, // 55: ethereum.eth.service.BeaconChain.SubmitBlindedBlock:output_type -> google.protobuf.Empty + 0, // 56: ethereum.eth.service.BeaconChain.SubmitBlindedBlockSSZ:output_type -> google.protobuf.Empty + 35, // 57: ethereum.eth.service.BeaconChain.GetBlockRoot:output_type -> ethereum.eth.v1.BlockRootResponse + 36, // 58: ethereum.eth.service.BeaconChain.GetBlock:output_type -> ethereum.eth.v1.BlockResponse + 37, // 59: ethereum.eth.service.BeaconChain.GetBlockSSZ:output_type -> ethereum.eth.v1.BlockSSZResponse + 38, // 60: ethereum.eth.service.BeaconChain.GetBlockV2:output_type -> ethereum.eth.v2.BlockResponseV2 + 39, // 61: ethereum.eth.service.BeaconChain.GetBlindedBlock:output_type -> ethereum.eth.v2.BlindedBlockResponse + 11, // 62: ethereum.eth.service.BeaconChain.GetBlindedBlockSSZ:output_type -> ethereum.eth.v2.SSZContainer + 11, // 63: ethereum.eth.service.BeaconChain.GetBlockSSZV2:output_type -> ethereum.eth.v2.SSZContainer + 40, // 64: ethereum.eth.service.BeaconChain.ListBlockAttestations:output_type -> ethereum.eth.v1.BlockAttestationsResponse + 41, // 65: ethereum.eth.service.BeaconChain.ListPoolAttestations:output_type -> ethereum.eth.v1.AttestationsPoolResponse + 0, // 66: ethereum.eth.service.BeaconChain.SubmitAttestations:output_type -> google.protobuf.Empty + 42, // 67: ethereum.eth.service.BeaconChain.ListPoolAttesterSlashings:output_type -> ethereum.eth.v1.AttesterSlashingsPoolResponse + 0, // 68: ethereum.eth.service.BeaconChain.SubmitAttesterSlashing:output_type -> google.protobuf.Empty + 43, // 69: ethereum.eth.service.BeaconChain.ListPoolProposerSlashings:output_type -> ethereum.eth.v1.ProposerSlashingPoolResponse + 0, // 70: ethereum.eth.service.BeaconChain.SubmitProposerSlashing:output_type -> google.protobuf.Empty + 44, // 71: ethereum.eth.service.BeaconChain.ListPoolVoluntaryExits:output_type -> ethereum.eth.v1.VoluntaryExitsPoolResponse + 0, // 72: ethereum.eth.service.BeaconChain.SubmitVoluntaryExit:output_type -> google.protobuf.Empty + 0, // 73: ethereum.eth.service.BeaconChain.SubmitSignedBLSToExecutionChanges:output_type -> google.protobuf.Empty + 0, // 74: ethereum.eth.service.BeaconChain.SubmitPoolSyncCommitteeSignatures:output_type -> google.protobuf.Empty + 45, // 75: ethereum.eth.service.BeaconChain.ListBLSToExecutionChanges:output_type -> ethereum.eth.v2.BLSToExecutionChangesPoolResponse + 46, // 76: ethereum.eth.service.BeaconChain.GetForkSchedule:output_type -> ethereum.eth.v1.ForkScheduleResponse + 47, // 77: ethereum.eth.service.BeaconChain.GetSpec:output_type -> ethereum.eth.v1.SpecResponse + 48, // 78: ethereum.eth.service.BeaconChain.GetDepositContract:output_type -> ethereum.eth.v1.DepositContractResponse + 49, // 79: ethereum.eth.service.BeaconChain.GetBlobsSidecar:output_type -> ethereum.eth.v1.BlobsResponse + 40, // [40:80] is the sub-list for method output_type + 0, // [0:40] 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 @@ -643,6 +655,7 @@ type BeaconChainClient interface { GetForkSchedule(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*v1.ForkScheduleResponse, error) GetSpec(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*v1.SpecResponse, error) GetDepositContract(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*v1.DepositContractResponse, error) + GetBlobsSidecar(ctx context.Context, in *v1.BlobsRequest, opts ...grpc.CallOption) (*v1.BlobsResponse, error) } type beaconChainClient struct { @@ -1004,6 +1017,15 @@ func (c *beaconChainClient) GetDepositContract(ctx context.Context, in *empty.Em return out, nil } +func (c *beaconChainClient) GetBlobsSidecar(ctx context.Context, in *v1.BlobsRequest, opts ...grpc.CallOption) (*v1.BlobsResponse, error) { + out := new(v1.BlobsResponse) + err := c.cc.Invoke(ctx, "/ethereum.eth.service.BeaconChain/GetBlobsSidecar", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // BeaconChainServer is the server API for BeaconChain service. type BeaconChainServer interface { GetGenesis(context.Context, *empty.Empty) (*v1.GenesisResponse, error) @@ -1045,6 +1067,7 @@ type BeaconChainServer interface { GetForkSchedule(context.Context, *empty.Empty) (*v1.ForkScheduleResponse, error) GetSpec(context.Context, *empty.Empty) (*v1.SpecResponse, error) GetDepositContract(context.Context, *empty.Empty) (*v1.DepositContractResponse, error) + GetBlobsSidecar(context.Context, *v1.BlobsRequest) (*v1.BlobsResponse, error) } // UnimplementedBeaconChainServer can be embedded to have forward compatible implementations. @@ -1168,6 +1191,9 @@ func (*UnimplementedBeaconChainServer) GetSpec(context.Context, *empty.Empty) (* func (*UnimplementedBeaconChainServer) GetDepositContract(context.Context, *empty.Empty) (*v1.DepositContractResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDepositContract not implemented") } +func (*UnimplementedBeaconChainServer) GetBlobsSidecar(context.Context, *v1.BlobsRequest) (*v1.BlobsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlobsSidecar not implemented") +} func RegisterBeaconChainServer(s *grpc.Server, srv BeaconChainServer) { s.RegisterService(&_BeaconChain_serviceDesc, srv) @@ -1875,6 +1901,24 @@ func _BeaconChain_GetDepositContract_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _BeaconChain_GetBlobsSidecar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.BlobsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BeaconChainServer).GetBlobsSidecar(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ethereum.eth.service.BeaconChain/GetBlobsSidecar", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BeaconChainServer).GetBlobsSidecar(ctx, req.(*v1.BlobsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _BeaconChain_serviceDesc = grpc.ServiceDesc{ ServiceName: "ethereum.eth.service.BeaconChain", HandlerType: (*BeaconChainServer)(nil), @@ -2035,6 +2079,10 @@ var _BeaconChain_serviceDesc = grpc.ServiceDesc{ MethodName: "GetDepositContract", Handler: _BeaconChain_GetDepositContract_Handler, }, + { + MethodName: "GetBlobsSidecar", + Handler: _BeaconChain_GetBlobsSidecar_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/eth/service/beacon_chain_service.proto", diff --git a/proto/eth/service/beacon_chain_service.pb.gw.go b/proto/eth/service/beacon_chain_service.pb.gw.go index 98c973fc2e54..6135fb20922c 100755 --- a/proto/eth/service/beacon_chain_service.pb.gw.go +++ b/proto/eth/service/beacon_chain_service.pb.gw.go @@ -18,6 +18,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" github_com_prysmaticlabs_prysm_v3_consensus_types_primitives "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v3/proto/eth/v1" v1 "github.com/prysmaticlabs/prysm/v3/proto/eth/v1" "github.com/prysmaticlabs/prysm/v3/proto/eth/v2" "google.golang.org/grpc" @@ -1697,6 +1698,42 @@ func local_request_BeaconChain_GetDepositContract_0(ctx context.Context, marshal } +var ( + filter_BeaconChain_GetBlobsSidecar_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_BeaconChain_GetBlobsSidecar_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconChainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.BlobsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconChain_GetBlobsSidecar_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetBlobsSidecar(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BeaconChain_GetBlobsSidecar_0(ctx context.Context, marshaler runtime.Marshaler, server BeaconChainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1.BlobsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BeaconChain_GetBlobsSidecar_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetBlobsSidecar(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterBeaconChainHandlerServer registers the http handlers for service BeaconChain to "mux". // UnaryRPC :call BeaconChainServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -2600,6 +2637,29 @@ func RegisterBeaconChainHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_BeaconChain_GetBlobsSidecar_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/GetBlobsSidecar") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BeaconChain_GetBlobsSidecar_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_GetBlobsSidecar_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -3421,6 +3481,26 @@ func RegisterBeaconChainHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_BeaconChain_GetBlobsSidecar_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/GetBlobsSidecar") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BeaconChain_GetBlobsSidecar_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_GetBlobsSidecar_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -3502,6 +3582,8 @@ var ( pattern_BeaconChain_GetSpec_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"internal", "eth", "v1", "config", "spec"}, "")) pattern_BeaconChain_GetDepositContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"internal", "eth", "v1", "config", "deposit_contract"}, "")) + + pattern_BeaconChain_GetBlobsSidecar_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"internal", "eth", "v1", "blobs", "sidecar"}, "")) ) var ( @@ -3582,4 +3664,6 @@ var ( forward_BeaconChain_GetSpec_0 = runtime.ForwardResponseMessage forward_BeaconChain_GetDepositContract_0 = runtime.ForwardResponseMessage + + forward_BeaconChain_GetBlobsSidecar_0 = runtime.ForwardResponseMessage ) diff --git a/proto/eth/service/beacon_chain_service.proto b/proto/eth/service/beacon_chain_service.proto index 9334f598c199..6226d5366be3 100644 --- a/proto/eth/service/beacon_chain_service.proto +++ b/proto/eth/service/beacon_chain_service.proto @@ -439,5 +439,10 @@ service BeaconChain { rpc GetDepositContract(google.protobuf.Empty) returns (v1.DepositContractResponse) { option (google.api.http) = {get: "/internal/eth/v1/config/deposit_contract"}; } + + // GetBlobs retrieves blob data by block ID and data hash + rpc GetBlobsSidecar(v1.BlobsRequest) returns (v1.BlobsResponse) { + option (google.api.http) = {get: "/internal/eth/v1/blobs/sidecar/{block_id}"}; + } } diff --git a/proto/eth/v1/beacon_chain.pb.go b/proto/eth/v1/beacon_chain.pb.go index 571738a5e50c..9e1ddc0b362f 100755 --- a/proto/eth/v1/beacon_chain.pb.go +++ b/proto/eth/v1/beacon_chain.pb.go @@ -2418,6 +2418,171 @@ func (x *ForkChoiceNode) GetValidity() ForkChoiceNodeValidity { return ForkChoiceNodeValidity_VALID } +type BlobsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockId []byte `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` +} + +func (x *BlobsRequest) Reset() { + *x = BlobsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlobsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlobsRequest) ProtoMessage() {} + +func (x *BlobsRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[40] + 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 BlobsRequest.ProtoReflect.Descriptor instead. +func (*BlobsRequest) Descriptor() ([]byte, []int) { + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{40} +} + +func (x *BlobsRequest) GetBlockId() []byte { + if x != nil { + return x.BlockId + } + return nil +} + +type Blob struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *Blob) Reset() { + *x = Blob{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Blob) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Blob) ProtoMessage() {} + +func (x *Blob) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[41] + 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 Blob.ProtoReflect.Descriptor instead. +func (*Blob) Descriptor() ([]byte, []int) { + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{41} +} + +func (x *Blob) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type BlobsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BeaconBlockRoot []byte `protobuf:"bytes,1,opt,name=beacon_block_root,json=beaconBlockRoot,proto3" json:"beacon_block_root,omitempty"` + BeaconBlockSlot uint64 `protobuf:"varint,2,opt,name=beacon_block_slot,json=beaconBlockSlot,proto3" json:"beacon_block_slot,omitempty"` + Blobs []*Blob `protobuf:"bytes,3,rep,name=blobs,proto3" json:"blobs,omitempty"` + AggregatedProof []byte `protobuf:"bytes,4,opt,name=aggregated_proof,json=aggregatedProof,proto3" json:"aggregated_proof,omitempty"` +} + +func (x *BlobsResponse) Reset() { + *x = BlobsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlobsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlobsResponse) ProtoMessage() {} + +func (x *BlobsResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[42] + 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 BlobsResponse.ProtoReflect.Descriptor instead. +func (*BlobsResponse) Descriptor() ([]byte, []int) { + return file_proto_eth_v1_beacon_chain_proto_rawDescGZIP(), []int{42} +} + +func (x *BlobsResponse) GetBeaconBlockRoot() []byte { + if x != nil { + return x.BeaconBlockRoot + } + return nil +} + +func (x *BlobsResponse) GetBeaconBlockSlot() uint64 { + if x != nil { + return x.BeaconBlockSlot + } + return 0 +} + +func (x *BlobsResponse) GetBlobs() []*Blob { + if x != nil { + return x.Blobs + } + return nil +} + +func (x *BlobsResponse) GetAggregatedProof() []byte { + if x != nil { + return x.AggregatedProof + } + return nil +} + type GenesisResponse_Genesis struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2431,7 +2596,7 @@ type GenesisResponse_Genesis struct { func (x *GenesisResponse_Genesis) Reset() { *x = GenesisResponse_Genesis{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[40] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2444,7 +2609,7 @@ func (x *GenesisResponse_Genesis) String() string { func (*GenesisResponse_Genesis) ProtoMessage() {} func (x *GenesisResponse_Genesis) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[40] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2492,7 +2657,7 @@ type StateRootResponse_StateRoot struct { func (x *StateRootResponse_StateRoot) Reset() { *x = StateRootResponse_StateRoot{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[41] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2505,7 +2670,7 @@ func (x *StateRootResponse_StateRoot) String() string { func (*StateRootResponse_StateRoot) ProtoMessage() {} func (x *StateRootResponse_StateRoot) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[41] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2541,7 +2706,7 @@ type StateFinalityCheckpointResponse_StateFinalityCheckpoint struct { func (x *StateFinalityCheckpointResponse_StateFinalityCheckpoint) Reset() { *x = StateFinalityCheckpointResponse_StateFinalityCheckpoint{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[42] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2554,7 +2719,7 @@ func (x *StateFinalityCheckpointResponse_StateFinalityCheckpoint) String() strin func (*StateFinalityCheckpointResponse_StateFinalityCheckpoint) ProtoMessage() {} func (x *StateFinalityCheckpointResponse_StateFinalityCheckpoint) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[42] + mi := &file_proto_eth_v1_beacon_chain_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3046,20 +3211,36 @@ var file_proto_eth_v1_beacon_chain_proto_rawDesc = []byte{ 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, 0x33, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x74, 0x79, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x22, 0x29, 0x0a, + 0x0c, 0x42, 0x6c, 0x6f, 0x62, 0x73, 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, 0x1a, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x62, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0xbf, 0x01, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0f, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x6f, + 0x6f, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x62, 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x62, + 0x65, 0x61, 0x63, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x2b, + 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x64, 0x50, 0x72, 0x6f, 0x6f, 0x66, 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, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, + 0x74, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3075,7 +3256,7 @@ 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, 44) +var file_proto_eth_v1_beacon_chain_proto_msgTypes = make([]protoimpl.MessageInfo, 47) var file_proto_eth_v1_beacon_chain_proto_goTypes = []interface{}{ (ForkChoiceNodeValidity)(0), // 0: ethereum.eth.v1.ForkChoiceNodeValidity (*GenesisResponse)(nil), // 1: ethereum.eth.v1.GenesisResponse @@ -3118,67 +3299,71 @@ var file_proto_eth_v1_beacon_chain_proto_goTypes = []interface{}{ (*WeakSubjectivityData)(nil), // 38: ethereum.eth.v1.WeakSubjectivityData (*ForkChoiceDump)(nil), // 39: ethereum.eth.v1.ForkChoiceDump (*ForkChoiceNode)(nil), // 40: ethereum.eth.v1.ForkChoiceNode - (*GenesisResponse_Genesis)(nil), // 41: ethereum.eth.v1.GenesisResponse.Genesis - (*StateRootResponse_StateRoot)(nil), // 42: ethereum.eth.v1.StateRootResponse.StateRoot - (*StateFinalityCheckpointResponse_StateFinalityCheckpoint)(nil), // 43: ethereum.eth.v1.StateFinalityCheckpointResponse.StateFinalityCheckpoint - nil, // 44: ethereum.eth.v1.SpecResponse.DataEntry - (*Fork)(nil), // 45: ethereum.eth.v1.Fork - (ValidatorStatus)(0), // 46: ethereum.eth.v1.ValidatorStatus - (*ValidatorContainer)(nil), // 47: ethereum.eth.v1.ValidatorContainer - (*Committee)(nil), // 48: ethereum.eth.v1.Committee - (*Attestation)(nil), // 49: ethereum.eth.v1.Attestation - (*BeaconBlockHeader)(nil), // 50: ethereum.eth.v1.BeaconBlockHeader - (*BeaconBlock)(nil), // 51: ethereum.eth.v1.BeaconBlock - (*AttesterSlashing)(nil), // 52: ethereum.eth.v1.AttesterSlashing - (*ProposerSlashing)(nil), // 53: ethereum.eth.v1.ProposerSlashing - (*SignedVoluntaryExit)(nil), // 54: ethereum.eth.v1.SignedVoluntaryExit - (*Checkpoint)(nil), // 55: ethereum.eth.v1.Checkpoint - (*timestamppb.Timestamp)(nil), // 56: google.protobuf.Timestamp + (*BlobsRequest)(nil), // 41: ethereum.eth.v1.BlobsRequest + (*Blob)(nil), // 42: ethereum.eth.v1.Blob + (*BlobsResponse)(nil), // 43: ethereum.eth.v1.BlobsResponse + (*GenesisResponse_Genesis)(nil), // 44: ethereum.eth.v1.GenesisResponse.Genesis + (*StateRootResponse_StateRoot)(nil), // 45: ethereum.eth.v1.StateRootResponse.StateRoot + (*StateFinalityCheckpointResponse_StateFinalityCheckpoint)(nil), // 46: ethereum.eth.v1.StateFinalityCheckpointResponse.StateFinalityCheckpoint + nil, // 47: ethereum.eth.v1.SpecResponse.DataEntry + (*Fork)(nil), // 48: ethereum.eth.v1.Fork + (ValidatorStatus)(0), // 49: ethereum.eth.v1.ValidatorStatus + (*ValidatorContainer)(nil), // 50: ethereum.eth.v1.ValidatorContainer + (*Committee)(nil), // 51: ethereum.eth.v1.Committee + (*Attestation)(nil), // 52: ethereum.eth.v1.Attestation + (*BeaconBlockHeader)(nil), // 53: ethereum.eth.v1.BeaconBlockHeader + (*BeaconBlock)(nil), // 54: ethereum.eth.v1.BeaconBlock + (*AttesterSlashing)(nil), // 55: ethereum.eth.v1.AttesterSlashing + (*ProposerSlashing)(nil), // 56: ethereum.eth.v1.ProposerSlashing + (*SignedVoluntaryExit)(nil), // 57: ethereum.eth.v1.SignedVoluntaryExit + (*Checkpoint)(nil), // 58: ethereum.eth.v1.Checkpoint + (*timestamppb.Timestamp)(nil), // 59: google.protobuf.Timestamp } var file_proto_eth_v1_beacon_chain_proto_depIdxs = []int32{ - 41, // 0: ethereum.eth.v1.GenesisResponse.data:type_name -> ethereum.eth.v1.GenesisResponse.Genesis - 42, // 1: ethereum.eth.v1.StateRootResponse.data:type_name -> ethereum.eth.v1.StateRootResponse.StateRoot - 45, // 2: ethereum.eth.v1.StateForkResponse.data:type_name -> ethereum.eth.v1.Fork - 43, // 3: ethereum.eth.v1.StateFinalityCheckpointResponse.data:type_name -> ethereum.eth.v1.StateFinalityCheckpointResponse.StateFinalityCheckpoint - 46, // 4: ethereum.eth.v1.StateValidatorsRequest.status:type_name -> ethereum.eth.v1.ValidatorStatus - 47, // 5: ethereum.eth.v1.StateValidatorsResponse.data:type_name -> ethereum.eth.v1.ValidatorContainer + 44, // 0: ethereum.eth.v1.GenesisResponse.data:type_name -> ethereum.eth.v1.GenesisResponse.Genesis + 45, // 1: ethereum.eth.v1.StateRootResponse.data:type_name -> ethereum.eth.v1.StateRootResponse.StateRoot + 48, // 2: ethereum.eth.v1.StateForkResponse.data:type_name -> ethereum.eth.v1.Fork + 46, // 3: ethereum.eth.v1.StateFinalityCheckpointResponse.data:type_name -> ethereum.eth.v1.StateFinalityCheckpointResponse.StateFinalityCheckpoint + 49, // 4: ethereum.eth.v1.StateValidatorsRequest.status:type_name -> ethereum.eth.v1.ValidatorStatus + 50, // 5: ethereum.eth.v1.StateValidatorsResponse.data:type_name -> ethereum.eth.v1.ValidatorContainer 10, // 6: ethereum.eth.v1.ValidatorBalancesResponse.data:type_name -> ethereum.eth.v1.ValidatorBalance - 47, // 7: ethereum.eth.v1.StateValidatorResponse.data:type_name -> ethereum.eth.v1.ValidatorContainer - 48, // 8: ethereum.eth.v1.StateCommitteesResponse.data:type_name -> ethereum.eth.v1.Committee - 49, // 9: ethereum.eth.v1.BlockAttestationsResponse.data:type_name -> ethereum.eth.v1.Attestation + 50, // 7: ethereum.eth.v1.StateValidatorResponse.data:type_name -> ethereum.eth.v1.ValidatorContainer + 51, // 8: ethereum.eth.v1.StateCommitteesResponse.data:type_name -> ethereum.eth.v1.Committee + 52, // 9: ethereum.eth.v1.BlockAttestationsResponse.data:type_name -> ethereum.eth.v1.Attestation 16, // 10: ethereum.eth.v1.BlockRootResponse.data:type_name -> ethereum.eth.v1.BlockRootContainer 22, // 11: ethereum.eth.v1.BlockHeadersResponse.data:type_name -> ethereum.eth.v1.BlockHeaderContainer 22, // 12: ethereum.eth.v1.BlockHeaderResponse.data:type_name -> ethereum.eth.v1.BlockHeaderContainer 23, // 13: ethereum.eth.v1.BlockHeaderContainer.header:type_name -> ethereum.eth.v1.BeaconBlockHeaderContainer - 50, // 14: ethereum.eth.v1.BeaconBlockHeaderContainer.message:type_name -> ethereum.eth.v1.BeaconBlockHeader + 53, // 14: ethereum.eth.v1.BeaconBlockHeaderContainer.message:type_name -> ethereum.eth.v1.BeaconBlockHeader 26, // 15: ethereum.eth.v1.BlockResponse.data:type_name -> ethereum.eth.v1.BeaconBlockContainer - 51, // 16: ethereum.eth.v1.BeaconBlockContainer.message:type_name -> ethereum.eth.v1.BeaconBlock - 49, // 17: ethereum.eth.v1.SubmitAttestationsRequest.data:type_name -> ethereum.eth.v1.Attestation - 49, // 18: ethereum.eth.v1.AttestationsPoolResponse.data:type_name -> ethereum.eth.v1.Attestation - 52, // 19: ethereum.eth.v1.AttesterSlashingsPoolResponse.data:type_name -> ethereum.eth.v1.AttesterSlashing - 53, // 20: ethereum.eth.v1.ProposerSlashingPoolResponse.data:type_name -> ethereum.eth.v1.ProposerSlashing - 54, // 21: ethereum.eth.v1.VoluntaryExitsPoolResponse.data:type_name -> ethereum.eth.v1.SignedVoluntaryExit - 45, // 22: ethereum.eth.v1.ForkScheduleResponse.data:type_name -> ethereum.eth.v1.Fork - 44, // 23: ethereum.eth.v1.SpecResponse.data:type_name -> ethereum.eth.v1.SpecResponse.DataEntry + 54, // 16: ethereum.eth.v1.BeaconBlockContainer.message:type_name -> ethereum.eth.v1.BeaconBlock + 52, // 17: ethereum.eth.v1.SubmitAttestationsRequest.data:type_name -> ethereum.eth.v1.Attestation + 52, // 18: ethereum.eth.v1.AttestationsPoolResponse.data:type_name -> ethereum.eth.v1.Attestation + 55, // 19: ethereum.eth.v1.AttesterSlashingsPoolResponse.data:type_name -> ethereum.eth.v1.AttesterSlashing + 56, // 20: ethereum.eth.v1.ProposerSlashingPoolResponse.data:type_name -> ethereum.eth.v1.ProposerSlashing + 57, // 21: ethereum.eth.v1.VoluntaryExitsPoolResponse.data:type_name -> ethereum.eth.v1.SignedVoluntaryExit + 48, // 22: ethereum.eth.v1.ForkScheduleResponse.data:type_name -> ethereum.eth.v1.Fork + 47, // 23: ethereum.eth.v1.SpecResponse.data:type_name -> ethereum.eth.v1.SpecResponse.DataEntry 36, // 24: ethereum.eth.v1.DepositContractResponse.data:type_name -> ethereum.eth.v1.DepositContract 38, // 25: ethereum.eth.v1.WeakSubjectivityResponse.data:type_name -> ethereum.eth.v1.WeakSubjectivityData - 55, // 26: ethereum.eth.v1.WeakSubjectivityData.ws_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 55, // 27: ethereum.eth.v1.ForkChoiceDump.justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 55, // 28: ethereum.eth.v1.ForkChoiceDump.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 55, // 29: ethereum.eth.v1.ForkChoiceDump.best_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 55, // 30: ethereum.eth.v1.ForkChoiceDump.unrealized_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint - 55, // 31: ethereum.eth.v1.ForkChoiceDump.unrealized_finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 58, // 26: ethereum.eth.v1.WeakSubjectivityData.ws_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 58, // 27: ethereum.eth.v1.ForkChoiceDump.justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 58, // 28: ethereum.eth.v1.ForkChoiceDump.finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 58, // 29: ethereum.eth.v1.ForkChoiceDump.best_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 58, // 30: ethereum.eth.v1.ForkChoiceDump.unrealized_justified_checkpoint:type_name -> ethereum.eth.v1.Checkpoint + 58, // 31: ethereum.eth.v1.ForkChoiceDump.unrealized_finalized_checkpoint:type_name -> ethereum.eth.v1.Checkpoint 40, // 32: ethereum.eth.v1.ForkChoiceDump.fork_choice_nodes:type_name -> ethereum.eth.v1.ForkChoiceNode 0, // 33: ethereum.eth.v1.ForkChoiceNode.validity:type_name -> ethereum.eth.v1.ForkChoiceNodeValidity - 56, // 34: ethereum.eth.v1.GenesisResponse.Genesis.genesis_time:type_name -> google.protobuf.Timestamp - 55, // 35: ethereum.eth.v1.StateFinalityCheckpointResponse.StateFinalityCheckpoint.previous_justified:type_name -> ethereum.eth.v1.Checkpoint - 55, // 36: ethereum.eth.v1.StateFinalityCheckpointResponse.StateFinalityCheckpoint.current_justified:type_name -> ethereum.eth.v1.Checkpoint - 55, // 37: ethereum.eth.v1.StateFinalityCheckpointResponse.StateFinalityCheckpoint.finalized:type_name -> ethereum.eth.v1.Checkpoint - 38, // [38:38] is the sub-list for method output_type - 38, // [38:38] is the sub-list for method input_type - 38, // [38:38] is the sub-list for extension type_name - 38, // [38:38] is the sub-list for extension extendee - 0, // [0:38] is the sub-list for field type_name + 42, // 34: ethereum.eth.v1.BlobsResponse.blobs:type_name -> ethereum.eth.v1.Blob + 59, // 35: ethereum.eth.v1.GenesisResponse.Genesis.genesis_time:type_name -> google.protobuf.Timestamp + 58, // 36: ethereum.eth.v1.StateFinalityCheckpointResponse.StateFinalityCheckpoint.previous_justified:type_name -> ethereum.eth.v1.Checkpoint + 58, // 37: ethereum.eth.v1.StateFinalityCheckpointResponse.StateFinalityCheckpoint.current_justified:type_name -> ethereum.eth.v1.Checkpoint + 58, // 38: ethereum.eth.v1.StateFinalityCheckpointResponse.StateFinalityCheckpoint.finalized:type_name -> ethereum.eth.v1.Checkpoint + 39, // [39:39] is the sub-list for method output_type + 39, // [39:39] is the sub-list for method input_type + 39, // [39:39] is the sub-list for extension type_name + 39, // [39:39] is the sub-list for extension extendee + 0, // [0:39] is the sub-list for field type_name } func init() { file_proto_eth_v1_beacon_chain_proto_init() } @@ -3672,7 +3857,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { } } file_proto_eth_v1_beacon_chain_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisResponse_Genesis); i { + switch v := v.(*BlobsRequest); i { case 0: return &v.state case 1: @@ -3684,7 +3869,7 @@ func file_proto_eth_v1_beacon_chain_proto_init() { } } file_proto_eth_v1_beacon_chain_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StateRootResponse_StateRoot); i { + switch v := v.(*Blob); i { case 0: return &v.state case 1: @@ -3696,6 +3881,42 @@ func file_proto_eth_v1_beacon_chain_proto_init() { } } file_proto_eth_v1_beacon_chain_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlobsResponse); 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[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisResponse_Genesis); 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[44].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 + } + } + file_proto_eth_v1_beacon_chain_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateFinalityCheckpointResponse_StateFinalityCheckpoint); i { case 0: return &v.state @@ -3717,7 +3938,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: 44, + NumMessages: 47, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/eth/v1/beacon_chain.proto b/proto/eth/v1/beacon_chain.proto index bcca3af068fc..a5a019dead57 100644 --- a/proto/eth/v1/beacon_chain.proto +++ b/proto/eth/v1/beacon_chain.proto @@ -358,3 +358,20 @@ enum ForkChoiceNodeValidity { INVALID = 1; OPTIMISTIC = 2; } + +message BlobsRequest { + // The block identifier. Can be one of: "head" (canonical head in node's view), "genesis", + // "finalized", , . + bytes block_id = 1; +} + +message Blob { + bytes data = 1; +} + +message BlobsResponse { + bytes beacon_block_root = 1; + uint64 beacon_block_slot = 2; + repeated Blob blobs = 3; + bytes aggregated_proof = 4; +} \ No newline at end of file