mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
c391fad258
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
375 lines
11 KiB
Python
375 lines
11 KiB
Python
workspace(name = "prysm")
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
|
|
|
http_archive(
|
|
name = "bazel_toolchains",
|
|
sha256 = "8e0633dfb59f704594f19ae996a35650747adc621ada5e8b9fb588f808c89cb0",
|
|
strip_prefix = "bazel-toolchains-3.7.0",
|
|
urls = [
|
|
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/3.7.0/bazel-toolchains-3.7.0.tar.gz",
|
|
"https://github.com/bazelbuild/bazel-toolchains/releases/download/3.7.0/bazel-toolchains-3.7.0.tar.gz",
|
|
],
|
|
)
|
|
|
|
http_archive(
|
|
name = "com_grail_bazel_toolchain",
|
|
sha256 = "b210fc8e58782ef171f428bfc850ed7179bdd805543ebd1aa144b9c93489134f",
|
|
strip_prefix = "bazel-toolchain-83e69ba9e4b4fdad0d1d057fcb87addf77c281c9",
|
|
urls = ["https://github.com/grailbio/bazel-toolchain/archive/83e69ba9e4b4fdad0d1d057fcb87addf77c281c9.tar.gz"],
|
|
)
|
|
|
|
load("@com_grail_bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies")
|
|
|
|
bazel_toolchain_dependencies()
|
|
|
|
load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm_toolchain")
|
|
|
|
llvm_toolchain(
|
|
name = "llvm_toolchain",
|
|
llvm_version = "13.0.1",
|
|
)
|
|
|
|
load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
|
|
|
|
llvm_register_toolchains()
|
|
|
|
load("@prysm//tools/cross-toolchain:prysm_toolchains.bzl", "configure_prysm_toolchains")
|
|
|
|
configure_prysm_toolchains()
|
|
|
|
load("@prysm//tools/cross-toolchain:rbe_toolchains_config.bzl", "rbe_toolchains_config")
|
|
|
|
rbe_toolchains_config()
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
http_archive(
|
|
name = "bazel_skylib",
|
|
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
|
|
urls = [
|
|
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
|
|
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
|
|
],
|
|
)
|
|
|
|
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
|
|
|
|
bazel_skylib_workspace()
|
|
|
|
http_archive(
|
|
name = "bazel_gazelle",
|
|
sha256 = "5982e5463f171da99e3bdaeff8c0f48283a7a5f396ec5282910b9e8a49c0dd7e",
|
|
urls = [
|
|
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
|
|
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
|
|
],
|
|
)
|
|
|
|
http_archive(
|
|
name = "com_github_atlassian_bazel_tools",
|
|
sha256 = "60821f298a7399450b51b9020394904bbad477c18718d2ad6c789f231e5b8b45",
|
|
strip_prefix = "bazel-tools-a2138311856f55add11cd7009a5abc8d4fd6f163",
|
|
urls = ["https://github.com/atlassian/bazel-tools/archive/a2138311856f55add11cd7009a5abc8d4fd6f163.tar.gz"],
|
|
)
|
|
|
|
http_archive(
|
|
name = "io_bazel_rules_docker",
|
|
sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf",
|
|
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.25.0/rules_docker-v0.25.0.tar.gz"],
|
|
)
|
|
|
|
http_archive(
|
|
name = "io_bazel_rules_go",
|
|
patch_args = ["-p1"],
|
|
patches = [
|
|
# Expose internals of go_test for custom build transitions.
|
|
"//third_party:io_bazel_rules_go_test.patch",
|
|
],
|
|
sha256 = "ae013bf35bd23234d1dea46b079f1e05ba74ac0321423830119d3e787ec73483",
|
|
urls = [
|
|
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.36.0/rules_go-v0.36.0.zip",
|
|
"https://github.com/bazelbuild/rules_go/releases/download/v0.36.0/rules_go-v0.36.0.zip",
|
|
],
|
|
)
|
|
|
|
# Override default import in rules_go with special patch until
|
|
# https://github.com/gogo/protobuf/pull/582 is merged.
|
|
git_repository(
|
|
name = "com_github_gogo_protobuf",
|
|
commit = "b03c65ea87cdc3521ede29f62fe3ce239267c1bc",
|
|
patch_args = ["-p1"],
|
|
patches = [
|
|
"@io_bazel_rules_go//third_party:com_github_gogo_protobuf-gazelle.patch",
|
|
"//third_party:com_github_gogo_protobuf-equal.patch",
|
|
],
|
|
remote = "https://github.com/gogo/protobuf",
|
|
shallow_since = "1610265707 +0000",
|
|
# gazelle args: -go_prefix github.com/gogo/protobuf -proto legacy
|
|
)
|
|
|
|
load(
|
|
"@io_bazel_rules_docker//repositories:repositories.bzl",
|
|
container_repositories = "repositories",
|
|
)
|
|
|
|
container_repositories()
|
|
|
|
load(
|
|
"@io_bazel_rules_docker//container:container.bzl",
|
|
"container_pull",
|
|
)
|
|
|
|
container_pull(
|
|
name = "cc_image_base",
|
|
digest = "sha256:41036fc7ed8df0f6addc18484cef0c94a85867508967789f947e11ffd5ff0cc8",
|
|
registry = "gcr.io",
|
|
repository = "distroless/cc",
|
|
)
|
|
|
|
container_pull(
|
|
name = "cc_debug_image_base",
|
|
digest = "sha256:6865ad48467c89c3c3524d4c426f52ad12d9ab7dec31fad31fae69da40eb6445",
|
|
registry = "gcr.io",
|
|
repository = "distroless/cc",
|
|
)
|
|
|
|
container_pull(
|
|
name = "go_image_base",
|
|
digest = "sha256:b9b124f955961599e72630654107a0cf04e08e6fa777fa250b8f840728abd770",
|
|
registry = "gcr.io",
|
|
repository = "distroless/base",
|
|
)
|
|
|
|
container_pull(
|
|
name = "go_debug_image_base",
|
|
digest = "sha256:65668d2b78d25df3d8ccf5a778d017fcaba513b52078c700083eaeef212b9979",
|
|
registry = "gcr.io",
|
|
repository = "distroless/base",
|
|
)
|
|
|
|
container_pull(
|
|
name = "alpine_cc_linux_amd64",
|
|
digest = "sha256:752aa0c9a88461ffc50c5267bb7497ef03a303e38b2c8f7f2ded9bebe5f1f00e",
|
|
registry = "index.docker.io",
|
|
repository = "pinglamb/alpine-glibc",
|
|
)
|
|
|
|
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
|
|
|
|
go_rules_dependencies()
|
|
|
|
go_register_toolchains(
|
|
go_version = "1.19.4",
|
|
nogo = "@//:nogo",
|
|
)
|
|
|
|
http_archive(
|
|
name = "io_kubernetes_build",
|
|
sha256 = "b84fbd1173acee9d02a7d3698ad269fdf4f7aa081e9cecd40e012ad0ad8cfa2a",
|
|
strip_prefix = "repo-infra-6537f2101fb432b679f3d103ee729dd8ac5d30a0",
|
|
url = "https://github.com/kubernetes/repo-infra/archive/6537f2101fb432b679f3d103ee729dd8ac5d30a0.tar.gz",
|
|
)
|
|
|
|
http_archive(
|
|
name = "eip3076_spec_tests",
|
|
build_file_content = """
|
|
filegroup(
|
|
name = "test_data",
|
|
srcs = glob([
|
|
"**/*.json",
|
|
]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
sha256 = "91434d5fd5e1c6eb7b0174fed2afe25e09bddf00e1e4c431db931b2cee4e7773",
|
|
url = "https://github.com/eth-clients/slashing-protection-interchange-tests/archive/b8413ca42dc92308019d0d4db52c87e9e125c4e9.tar.gz",
|
|
)
|
|
|
|
consensus_spec_version = "v1.3.0-rc.3"
|
|
|
|
bls_test_version = "v0.1.1"
|
|
|
|
http_archive(
|
|
name = "consensus_spec_tests_general",
|
|
build_file_content = """
|
|
filegroup(
|
|
name = "test_data",
|
|
srcs = glob([
|
|
"**/*.ssz_snappy",
|
|
"**/*.yaml",
|
|
]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
sha256 = "c56ea4e8fb2fea4b0b23d2191a87bc7e676738dd8a623b44ac847bfeaae5fe64",
|
|
url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/general.tar.gz" % consensus_spec_version,
|
|
)
|
|
|
|
http_archive(
|
|
name = "consensus_spec_tests_minimal",
|
|
build_file_content = """
|
|
filegroup(
|
|
name = "test_data",
|
|
srcs = glob([
|
|
"**/*.ssz_snappy",
|
|
"**/*.yaml",
|
|
]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
sha256 = "c97730b372b81e9ee698c4f09eafaec3fb4be177fab323b32e5ef78d0873fb5c",
|
|
url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/minimal.tar.gz" % consensus_spec_version,
|
|
)
|
|
|
|
http_archive(
|
|
name = "consensus_spec_tests_mainnet",
|
|
build_file_content = """
|
|
filegroup(
|
|
name = "test_data",
|
|
srcs = glob([
|
|
"**/*.ssz_snappy",
|
|
"**/*.yaml",
|
|
]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
sha256 = "bdd8255c8a536fa83366144aa32fcc3df92a4997401f88f7cda934d13e90d11c",
|
|
url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/mainnet.tar.gz" % consensus_spec_version,
|
|
)
|
|
|
|
http_archive(
|
|
name = "consensus_spec",
|
|
build_file_content = """
|
|
filegroup(
|
|
name = "spec_data",
|
|
srcs = glob([
|
|
"**/*.yaml",
|
|
]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
sha256 = "f6539e19b8e4e45f45b80da39c87dfe7c61d9d7cb51fa7a3a36bdaca11a89693",
|
|
strip_prefix = "consensus-specs-" + consensus_spec_version[1:],
|
|
url = "https://github.com/ethereum/consensus-specs/archive/refs/tags/%s.tar.gz" % consensus_spec_version,
|
|
)
|
|
|
|
http_archive(
|
|
name = "bls_spec_tests",
|
|
build_file_content = """
|
|
filegroup(
|
|
name = "test_data",
|
|
srcs = glob([
|
|
"**/*.yaml",
|
|
]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
sha256 = "93c7d006e7c5b882cbd11dc9ec6c5d0e07f4a8c6b27a32f964eb17cf2db9763a",
|
|
url = "https://github.com/ethereum/bls12-381-tests/releases/download/%s/bls_tests_yaml.tar.gz" % bls_test_version,
|
|
)
|
|
|
|
http_archive(
|
|
name = "eth2_networks",
|
|
build_file_content = """
|
|
filegroup(
|
|
name = "configs",
|
|
srcs = glob([
|
|
"shared/**/config.yaml",
|
|
]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
sha256 = "82b01a48b143fe0f2fb7fb5f5dd385c1f934335a12d7954f08b1d45d77427b5e",
|
|
strip_prefix = "eth2-networks-674f7a1d01d9c18345456eab76e3871b3df2126b",
|
|
url = "https://github.com/eth-clients/eth2-networks/archive/674f7a1d01d9c18345456eab76e3871b3df2126b.tar.gz",
|
|
)
|
|
|
|
http_archive(
|
|
name = "com_github_bazelbuild_buildtools",
|
|
sha256 = "7a182df18df1debabd9e36ae07c8edfa1378b8424a04561b674d933b965372b3",
|
|
strip_prefix = "buildtools-f2aed9ee205d62d45c55cfabbfd26342f8526862",
|
|
url = "https://github.com/bazelbuild/buildtools/archive/f2aed9ee205d62d45c55cfabbfd26342f8526862.zip",
|
|
)
|
|
|
|
git_repository(
|
|
name = "com_google_protobuf",
|
|
commit = "436bd7880e458532901c58f4d9d1ea23fa7edd52",
|
|
remote = "https://github.com/protocolbuffers/protobuf",
|
|
shallow_since = "1617835118 -0700",
|
|
)
|
|
|
|
# Group the sources of the library so that CMake rule have access to it
|
|
all_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])"""
|
|
|
|
# External dependencies
|
|
|
|
http_archive(
|
|
name = "prysm_web_ui",
|
|
build_file_content = """
|
|
filegroup(
|
|
name = "site",
|
|
srcs = glob(["**/*"]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
""",
|
|
sha256 = "5006614c33e358699b4e072c649cd4c3866f7d41a691449d5156f6c6e07a4c60",
|
|
urls = [
|
|
"https://github.com/prysmaticlabs/prysm-web-ui/releases/download/v2.0.3/prysm-web-ui.tar.gz",
|
|
],
|
|
)
|
|
|
|
load("//:deps.bzl", "prysm_deps")
|
|
|
|
# gazelle:repository_macro deps.bzl%prysm_deps
|
|
prysm_deps()
|
|
|
|
load("@prysm//third_party/herumi:herumi.bzl", "bls_dependencies")
|
|
|
|
bls_dependencies()
|
|
|
|
load("@prysm//testing/endtoend:deps.bzl", "e2e_deps")
|
|
|
|
e2e_deps()
|
|
|
|
load(
|
|
"@io_bazel_rules_docker//go:image.bzl",
|
|
_go_image_repos = "repositories",
|
|
)
|
|
|
|
# Golang images
|
|
# This is using gcr.io/distroless/base
|
|
_go_image_repos()
|
|
|
|
# CC images
|
|
# This is using gcr.io/distroless/base
|
|
load(
|
|
"@io_bazel_rules_docker//cc:image.bzl",
|
|
_cc_image_repos = "repositories",
|
|
)
|
|
|
|
_cc_image_repos()
|
|
|
|
load("@io_bazel_rules_go//extras:embed_data_deps.bzl", "go_embed_data_dependencies")
|
|
|
|
go_embed_data_dependencies()
|
|
|
|
load("@com_github_atlassian_bazel_tools//gometalinter:deps.bzl", "gometalinter_dependencies")
|
|
|
|
gometalinter_dependencies()
|
|
|
|
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
|
|
|
|
gazelle_dependencies()
|
|
|
|
load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies")
|
|
|
|
buildifier_dependencies()
|
|
|
|
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
|
|
|
|
protobuf_deps()
|
|
|
|
# Do NOT add new go dependencies here! Refer to DEPENDENCIES.md!
|