From cebefde33589560cc07dad7c5bde66a48244456a Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Tue, 18 Jun 2019 18:02:01 -0400 Subject: [PATCH] Update config.go to fix BLS issue (#2821) * Update config.go * fix test --- beacon-chain/rpc/validator_server_test.go | 5 ++++- shared/params/config.go | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/beacon-chain/rpc/validator_server_test.go b/beacon-chain/rpc/validator_server_test.go index 1d7776aa6..debfc3583 100644 --- a/beacon-chain/rpc/validator_server_test.go +++ b/beacon-chain/rpc/validator_server_test.go @@ -28,7 +28,7 @@ func genesisState(validators uint64) (*pbp2p.BeaconState, error) { genesisTime := time.Unix(0, 0).Unix() deposits := make([]*pbp2p.Deposit, validators) for i := 0; i < len(deposits); i++ { - var pubKey [96]byte + var pubKey [48]byte copy(pubKey[:], []byte(strconv.Itoa(i))) depositInput := &pbp2p.DepositInput{ Pubkey: pubKey[:], @@ -219,6 +219,9 @@ func TestCommitteeAssignment_OK(t *testing.T) { if err != nil { t.Fatalf("Could not call epoch committee assignment %v", err) } + if len(res.Assignment) == 0 { + t.Fatal("No assignments returned") + } if res.Assignment[0].Shard >= params.BeaconConfig().ShardCount { t.Errorf("Assigned shard %d can't be higher than %d", res.Assignment[0].Shard, params.BeaconConfig().ShardCount) diff --git a/shared/params/config.go b/shared/params/config.go index 520d7d618..c6e3e130b 100644 --- a/shared/params/config.go +++ b/shared/params/config.go @@ -118,7 +118,7 @@ var defaultBeaconConfig = &BeaconChainConfig{ MaxExitDequeuesPerEpoch: 4, ValidatorPrivkeyFileName: "/validatorprivatekey", WithdrawalPrivkeyFileName: "/shardwithdrawalkey", - BLSPubkeyLength: 96, + BLSPubkeyLength: 48, DefaultBufferSize: 10000, HashCacheSize: 100000,