2021-06-02 23:49:52 +00:00
|
|
|
##############################################################################
|
|
|
|
# Common
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
load("@rules_proto//proto:defs.bzl", "proto_library")
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# Go
|
|
|
|
##############################################################################
|
|
|
|
# gazelle:ignore
|
2021-09-04 06:55:57 +00:00
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
2021-06-02 23:49:52 +00:00
|
|
|
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
|
2021-06-24 15:32:30 +00:00
|
|
|
load("//proto:ssz_proto_library.bzl", "ssz_proto_files")
|
2021-06-02 23:49:52 +00:00
|
|
|
load("//tools:ssz.bzl", "SSZ_DEPS", "ssz_gen_marshal")
|
|
|
|
|
|
|
|
proto_library(
|
|
|
|
name = "proto",
|
|
|
|
srcs = [
|
2021-07-28 18:05:07 +00:00
|
|
|
"beacon_chain.proto",
|
|
|
|
"debug.proto",
|
|
|
|
"finalized_block_root_container.proto",
|
|
|
|
"health.proto",
|
2023-11-16 18:41:37 +00:00
|
|
|
"node.proto",
|
|
|
|
"p2p_messages.proto",
|
2021-07-28 18:05:07 +00:00
|
|
|
"powchain.proto",
|
|
|
|
"slasher.proto",
|
2021-06-02 23:49:52 +00:00
|
|
|
"validator.proto",
|
2021-07-28 18:05:07 +00:00
|
|
|
":ssz_proto_files",
|
2021-06-02 23:49:52 +00:00
|
|
|
],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
2022-02-02 03:30:35 +00:00
|
|
|
"//proto/engine/v1:proto",
|
2022-10-19 14:37:45 +00:00
|
|
|
"//proto/eth/ext:proto",
|
2021-06-02 23:49:52 +00:00
|
|
|
"@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",
|
2024-02-07 22:53:08 +00:00
|
|
|
"@com_google_protobuf//:wrappers_proto",
|
2023-10-10 04:50:29 +00:00
|
|
|
"@googleapis//google/api:annotations_proto",
|
2021-06-02 23:49:52 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# Go
|
|
|
|
##############################################################################
|
|
|
|
ssz_gen_marshal(
|
|
|
|
name = "ssz_generated_files",
|
|
|
|
go_proto = ":go_proto",
|
|
|
|
includes = [
|
2022-04-29 14:32:11 +00:00
|
|
|
"//consensus-types/primitives:go_default_library",
|
2022-02-02 03:30:35 +00:00
|
|
|
"//proto/engine/v1:go_default_library",
|
2021-06-02 23:49:52 +00:00
|
|
|
],
|
|
|
|
objs = [
|
2021-07-28 18:05:07 +00:00
|
|
|
"BeaconBlockAltair",
|
|
|
|
"BeaconBlockBodyAltair",
|
|
|
|
"SignedBeaconBlockAltair",
|
2022-01-26 07:24:47 +00:00
|
|
|
"BeaconBlockBellatrix",
|
|
|
|
"BeaconBlockBodyBellatrix",
|
|
|
|
"SignedBeaconBlockBellatrix",
|
2022-10-19 14:37:45 +00:00
|
|
|
"SignedBlindedBeaconBlockBellatrix",
|
|
|
|
"BlindedBeaconBlockBellatrix",
|
|
|
|
"BlindedBeaconBlockBodyBellatrix",
|
|
|
|
"BeaconBlockCapella",
|
|
|
|
"BeaconBlockBodyCapella",
|
|
|
|
"SignedBeaconBlockCapella",
|
2023-05-05 23:02:21 +00:00
|
|
|
"BeaconBlockDeneb",
|
|
|
|
"BeaconBlockBodyDeneb",
|
|
|
|
"SignedBeaconBlockDeneb",
|
2022-10-19 14:37:45 +00:00
|
|
|
"SignedBlindedBeaconBlockCapella",
|
|
|
|
"BlindedBeaconBlockCapella",
|
|
|
|
"BlindedBeaconBlockBodyCapella",
|
2023-05-05 23:02:21 +00:00
|
|
|
"SignedBlindedBeaconBlockDeneb",
|
2023-12-07 17:37:11 +00:00
|
|
|
"BeaconBlockContentsDeneb",
|
|
|
|
"SignedBeaconBlockContentsDeneb",
|
2023-05-05 23:02:21 +00:00
|
|
|
"BlindedBeaconBlockDeneb",
|
|
|
|
"BlindedBeaconBlockBodyDeneb",
|
2021-07-28 18:05:07 +00:00
|
|
|
"SyncAggregate",
|
|
|
|
"SyncCommitteeMessage",
|
|
|
|
"SyncCommitteeContribution",
|
|
|
|
"ContributionAndProof",
|
|
|
|
"SignedContributionAndProof",
|
|
|
|
"BeaconBlocksByRangeRequest",
|
2023-05-05 23:02:21 +00:00
|
|
|
"BlobSidecarsByRangeRequest",
|
2021-07-28 18:05:07 +00:00
|
|
|
"ENRForkID",
|
|
|
|
"MetaDataV0",
|
|
|
|
"MetaDataV1",
|
|
|
|
"Status",
|
2021-06-02 23:49:52 +00:00
|
|
|
"AggregateAttestationAndProof",
|
|
|
|
"Attestation",
|
|
|
|
"AttestationData",
|
|
|
|
"AttesterSlashing",
|
|
|
|
"BeaconBlock",
|
|
|
|
"BeaconBlockHeader",
|
|
|
|
"Checkpoint",
|
|
|
|
"Deposit",
|
|
|
|
"Eth1Data",
|
|
|
|
"IndexedAttestation",
|
|
|
|
"ProposerSlashing",
|
|
|
|
"SignedAggregateAttestationAndProof",
|
|
|
|
"SignedBeaconBlock",
|
|
|
|
"SignedBeaconBlockHeader",
|
|
|
|
"SignedVoluntaryExit",
|
|
|
|
"Validator",
|
|
|
|
"VoluntaryExit",
|
|
|
|
"ContributionAndProof",
|
|
|
|
"SignedContributionAndProof",
|
2021-07-28 18:05:07 +00:00
|
|
|
"DepositMessage",
|
|
|
|
"Fork",
|
|
|
|
"ForkData",
|
|
|
|
"HistoricalBatch",
|
|
|
|
"Status",
|
|
|
|
"BeaconState",
|
|
|
|
"BeaconStateAltair",
|
2022-01-10 16:47:30 +00:00
|
|
|
"BeaconStateBellatrix",
|
2022-10-12 16:39:19 +00:00
|
|
|
"BeaconStateCapella",
|
2023-05-05 23:02:21 +00:00
|
|
|
"BeaconStateDeneb",
|
2021-07-28 18:05:07 +00:00
|
|
|
"SigningData",
|
|
|
|
"SyncCommittee",
|
|
|
|
"SyncAggregatorSelectionData",
|
2022-02-09 22:27:30 +00:00
|
|
|
"PowBlock",
|
2022-06-01 01:53:25 +00:00
|
|
|
"SignedValidatorRegistrationV1",
|
2022-06-03 15:13:04 +00:00
|
|
|
"ValidatorRegistrationV1",
|
2022-10-19 14:37:45 +00:00
|
|
|
"Withdrawal",
|
2022-07-25 14:10:18 +00:00
|
|
|
"BLSToExecutionChange",
|
|
|
|
"SignedBLSToExecutionChange",
|
2022-10-19 14:37:45 +00:00
|
|
|
"BuilderBid",
|
2023-01-26 13:07:44 +00:00
|
|
|
"BuilderBidCapella",
|
2023-06-14 18:04:48 +00:00
|
|
|
"BuilderBidDeneb",
|
2023-05-05 23:02:21 +00:00
|
|
|
"BlobSidecar",
|
2023-12-07 17:37:11 +00:00
|
|
|
"BlobSidecars",
|
2023-05-05 23:02:21 +00:00
|
|
|
"BlobIdentifier",
|
2024-02-07 22:53:08 +00:00
|
|
|
"DepositSnapshot",
|
2022-10-19 14:37:45 +00:00
|
|
|
],
|
2021-06-02 23:49:52 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
go_proto_library(
|
|
|
|
name = "go_proto",
|
|
|
|
compilers = [
|
|
|
|
"@com_github_prysmaticlabs_protoc_gen_go_cast//:go_cast_grpc",
|
|
|
|
],
|
2024-02-15 05:46:47 +00:00
|
|
|
importpath = "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1",
|
2021-06-02 23:49:52 +00:00
|
|
|
proto = ":proto",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
2022-10-19 14:37:45 +00:00
|
|
|
"//consensus-types/primitives:go_default_library",
|
2022-02-02 03:30:35 +00:00
|
|
|
"//proto/engine/v1:go_default_library",
|
2022-10-19 14:37:45 +00:00
|
|
|
"//proto/eth/ext:go_default_library",
|
2021-06-02 23:49:52 +00:00
|
|
|
"@com_github_golang_protobuf//proto:go_default_library",
|
|
|
|
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_go_proto",
|
2021-09-04 06:55:57 +00:00
|
|
|
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
|
2023-10-10 04:50:29 +00:00
|
|
|
"@googleapis//google/api:annotations_go_proto",
|
2021-09-04 06:55:57 +00:00
|
|
|
"@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
|
|
|
|
"@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
|
2021-06-02 23:49:52 +00:00
|
|
|
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
|
|
|
|
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
|
2023-10-10 04:50:29 +00:00
|
|
|
"@org_golang_google_protobuf//types/descriptorpb:go_default_library",
|
2023-11-16 18:41:37 +00:00
|
|
|
"@org_golang_google_protobuf//types/known/emptypb:go_default_library",
|
|
|
|
"@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
|
2024-02-07 22:53:08 +00:00
|
|
|
"@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
|
2021-06-02 23:49:52 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
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"],
|
2024-02-15 05:46:47 +00:00
|
|
|
importpath = "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1",
|
2021-06-02 23:49:52 +00:00
|
|
|
protos = [":proto"],
|
|
|
|
visibility = ["//visibility:private"],
|
|
|
|
deps = [
|
2022-02-02 03:30:35 +00:00
|
|
|
"//proto/engine/v1:go_default_library",
|
2022-10-19 14:37:45 +00:00
|
|
|
"//proto/eth/ext:go_default_library",
|
2021-06-02 23:49:52 +00:00
|
|
|
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_go_proto",
|
|
|
|
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
|
2023-10-10 04:50:29 +00:00
|
|
|
"@googleapis//google/api:annotations_go_proto",
|
2021-06-02 23:49:52 +00:00
|
|
|
"@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
|
2021-09-04 06:55:57 +00:00
|
|
|
"@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
|
2024-02-07 22:53:08 +00:00
|
|
|
"@io_bazel_rules_go//proto/wkt:wrappers_go_proto",
|
2023-11-16 18:41:37 +00:00
|
|
|
"@org_golang_google_protobuf//types/descriptorpb:go_default_library",
|
|
|
|
"@org_golang_google_protobuf//types/known/emptypb:go_default_library",
|
2021-06-02 23:49:52 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
go_library(
|
|
|
|
name = "go_default_library",
|
|
|
|
srcs = [
|
2021-09-04 06:55:57 +00:00
|
|
|
"cloners.go",
|
2021-07-28 18:05:07 +00:00
|
|
|
"sync_committee_mainnet.go",
|
2021-09-04 06:55:57 +00:00
|
|
|
"sync_committee_minimal.go", # keep
|
2021-06-02 23:49:52 +00:00
|
|
|
":ssz_generated_files", # keep
|
|
|
|
],
|
|
|
|
embed = [
|
|
|
|
":go_grpc_gateway_library",
|
|
|
|
],
|
2024-02-15 05:46:47 +00:00
|
|
|
importpath = "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1",
|
2021-06-02 23:49:52 +00:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = SSZ_DEPS + [
|
2021-09-23 15:23:37 +00:00
|
|
|
"//encoding/bytesutil:go_default_library",
|
2023-11-16 18:41:37 +00:00
|
|
|
"//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",
|
2021-06-02 23:49:52 +00:00
|
|
|
"@com_github_grpc_ecosystem_grpc_gateway_v2//runtime:go_default_library",
|
|
|
|
"@com_github_grpc_ecosystem_grpc_gateway_v2//utilities:go_default_library",
|
2023-11-16 18:41:37 +00:00
|
|
|
"@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",
|
2021-06-02 23:49:52 +00:00
|
|
|
"@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",
|
2023-11-16 18:41:37 +00:00
|
|
|
"@org_golang_google_protobuf//types/descriptorpb:go_default_library",
|
|
|
|
"@org_golang_google_protobuf//types/known/emptypb:go_default_library",
|
2021-09-04 06:55:57 +00:00
|
|
|
],
|
2021-06-02 23:49:52 +00:00
|
|
|
)
|
|
|
|
|
2021-07-28 18:05:07 +00:00
|
|
|
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",
|
2021-09-04 06:55:57 +00:00
|
|
|
"sync_committee.proto",
|
2022-07-25 14:10:18 +00:00
|
|
|
"withdrawals.proto",
|
2021-07-28 18:05:07 +00:00
|
|
|
],
|
|
|
|
config = select({
|
|
|
|
"//conditions:default": "mainnet",
|
|
|
|
"//proto:ssz_mainnet": "mainnet",
|
|
|
|
"//proto:ssz_minimal": "minimal",
|
|
|
|
}),
|
|
|
|
)
|
2021-09-04 06:55:57 +00:00
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "go_default_test",
|
|
|
|
srcs = ["cloners_test.go"],
|
|
|
|
embed = [":go_default_library"],
|
|
|
|
deps = [
|
2021-09-23 18:53:46 +00:00
|
|
|
"//testing/assert:go_default_library",
|
2021-09-04 06:55:57 +00:00
|
|
|
],
|
|
|
|
)
|