mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
* Add blst third party dep * initial build * add init * blst passing tests * add feature flag * blst and herumi for spec tests * maybe this works for mac * Actually set feature flag * Add stub for VerifyMultipleSignatures for blst * verifyCompressed * use correct cores sizes * aggregate public keys * add multi-sig verification * encode not hash * revert back * go mod tidy * update blst to latest commit * add batch decompress * fix * add test * gofmt * update blst * go mod tidy * remove kubesec, fix * mod tidy * disable some remote cache * disable some remote cache * disable some remote cache * disable some remote cache * Switch to -D__ADX__ * update * tidy * fix build * Make blst for only linux,amd64 * gofmt * lint * lint * gazelle * fix build tag * more stub methods * shift adx instructions to x86 * fix arm64 * Revert "fix arm64" This reverts commit4d34ac21b7. * add one more in * Revert "Revert "fix arm64"" This reverts commit1c8ae24ad1. * try darwin now * Revert "try darwin now" This reverts commit6f884714b8. * Add sha256 * remove TODO * checkpoint * finally builds * fix up * add tag * try again * explicit disabling * remove * select properly * fix * better * make CI happy too * Update .bazelrc * Update .bazelrc * fix tests * revert back * Update shared/bls/blst/public_key.go Co-authored-by: Victor Farazdagi <simple.square@gmail.com> * Update shared/bls/blst/public_key.go Co-authored-by: Victor Farazdagi <simple.square@gmail.com> * clean up tests * more clean up * clean up * add * Update shared/bls/blst/signature.go * Update shared/bls/blst/signature.go * Update .buildkite-bazelrc Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> * try again * remove go tag * revert change * gaz * gazelle ignore Co-authored-by: nisdas <nishdas93@gmail.com> Co-authored-by: Victor Farazdagi <simple.square@gmail.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
152 lines
4.1 KiB
Python
152 lines
4.1 KiB
Python
load("@io_bazel_rules_go//go:def.bzl", "go_test")
|
|
load("@bazel_skylib//lib:selects.bzl", "selects")
|
|
load("@prysm//tools/go:def.bzl", "go_library")
|
|
|
|
# Build with --define=blst_enabled=false to exclude blst library.
|
|
config_setting(
|
|
name = "blst_enabled_linux_amd64",
|
|
constraint_values = [
|
|
"@platforms//os:linux",
|
|
"@platforms//cpu:x86_64",
|
|
],
|
|
values = {
|
|
"define": "blst_enabled=true",
|
|
},
|
|
)
|
|
|
|
config_setting(
|
|
name = "blst_enabled_linux_arm64",
|
|
constraint_values = [
|
|
"@platforms//os:linux",
|
|
"@platforms//cpu:aarch64",
|
|
],
|
|
values = {
|
|
"define": "blst_enabled=true",
|
|
},
|
|
)
|
|
|
|
config_setting(
|
|
name = "blst_enabled_android_amd64",
|
|
constraint_values = [
|
|
"@platforms//os:android",
|
|
"@platforms//cpu:x86_64",
|
|
],
|
|
values = {
|
|
"define": "blst_enabled=true",
|
|
},
|
|
)
|
|
|
|
config_setting(
|
|
name = "blst_enabled_android_arm64",
|
|
constraint_values = [
|
|
"@platforms//os:android",
|
|
"@platforms//cpu:aarch64",
|
|
],
|
|
values = {
|
|
"define": "blst_enabled=true",
|
|
},
|
|
)
|
|
|
|
# gazelle:resolve go github.com/supranational/blst/bindings/go @com_github_supranational_blst//:go_default_library
|
|
|
|
go_library(
|
|
name = "go_default_library",
|
|
srcs =
|
|
selects.with_or({
|
|
(
|
|
":blst_enabled_linux_amd64",
|
|
":blst_enabled_linux_arm64",
|
|
":blst_enabled_android_amd64",
|
|
":blst_enabled_android_arm64",
|
|
): [
|
|
"aliases.go",
|
|
"doc.go",
|
|
"init.go",
|
|
"public_key.go",
|
|
"secret_key.go",
|
|
"signature.go",
|
|
],
|
|
"//conditions:default": [
|
|
"stub.go",
|
|
],
|
|
}),
|
|
importpath = "github.com/prysmaticlabs/prysm/shared/bls/blst",
|
|
visibility = [
|
|
"//shared/bls:__pkg__",
|
|
],
|
|
deps = selects.with_or({
|
|
(
|
|
":blst_enabled_linux_amd64",
|
|
":blst_enabled_linux_arm64",
|
|
":blst_enabled_android_amd64",
|
|
":blst_enabled_android_arm64",
|
|
): [
|
|
"//shared/bls/iface:go_default_library",
|
|
"//shared/featureconfig:go_default_library",
|
|
"//shared/params:go_default_library",
|
|
"//shared/rand:go_default_library",
|
|
"@com_github_dgraph_io_ristretto//:go_default_library",
|
|
"@com_github_pkg_errors//:go_default_library",
|
|
"@com_github_supranational_blst//:go_default_library",
|
|
],
|
|
"//conditions:default": ["//shared/bls/iface:go_default_library"],
|
|
}),
|
|
)
|
|
|
|
# gazelle:ignore
|
|
go_test(
|
|
name = "go_default_test",
|
|
srcs = selects.with_or({
|
|
(
|
|
":blst_enabled_linux_amd64",
|
|
":blst_enabled_linux_arm64",
|
|
":blst_enabled_android_amd64",
|
|
":blst_enabled_android_arm64",
|
|
): [
|
|
"public_key_test.go",
|
|
"secret_key_test.go",
|
|
"signature_test.go",
|
|
],
|
|
"//conditions:default": [],
|
|
}),
|
|
deps = selects.with_or({
|
|
(
|
|
":blst_enabled_linux_amd64",
|
|
":blst_enabled_linux_arm64",
|
|
":blst_enabled_android_amd64",
|
|
":blst_enabled_android_arm64",
|
|
): [
|
|
"//shared/bls/blst:go_default_library",
|
|
"//shared/bls/iface:go_default_library",
|
|
"//shared/bytesutil:go_default_library",
|
|
"//shared/testutil/assert:go_default_library",
|
|
"//shared/testutil/require:go_default_library",
|
|
],
|
|
"//conditions:default": [],
|
|
}),
|
|
)
|
|
|
|
# gazelle:exclude bls_benchmark_test.go
|
|
go_test(
|
|
name = "go_benchmark_test",
|
|
size = "small",
|
|
srcs = ["bls_benchmark_test.go"],
|
|
args = [
|
|
"-test.bench=.",
|
|
"-test.benchmem",
|
|
"-test.v",
|
|
],
|
|
local = True,
|
|
tags = [
|
|
"benchmark",
|
|
"manual",
|
|
"no-cache",
|
|
],
|
|
deps = [
|
|
":go_default_library",
|
|
"//shared/bls/iface:go_default_library",
|
|
"//shared/bytesutil:go_default_library",
|
|
"//shared/hashutil:go_default_library",
|
|
],
|
|
)
|