Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update BLS and limit visibility #5415

Merged
merged 4 commits into from
Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,6 @@ http_archive(
urls = ["https://github.com/edenhill/librdkafka/archive/v1.2.1.tar.gz"],
)

http_archive(
name = "com_github_herumi_bls_eth_go_binary",
sha256 = "3b155ff597c307b5b0875c3b1ffc3beaa0a6634ee1cfad8768041b61c47eac39",
strip_prefix = "bls-eth-go-binary-946ee977cd0f585757741dda65073cbd84a160ac",
url = "https://github.com/prysmaticlabs/bls-eth-go-binary/archive/946ee977cd0f585757741dda65073cbd84a160ac.zip",
)

# External dependencies

go_repository(
Expand Down Expand Up @@ -1671,3 +1664,10 @@ go_repository(
sum = "h1:GWsU1WjSE2rtvyTYGcndqmPPkQkBNV7pEuZdnGtwtu4=",
version = "v0.0.0-20200321040036-d43e30eacb43",
)

go_repository(
name = "org_golang_x_mod",
importpath = "golang.org/x/mod",
sum = "h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=",
version = "v0.2.0",
)
2 changes: 1 addition & 1 deletion beacon-chain/core/blocks/block_operations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestProcessBlockHeader_WrongProposerSig(t *testing.T) {
Body: &ethpb.BeaconBlockBody{
RandaoReveal: []byte{'A', 'B', 'C'},
},
ParentRoot: lbhsr[:],
ParentRoot: lbhdr[:],
},
}
dt, err := helpers.Domain(beaconState.Fork(), 0, params.BeaconConfig().DomainBeaconProposer, beaconState.GenesisValidatorRoot())
Expand Down
7 changes: 4 additions & 3 deletions shared/bls/bls.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ import (
)

func init() {
err := bls12.Init(bls12.BLS12_381)
if err != nil {
if err := bls12.Init(bls12.BLS12_381); err != nil {
panic(err)
}
if err := bls12.SetETHmode(1); err != nil {
panic(err)
}
bls12.SetETHmode(1)
}

// DomainByteLength length of domain byte array.
Expand Down
13 changes: 7 additions & 6 deletions third_party/herumi/bls_eth_go_binary.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ OPTS = [
}) + select({
":use_openssl": [],
"//conditions:default": [
"-DMCL_DONT_USE_OPENSSL",
"-DMCL_DONT_USE_OPENSSL",
],
})



genrule(
name = "base64_ll",
outs = ["src/base64.ll"], # llvm assembly language file.
Expand Down Expand Up @@ -81,10 +79,10 @@ cc_library(
}) + select({
":use_openssl": [
"-lssl",
"-lcrypto"
"-lcrypto",
],
"//conditions:default": [],
})
}),
)

cc_library(
Expand Down Expand Up @@ -145,5 +143,8 @@ go_library(
}),
copts = OPTS,
cgo = True,
visibility = ["//visibility:public"],
visibility = [
# Additional access will require security approval.
"@prysm//shared/bls:__pkg__",
],
)
6 changes: 3 additions & 3 deletions third_party/herumi/herumi.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ def bls_dependencies():
_maybe(
http_archive,
name = "herumi_bls_eth_go_binary",
strip_prefix = "bls-eth-go-binary-da18d415993a059052dfed16711f2b3bd03c34b8",
strip_prefix = "bls-eth-go-binary-f58f8b8bd66f1d286d650e9b39b9629411067f82",
urls = [
"https://github.com/herumi/bls-eth-go-binary/archive/da18d415993a059052dfed16711f2b3bd03c34b8.tar.gz",
"https://github.com/herumi/bls-eth-go-binary/archive/f58f8b8bd66f1d286d650e9b39b9629411067f82.tar.gz",
],
sha256 = "69080ca634f8aaeb0950e19db218811f4bb920a054232e147669ea574ba11ef0",
sha256 = "1a61363fdc33018d4334481410082c804f5aa083c4454b7eef3b2395a0df98f1",
build_file = "@prysm//third_party/herumi:bls_eth_go_binary.BUILD",
)
_maybe(
Expand Down