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

@@ -22,6 +22,7 @@ go_test(
srcs = ["sparse_merkle_test.go"],
deps = [
":go_default_library",
"//config/fieldparams:go_default_library",
"//config/params:go_default_library",
"//contracts/deposit:go_default_library",
"//crypto/hash:go_default_library",

View File

@@ -5,6 +5,7 @@ import (
"testing"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
fieldparams "github.com/prysmaticlabs/prysm/config/fieldparams"
"github.com/prysmaticlabs/prysm/config/params"
"github.com/prysmaticlabs/prysm/container/trie"
contracts "github.com/prysmaticlabs/prysm/contracts/deposit"
@@ -32,7 +33,7 @@ func TestMarshalDepositWithProof(t *testing.T) {
require.Equal(t, len(proof), int(params.BeaconConfig().DepositContractTreeDepth)+1)
someRoot := [32]byte{1, 2, 3, 4}
someSig := [96]byte{1, 2, 3, 4}
someKey := [48]byte{1, 2, 3, 4}
someKey := [fieldparams.BLSPubkeyLength]byte{1, 2, 3, 4}
dep := &ethpb.Deposit{
Proof: proof,
Data: &ethpb.Deposit_Data{