prysm-pulse/cmd/validator/BUILD.bazel
Manu NALEPA 99a8d0bac6
Validator client - Improve readability - NO FUNCTIONAL CHANGE (#13468)
* Improve `NewServiceRegistry` documentation.

* Improve `README.md`.

* Improve readability of `registerValidatorService`.

* Move `log` in `main.go`.

Since `log` is only used in `main.go`.

* Clean Tos.

* `DefaultDataDir`: Use `switch` instead of `if/elif`.

* `ReadPassword`: Remove unused receiver.

* `validator/main.go`: Clean.

* `WarnIfPlatformNotSupported`: Add Mac OSX ARM64.

* `runner.go`: Use idiomatic `err` handling.

* `waitForChainStart`: Avoid `chainStartResponse`mutation.

* `WaitForChainStart`: Reduce cognitive complexity.

* Logs: `powchain` ==> `execution`.
2024-01-15 14:46:54 +00:00

70 lines
2.3 KiB
Python

load("@prysm//tools/go:def.bzl", "go_library", "go_test")
load("@io_bazel_rules_go//go:def.bzl", "go_binary")
load("//tools:prysm_image.bzl", "prysm_image_upload")
go_library(
name = "go_default_library",
srcs = [
"main.go",
"usage.go",
],
importpath = "github.com/prysmaticlabs/prysm/v4/cmd/validator",
visibility = ["//validator:__subpackages__"],
deps = [
"//cmd:go_default_library",
"//cmd/validator/accounts:go_default_library",
"//cmd/validator/db:go_default_library",
"//cmd/validator/flags:go_default_library",
"//cmd/validator/slashing-protection:go_default_library",
"//cmd/validator/wallet:go_default_library",
"//cmd/validator/web:go_default_library",
"//config/features:go_default_library",
"//io/file:go_default_library",
"//io/logs:go_default_library",
"//monitoring/journald:go_default_library",
"//runtime/debug:go_default_library",
"//runtime/logging/logrus-prefixed-formatter:go_default_library",
"//runtime/maxprocs:go_default_library",
"//runtime/tos:go_default_library",
"//runtime/version:go_default_library",
"//validator/node:go_default_library",
"@com_github_joonix_log//:go_default_library",
"@com_github_pkg_errors//:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@com_github_urfave_cli_v2//:go_default_library",
],
)
go_binary(
name = "validator",
embed = [":go_default_library"],
pure = "off", # Enabled unless there is a valid reason to include cgo dep.
visibility = [
"//testing/endtoend:__pkg__",
"//validator:__subpackages__",
],
)
go_test(
name = "go_default_test",
srcs = ["usage_test.go"],
embed = [":go_default_library"],
visibility = ["//validator:__pkg__"],
deps = [
"//config/features:go_default_library",
"@com_github_urfave_cli_v2//:go_default_library",
],
)
prysm_image_upload(
name = "push_images",
binary = ":validator",
entrypoint = ["/validator"],
repository = "gcr.io/prysmaticlabs/prysm/validator",
symlinks = {
# Backwards compatibility for images that depended on the old filepath.
"/app/cmd/validator/validator": "/validator",
},
tags = ["manual"],
)