From 437bab7df0de35c48a9d55b073a721585b077cca Mon Sep 17 00:00:00 2001 From: Raul Jordan Date: Thu, 1 Oct 2020 21:04:48 -0500 Subject: [PATCH] Update EthereumAPIs (#7409) * handle unknown validator * tests passing * tidy --- beacon-chain/rpc/beacon/validators.go | 6 +++++- deps.bzl | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/beacon-chain/rpc/beacon/validators.go b/beacon-chain/rpc/beacon/validators.go index 8b120d2c0777..8c222c7a22a6 100644 --- a/beacon-chain/rpc/beacon/validators.go +++ b/beacon-chain/rpc/beacon/validators.go @@ -74,7 +74,11 @@ func (bs *Server) ListValidatorBalances( pubkeyBytes := bytesutil.ToBytes48(pubKey) index, ok := requestedState.ValidatorIndexByPubkey(pubkeyBytes) if !ok { - return nil, status.Errorf(codes.NotFound, "Could not find validator index for public key %#x", pubkeyBytes) + // We continue the loop if one validator in the request is not found. + res = append(res, ðpb.ValidatorBalances_Balance{ + Status: "UNKNOWN", + }) + continue } filtered[index] = true diff --git a/deps.bzl b/deps.bzl index fbffd6486228..7601b04da036 100644 --- a/deps.bzl +++ b/deps.bzl @@ -2552,8 +2552,8 @@ def prysm_deps(): name = "com_github_prysmaticlabs_ethereumapis", build_file_generation = "off", importpath = "github.com/prysmaticlabs/ethereumapis", - sum = "h1:mUAxIu2Zh+9GK+RB1Sc+T9uSveQu32SFO+d9/rOd05M=", - version = "v0.0.0-20200909190233-a9190508298e", + sum = "h1:zM15JmyZ5v6B3xqVsYe34a8IXAoklYJo6glJ5V0kXyU=", + version = "v0.0.0-20201002012750-b612cbd9e525", ) go_repository( name = "com_github_prysmaticlabs_go_bitfield", diff --git a/go.mod b/go.mod index 331e4e414288..68013f3b3c39 100644 --- a/go.mod +++ b/go.mod @@ -87,7 +87,7 @@ require ( github.com/prometheus/client_golang v1.7.1 github.com/prometheus/tsdb v0.10.0 // indirect github.com/protolambda/zssz v0.1.5 - github.com/prysmaticlabs/ethereumapis v0.0.0-20200909190233-a9190508298e + github.com/prysmaticlabs/ethereumapis v0.0.0-20201002012750-b612cbd9e525 github.com/prysmaticlabs/go-bitfield v0.0.0-20200618145306-2ae0807bef65 github.com/prysmaticlabs/go-ssz v0.0.0-20200612203617-6d5c9aa213ae github.com/prysmaticlabs/prombbolt v0.0.0-20200324184628-09789ef63796 diff --git a/go.sum b/go.sum index 0a49fcbc1d26..486f5060d36c 100644 --- a/go.sum +++ b/go.sum @@ -996,8 +996,8 @@ github.com/protolambda/zssz v0.1.5 h1:7fjJjissZIIaa2QcvmhS/pZISMX21zVITt49sW1oue github.com/protolambda/zssz v0.1.5/go.mod h1:a4iwOX5FE7/JkKA+J/PH0Mjo9oXftN6P8NZyL28gpag= github.com/prysmaticlabs/bazel-go-ethereum v0.0.0-20200922100503-3794d0d7ca25 h1:yoOj4FD6uNdWDjgZqlKGxmUYnR6tI9zN1NrE8tJ3/xE= github.com/prysmaticlabs/bazel-go-ethereum v0.0.0-20200922100503-3794d0d7ca25/go.mod h1:FQjK3ZwD8C5DYn7ukTmFee36rq1dOMESiUfXr5RUc1w= -github.com/prysmaticlabs/ethereumapis v0.0.0-20200909190233-a9190508298e h1:mUAxIu2Zh+9GK+RB1Sc+T9uSveQu32SFO+d9/rOd05M= -github.com/prysmaticlabs/ethereumapis v0.0.0-20200909190233-a9190508298e/go.mod h1:k7b2dxy6RppCG6kmOJkNOXzRpEoTdsPygc2aQhsUsZk= +github.com/prysmaticlabs/ethereumapis v0.0.0-20201002012750-b612cbd9e525 h1:zM15JmyZ5v6B3xqVsYe34a8IXAoklYJo6glJ5V0kXyU= +github.com/prysmaticlabs/ethereumapis v0.0.0-20201002012750-b612cbd9e525/go.mod h1:k7b2dxy6RppCG6kmOJkNOXzRpEoTdsPygc2aQhsUsZk= github.com/prysmaticlabs/go-bitfield v0.0.0-20191017011753-53b773adde52/go.mod h1:hCwmef+4qXWjv0jLDbQdWnL0Ol7cS7/lCSS26WR+u6s= github.com/prysmaticlabs/go-bitfield v0.0.0-20200322041314-62c2aee71669 h1:cX6YRZnZ9sgMqM5U14llxUiXVNJ3u07Res1IIjTOgtI= github.com/prysmaticlabs/go-bitfield v0.0.0-20200322041314-62c2aee71669/go.mod h1:hCwmef+4qXWjv0jLDbQdWnL0Ol7cS7/lCSS26WR+u6s=