prysm-pulse/proto/prysm/v1alpha1/BUILD.bazel

250 lines
8.9 KiB
Python
Raw Permalink Normal View History

##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
##############################################################################
# Go
##############################################################################
# gazelle:ignore
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("//proto:ssz_proto_library.bzl", "ssz_proto_files")
load("//tools:ssz.bzl", "SSZ_DEPS", "ssz_gen_marshal")
proto_library(
name = "proto",
srcs = [
"beacon_chain.proto",
"debug.proto",
"finalized_block_root_container.proto",
"health.proto",
"node.proto",
"p2p_messages.proto",
"powchain.proto",
"slasher.proto",
"validator.proto",
":ssz_proto_files",
],
visibility = ["//visibility:public"],
deps = [
"//proto/engine/v1:proto",
"//proto/eth/ext:proto",
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_proto",
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:descriptor_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:timestamp_proto",
"@com_google_protobuf//:wrappers_proto",
"@googleapis//google/api:annotations_proto",
],
)
##############################################################################
# Go
##############################################################################
ssz_gen_marshal(
name = "ssz_generated_files",
go_proto = ":go_proto",
includes = [
"//consensus-types/primitives:go_default_library",
"//proto/engine/v1:go_default_library",
],
objs = [
"BeaconBlockAltair",
"BeaconBlockBodyAltair",
"SignedBeaconBlockAltair",
"BeaconBlockBellatrix",
"BeaconBlockBodyBellatrix",
"SignedBeaconBlockBellatrix",
"SignedBlindedBeaconBlockBellatrix",
"BlindedBeaconBlockBellatrix",
"BlindedBeaconBlockBodyBellatrix",
"BeaconBlockCapella",
"BeaconBlockBodyCapella",
"SignedBeaconBlockCapella",
2023-05-05 23:02:21 +00:00
"BeaconBlockDeneb",
"BeaconBlockBodyDeneb",
"SignedBeaconBlockDeneb",
"SignedBlindedBeaconBlockCapella",
"BlindedBeaconBlockCapella",
"BlindedBeaconBlockBodyCapella",
2023-05-05 23:02:21 +00:00
"SignedBlindedBeaconBlockDeneb",
Beacon API: update Deneb endpoints after removing blob signing (#13235) * making needed changes to beacon API based on removal of blobsidecar from block contents * fixing tests and reverting some changes to be addressed later * fixing generated code from protos * gaz * fixing get blob handler and adding blob storage to the blob service * updating unit tests * WIP * wip tests * got tests passing but needs cleanup * removing gomod and gosum changes * fixing more tests * fixing more tests * fixing more tests * gaz * moving some proto types around * removing unneeded unit test * fixing proposer paths * adding more tests * fixing more tests * improving more unit tests * updating one blob only unit test * changing arguments of buildBlobSidecar * reverting a change based on feedback * terence's review items * fixing test based on new develop changes * radek's comments * addressed more comments from radek * adding in blobs to test data * fixing casing in test * removing extra line * fixing issue from bad merge * Update beacon-chain/rpc/eth/beacon/handlers_test.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/eth/beacon/handlers_test.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/eth/beacon/handlers_test.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/eth/blob/handlers.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * moving core getblob business logic to blocker based on radek's comment * fixing mock blocker * gaz --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2023-12-07 17:37:11 +00:00
"BeaconBlockContentsDeneb",
"SignedBeaconBlockContentsDeneb",
2023-05-05 23:02:21 +00:00
"BlindedBeaconBlockDeneb",
"BlindedBeaconBlockBodyDeneb",
"SyncAggregate",
"SyncCommitteeMessage",
"SyncCommitteeContribution",
"ContributionAndProof",
"SignedContributionAndProof",
"BeaconBlocksByRangeRequest",
2023-05-05 23:02:21 +00:00
"BlobSidecarsByRangeRequest",
"ENRForkID",
"MetaDataV0",
"MetaDataV1",
"Status",
"AggregateAttestationAndProof",
"Attestation",
"AttestationData",
"AttesterSlashing",
"BeaconBlock",
"BeaconBlockHeader",
"Checkpoint",
"Deposit",
"Eth1Data",
"IndexedAttestation",
"ProposerSlashing",
"SignedAggregateAttestationAndProof",
"SignedBeaconBlock",
"SignedBeaconBlockHeader",
"SignedVoluntaryExit",
"Validator",
"VoluntaryExit",
"ContributionAndProof",
"SignedContributionAndProof",
"DepositMessage",
"Fork",
"ForkData",
"HistoricalBatch",
"Status",
"BeaconState",
"BeaconStateAltair",
"BeaconStateBellatrix",
"BeaconStateCapella",
2023-05-05 23:02:21 +00:00
"BeaconStateDeneb",
"SigningData",
"SyncCommittee",
"SyncAggregatorSelectionData",
"PowBlock",
"SignedValidatorRegistrationV1",
2022-06-03 15:13:04 +00:00
"ValidatorRegistrationV1",
"Withdrawal",
"BLSToExecutionChange",
"SignedBLSToExecutionChange",
"BuilderBid",
"BuilderBidCapella",
"BuilderBidDeneb",
2023-05-05 23:02:21 +00:00
"BlobSidecar",
Beacon API: update Deneb endpoints after removing blob signing (#13235) * making needed changes to beacon API based on removal of blobsidecar from block contents * fixing tests and reverting some changes to be addressed later * fixing generated code from protos * gaz * fixing get blob handler and adding blob storage to the blob service * updating unit tests * WIP * wip tests * got tests passing but needs cleanup * removing gomod and gosum changes * fixing more tests * fixing more tests * fixing more tests * gaz * moving some proto types around * removing unneeded unit test * fixing proposer paths * adding more tests * fixing more tests * improving more unit tests * updating one blob only unit test * changing arguments of buildBlobSidecar * reverting a change based on feedback * terence's review items * fixing test based on new develop changes * radek's comments * addressed more comments from radek * adding in blobs to test data * fixing casing in test * removing extra line * fixing issue from bad merge * Update beacon-chain/rpc/eth/beacon/handlers_test.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/eth/beacon/handlers_test.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/eth/beacon/handlers_test.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/eth/blob/handlers.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * moving core getblob business logic to blocker based on radek's comment * fixing mock blocker * gaz --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2023-12-07 17:37:11 +00:00
"BlobSidecars",
2023-05-05 23:02:21 +00:00
"BlobIdentifier",
"DepositSnapshot",
],
)
go_proto_library(
name = "go_proto",
compilers = [
"@com_github_prysmaticlabs_protoc_gen_go_cast//:go_cast_grpc",
],
importpath = "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1",
proto = ":proto",
visibility = ["//visibility:public"],
deps = [
"//consensus-types/primitives:go_default_library",
"//proto/engine/v1:go_default_library",
"//proto/eth/ext:go_default_library",
"@com_github_golang_protobuf//proto:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_go_proto",
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
"@googleapis//google/api:annotations_go_proto",
"@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
"@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
"@org_golang_google_protobuf//types/descriptorpb:go_default_library",
"@org_golang_google_protobuf//types/known/emptypb:go_default_library",
"@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
"@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
],
)
go_proto_library(
name = "go_grpc_gateway_library",
compilers = [
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-grpc-gateway:go_gen_grpc_gateway",
],
embed = [":go_proto"],
importpath = "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1",
protos = [":proto"],
visibility = ["//visibility:private"],
deps = [
"//proto/engine/v1:go_default_library",
"//proto/eth/ext:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_go_proto",
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
"@googleapis//google/api:annotations_go_proto",
"@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
"@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
"@io_bazel_rules_go//proto/wkt:wrappers_go_proto",
"@org_golang_google_protobuf//types/descriptorpb:go_default_library",
"@org_golang_google_protobuf//types/known/emptypb:go_default_library",
],
)
go_library(
name = "go_default_library",
srcs = [
"cloners.go",
"sync_committee_mainnet.go",
"sync_committee_minimal.go", # keep
":ssz_generated_files", # keep
],
embed = [
":go_grpc_gateway_library",
],
importpath = "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1",
visibility = ["//visibility:public"],
deps = SSZ_DEPS + [
"//encoding/bytesutil:go_default_library",
"//proto/engine/v1:go_default_library",
"//proto/eth/ext:go_default_library",
"@com_github_golang_protobuf//proto:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_go_proto",
"@com_github_grpc_ecosystem_grpc_gateway_v2//runtime:go_default_library",
"@com_github_grpc_ecosystem_grpc_gateway_v2//utilities:go_default_library",
"@com_github_prysmaticlabs_go_bitfield//:go_default_library", # keep
"@googleapis//google/api:annotations_go_proto",
"@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
"@io_bazel_rules_go//proto/wkt:empty_go_proto",
"@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_google_grpc//codes:go_default_library",
"@org_golang_google_grpc//grpclog:go_default_library",
"@org_golang_google_grpc//metadata:go_default_library",
"@org_golang_google_grpc//status:go_default_library",
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
"@org_golang_google_protobuf//types/descriptorpb:go_default_library",
"@org_golang_google_protobuf//types/known/emptypb:go_default_library",
],
)
ssz_proto_files(
name = "ssz_proto_files",
srcs = [
"attestation.proto",
"beacon_block.proto",
"beacon_state.proto",
2023-05-05 23:02:21 +00:00
"blobs.proto",
"sync_committee.proto",
"withdrawals.proto",
],
config = select({
"//conditions:default": "mainnet",
"//proto:ssz_mainnet": "mainnet",
"//proto:ssz_minimal": "minimal",
}),
)
go_test(
name = "go_default_test",
srcs = ["cloners_test.go"],
embed = [":go_default_library"],
deps = [
"//testing/assert:go_default_library",
],
)