diff --git a/WORKSPACE b/WORKSPACE index 69c3964918..f8f2bc57fa 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -60,10 +60,10 @@ bazel_skylib_workspace() http_archive( name = "bazel_gazelle", - sha256 = "222e49f034ca7a1d1231422cdb67066b885819885c356673cb1f72f748a3c9d4", + sha256 = "62ca106be173579c0a167deb23358fdfe71ffa1e4cfdddf5582af26520f1c66f", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz", - "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz", + "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz", ], ) @@ -89,10 +89,10 @@ http_archive( # nogo check fails for certain third_party dependencies. "//third_party:io_bazel_rules_go.patch", ], - sha256 = "52d0a57ea12139d727883c2fef03597970b89f2cc2a05722c42d1d7d41ec065b", + sha256 = "7c10271940c6bce577d51a075ae77728964db285dac0a46614a7934dc34303e6", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.24.13/rules_go-v0.24.13.tar.gz", - "https://github.com/bazelbuild/rules_go/releases/download/v0.24.13/rules_go-v0.24.13.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.26.0/rules_go-v0.26.0.tar.gz", + "https://github.com/bazelbuild/rules_go/releases/download/v0.26.0/rules_go-v0.26.0.tar.gz", ], ) diff --git a/beacon-chain/core/state/stateutils/BUILD.bazel b/beacon-chain/core/state/stateutils/BUILD.bazel index 2b2a61b4fd..4beb3e02b8 100644 --- a/beacon-chain/core/state/stateutils/BUILD.bazel +++ b/beacon-chain/core/state/stateutils/BUILD.bazel @@ -20,8 +20,8 @@ go_test( name = "go_default_test", size = "small", srcs = ["validator_index_map_test.go"], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//beacon-chain/state:go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//shared/bytesutil:go_default_library", diff --git a/beacon-chain/p2p/peers/peerdata/BUILD.bazel b/beacon-chain/p2p/peers/peerdata/BUILD.bazel index 8629dd6b92..d1ec2859c5 100644 --- a/beacon-chain/p2p/peers/peerdata/BUILD.bazel +++ b/beacon-chain/p2p/peers/peerdata/BUILD.bazel @@ -20,8 +20,8 @@ go_library( go_test( name = "go_default_test", srcs = ["store_test.go"], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", "@com_github_libp2p_go_libp2p_core//peer:go_default_library", diff --git a/beacon-chain/p2p/peers/scorers/BUILD.bazel b/beacon-chain/p2p/peers/scorers/BUILD.bazel index 662dfb7483..a7caf62b5e 100644 --- a/beacon-chain/p2p/peers/scorers/BUILD.bazel +++ b/beacon-chain/p2p/peers/scorers/BUILD.bazel @@ -36,8 +36,8 @@ go_test( "scorers_test.go", "service_test.go", ], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//beacon-chain/p2p/peers:go_default_library", "//beacon-chain/p2p/peers/peerdata:go_default_library", "//beacon-chain/p2p/types:go_default_library", diff --git a/beacon-chain/rpc/debug/BUILD.bazel b/beacon-chain/rpc/debug/BUILD.bazel index 9b4a878b1c..fc9b270867 100644 --- a/beacon-chain/rpc/debug/BUILD.bazel +++ b/beacon-chain/rpc/debug/BUILD.bazel @@ -25,13 +25,13 @@ go_library( "//shared/bytesutil:go_default_library", "//shared/params:go_default_library", "@com_github_ethereum_go_ethereum//log:go_default_library", - "@com_github_gogo_protobuf//types:go_default_library", "@com_github_ipfs_go_log_v2//:go_default_library", "@com_github_libp2p_go_libp2p_core//network:go_default_library", "@com_github_libp2p_go_libp2p_core//peer:go_default_library", "@com_github_prysmaticlabs_eth2_types//:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", "@org_golang_google_grpc//codes:go_default_library", "@org_golang_google_grpc//status:go_default_library", ], @@ -58,9 +58,9 @@ go_test( "//shared/testutil:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", - "@com_github_gogo_protobuf//types:go_default_library", "@com_github_prysmaticlabs_eth2_types//:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_prysmaticlabs_go_bitfield//:go_default_library", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", ], ) diff --git a/beacon-chain/rpc/debug/forkchoice.go b/beacon-chain/rpc/debug/forkchoice.go index a33a37b9cb..ff4378cb6f 100644 --- a/beacon-chain/rpc/debug/forkchoice.go +++ b/beacon-chain/rpc/debug/forkchoice.go @@ -4,12 +4,12 @@ import ( "context" "encoding/hex" - ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" pbrpc "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" ) // GetProtoArrayForkChoice returns proto array fork choice store. -func (ds *Server) GetProtoArrayForkChoice(_ context.Context, _ *ptypes.Empty) (*pbrpc.ProtoArrayForkChoiceResponse, error) { +func (ds *Server) GetProtoArrayForkChoice(_ context.Context, _ *empty.Empty) (*pbrpc.ProtoArrayForkChoiceResponse, error) { store := ds.HeadFetcher.ProtoArrayStore() nodes := store.Nodes() diff --git a/beacon-chain/rpc/debug/forkchoice_test.go b/beacon-chain/rpc/debug/forkchoice_test.go index 6a2155e9e0..ca410ae0a1 100644 --- a/beacon-chain/rpc/debug/forkchoice_test.go +++ b/beacon-chain/rpc/debug/forkchoice_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" mock "github.com/prysmaticlabs/prysm/beacon-chain/blockchain/testing" "github.com/prysmaticlabs/prysm/beacon-chain/forkchoice/protoarray" "github.com/prysmaticlabs/prysm/shared/testutil/assert" @@ -14,7 +14,7 @@ import ( func TestServer_GetForkChoice(t *testing.T) { store := &protoarray.Store{} bs := &Server{HeadFetcher: &mock.ChainService{ForkChoiceStore: store}} - res, err := bs.GetProtoArrayForkChoice(context.Background(), &ptypes.Empty{}) + res, err := bs.GetProtoArrayForkChoice(context.Background(), &empty.Empty{}) require.NoError(t, err) assert.Equal(t, store.PruneThreshold(), res.PruneThreshold, "Did not get wanted prune threshold") assert.Equal(t, store.JustifiedEpoch(), res.JustifiedEpoch, "Did not get wanted justified epoch") diff --git a/beacon-chain/rpc/debug/p2p.go b/beacon-chain/rpc/debug/p2p.go index c61bfa9f6e..8b18f9d527 100644 --- a/beacon-chain/rpc/debug/p2p.go +++ b/beacon-chain/rpc/debug/p2p.go @@ -3,7 +3,7 @@ package debug import ( "context" - "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/peer" ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" @@ -24,7 +24,7 @@ func (ds *Server) GetPeer(_ context.Context, peerReq *ethpb.PeerRequest) (*pbrpc // ListPeers returns all peers known to the host node, irregardless of if they are connected/ // disconnected. -func (ds *Server) ListPeers(_ context.Context, _ *types.Empty) (*pbrpc.DebugPeerResponses, error) { +func (ds *Server) ListPeers(_ context.Context, _ *empty.Empty) (*pbrpc.DebugPeerResponses, error) { var responses []*pbrpc.DebugPeerResponse for _, pid := range ds.PeersFetcher.Peers().All() { resp, err := ds.getPeer(pid) diff --git a/beacon-chain/rpc/debug/p2p_test.go b/beacon-chain/rpc/debug/p2p_test.go index 808ad8e683..290e99f048 100644 --- a/beacon-chain/rpc/debug/p2p_test.go +++ b/beacon-chain/rpc/debug/p2p_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" mockP2p "github.com/prysmaticlabs/prysm/beacon-chain/p2p/testing" "github.com/prysmaticlabs/prysm/shared/testutil/assert" @@ -36,7 +36,7 @@ func TestDebugServer_ListPeers(t *testing.T) { PeerManager: &mockP2p.MockPeerManager{BHost: mP2P.BHost}, } - res, err := ds.ListPeers(context.Background(), &ptypes.Empty{}) + res, err := ds.ListPeers(context.Background(), &empty.Empty{}) require.NoError(t, err) assert.Equal(t, 2, len(res.Responses)) diff --git a/beacon-chain/rpc/debug/server.go b/beacon-chain/rpc/debug/server.go index 62fde76e46..4667248ab2 100644 --- a/beacon-chain/rpc/debug/server.go +++ b/beacon-chain/rpc/debug/server.go @@ -8,7 +8,7 @@ import ( "os" gethlog "github.com/ethereum/go-ethereum/log" - ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" golog "github.com/ipfs/go-log/v2" "github.com/prysmaticlabs/prysm/beacon-chain/blockchain" "github.com/prysmaticlabs/prysm/beacon-chain/db" @@ -34,7 +34,7 @@ type Server struct { // SetLoggingLevel of a beacon node according to a request type, // either INFO, DEBUG, or TRACE. -func (ds *Server) SetLoggingLevel(_ context.Context, req *pbrpc.LoggingLevelRequest) (*ptypes.Empty, error) { +func (ds *Server) SetLoggingLevel(_ context.Context, req *pbrpc.LoggingLevelRequest) (*empty.Empty, error) { var verbosity string switch req.Level { case pbrpc.LoggingLevelRequest_INFO: @@ -59,5 +59,5 @@ func (ds *Server) SetLoggingLevel(_ context.Context, req *pbrpc.LoggingLevelRequ glogger.Verbosity(gethlog.LvlTrace) gethlog.Root().SetHandler(glogger) } - return &ptypes.Empty{}, nil + return &empty.Empty{}, nil } diff --git a/beacon-chain/rpc/node/BUILD.bazel b/beacon-chain/rpc/node/BUILD.bazel index 89d65683a1..9913410ef8 100644 --- a/beacon-chain/rpc/node/BUILD.bazel +++ b/beacon-chain/rpc/node/BUILD.bazel @@ -18,6 +18,7 @@ go_library( "@com_github_libp2p_go_libp2p_core//network:go_default_library", "@com_github_libp2p_go_libp2p_core//peer:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//codes:go_default_library", "@org_golang_google_grpc//status:go_default_library", diff --git a/beacon-chain/rpc/node/server.go b/beacon-chain/rpc/node/server.go index 86544978af..ec44b1b7be 100644 --- a/beacon-chain/rpc/node/server.go +++ b/beacon-chain/rpc/node/server.go @@ -10,6 +10,7 @@ import ( "time" ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/peer" ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" @@ -222,7 +223,7 @@ func (ns *Server) ListPeers(ctx context.Context, _ *ptypes.Empty) (*ethpb.Peers, } // StreamBeaconLogs from the beacon node via a gRPC server-side stream. -func (ns *Server) StreamBeaconLogs(_ *ptypes.Empty, stream pb.Health_StreamBeaconLogsServer) error { +func (ns *Server) StreamBeaconLogs(_ *empty.Empty, stream pb.Health_StreamBeaconLogsServer) error { ch := make(chan []byte, ns.StreamLogsBufferSize) sub := ns.LogsStreamer.LogsFeed().Subscribe(ch) defer func() { diff --git a/contracts/deposit-contract/BUILD.bazel b/contracts/deposit-contract/BUILD.bazel index 831b3922eb..95857bc4e0 100644 --- a/contracts/deposit-contract/BUILD.bazel +++ b/contracts/deposit-contract/BUILD.bazel @@ -31,8 +31,8 @@ go_test( "depositContract_test.go", "deposit_tree_test.go", ], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//shared/interop:go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", diff --git a/deps.bzl b/deps.bzl index d58f9aca4e..af098602ca 100644 --- a/deps.bzl +++ b/deps.bzl @@ -432,8 +432,8 @@ def prysm_deps(): go_repository( name = "com_github_cncf_udpa_go", importpath = "github.com/cncf/udpa/go", - sum = "h1:WBZRG4aNOuI15bLRrCgN8fCq8E5Xuty6jGbmSNEvSsU=", - version = "v0.0.0-20191209042840-269d4d468f6f", + sum = "h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M=", + version = "v0.0.0-20201120205902-5459f2c99403", ) go_repository( name = "com_github_cockroachdb_datadriven", @@ -684,8 +684,8 @@ def prysm_deps(): go_repository( name = "com_github_envoyproxy_go_control_plane", importpath = "github.com/envoyproxy/go-control-plane", - sum = "h1:rEvIZUSZ3fx39WIi3JkQqQBitGwpELBIYWeBVh6wn+E=", - version = "v0.9.4", + sum = "h1:EmNYJhPYy0pOFjCx2PrgtaBXmee0iUX9hLlxE1xHOJE=", + version = "v0.9.9-0.20201210154907-fd9021fe5dad", ) go_repository( name = "com_github_envoyproxy_protoc_gen_validate", @@ -698,7 +698,7 @@ def prysm_deps(): # Note: The keep directives help gazelle leave this alone. go_repository( name = "com_github_ethereum_go_ethereum", - commit = "71d15f72c132cfacad9df510f722e892c5263a1d", # keep + commit = "b9c0d847ae7b07a9a86b81aebacf986c8d310ae7", # keep importpath = "github.com/ethereum/go-ethereum", # keep # Note: go-ethereum is not bazel-friendly with regards to cgo. We have a # a fork that has resolved these issues by disabling HID/USB support and @@ -962,6 +962,8 @@ def prysm_deps(): go_repository( name = "com_github_golang_protobuf", importpath = "github.com/golang/protobuf", + patch_args = ["-p1"], + patches = ["@io_bazel_rules_go//third_party:com_github_golang_protobuf-extras.patch"], sum = "h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=", version = "v1.4.3", ) @@ -1119,8 +1121,8 @@ def prysm_deps(): go_repository( name = "com_github_grpc_ecosystem_grpc_gateway", importpath = "github.com/grpc-ecosystem/grpc-gateway", - sum = "h1:8ERzHx8aj1Sc47mu9n/AksaKCSWrMchFtkdrS4BIj5o=", - version = "v1.14.6", + sum = "h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=", + version = "v1.16.0", ) go_repository( name = "com_github_gxed_hashland_keccakpg", @@ -2577,8 +2579,8 @@ def prysm_deps(): name = "com_github_prysmaticlabs_ethereumapis", build_file_generation = "off", importpath = "github.com/prysmaticlabs/ethereumapis", - sum = "h1:WbNiB9+NFslsXtM8mjOEjcsSbedl+06eGBkW7zvSynE=", - version = "v0.0.0-20210303155523-663cc605c7d9", + sum = "h1:6qCWUpx87Ahd+GqthQz4k1wLLI2K5yJQ7kwvrs1+zzg=", + version = "v0.0.0-20210311175904-cf9f64632dd4", ) go_repository( name = "com_github_prysmaticlabs_go_bitfield", @@ -3507,10 +3509,10 @@ def prysm_deps(): go_repository( name = "org_golang_google_grpc", - build_file_proto_mode = "disable_global", + build_file_proto_mode = "disable", importpath = "google.golang.org/grpc", - sum = "h1:DGeFlSan2f+WEtCERJ4J9GJWk15TxUi8QGagfI87Xyc=", - version = "v1.33.1", + sum = "h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As=", + version = "v1.36.0", ) go_repository( name = "org_golang_google_protobuf", diff --git a/go.mod b/go.mod index f7879505b6..5ddcbf714c 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( github.com/graph-gophers/graphql-go v0.0.0-20200309224638-dae41bde9ef9 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/grpc-ecosystem/grpc-gateway v1.14.6 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/golang-lru v0.5.4 github.com/herumi/bls-eth-go-binary v0.0.0-20210130185500-57372fb27371 github.com/ianlancetaylor/cgosymbolizer v0.0.0-20200424224625-be1b05b0b279 @@ -84,7 +84,7 @@ require ( github.com/prometheus/procfs v0.3.0 // indirect github.com/prometheus/tsdb v0.10.0 // indirect github.com/prysmaticlabs/eth2-types v0.0.0-20210219172114-1da477c09a06 - github.com/prysmaticlabs/ethereumapis v0.0.0-20210303155523-663cc605c7d9 + github.com/prysmaticlabs/ethereumapis v0.0.0-20210311175904-cf9f64632dd4 github.com/prysmaticlabs/go-bitfield v0.0.0-20210202205921-7fcea7c45dc8 github.com/prysmaticlabs/prombbolt v0.0.0-20210126082820-9b7adba6db7c github.com/rs/cors v1.7.0 @@ -113,7 +113,7 @@ require ( google.golang.org/api v0.34.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20201026171402-d4b8fe4fd877 - google.golang.org/grpc v1.33.1 + google.golang.org/grpc v1.36.0 google.golang.org/protobuf v1.25.0 gopkg.in/confluentinc/confluent-kafka-go.v1 v1.4.2 gopkg.in/d4l3k/messagediff.v1 v1.2.1 @@ -126,6 +126,6 @@ require ( k8s.io/utils v0.0.0-20200520001619-278ece378a50 // indirect ) -replace github.com/ethereum/go-ethereum => github.com/prysmaticlabs/bazel-go-ethereum v0.0.0-20210222122116-71d15f72c132 +replace github.com/ethereum/go-ethereum => github.com/prysmaticlabs/bazel-go-ethereum v0.0.0-20210311182818-b9c0d847ae7b replace github.com/json-iterator/go => github.com/prestonvanloon/go v1.1.7-0.20190722034630-4f2e55fcf87b diff --git a/go.sum b/go.sum index 06f26d38c9..25ad23e5a9 100644 --- a/go.sum +++ b/go.sum @@ -84,7 +84,6 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -158,6 +157,7 @@ github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/confluentinc/confluent-kafka-go v1.4.2 h1:13EK9RTujF7lVkvHQ5Hbu6bM+Yfrq8L0MkJNnjHSd4Q= @@ -231,6 +231,7 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -407,9 +408,8 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaD github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.13.0/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= -github.com/grpc-ecosystem/grpc-gateway v1.14.6 h1:8ERzHx8aj1Sc47mu9n/AksaKCSWrMchFtkdrS4BIj5o= -github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= @@ -1021,13 +1021,13 @@ github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= -github.com/prysmaticlabs/bazel-go-ethereum v0.0.0-20210222122116-71d15f72c132 h1:UB0glz/7DDQQvx8uh6CEpZ++dYa6G6WzjQe6Ev3PI2g= -github.com/prysmaticlabs/bazel-go-ethereum v0.0.0-20210222122116-71d15f72c132/go.mod h1:JIfVb6esrqALTExdz9hRYvrP0xBDf6wCncIu1hNwHpM= +github.com/prysmaticlabs/bazel-go-ethereum v0.0.0-20210311182818-b9c0d847ae7b h1:ITTDvJwlt6TUF5Kfl1hmHr7a4PCV+joQgFDWiBJK4Q8= +github.com/prysmaticlabs/bazel-go-ethereum v0.0.0-20210311182818-b9c0d847ae7b/go.mod h1:JIfVb6esrqALTExdz9hRYvrP0xBDf6wCncIu1hNwHpM= github.com/prysmaticlabs/eth2-types v0.0.0-20210127031309-22cbe426eba6/go.mod h1:kOmQ/zdobQf7HUohDTifDNFEZfNaSCIY5fkONPL+dWU= github.com/prysmaticlabs/eth2-types v0.0.0-20210219172114-1da477c09a06 h1:b4WxLSz1KzkEdF/DPcog9gIKN9d9YAFgbZO1hqjNrW0= github.com/prysmaticlabs/eth2-types v0.0.0-20210219172114-1da477c09a06/go.mod h1:kOmQ/zdobQf7HUohDTifDNFEZfNaSCIY5fkONPL+dWU= -github.com/prysmaticlabs/ethereumapis v0.0.0-20210303155523-663cc605c7d9 h1:WbNiB9+NFslsXtM8mjOEjcsSbedl+06eGBkW7zvSynE= -github.com/prysmaticlabs/ethereumapis v0.0.0-20210303155523-663cc605c7d9/go.mod h1:YS3iOCGE+iVDE007GHWtj+UoPK9hyYA7Fo4mSDNTtiY= +github.com/prysmaticlabs/ethereumapis v0.0.0-20210311175904-cf9f64632dd4 h1:6qCWUpx87Ahd+GqthQz4k1wLLI2K5yJQ7kwvrs1+zzg= +github.com/prysmaticlabs/ethereumapis v0.0.0-20210311175904-cf9f64632dd4/go.mod h1:7PScMYRV0tzumbo5iDa/iVfj42Pw1qYxBe9daF6OMsQ= github.com/prysmaticlabs/go-bitfield v0.0.0-20200322041314-62c2aee71669/go.mod h1:hCwmef+4qXWjv0jLDbQdWnL0Ol7cS7/lCSS26WR+u6s= github.com/prysmaticlabs/go-bitfield v0.0.0-20210202205921-7fcea7c45dc8 h1:18+Qqobq3HAUY0hgIhPGSqmLFnaLLocemmU7+Sj2aYQ= github.com/prysmaticlabs/go-bitfield v0.0.0-20210202205921-7fcea7c45dc8/go.mod h1:hCwmef+4qXWjv0jLDbQdWnL0Ol7cS7/lCSS26WR+u6s= @@ -1304,7 +1304,6 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1546,7 +1545,6 @@ google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -1586,7 +1584,6 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -1597,8 +1594,9 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1 h1:DGeFlSan2f+WEtCERJ4J9GJWk15TxUi8QGagfI87Xyc= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/proto/beacon/rpc/v1/BUILD.bazel b/proto/beacon/rpc/v1/BUILD.bazel index 72ce5abc08..58a62b134f 100644 --- a/proto/beacon/rpc/v1/BUILD.bazel +++ b/proto/beacon/rpc/v1/BUILD.bazel @@ -15,12 +15,12 @@ go_proto_library( visibility = ["//visibility:public"], deps = [ "//proto/beacon/p2p/v1:go_default_library", + "@com_github_gogo_protobuf//gogoproto:go_default_library", "@com_github_prysmaticlabs_eth2_types//:go_default_library", - "@com_github_golang_protobuf//descriptor:go_default_library", - "@com_github_golang_protobuf//ptypes/empty:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@go_googleapis//google/api:annotations_go_proto", - "@com_github_gogo_protobuf//gogoproto:go_default_library", + "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", ], ) @@ -33,9 +33,9 @@ go_proto_library( deps = [ "//proto/beacon/p2p/v1:go_default_library", "@com_github_prysmaticlabs_eth2_types//:go_default_library", - "@com_github_golang_protobuf//ptypes/empty:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@go_googleapis//google/api:annotations_go_proto", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", ], ) @@ -48,7 +48,10 @@ go_library( proto_library( name = "v1_proto", - srcs = ["debug.proto", "health.proto"], + srcs = [ + "debug.proto", + "health.proto", + ], visibility = ["//visibility:public"], deps = [ "//proto/beacon/p2p/v1:v1_proto", diff --git a/proto/beacon/rpc/v1/debug.pb.go b/proto/beacon/rpc/v1/debug.pb.go index 1fcb1ce7da..325e893954 100755 --- a/proto/beacon/rpc/v1/debug.pb.go +++ b/proto/beacon/rpc/v1/debug.pb.go @@ -13,7 +13,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" + empty "github.com/golang/protobuf/ptypes/empty" github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types" v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1" @@ -1125,9 +1125,9 @@ const _ = grpc.SupportPackageIsVersion4 type DebugClient interface { GetBeaconState(ctx context.Context, in *BeaconStateRequest, opts ...grpc.CallOption) (*SSZResponse, error) GetBlock(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*SSZResponse, error) - SetLoggingLevel(ctx context.Context, in *LoggingLevelRequest, opts ...grpc.CallOption) (*types.Empty, error) - GetProtoArrayForkChoice(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ProtoArrayForkChoiceResponse, error) - ListPeers(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*DebugPeerResponses, error) + SetLoggingLevel(ctx context.Context, in *LoggingLevelRequest, opts ...grpc.CallOption) (*empty.Empty, error) + GetProtoArrayForkChoice(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ProtoArrayForkChoiceResponse, error) + ListPeers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*DebugPeerResponses, error) GetPeer(ctx context.Context, in *v1alpha1.PeerRequest, opts ...grpc.CallOption) (*DebugPeerResponse, error) GetInclusionSlot(ctx context.Context, in *InclusionSlotRequest, opts ...grpc.CallOption) (*InclusionSlotResponse, error) } @@ -1158,8 +1158,8 @@ func (c *debugClient) GetBlock(ctx context.Context, in *BlockRequest, opts ...gr return out, nil } -func (c *debugClient) SetLoggingLevel(ctx context.Context, in *LoggingLevelRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) +func (c *debugClient) SetLoggingLevel(ctx context.Context, in *LoggingLevelRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) err := c.cc.Invoke(ctx, "/ethereum.beacon.rpc.v1.Debug/SetLoggingLevel", in, out, opts...) if err != nil { return nil, err @@ -1167,7 +1167,7 @@ func (c *debugClient) SetLoggingLevel(ctx context.Context, in *LoggingLevelReque return out, nil } -func (c *debugClient) GetProtoArrayForkChoice(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ProtoArrayForkChoiceResponse, error) { +func (c *debugClient) GetProtoArrayForkChoice(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ProtoArrayForkChoiceResponse, error) { out := new(ProtoArrayForkChoiceResponse) err := c.cc.Invoke(ctx, "/ethereum.beacon.rpc.v1.Debug/GetProtoArrayForkChoice", in, out, opts...) if err != nil { @@ -1176,7 +1176,7 @@ func (c *debugClient) GetProtoArrayForkChoice(ctx context.Context, in *types.Emp return out, nil } -func (c *debugClient) ListPeers(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*DebugPeerResponses, error) { +func (c *debugClient) ListPeers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*DebugPeerResponses, error) { out := new(DebugPeerResponses) err := c.cc.Invoke(ctx, "/ethereum.beacon.rpc.v1.Debug/ListPeers", in, out, opts...) if err != nil { @@ -1207,9 +1207,9 @@ func (c *debugClient) GetInclusionSlot(ctx context.Context, in *InclusionSlotReq type DebugServer interface { GetBeaconState(context.Context, *BeaconStateRequest) (*SSZResponse, error) GetBlock(context.Context, *BlockRequest) (*SSZResponse, error) - SetLoggingLevel(context.Context, *LoggingLevelRequest) (*types.Empty, error) - GetProtoArrayForkChoice(context.Context, *types.Empty) (*ProtoArrayForkChoiceResponse, error) - ListPeers(context.Context, *types.Empty) (*DebugPeerResponses, error) + SetLoggingLevel(context.Context, *LoggingLevelRequest) (*empty.Empty, error) + GetProtoArrayForkChoice(context.Context, *empty.Empty) (*ProtoArrayForkChoiceResponse, error) + ListPeers(context.Context, *empty.Empty) (*DebugPeerResponses, error) GetPeer(context.Context, *v1alpha1.PeerRequest) (*DebugPeerResponse, error) GetInclusionSlot(context.Context, *InclusionSlotRequest) (*InclusionSlotResponse, error) } @@ -1224,13 +1224,13 @@ func (*UnimplementedDebugServer) GetBeaconState(ctx context.Context, req *Beacon func (*UnimplementedDebugServer) GetBlock(ctx context.Context, req *BlockRequest) (*SSZResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") } -func (*UnimplementedDebugServer) SetLoggingLevel(ctx context.Context, req *LoggingLevelRequest) (*types.Empty, error) { +func (*UnimplementedDebugServer) SetLoggingLevel(ctx context.Context, req *LoggingLevelRequest) (*empty.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method SetLoggingLevel not implemented") } -func (*UnimplementedDebugServer) GetProtoArrayForkChoice(ctx context.Context, req *types.Empty) (*ProtoArrayForkChoiceResponse, error) { +func (*UnimplementedDebugServer) GetProtoArrayForkChoice(ctx context.Context, req *empty.Empty) (*ProtoArrayForkChoiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetProtoArrayForkChoice not implemented") } -func (*UnimplementedDebugServer) ListPeers(ctx context.Context, req *types.Empty) (*DebugPeerResponses, error) { +func (*UnimplementedDebugServer) ListPeers(ctx context.Context, req *empty.Empty) (*DebugPeerResponses, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPeers not implemented") } func (*UnimplementedDebugServer) GetPeer(ctx context.Context, req *v1alpha1.PeerRequest) (*DebugPeerResponse, error) { @@ -1299,7 +1299,7 @@ func _Debug_SetLoggingLevel_Handler(srv interface{}, ctx context.Context, dec fu } func _Debug_GetProtoArrayForkChoice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -1311,13 +1311,13 @@ func _Debug_GetProtoArrayForkChoice_Handler(srv interface{}, ctx context.Context FullMethod: "/ethereum.beacon.rpc.v1.Debug/GetProtoArrayForkChoice", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DebugServer).GetProtoArrayForkChoice(ctx, req.(*types.Empty)) + return srv.(DebugServer).GetProtoArrayForkChoice(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } func _Debug_ListPeers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -1329,7 +1329,7 @@ func _Debug_ListPeers_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/ethereum.beacon.rpc.v1.Debug/ListPeers", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DebugServer).ListPeers(ctx, req.(*types.Empty)) + return srv.(DebugServer).ListPeers(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } diff --git a/proto/beacon/rpc/v1/health.pb.go b/proto/beacon/rpc/v1/health.pb.go index 4c95f8a5b7..05716ac235 100755 --- a/proto/beacon/rpc/v1/health.pb.go +++ b/proto/beacon/rpc/v1/health.pb.go @@ -11,7 +11,7 @@ import ( math_bits "math/bits" proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" + empty "github.com/golang/protobuf/ptypes/empty" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -114,7 +114,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type HealthClient interface { - StreamBeaconLogs(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Health_StreamBeaconLogsClient, error) + StreamBeaconLogs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Health_StreamBeaconLogsClient, error) } type healthClient struct { @@ -125,7 +125,7 @@ func NewHealthClient(cc *grpc.ClientConn) HealthClient { return &healthClient{cc} } -func (c *healthClient) StreamBeaconLogs(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Health_StreamBeaconLogsClient, error) { +func (c *healthClient) StreamBeaconLogs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Health_StreamBeaconLogsClient, error) { stream, err := c.cc.NewStream(ctx, &_Health_serviceDesc.Streams[0], "/ethereum.beacon.rpc.v1.Health/StreamBeaconLogs", opts...) if err != nil { return nil, err @@ -159,14 +159,14 @@ func (x *healthStreamBeaconLogsClient) Recv() (*LogsResponse, error) { // HealthServer is the server API for Health service. type HealthServer interface { - StreamBeaconLogs(*types.Empty, Health_StreamBeaconLogsServer) error + StreamBeaconLogs(*empty.Empty, Health_StreamBeaconLogsServer) error } // UnimplementedHealthServer can be embedded to have forward compatible implementations. type UnimplementedHealthServer struct { } -func (*UnimplementedHealthServer) StreamBeaconLogs(req *types.Empty, srv Health_StreamBeaconLogsServer) error { +func (*UnimplementedHealthServer) StreamBeaconLogs(req *empty.Empty, srv Health_StreamBeaconLogsServer) error { return status.Errorf(codes.Unimplemented, "method StreamBeaconLogs not implemented") } @@ -175,7 +175,7 @@ func RegisterHealthServer(s *grpc.Server, srv HealthServer) { } func _Health_StreamBeaconLogs_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(types.Empty) + m := new(empty.Empty) if err := stream.RecvMsg(m); err != nil { return err } diff --git a/proto/beacon/rpc/v1_gateway/debug.pb.gw.go b/proto/beacon/rpc/v1_gateway/debug.pb.gw.go index 115d2aec40..22b6dec317 100755 --- a/proto/beacon/rpc/v1_gateway/debug.pb.gw.go +++ b/proto/beacon/rpc/v1_gateway/debug.pb.gw.go @@ -22,6 +22,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -32,6 +33,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join var ( filter_Debug_GetBeaconState_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} @@ -252,11 +254,14 @@ func local_request_Debug_GetInclusionSlot_0(ctx context.Context, marshaler runti // RegisterDebugHandlerServer registers the http handlers for service Debug to "mux". // UnaryRPC :call DebugServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDebugHandlerFromEndpoint instead. func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DebugServer) error { mux.Handle("GET", pattern_Debug_GetBeaconState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -264,6 +269,7 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Debug_GetBeaconState_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -277,6 +283,8 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Debug_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -284,6 +292,7 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Debug_GetBlock_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -297,6 +306,8 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("POST", pattern_Debug_SetLoggingLevel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -304,6 +315,7 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Debug_SetLoggingLevel_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -317,6 +329,8 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Debug_GetProtoArrayForkChoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -324,6 +338,7 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Debug_GetProtoArrayForkChoice_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -337,6 +352,8 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Debug_ListPeers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -344,6 +361,7 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Debug_ListPeers_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -357,6 +375,8 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Debug_GetPeer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -364,6 +384,7 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Debug_GetPeer_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -377,6 +398,8 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Debug_GetInclusionSlot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -384,6 +407,7 @@ func RegisterDebugHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Debug_GetInclusionSlot_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/proto/beacon/rpc/v1_gateway/health.pb.gw.go b/proto/beacon/rpc/v1_gateway/health.pb.gw.go index 4e8b9a6874..675f665de7 100755 --- a/proto/beacon/rpc/v1_gateway/health.pb.gw.go +++ b/proto/beacon/rpc/v1_gateway/health.pb.gw.go @@ -21,6 +21,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,6 +32,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Health_StreamBeaconLogs_0(ctx context.Context, marshaler runtime.Marshaler, client HealthClient, req *http.Request, pathParams map[string]string) (Health_StreamBeaconLogsClient, runtime.ServerMetadata, error) { var protoReq empty.Empty @@ -52,6 +54,7 @@ func request_Health_StreamBeaconLogs_0(ctx context.Context, marshaler runtime.Ma // RegisterHealthHandlerServer registers the http handlers for service Health to "mux". // UnaryRPC :call HealthServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHealthHandlerFromEndpoint instead. func RegisterHealthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthServer) error { mux.Handle("GET", pattern_Health_StreamBeaconLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/proto/validator/accounts/v2/BUILD.bazel b/proto/validator/accounts/v2/BUILD.bazel index 50c413dfc7..ee2a01a30f 100644 --- a/proto/validator/accounts/v2/BUILD.bazel +++ b/proto/validator/accounts/v2/BUILD.bazel @@ -31,8 +31,10 @@ go_proto_library( deps = [ "//proto/beacon/rpc/v1:go_default_library", "@com_github_prysmaticlabs_eth2_types//:go_default_library", - "@com_github_golang_protobuf//descriptor:go_default_library", - "@com_github_golang_protobuf//ptypes/empty:go_default_library", + "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", + #"@com_github_golang_protobuf//descriptor:go_default_library", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", + #"@com_github_golang_protobuf//ptypes/empty:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@go_googleapis//google/api:annotations_go_proto", "@com_github_gogo_protobuf//gogoproto:go_default_library", diff --git a/proto/validator/accounts/v2/keymanager.pb.go b/proto/validator/accounts/v2/keymanager.pb.go index 09c5c83ae5..f2e81c8bc8 100755 --- a/proto/validator/accounts/v2/keymanager.pb.go +++ b/proto/validator/accounts/v2/keymanager.pb.go @@ -12,7 +12,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" + empty "github.com/golang/protobuf/ptypes/empty" github_com_prysmaticlabs_eth2_types "github.com/prysmaticlabs/eth2-types" v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -403,7 +403,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type RemoteSignerClient interface { - ListValidatingPublicKeys(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ListPublicKeysResponse, error) + ListValidatingPublicKeys(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListPublicKeysResponse, error) Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) } @@ -415,7 +415,7 @@ func NewRemoteSignerClient(cc *grpc.ClientConn) RemoteSignerClient { return &remoteSignerClient{cc} } -func (c *remoteSignerClient) ListValidatingPublicKeys(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*ListPublicKeysResponse, error) { +func (c *remoteSignerClient) ListValidatingPublicKeys(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListPublicKeysResponse, error) { out := new(ListPublicKeysResponse) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.RemoteSigner/ListValidatingPublicKeys", in, out, opts...) if err != nil { @@ -435,7 +435,7 @@ func (c *remoteSignerClient) Sign(ctx context.Context, in *SignRequest, opts ... // RemoteSignerServer is the server API for RemoteSigner service. type RemoteSignerServer interface { - ListValidatingPublicKeys(context.Context, *types.Empty) (*ListPublicKeysResponse, error) + ListValidatingPublicKeys(context.Context, *empty.Empty) (*ListPublicKeysResponse, error) Sign(context.Context, *SignRequest) (*SignResponse, error) } @@ -443,7 +443,7 @@ type RemoteSignerServer interface { type UnimplementedRemoteSignerServer struct { } -func (*UnimplementedRemoteSignerServer) ListValidatingPublicKeys(ctx context.Context, req *types.Empty) (*ListPublicKeysResponse, error) { +func (*UnimplementedRemoteSignerServer) ListValidatingPublicKeys(ctx context.Context, req *empty.Empty) (*ListPublicKeysResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListValidatingPublicKeys not implemented") } func (*UnimplementedRemoteSignerServer) Sign(ctx context.Context, req *SignRequest) (*SignResponse, error) { @@ -455,7 +455,7 @@ func RegisterRemoteSignerServer(s *grpc.Server, srv RemoteSignerServer) { } func _RemoteSigner_ListValidatingPublicKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -467,7 +467,7 @@ func _RemoteSigner_ListValidatingPublicKeys_Handler(srv interface{}, ctx context FullMethod: "/ethereum.validator.accounts.v2.RemoteSigner/ListValidatingPublicKeys", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RemoteSignerServer).ListValidatingPublicKeys(ctx, req.(*types.Empty)) + return srv.(RemoteSignerServer).ListValidatingPublicKeys(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } diff --git a/proto/validator/accounts/v2/web_api.pb.go b/proto/validator/accounts/v2/web_api.pb.go index 6fbcf6b500..ffd5276667 100755 --- a/proto/validator/accounts/v2/web_api.pb.go +++ b/proto/validator/accounts/v2/web_api.pb.go @@ -11,7 +11,7 @@ import ( math_bits "math/bits" proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" + empty "github.com/golang/protobuf/ptypes/empty" v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" v1 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -1625,8 +1625,8 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type WalletClient interface { CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*CreateWalletResponse, error) - WalletConfig(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*WalletResponse, error) - GenerateMnemonic(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*GenerateMnemonicResponse, error) + WalletConfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*WalletResponse, error) + GenerateMnemonic(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GenerateMnemonicResponse, error) ImportKeystores(ctx context.Context, in *ImportKeystoresRequest, opts ...grpc.CallOption) (*ImportKeystoresResponse, error) } @@ -1647,7 +1647,7 @@ func (c *walletClient) CreateWallet(ctx context.Context, in *CreateWalletRequest return out, nil } -func (c *walletClient) WalletConfig(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*WalletResponse, error) { +func (c *walletClient) WalletConfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*WalletResponse, error) { out := new(WalletResponse) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Wallet/WalletConfig", in, out, opts...) if err != nil { @@ -1656,7 +1656,7 @@ func (c *walletClient) WalletConfig(ctx context.Context, in *types.Empty, opts . return out, nil } -func (c *walletClient) GenerateMnemonic(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*GenerateMnemonicResponse, error) { +func (c *walletClient) GenerateMnemonic(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GenerateMnemonicResponse, error) { out := new(GenerateMnemonicResponse) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Wallet/GenerateMnemonic", in, out, opts...) if err != nil { @@ -1677,8 +1677,8 @@ func (c *walletClient) ImportKeystores(ctx context.Context, in *ImportKeystoresR // WalletServer is the server API for Wallet service. type WalletServer interface { CreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error) - WalletConfig(context.Context, *types.Empty) (*WalletResponse, error) - GenerateMnemonic(context.Context, *types.Empty) (*GenerateMnemonicResponse, error) + WalletConfig(context.Context, *empty.Empty) (*WalletResponse, error) + GenerateMnemonic(context.Context, *empty.Empty) (*GenerateMnemonicResponse, error) ImportKeystores(context.Context, *ImportKeystoresRequest) (*ImportKeystoresResponse, error) } @@ -1689,10 +1689,10 @@ type UnimplementedWalletServer struct { func (*UnimplementedWalletServer) CreateWallet(ctx context.Context, req *CreateWalletRequest) (*CreateWalletResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateWallet not implemented") } -func (*UnimplementedWalletServer) WalletConfig(ctx context.Context, req *types.Empty) (*WalletResponse, error) { +func (*UnimplementedWalletServer) WalletConfig(ctx context.Context, req *empty.Empty) (*WalletResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method WalletConfig not implemented") } -func (*UnimplementedWalletServer) GenerateMnemonic(ctx context.Context, req *types.Empty) (*GenerateMnemonicResponse, error) { +func (*UnimplementedWalletServer) GenerateMnemonic(ctx context.Context, req *empty.Empty) (*GenerateMnemonicResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GenerateMnemonic not implemented") } func (*UnimplementedWalletServer) ImportKeystores(ctx context.Context, req *ImportKeystoresRequest) (*ImportKeystoresResponse, error) { @@ -1722,7 +1722,7 @@ func _Wallet_CreateWallet_Handler(srv interface{}, ctx context.Context, dec func } func _Wallet_WalletConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -1734,13 +1734,13 @@ func _Wallet_WalletConfig_Handler(srv interface{}, ctx context.Context, dec func FullMethod: "/ethereum.validator.accounts.v2.Wallet/WalletConfig", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).WalletConfig(ctx, req.(*types.Empty)) + return srv.(WalletServer).WalletConfig(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } func _Wallet_GenerateMnemonic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -1752,7 +1752,7 @@ func _Wallet_GenerateMnemonic_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/ethereum.validator.accounts.v2.Wallet/GenerateMnemonic", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GenerateMnemonic(ctx, req.(*types.Empty)) + return srv.(WalletServer).GenerateMnemonic(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } @@ -1806,7 +1806,7 @@ var _Wallet_serviceDesc = grpc.ServiceDesc{ type AccountsClient interface { ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) BackupAccounts(ctx context.Context, in *BackupAccountsRequest, opts ...grpc.CallOption) (*BackupAccountsResponse, error) - ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) + ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*empty.Empty, error) } type accountsClient struct { @@ -1835,8 +1835,8 @@ func (c *accountsClient) BackupAccounts(ctx context.Context, in *BackupAccountsR return out, nil } -func (c *accountsClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) +func (c *accountsClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Accounts/ChangePassword", in, out, opts...) if err != nil { return nil, err @@ -1848,7 +1848,7 @@ func (c *accountsClient) ChangePassword(ctx context.Context, in *ChangePasswordR type AccountsServer interface { ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) BackupAccounts(context.Context, *BackupAccountsRequest) (*BackupAccountsResponse, error) - ChangePassword(context.Context, *ChangePasswordRequest) (*types.Empty, error) + ChangePassword(context.Context, *ChangePasswordRequest) (*empty.Empty, error) } // UnimplementedAccountsServer can be embedded to have forward compatible implementations. @@ -1861,7 +1861,7 @@ func (*UnimplementedAccountsServer) ListAccounts(ctx context.Context, req *ListA func (*UnimplementedAccountsServer) BackupAccounts(ctx context.Context, req *BackupAccountsRequest) (*BackupAccountsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BackupAccounts not implemented") } -func (*UnimplementedAccountsServer) ChangePassword(ctx context.Context, req *ChangePasswordRequest) (*types.Empty, error) { +func (*UnimplementedAccountsServer) ChangePassword(ctx context.Context, req *ChangePasswordRequest) (*empty.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented") } @@ -1948,13 +1948,13 @@ var _Accounts_serviceDesc = grpc.ServiceDesc{ // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type BeaconClient interface { - GetBeaconStatus(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*BeaconStatusResponse, error) + GetBeaconStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*BeaconStatusResponse, error) GetValidatorParticipation(ctx context.Context, in *v1alpha1.GetValidatorParticipationRequest, opts ...grpc.CallOption) (*v1alpha1.ValidatorParticipationResponse, error) GetValidatorPerformance(ctx context.Context, in *v1alpha1.ValidatorPerformanceRequest, opts ...grpc.CallOption) (*v1alpha1.ValidatorPerformanceResponse, error) GetValidators(ctx context.Context, in *v1alpha1.ListValidatorsRequest, opts ...grpc.CallOption) (*v1alpha1.Validators, error) GetValidatorBalances(ctx context.Context, in *v1alpha1.ListValidatorBalancesRequest, opts ...grpc.CallOption) (*v1alpha1.ValidatorBalances, error) - GetValidatorQueue(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*v1alpha1.ValidatorQueue, error) - GetPeers(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*v1alpha1.Peers, error) + GetValidatorQueue(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*v1alpha1.ValidatorQueue, error) + GetPeers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*v1alpha1.Peers, error) } type beaconClient struct { @@ -1965,7 +1965,7 @@ func NewBeaconClient(cc *grpc.ClientConn) BeaconClient { return &beaconClient{cc} } -func (c *beaconClient) GetBeaconStatus(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*BeaconStatusResponse, error) { +func (c *beaconClient) GetBeaconStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*BeaconStatusResponse, error) { out := new(BeaconStatusResponse) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Beacon/GetBeaconStatus", in, out, opts...) if err != nil { @@ -2010,7 +2010,7 @@ func (c *beaconClient) GetValidatorBalances(ctx context.Context, in *v1alpha1.Li return out, nil } -func (c *beaconClient) GetValidatorQueue(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*v1alpha1.ValidatorQueue, error) { +func (c *beaconClient) GetValidatorQueue(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*v1alpha1.ValidatorQueue, error) { out := new(v1alpha1.ValidatorQueue) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Beacon/GetValidatorQueue", in, out, opts...) if err != nil { @@ -2019,7 +2019,7 @@ func (c *beaconClient) GetValidatorQueue(ctx context.Context, in *types.Empty, o return out, nil } -func (c *beaconClient) GetPeers(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*v1alpha1.Peers, error) { +func (c *beaconClient) GetPeers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*v1alpha1.Peers, error) { out := new(v1alpha1.Peers) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Beacon/GetPeers", in, out, opts...) if err != nil { @@ -2030,20 +2030,20 @@ func (c *beaconClient) GetPeers(ctx context.Context, in *types.Empty, opts ...gr // BeaconServer is the server API for Beacon service. type BeaconServer interface { - GetBeaconStatus(context.Context, *types.Empty) (*BeaconStatusResponse, error) + GetBeaconStatus(context.Context, *empty.Empty) (*BeaconStatusResponse, error) GetValidatorParticipation(context.Context, *v1alpha1.GetValidatorParticipationRequest) (*v1alpha1.ValidatorParticipationResponse, error) GetValidatorPerformance(context.Context, *v1alpha1.ValidatorPerformanceRequest) (*v1alpha1.ValidatorPerformanceResponse, error) GetValidators(context.Context, *v1alpha1.ListValidatorsRequest) (*v1alpha1.Validators, error) GetValidatorBalances(context.Context, *v1alpha1.ListValidatorBalancesRequest) (*v1alpha1.ValidatorBalances, error) - GetValidatorQueue(context.Context, *types.Empty) (*v1alpha1.ValidatorQueue, error) - GetPeers(context.Context, *types.Empty) (*v1alpha1.Peers, error) + GetValidatorQueue(context.Context, *empty.Empty) (*v1alpha1.ValidatorQueue, error) + GetPeers(context.Context, *empty.Empty) (*v1alpha1.Peers, error) } // UnimplementedBeaconServer can be embedded to have forward compatible implementations. type UnimplementedBeaconServer struct { } -func (*UnimplementedBeaconServer) GetBeaconStatus(ctx context.Context, req *types.Empty) (*BeaconStatusResponse, error) { +func (*UnimplementedBeaconServer) GetBeaconStatus(ctx context.Context, req *empty.Empty) (*BeaconStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBeaconStatus not implemented") } func (*UnimplementedBeaconServer) GetValidatorParticipation(ctx context.Context, req *v1alpha1.GetValidatorParticipationRequest) (*v1alpha1.ValidatorParticipationResponse, error) { @@ -2058,10 +2058,10 @@ func (*UnimplementedBeaconServer) GetValidators(ctx context.Context, req *v1alph func (*UnimplementedBeaconServer) GetValidatorBalances(ctx context.Context, req *v1alpha1.ListValidatorBalancesRequest) (*v1alpha1.ValidatorBalances, error) { return nil, status.Errorf(codes.Unimplemented, "method GetValidatorBalances not implemented") } -func (*UnimplementedBeaconServer) GetValidatorQueue(ctx context.Context, req *types.Empty) (*v1alpha1.ValidatorQueue, error) { +func (*UnimplementedBeaconServer) GetValidatorQueue(ctx context.Context, req *empty.Empty) (*v1alpha1.ValidatorQueue, error) { return nil, status.Errorf(codes.Unimplemented, "method GetValidatorQueue not implemented") } -func (*UnimplementedBeaconServer) GetPeers(ctx context.Context, req *types.Empty) (*v1alpha1.Peers, error) { +func (*UnimplementedBeaconServer) GetPeers(ctx context.Context, req *empty.Empty) (*v1alpha1.Peers, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPeers not implemented") } @@ -2070,7 +2070,7 @@ func RegisterBeaconServer(s *grpc.Server, srv BeaconServer) { } func _Beacon_GetBeaconStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -2082,7 +2082,7 @@ func _Beacon_GetBeaconStatus_Handler(srv interface{}, ctx context.Context, dec f FullMethod: "/ethereum.validator.accounts.v2.Beacon/GetBeaconStatus", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconServer).GetBeaconStatus(ctx, req.(*types.Empty)) + return srv.(BeaconServer).GetBeaconStatus(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } @@ -2160,7 +2160,7 @@ func _Beacon_GetValidatorBalances_Handler(srv interface{}, ctx context.Context, } func _Beacon_GetValidatorQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -2172,13 +2172,13 @@ func _Beacon_GetValidatorQueue_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/ethereum.validator.accounts.v2.Beacon/GetValidatorQueue", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconServer).GetValidatorQueue(ctx, req.(*types.Empty)) + return srv.(BeaconServer).GetValidatorQueue(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } func _Beacon_GetPeers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -2190,7 +2190,7 @@ func _Beacon_GetPeers_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/ethereum.validator.accounts.v2.Beacon/GetPeers", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BeaconServer).GetPeers(ctx, req.(*types.Empty)) + return srv.(BeaconServer).GetPeers(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } @@ -2236,11 +2236,11 @@ var _Beacon_serviceDesc = grpc.ServiceDesc{ // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type HealthClient interface { - GetBeaconNodeConnection(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*NodeConnectionResponse, error) - GetLogsEndpoints(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*LogsEndpointResponse, error) - GetVersion(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*VersionResponse, error) - StreamBeaconLogs(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Health_StreamBeaconLogsClient, error) - StreamValidatorLogs(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Health_StreamValidatorLogsClient, error) + GetBeaconNodeConnection(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*NodeConnectionResponse, error) + GetLogsEndpoints(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*LogsEndpointResponse, error) + GetVersion(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*VersionResponse, error) + StreamBeaconLogs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Health_StreamBeaconLogsClient, error) + StreamValidatorLogs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Health_StreamValidatorLogsClient, error) } type healthClient struct { @@ -2251,7 +2251,7 @@ func NewHealthClient(cc *grpc.ClientConn) HealthClient { return &healthClient{cc} } -func (c *healthClient) GetBeaconNodeConnection(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*NodeConnectionResponse, error) { +func (c *healthClient) GetBeaconNodeConnection(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*NodeConnectionResponse, error) { out := new(NodeConnectionResponse) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Health/GetBeaconNodeConnection", in, out, opts...) if err != nil { @@ -2260,7 +2260,7 @@ func (c *healthClient) GetBeaconNodeConnection(ctx context.Context, in *types.Em return out, nil } -func (c *healthClient) GetLogsEndpoints(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*LogsEndpointResponse, error) { +func (c *healthClient) GetLogsEndpoints(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*LogsEndpointResponse, error) { out := new(LogsEndpointResponse) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Health/GetLogsEndpoints", in, out, opts...) if err != nil { @@ -2269,7 +2269,7 @@ func (c *healthClient) GetLogsEndpoints(ctx context.Context, in *types.Empty, op return out, nil } -func (c *healthClient) GetVersion(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*VersionResponse, error) { +func (c *healthClient) GetVersion(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*VersionResponse, error) { out := new(VersionResponse) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Health/GetVersion", in, out, opts...) if err != nil { @@ -2278,7 +2278,7 @@ func (c *healthClient) GetVersion(ctx context.Context, in *types.Empty, opts ... return out, nil } -func (c *healthClient) StreamBeaconLogs(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Health_StreamBeaconLogsClient, error) { +func (c *healthClient) StreamBeaconLogs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Health_StreamBeaconLogsClient, error) { stream, err := c.cc.NewStream(ctx, &_Health_serviceDesc.Streams[0], "/ethereum.validator.accounts.v2.Health/StreamBeaconLogs", opts...) if err != nil { return nil, err @@ -2310,7 +2310,7 @@ func (x *healthStreamBeaconLogsClient) Recv() (*v1.LogsResponse, error) { return m, nil } -func (c *healthClient) StreamValidatorLogs(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (Health_StreamValidatorLogsClient, error) { +func (c *healthClient) StreamValidatorLogs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Health_StreamValidatorLogsClient, error) { stream, err := c.cc.NewStream(ctx, &_Health_serviceDesc.Streams[1], "/ethereum.validator.accounts.v2.Health/StreamValidatorLogs", opts...) if err != nil { return nil, err @@ -2344,30 +2344,30 @@ func (x *healthStreamValidatorLogsClient) Recv() (*LogsResponse, error) { // HealthServer is the server API for Health service. type HealthServer interface { - GetBeaconNodeConnection(context.Context, *types.Empty) (*NodeConnectionResponse, error) - GetLogsEndpoints(context.Context, *types.Empty) (*LogsEndpointResponse, error) - GetVersion(context.Context, *types.Empty) (*VersionResponse, error) - StreamBeaconLogs(*types.Empty, Health_StreamBeaconLogsServer) error - StreamValidatorLogs(*types.Empty, Health_StreamValidatorLogsServer) error + GetBeaconNodeConnection(context.Context, *empty.Empty) (*NodeConnectionResponse, error) + GetLogsEndpoints(context.Context, *empty.Empty) (*LogsEndpointResponse, error) + GetVersion(context.Context, *empty.Empty) (*VersionResponse, error) + StreamBeaconLogs(*empty.Empty, Health_StreamBeaconLogsServer) error + StreamValidatorLogs(*empty.Empty, Health_StreamValidatorLogsServer) error } // UnimplementedHealthServer can be embedded to have forward compatible implementations. type UnimplementedHealthServer struct { } -func (*UnimplementedHealthServer) GetBeaconNodeConnection(ctx context.Context, req *types.Empty) (*NodeConnectionResponse, error) { +func (*UnimplementedHealthServer) GetBeaconNodeConnection(ctx context.Context, req *empty.Empty) (*NodeConnectionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBeaconNodeConnection not implemented") } -func (*UnimplementedHealthServer) GetLogsEndpoints(ctx context.Context, req *types.Empty) (*LogsEndpointResponse, error) { +func (*UnimplementedHealthServer) GetLogsEndpoints(ctx context.Context, req *empty.Empty) (*LogsEndpointResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLogsEndpoints not implemented") } -func (*UnimplementedHealthServer) GetVersion(ctx context.Context, req *types.Empty) (*VersionResponse, error) { +func (*UnimplementedHealthServer) GetVersion(ctx context.Context, req *empty.Empty) (*VersionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") } -func (*UnimplementedHealthServer) StreamBeaconLogs(req *types.Empty, srv Health_StreamBeaconLogsServer) error { +func (*UnimplementedHealthServer) StreamBeaconLogs(req *empty.Empty, srv Health_StreamBeaconLogsServer) error { return status.Errorf(codes.Unimplemented, "method StreamBeaconLogs not implemented") } -func (*UnimplementedHealthServer) StreamValidatorLogs(req *types.Empty, srv Health_StreamValidatorLogsServer) error { +func (*UnimplementedHealthServer) StreamValidatorLogs(req *empty.Empty, srv Health_StreamValidatorLogsServer) error { return status.Errorf(codes.Unimplemented, "method StreamValidatorLogs not implemented") } @@ -2376,7 +2376,7 @@ func RegisterHealthServer(s *grpc.Server, srv HealthServer) { } func _Health_GetBeaconNodeConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -2388,13 +2388,13 @@ func _Health_GetBeaconNodeConnection_Handler(srv interface{}, ctx context.Contex FullMethod: "/ethereum.validator.accounts.v2.Health/GetBeaconNodeConnection", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HealthServer).GetBeaconNodeConnection(ctx, req.(*types.Empty)) + return srv.(HealthServer).GetBeaconNodeConnection(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } func _Health_GetLogsEndpoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -2406,13 +2406,13 @@ func _Health_GetLogsEndpoints_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/ethereum.validator.accounts.v2.Health/GetLogsEndpoints", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HealthServer).GetLogsEndpoints(ctx, req.(*types.Empty)) + return srv.(HealthServer).GetLogsEndpoints(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } func _Health_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -2424,13 +2424,13 @@ func _Health_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: "/ethereum.validator.accounts.v2.Health/GetVersion", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HealthServer).GetVersion(ctx, req.(*types.Empty)) + return srv.(HealthServer).GetVersion(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } func _Health_StreamBeaconLogs_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(types.Empty) + m := new(empty.Empty) if err := stream.RecvMsg(m); err != nil { return err } @@ -2451,7 +2451,7 @@ func (x *healthStreamBeaconLogsServer) Send(m *v1.LogsResponse) error { } func _Health_StreamValidatorLogs_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(types.Empty) + m := new(empty.Empty) if err := stream.RecvMsg(m); err != nil { return err } @@ -2507,10 +2507,10 @@ var _Health_serviceDesc = grpc.ServiceDesc{ // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type AuthClient interface { - HasUsedWeb(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HasUsedWebResponse, error) + HasUsedWeb(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HasUsedWebResponse, error) Login(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthResponse, error) Signup(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthResponse, error) - Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) + Logout(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) } type authClient struct { @@ -2521,7 +2521,7 @@ func NewAuthClient(cc *grpc.ClientConn) AuthClient { return &authClient{cc} } -func (c *authClient) HasUsedWeb(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*HasUsedWebResponse, error) { +func (c *authClient) HasUsedWeb(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HasUsedWebResponse, error) { out := new(HasUsedWebResponse) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Auth/HasUsedWeb", in, out, opts...) if err != nil { @@ -2548,8 +2548,8 @@ func (c *authClient) Signup(ctx context.Context, in *AuthRequest, opts ...grpc.C return out, nil } -func (c *authClient) Logout(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*types.Empty, error) { - out := new(types.Empty) +func (c *authClient) Logout(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Auth/Logout", in, out, opts...) if err != nil { return nil, err @@ -2559,17 +2559,17 @@ func (c *authClient) Logout(ctx context.Context, in *types.Empty, opts ...grpc.C // AuthServer is the server API for Auth service. type AuthServer interface { - HasUsedWeb(context.Context, *types.Empty) (*HasUsedWebResponse, error) + HasUsedWeb(context.Context, *empty.Empty) (*HasUsedWebResponse, error) Login(context.Context, *AuthRequest) (*AuthResponse, error) Signup(context.Context, *AuthRequest) (*AuthResponse, error) - Logout(context.Context, *types.Empty) (*types.Empty, error) + Logout(context.Context, *empty.Empty) (*empty.Empty, error) } // UnimplementedAuthServer can be embedded to have forward compatible implementations. type UnimplementedAuthServer struct { } -func (*UnimplementedAuthServer) HasUsedWeb(ctx context.Context, req *types.Empty) (*HasUsedWebResponse, error) { +func (*UnimplementedAuthServer) HasUsedWeb(ctx context.Context, req *empty.Empty) (*HasUsedWebResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HasUsedWeb not implemented") } func (*UnimplementedAuthServer) Login(ctx context.Context, req *AuthRequest) (*AuthResponse, error) { @@ -2578,7 +2578,7 @@ func (*UnimplementedAuthServer) Login(ctx context.Context, req *AuthRequest) (*A func (*UnimplementedAuthServer) Signup(ctx context.Context, req *AuthRequest) (*AuthResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Signup not implemented") } -func (*UnimplementedAuthServer) Logout(ctx context.Context, req *types.Empty) (*types.Empty, error) { +func (*UnimplementedAuthServer) Logout(ctx context.Context, req *empty.Empty) (*empty.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Logout not implemented") } @@ -2587,7 +2587,7 @@ func RegisterAuthServer(s *grpc.Server, srv AuthServer) { } func _Auth_HasUsedWeb_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -2599,7 +2599,7 @@ func _Auth_HasUsedWeb_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/ethereum.validator.accounts.v2.Auth/HasUsedWeb", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).HasUsedWeb(ctx, req.(*types.Empty)) + return srv.(AuthServer).HasUsedWeb(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } @@ -2641,7 +2641,7 @@ func _Auth_Signup_Handler(srv interface{}, ctx context.Context, dec func(interfa } func _Auth_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -2653,7 +2653,7 @@ func _Auth_Logout_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: "/ethereum.validator.accounts.v2.Auth/Logout", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).Logout(ctx, req.(*types.Empty)) + return srv.(AuthServer).Logout(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } diff --git a/proto/validator/accounts/v2_gateway/keymanager.pb.gw.go b/proto/validator/accounts/v2_gateway/keymanager.pb.gw.go index 6f3d30ee23..7ee167d539 100755 --- a/proto/validator/accounts/v2_gateway/keymanager.pb.gw.go +++ b/proto/validator/accounts/v2_gateway/keymanager.pb.gw.go @@ -21,6 +21,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,6 +32,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_RemoteSigner_ListValidatingPublicKeys_0(ctx context.Context, marshaler runtime.Marshaler, client RemoteSignerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq empty.Empty @@ -89,11 +91,14 @@ func local_request_RemoteSigner_Sign_0(ctx context.Context, marshaler runtime.Ma // RegisterRemoteSignerHandlerServer registers the http handlers for service RemoteSigner to "mux". // UnaryRPC :call RemoteSignerServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRemoteSignerHandlerFromEndpoint instead. func RegisterRemoteSignerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RemoteSignerServer) error { mux.Handle("GET", pattern_RemoteSigner_ListValidatingPublicKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -101,6 +106,7 @@ func RegisterRemoteSignerHandlerServer(ctx context.Context, mux *runtime.ServeMu return } resp, md, err := local_request_RemoteSigner_ListValidatingPublicKeys_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -114,6 +120,8 @@ func RegisterRemoteSignerHandlerServer(ctx context.Context, mux *runtime.ServeMu mux.Handle("POST", pattern_RemoteSigner_Sign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -121,6 +129,7 @@ func RegisterRemoteSignerHandlerServer(ctx context.Context, mux *runtime.ServeMu return } resp, md, err := local_request_RemoteSigner_Sign_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/proto/validator/accounts/v2_gateway/web_api.pb.gw.go b/proto/validator/accounts/v2_gateway/web_api.pb.gw.go index 4bee64d21d..87fff863e0 100755 --- a/proto/validator/accounts/v2_gateway/web_api.pb.gw.go +++ b/proto/validator/accounts/v2_gateway/web_api.pb.gw.go @@ -22,6 +22,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -32,6 +33,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Wallet_CreateWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateWalletRequest @@ -650,11 +652,14 @@ func local_request_Auth_Logout_0(ctx context.Context, marshaler runtime.Marshale // RegisterWalletHandlerServer registers the http handlers for service Wallet to "mux". // UnaryRPC :call WalletServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWalletHandlerFromEndpoint instead. func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WalletServer) error { mux.Handle("POST", pattern_Wallet_CreateWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -662,6 +667,7 @@ func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Wallet_CreateWallet_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -675,6 +681,8 @@ func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser mux.Handle("GET", pattern_Wallet_WalletConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -682,6 +690,7 @@ func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Wallet_WalletConfig_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -695,6 +704,8 @@ func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser mux.Handle("GET", pattern_Wallet_GenerateMnemonic_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -702,6 +713,7 @@ func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Wallet_GenerateMnemonic_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -715,6 +727,8 @@ func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser mux.Handle("POST", pattern_Wallet_ImportKeystores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -722,6 +736,7 @@ func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Wallet_ImportKeystores_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -738,11 +753,14 @@ func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterAccountsHandlerServer registers the http handlers for service Accounts to "mux". // UnaryRPC :call AccountsServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAccountsHandlerFromEndpoint instead. func RegisterAccountsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccountsServer) error { mux.Handle("GET", pattern_Accounts_ListAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -750,6 +768,7 @@ func RegisterAccountsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s return } resp, md, err := local_request_Accounts_ListAccounts_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -763,6 +782,8 @@ func RegisterAccountsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s mux.Handle("POST", pattern_Accounts_BackupAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -770,6 +791,7 @@ func RegisterAccountsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s return } resp, md, err := local_request_Accounts_BackupAccounts_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -783,6 +805,8 @@ func RegisterAccountsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s mux.Handle("POST", pattern_Accounts_ChangePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -790,6 +814,7 @@ func RegisterAccountsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s return } resp, md, err := local_request_Accounts_ChangePassword_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -806,11 +831,14 @@ func RegisterAccountsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s // RegisterBeaconHandlerServer registers the http handlers for service Beacon to "mux". // UnaryRPC :call BeaconServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBeaconHandlerFromEndpoint instead. func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BeaconServer) error { mux.Handle("GET", pattern_Beacon_GetBeaconStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -818,6 +846,7 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Beacon_GetBeaconStatus_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -831,6 +860,8 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser mux.Handle("GET", pattern_Beacon_GetValidatorParticipation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -838,6 +869,7 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Beacon_GetValidatorParticipation_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -851,6 +883,8 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser mux.Handle("GET", pattern_Beacon_GetValidatorPerformance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -858,6 +892,7 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Beacon_GetValidatorPerformance_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -871,6 +906,8 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser mux.Handle("GET", pattern_Beacon_GetValidators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -878,6 +915,7 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Beacon_GetValidators_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -891,6 +929,8 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser mux.Handle("GET", pattern_Beacon_GetValidatorBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -898,6 +938,7 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Beacon_GetValidatorBalances_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -911,6 +952,8 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser mux.Handle("GET", pattern_Beacon_GetValidatorQueue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -918,6 +961,7 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Beacon_GetValidatorQueue_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -931,6 +975,8 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser mux.Handle("GET", pattern_Beacon_GetPeers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -938,6 +984,7 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Beacon_GetPeers_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -954,11 +1001,14 @@ func RegisterBeaconHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterHealthHandlerServer registers the http handlers for service Health to "mux". // UnaryRPC :call HealthServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHealthHandlerFromEndpoint instead. func RegisterHealthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthServer) error { mux.Handle("GET", pattern_Health_GetBeaconNodeConnection_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -966,6 +1016,7 @@ func RegisterHealthHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Health_GetBeaconNodeConnection_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -979,6 +1030,8 @@ func RegisterHealthHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser mux.Handle("GET", pattern_Health_GetLogsEndpoints_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -986,6 +1039,7 @@ func RegisterHealthHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Health_GetLogsEndpoints_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -999,6 +1053,8 @@ func RegisterHealthHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser mux.Handle("GET", pattern_Health_GetVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1006,6 +1062,7 @@ func RegisterHealthHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return } resp, md, err := local_request_Health_GetVersion_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1036,11 +1093,14 @@ func RegisterHealthHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser // RegisterAuthHandlerServer registers the http handlers for service Auth to "mux". // UnaryRPC :call AuthServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthHandlerFromEndpoint instead. func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServer) error { mux.Handle("GET", pattern_Auth_HasUsedWeb_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1048,6 +1108,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_HasUsedWeb_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1061,6 +1122,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1068,6 +1131,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_Login_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1081,6 +1145,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_Signup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1088,6 +1154,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_Signup_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1101,6 +1168,8 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve mux.Handle("POST", pattern_Auth_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -1108,6 +1177,7 @@ func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve return } resp, md, err := local_request_Auth_Logout_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/shared/attestationutil/BUILD.bazel b/shared/attestationutil/BUILD.bazel index fad5017c08..8e9893c5df 100644 --- a/shared/attestationutil/BUILD.bazel +++ b/shared/attestationutil/BUILD.bazel @@ -21,8 +21,8 @@ go_library( go_test( name = "go_default_test", srcs = ["attestation_utils_test.go"], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", diff --git a/shared/bytesutil/BUILD.bazel b/shared/bytesutil/BUILD.bazel index 2460c865e3..c8669bd28f 100644 --- a/shared/bytesutil/BUILD.bazel +++ b/shared/bytesutil/BUILD.bazel @@ -16,8 +16,8 @@ go_test( name = "go_default_test", size = "small", srcs = ["bytes_test.go"], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", "@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", diff --git a/shared/depositutil/BUILD.bazel b/shared/depositutil/BUILD.bazel index 598a0cfe8e..165721bc6d 100644 --- a/shared/depositutil/BUILD.bazel +++ b/shared/depositutil/BUILD.bazel @@ -22,8 +22,8 @@ go_library( go_test( name = "go_default_test", srcs = ["deposit_test.go"], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//beacon-chain/core/helpers:go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//shared/bls:go_default_library", diff --git a/shared/fileutil/BUILD.bazel b/shared/fileutil/BUILD.bazel index 5016ae848f..4ffb85ab02 100644 --- a/shared/fileutil/BUILD.bazel +++ b/shared/fileutil/BUILD.bazel @@ -16,8 +16,8 @@ go_library( go_test( name = "go_default_test", srcs = ["fileutil_test.go"], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", diff --git a/shared/hashutil/BUILD.bazel b/shared/hashutil/BUILD.bazel index 6384ddaa0e..df625c3541 100644 --- a/shared/hashutil/BUILD.bazel +++ b/shared/hashutil/BUILD.bazel @@ -26,8 +26,8 @@ go_test( "hash_test.go", "merkleRoot_test.go", ], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//proto/testing:go_default_library", "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", diff --git a/shared/htrutils/BUILD.bazel b/shared/htrutils/BUILD.bazel index 3f0745eab7..6769a0bded 100644 --- a/shared/htrutils/BUILD.bazel +++ b/shared/htrutils/BUILD.bazel @@ -33,8 +33,8 @@ go_test( "htrutils_test.go", "merkleize_test.go", ], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//shared/hashutil:go_default_library", "//shared/testutil/assert:go_default_library", diff --git a/shared/interop/BUILD.bazel b/shared/interop/BUILD.bazel index bca08f4d70..0170e2b634 100644 --- a/shared/interop/BUILD.bazel +++ b/shared/interop/BUILD.bazel @@ -33,8 +33,8 @@ go_test( data = [ "keygen_test_vector.yaml", ], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//beacon-chain/core/state:go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", diff --git a/shared/iputils/BUILD.bazel b/shared/iputils/BUILD.bazel index 86c284cd59..25ba8c292c 100644 --- a/shared/iputils/BUILD.bazel +++ b/shared/iputils/BUILD.bazel @@ -12,9 +12,9 @@ go_test( name = "go_default_test", size = "small", srcs = ["external_ip_test.go"], - embed = [":go_default_library"], tags = ["requires-network"], deps = [ + ":go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", ], diff --git a/shared/mathutil/BUILD.bazel b/shared/mathutil/BUILD.bazel index 27d8e05deb..e6961b79d8 100644 --- a/shared/mathutil/BUILD.bazel +++ b/shared/mathutil/BUILD.bazel @@ -12,6 +12,8 @@ go_test( name = "go_default_test", size = "small", srcs = ["math_helper_test.go"], - embed = [":go_default_library"], - deps = ["//shared/testutil/require:go_default_library"], + deps = [ + ":go_default_library", + "//shared/testutil/require:go_default_library", + ], ) diff --git a/shared/messagehandler/BUILD.bazel b/shared/messagehandler/BUILD.bazel index cedb79c76d..347ba13bdd 100644 --- a/shared/messagehandler/BUILD.bazel +++ b/shared/messagehandler/BUILD.bazel @@ -17,8 +17,8 @@ go_test( name = "go_default_test", size = "small", srcs = ["messagehandler_test.go"], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//shared/testutil/require:go_default_library", "@com_github_gogo_protobuf//proto:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", diff --git a/shared/mock/BUILD.bazel b/shared/mock/BUILD.bazel index cb88ce2391..b738dc605b 100644 --- a/shared/mock/BUILD.bazel +++ b/shared/mock/BUILD.bazel @@ -19,6 +19,7 @@ go_library( "@com_github_gogo_protobuf//types:go_default_library", "@com_github_golang_mock//gomock:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//metadata:go_default_library", ], diff --git a/shared/mock/keymanager_mock.go b/shared/mock/keymanager_mock.go index dbf17c1436..288079b952 100644 --- a/shared/mock/keymanager_mock.go +++ b/shared/mock/keymanager_mock.go @@ -8,8 +8,8 @@ import ( context "context" reflect "reflect" - types "github.com/gogo/protobuf/types" gomock "github.com/golang/mock/gomock" + "github.com/golang/protobuf/ptypes/empty" ethereum_validator_accounts_v2 "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2" grpc "google.golang.org/grpc" ) @@ -38,7 +38,7 @@ func (m *MockRemoteSignerClient) EXPECT() *MockRemoteSignerClientMockRecorder { } // ListValidatingPublicKeys mocks base method -func (m *MockRemoteSignerClient) ListValidatingPublicKeys(arg0 context.Context, arg1 *types.Empty, arg2 ...grpc.CallOption) (*ethereum_validator_accounts_v2.ListPublicKeysResponse, error) { +func (m *MockRemoteSignerClient) ListValidatingPublicKeys(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc.CallOption) (*ethereum_validator_accounts_v2.ListPublicKeysResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{arg0, arg1} for _, a := range arg2 { diff --git a/shared/pagination/BUILD.bazel b/shared/pagination/BUILD.bazel index 094314ad5b..37220098aa 100644 --- a/shared/pagination/BUILD.bazel +++ b/shared/pagination/BUILD.bazel @@ -15,8 +15,8 @@ go_library( go_test( name = "go_default_test", srcs = ["pagination_test.go"], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", ], diff --git a/shared/runutil/BUILD.bazel b/shared/runutil/BUILD.bazel index 738808e599..d09447dbc5 100644 --- a/shared/runutil/BUILD.bazel +++ b/shared/runutil/BUILD.bazel @@ -12,5 +12,5 @@ go_library( go_test( name = "go_default_test", srcs = ["every_test.go"], - embed = [":go_default_library"], + deps = [":go_default_library"], ) diff --git a/shared/sliceutil/BUILD.bazel b/shared/sliceutil/BUILD.bazel index dcff1101d9..a4be5b8b08 100644 --- a/shared/sliceutil/BUILD.bazel +++ b/shared/sliceutil/BUILD.bazel @@ -16,6 +16,8 @@ go_test( name = "go_default_test", size = "small", srcs = ["slice_test.go"], - embed = [":go_default_library"], - deps = ["@com_github_prysmaticlabs_eth2_types//:go_default_library"], + deps = [ + ":go_default_library", + "@com_github_prysmaticlabs_eth2_types//:go_default_library", + ], ) diff --git a/shared/sszutil/BUILD.bazel b/shared/sszutil/BUILD.bazel index e8aba4519c..b335f02017 100644 --- a/shared/sszutil/BUILD.bazel +++ b/shared/sszutil/BUILD.bazel @@ -16,8 +16,8 @@ go_test( name = "go_default_test", size = "small", srcs = ["deep_equal_test.go"], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//proto/beacon/p2p/v1:go_default_library", "//shared/testutil/assert:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", diff --git a/shared/testutil/assertions/BUILD.bazel b/shared/testutil/assertions/BUILD.bazel index 1c8502516e..a014cd9e79 100644 --- a/shared/testutil/assertions/BUILD.bazel +++ b/shared/testutil/assertions/BUILD.bazel @@ -17,8 +17,8 @@ go_library( go_test( name = "go_default_test", srcs = ["assertions_test.go"], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", diff --git a/slasher/detection/attestations/types/BUILD.bazel b/slasher/detection/attestations/types/BUILD.bazel index 49925213c8..f54667b7f2 100644 --- a/slasher/detection/attestations/types/BUILD.bazel +++ b/slasher/detection/attestations/types/BUILD.bazel @@ -22,8 +22,8 @@ go_test( "epoch_store_test.go", "types_test.go", ], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", "//slasher/db/testing:go_default_library", diff --git a/validator/accounts/wallet/BUILD.bazel b/validator/accounts/wallet/BUILD.bazel index 841cb8c36a..8ee110a9cd 100644 --- a/validator/accounts/wallet/BUILD.bazel +++ b/validator/accounts/wallet/BUILD.bazel @@ -28,8 +28,8 @@ go_library( go_test( name = "go_default_test", srcs = ["wallet_test.go"], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//shared/params:go_default_library", "//shared/testutil/require:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", diff --git a/validator/keymanager/BUILD.bazel b/validator/keymanager/BUILD.bazel index f056b809c9..fcc8461609 100644 --- a/validator/keymanager/BUILD.bazel +++ b/validator/keymanager/BUILD.bazel @@ -20,8 +20,8 @@ go_library( go_test( name = "go_default_test", srcs = ["types_test.go"], - embed = [":go_default_library"], deps = [ + ":go_default_library", "//validator/keymanager/derived:go_default_library", "//validator/keymanager/imported:go_default_library", "//validator/keymanager/remote:go_default_library", diff --git a/validator/keymanager/remote/BUILD.bazel b/validator/keymanager/remote/BUILD.bazel index 5e8ff388b9..70aec92eec 100644 --- a/validator/keymanager/remote/BUILD.bazel +++ b/validator/keymanager/remote/BUILD.bazel @@ -18,10 +18,10 @@ go_library( "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", "//shared/event:go_default_library", - "@com_github_gogo_protobuf//types:go_default_library", "@com_github_logrusorgru_aurora//:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//credentials:go_default_library", ], diff --git a/validator/keymanager/remote/keymanager.go b/validator/keymanager/remote/keymanager.go index 23841e2287..0669599550 100644 --- a/validator/keymanager/remote/keymanager.go +++ b/validator/keymanager/remote/keymanager.go @@ -10,7 +10,7 @@ import ( "io/ioutil" "strings" - ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" "github.com/logrusorgru/aurora" "github.com/pkg/errors" validatorpb "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2" @@ -198,7 +198,7 @@ func (km *Keymanager) KeymanagerOpts() *KeymanagerOpts { // FetchValidatingPublicKeys fetches the list of public keys that should be used to validate with. func (km *Keymanager) FetchValidatingPublicKeys(ctx context.Context) ([][48]byte, error) { - resp, err := km.client.ListValidatingPublicKeys(ctx, &ptypes.Empty{}) + resp, err := km.client.ListValidatingPublicKeys(ctx, &empty.Empty{}) if err != nil { return nil, errors.Wrap(err, "could not list accounts from remote server") } diff --git a/validator/rpc/BUILD.bazel b/validator/rpc/BUILD.bazel index 0bc32548d3..d1084f51e1 100644 --- a/validator/rpc/BUILD.bazel +++ b/validator/rpc/BUILD.bazel @@ -51,6 +51,7 @@ go_library( "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_tyler_smith_go_bip39//:go_default_library", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", "@io_opencensus_go//plugin/ocgrpc:go_default_library", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//codes:go_default_library", @@ -101,6 +102,7 @@ go_test( "@com_github_pkg_errors//:go_default_library", "@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library", "@com_github_wealdtech_go_eth2_wallet_encryptor_keystorev4//:go_default_library", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//metadata:go_default_library", ], diff --git a/validator/rpc/auth.go b/validator/rpc/auth.go index 4446c38e78..bf1ec0353d 100644 --- a/validator/rpc/auth.go +++ b/validator/rpc/auth.go @@ -6,7 +6,7 @@ import ( "time" "github.com/dgrijalva/jwt-go" - ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" pb "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2" "github.com/prysmaticlabs/prysm/shared/fileutil" @@ -86,7 +86,7 @@ func (s *Server) Login(ctx context.Context, req *pb.AuthRequest) (*pb.AuthRespon } // HasUsedWeb checks if the user has authenticated via the web interface. -func (s *Server) HasUsedWeb(ctx context.Context, _ *ptypes.Empty) (*pb.HasUsedWebResponse, error) { +func (s *Server) HasUsedWeb(ctx context.Context, _ *empty.Empty) (*pb.HasUsedWebResponse, error) { walletExists, err := wallet.Exists(s.walletDir) if err != nil { return nil, status.Error(codes.Internal, "Could not check if wallet exists") @@ -99,14 +99,14 @@ func (s *Server) HasUsedWeb(ctx context.Context, _ *ptypes.Empty) (*pb.HasUsedWe } // Logout a user by invalidating their JWT key. -func (s *Server) Logout(ctx context.Context, _ *ptypes.Empty) (*ptypes.Empty, error) { +func (s *Server) Logout(ctx context.Context, _ *empty.Empty) (*empty.Empty, error) { // Invalidate the old JWT key, making all requests done with its token fail. jwtKey, err := createRandomJWTKey() if err != nil { return nil, status.Error(codes.Internal, "Could not invalidate JWT key") } s.jwtKey = jwtKey - return &ptypes.Empty{}, nil + return &empty.Empty{}, nil } // Sends an auth response via gRPC containing a new JWT token. @@ -123,7 +123,7 @@ func (s *Server) sendAuthResponse() (*pb.AuthResponse, error) { } // ChangePassword allows changing the RPC password via the API as an authenticated method. -func (s *Server) ChangePassword(ctx context.Context, req *pb.ChangePasswordRequest) (*ptypes.Empty, error) { +func (s *Server) ChangePassword(ctx context.Context, req *pb.ChangePasswordRequest) (*empty.Empty, error) { if req.CurrentPassword == "" { return nil, status.Error(codes.InvalidArgument, "Current password cannot be empty") } @@ -148,7 +148,7 @@ func (s *Server) ChangePassword(ctx context.Context, req *pb.ChangePasswordReque if err := s.SaveHashedPassword(req.Password); err != nil { return nil, status.Errorf(codes.Internal, "could not write hashed password to disk: %v", err) } - return &ptypes.Empty{}, nil + return &empty.Empty{}, nil } // SaveHashedPassword to disk for the validator RPC. diff --git a/validator/rpc/auth_test.go b/validator/rpc/auth_test.go index e2d998f2ea..05ce926074 100644 --- a/validator/rpc/auth_test.go +++ b/validator/rpc/auth_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/dgrijalva/jwt-go" - ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" pb "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2" "github.com/prysmaticlabs/prysm/shared/event" "github.com/prysmaticlabs/prysm/shared/fileutil" @@ -87,7 +87,7 @@ func TestServer_Logout(t *testing.T) { _, err = jwt.Parse(tokenString, checkParsedKey) assert.NoError(t, err) - _, err = ss.Logout(context.Background(), &ptypes.Empty{}) + _, err = ss.Logout(context.Background(), &empty.Empty{}) require.NoError(t, err) // Attempting to validate the same token string after logout should fail. diff --git a/validator/rpc/beacon.go b/validator/rpc/beacon.go index c3315ac9e8..9932b8944c 100644 --- a/validator/rpc/beacon.go +++ b/validator/rpc/beacon.go @@ -5,6 +5,7 @@ import ( "time" ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" middleware "github.com/grpc-ecosystem/go-grpc-middleware" grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry" grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing" @@ -54,7 +55,7 @@ func (s *Server) registerBeaconClient() error { // GetBeaconStatus retrieves information about the beacon node gRPC connection // and certain chain metadata, such as the genesis time, the chain head, and the // deposit contract address. -func (s *Server) GetBeaconStatus(ctx context.Context, _ *ptypes.Empty) (*pb.BeaconStatusResponse, error) { +func (s *Server) GetBeaconStatus(ctx context.Context, _ *empty.Empty) (*pb.BeaconStatusResponse, error) { syncStatus, err := s.beaconNodeClient.GetSyncStatus(ctx, &ptypes.Empty{}) if err != nil { return &pb.BeaconStatusResponse{ @@ -113,14 +114,14 @@ func (s *Server) GetValidators( // GetValidatorQueue is a wrapper around the /eth/v1alpha1 endpoint of the same name. func (s *Server) GetValidatorQueue( - ctx context.Context, req *ptypes.Empty, + ctx context.Context, _ *empty.Empty, ) (*ethpb.ValidatorQueue, error) { - return s.beaconChainClient.GetValidatorQueue(ctx, req) + return s.beaconChainClient.GetValidatorQueue(ctx, &ptypes.Empty{}) } // GetPeers is a wrapper around the /eth/v1alpha1 endpoint of the same name. func (s *Server) GetPeers( - ctx context.Context, req *ptypes.Empty, + ctx context.Context, _ *empty.Empty, ) (*ethpb.Peers, error) { - return s.beaconNodeClient.ListPeers(ctx, req) + return s.beaconNodeClient.ListPeers(ctx, &ptypes.Empty{}) } diff --git a/validator/rpc/beacon_test.go b/validator/rpc/beacon_test.go index 13209ff5f1..6efaff0af5 100644 --- a/validator/rpc/beacon_test.go +++ b/validator/rpc/beacon_test.go @@ -7,6 +7,7 @@ import ( ptypes "github.com/gogo/protobuf/types" "github.com/golang/mock/gomock" + "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2" @@ -27,7 +28,7 @@ func TestGetBeaconStatus_NotConnected(t *testing.T) { beaconNodeClient: nodeClient, } ctx := context.Background() - resp, err := srv.GetBeaconStatus(ctx, &ptypes.Empty{}) + resp, err := srv.GetBeaconStatus(ctx, &empty.Empty{}) require.NoError(t, err) want := &pb.BeaconStatusResponse{ BeaconNodeEndpoint: "", @@ -65,7 +66,7 @@ func TestGetBeaconStatus_OK(t *testing.T) { beaconChainClient: beaconChainClient, } ctx := context.Background() - resp, err := srv.GetBeaconStatus(ctx, &ptypes.Empty{}) + resp, err := srv.GetBeaconStatus(ctx, &empty.Empty{}) require.NoError(t, err) want := &pb.BeaconStatusResponse{ BeaconNodeEndpoint: "", diff --git a/validator/rpc/health.go b/validator/rpc/health.go index b1ef903de3..2e37eab796 100644 --- a/validator/rpc/health.go +++ b/validator/rpc/health.go @@ -5,6 +5,7 @@ import ( "time" ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" pb "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2" "github.com/prysmaticlabs/prysm/shared/version" @@ -14,7 +15,7 @@ import ( // GetBeaconNodeConnection retrieves the current beacon node connection // information, as well as its sync status. -func (s *Server) GetBeaconNodeConnection(ctx context.Context, _ *ptypes.Empty) (*pb.NodeConnectionResponse, error) { +func (s *Server) GetBeaconNodeConnection(ctx context.Context, _ *empty.Empty) (*pb.NodeConnectionResponse, error) { syncStatus, err := s.syncChecker.Syncing(ctx) if err != nil || s.validatorService.Status() != nil { return &pb.NodeConnectionResponse{ @@ -38,12 +39,12 @@ func (s *Server) GetBeaconNodeConnection(ctx context.Context, _ *ptypes.Empty) ( } // GetLogsEndpoints for the beacon and validator client. -func (s *Server) GetLogsEndpoints(ctx context.Context, _ *ptypes.Empty) (*pb.LogsEndpointResponse, error) { +func (s *Server) GetLogsEndpoints(ctx context.Context, _ *empty.Empty) (*pb.LogsEndpointResponse, error) { return nil, status.Error(codes.Unimplemented, "unimplemented") } // GetVersion -- -func (s *Server) GetVersion(ctx context.Context, _ *ptypes.Empty) (*pb.VersionResponse, error) { +func (s *Server) GetVersion(ctx context.Context, _ *empty.Empty) (*pb.VersionResponse, error) { beacon, err := s.beaconNodeClient.GetVersion(ctx, &ptypes.Empty{}) if err != nil { return nil, err @@ -56,7 +57,7 @@ func (s *Server) GetVersion(ctx context.Context, _ *ptypes.Empty) (*pb.VersionRe } // StreamBeaconLogs from the beacon node via a gRPC server-side stream. -func (s *Server) StreamBeaconLogs(req *ptypes.Empty, stream pb.Health_StreamBeaconLogsServer) error { +func (s *Server) StreamBeaconLogs(req *empty.Empty, stream pb.Health_StreamBeaconLogsServer) error { // Wrap service context with a cancel in order to propagate the exiting of // this method properly to the beacon node server. ctx, cancel := context.WithCancel(s.ctx) @@ -87,7 +88,7 @@ func (s *Server) StreamBeaconLogs(req *ptypes.Empty, stream pb.Health_StreamBeac } // StreamValidatorLogs from the validator client via a gRPC server-side stream. -func (s *Server) StreamValidatorLogs(_ *ptypes.Empty, stream pb.Health_StreamValidatorLogsServer) error { +func (s *Server) StreamValidatorLogs(_ *empty.Empty, stream pb.Health_StreamValidatorLogsServer) error { ch := make(chan []byte, s.streamLogsBufferSize) sub := s.logsStreamer.LogsFeed().Subscribe(ch) defer func() { diff --git a/validator/rpc/health_test.go b/validator/rpc/health_test.go index 60aaa9bbcb..ab9308056e 100644 --- a/validator/rpc/health_test.go +++ b/validator/rpc/health_test.go @@ -6,6 +6,7 @@ import ( "time" ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1" pb "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2" "github.com/prysmaticlabs/prysm/shared/testutil/require" @@ -45,7 +46,7 @@ func TestServer_GetBeaconNodeConnection(t *testing.T) { genesisFetcher: &mockGenesisFetcher{}, nodeGatewayEndpoint: endpoint, } - got, err := s.GetBeaconNodeConnection(ctx, &ptypes.Empty{}) + got, err := s.GetBeaconNodeConnection(ctx, &empty.Empty{}) require.NoError(t, err) want := &pb.NodeConnectionResponse{ BeaconNodeEndpoint: endpoint, diff --git a/validator/rpc/wallet.go b/validator/rpc/wallet.go index 89b961dffb..942ef108ed 100644 --- a/validator/rpc/wallet.go +++ b/validator/rpc/wallet.go @@ -7,7 +7,7 @@ import ( "fmt" "path/filepath" - ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" pb "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2" "github.com/prysmaticlabs/prysm/shared/featureconfig" @@ -126,7 +126,7 @@ func (s *Server) CreateWallet(ctx context.Context, req *pb.CreateWalletRequest) } // WalletConfig returns the wallet's configuration. If no wallet exists, we return an empty response. -func (s *Server) WalletConfig(ctx context.Context, _ *ptypes.Empty) (*pb.WalletResponse, error) { +func (s *Server) WalletConfig(ctx context.Context, _ *empty.Empty) (*pb.WalletResponse, error) { exists, err := wallet.Exists(s.walletDir) if err != nil { return nil, status.Errorf(codes.Internal, checkExistsErrMsg) @@ -166,7 +166,7 @@ func (s *Server) WalletConfig(ctx context.Context, _ *ptypes.Empty) (*pb.WalletR } // GenerateMnemonic creates a new, random bip39 mnemonic phrase. -func (s *Server) GenerateMnemonic(_ context.Context, _ *ptypes.Empty) (*pb.GenerateMnemonicResponse, error) { +func (s *Server) GenerateMnemonic(_ context.Context, _ *empty.Empty) (*pb.GenerateMnemonicResponse, error) { mnemonicRandomness := make([]byte, 32) if _, err := rand.NewGenerator().Read(mnemonicRandomness); err != nil { return nil, status.Errorf( diff --git a/validator/rpc/wallet_test.go b/validator/rpc/wallet_test.go index d054ef2c30..aafa597669 100644 --- a/validator/rpc/wallet_test.go +++ b/validator/rpc/wallet_test.go @@ -8,7 +8,7 @@ import ( "path/filepath" "testing" - ptypes "github.com/gogo/protobuf/types" + "github.com/golang/protobuf/ptypes/empty" "github.com/google/uuid" pb "github.com/prysmaticlabs/prysm/proto/validator/accounts/v2" "github.com/prysmaticlabs/prysm/shared/bls" @@ -106,7 +106,7 @@ func TestServer_CreateWallet_Derived(t *testing.T) { _, err = s.CreateWallet(ctx, req) require.ErrorContains(t, "Must include mnemonic", err) - mnemonicResp, err := s.GenerateMnemonic(ctx, &ptypes.Empty{}) + mnemonicResp, err := s.GenerateMnemonic(ctx, &empty.Empty{}) require.NoError(t, err) req.Mnemonic = mnemonicResp.Mnemonic @@ -116,7 +116,7 @@ func TestServer_CreateWallet_Derived(t *testing.T) { func TestServer_WalletConfig_NoWalletFound(t *testing.T) { s := &Server{} - resp, err := s.WalletConfig(context.Background(), &ptypes.Empty{}) + resp, err := s.WalletConfig(context.Background(), &empty.Empty{}) require.NoError(t, err) assert.DeepEqual(t, resp, &pb.WalletResponse{}) } @@ -143,7 +143,7 @@ func TestServer_WalletConfig(t *testing.T) { require.NoError(t, err) s.wallet = w s.keymanager = km - resp, err := s.WalletConfig(ctx, &ptypes.Empty{}) + resp, err := s.WalletConfig(ctx, &empty.Empty{}) require.NoError(t, err) assert.DeepEqual(t, resp, &pb.WalletResponse{