Use fieldparams for BLS public key (#10042)

* Use fieldparams for pubkey length

* Fix validator tests

* fix more tests

* fix mock validator

* Fix typo

* bunch of typos

* Update bytes.go

* Update BUILD.bazel

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
terence tsao
2022-01-06 09:33:08 -08:00
committed by GitHub
parent ad06230291
commit c69bce5d84
133 changed files with 672 additions and 539 deletions

View File

@@ -12,4 +12,5 @@ go_library(
"//crypto/bls:__subpackages__",
"//testing:__subpackages__",
],
deps = ["//config/fieldparams:go_default_library"],
)

View File

@@ -1,10 +1,12 @@
package common
import fieldparams "github.com/prysmaticlabs/prysm/config/fieldparams"
// ZeroSecretKey represents a zero secret key.
var ZeroSecretKey = [32]byte{}
// InfinitePublicKey represents an infinite public key (G1 Point at Infinity).
var InfinitePublicKey = [48]byte{0xC0}
var InfinitePublicKey = [fieldparams.BLSPubkeyLength]byte{0xC0}
// InfiniteSignature represents an infinite signature (G2 Point at Infinity).
var InfiniteSignature = [96]byte{0xC0}