Move RPC Protos Into V2 Namespace (#9254)

* moved rpc protos

* gazelle

* change pb

* validator health

* edit name

* naming
This commit is contained in:
Raul Jordan
2021-07-22 16:00:28 -05:00
committed by GitHub
parent b7919b3115
commit 5864795ca5
56 changed files with 4448 additions and 4541 deletions

View File

@@ -16,7 +16,6 @@ go_library(
importpath = "github.com/prysmaticlabs/prysm/validator/rpc",
visibility = ["//validator:__subpackages__"],
deps = [
"//proto/beacon/rpc/v1:go_default_library",
"//proto/prysm/v1alpha1:go_default_library",
"//proto/prysm/v2:go_default_library",
"//shared/bls:go_default_library",

View File

@@ -10,7 +10,6 @@ import (
grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/pkg/errors"
healthpb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
pb "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/grpcutils"
@@ -48,7 +47,7 @@ func (s *Server) registerBeaconClient() error {
}
s.beaconChainClient = ethpb.NewBeaconChainClient(conn)
s.beaconNodeClient = ethpb.NewNodeClient(conn)
s.beaconNodeHealthClient = healthpb.NewHealthClient(conn)
s.beaconNodeHealthClient = pb.NewHealthClient(conn)
s.beaconNodeValidatorClient = ethpb.NewBeaconNodeValidatorClient(conn)
return nil
}

View File

@@ -56,7 +56,7 @@ func (s *Server) GetVersion(ctx context.Context, _ *emptypb.Empty) (*pb.VersionR
}
// StreamBeaconLogs from the beacon node via a gRPC server-side stream.
func (s *Server) StreamBeaconLogs(req *emptypb.Empty, stream pb.Health_StreamBeaconLogsServer) error {
func (s *Server) StreamBeaconLogs(req *emptypb.Empty, stream pb.ValidatorHealth_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 +87,7 @@ func (s *Server) StreamBeaconLogs(req *emptypb.Empty, stream pb.Health_StreamBea
}
// StreamValidatorLogs from the validator client via a gRPC server-side stream.
func (s *Server) StreamValidatorLogs(_ *emptypb.Empty, stream pb.Health_StreamValidatorLogsServer) error {
func (s *Server) StreamValidatorLogs(_ *emptypb.Empty, stream pb.ValidatorHealth_StreamValidatorLogsServer) error {
ch := make(chan []byte, s.streamLogsBufferSize)
sub := s.logsStreamer.LogsFeed().Subscribe(ch)
defer func() {

View File

@@ -11,7 +11,6 @@ import (
recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
healthpb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
pb "github.com/prysmaticlabs/prysm/proto/prysm/v2"
"github.com/prysmaticlabs/prysm/shared/event"
@@ -63,7 +62,7 @@ type Server struct {
beaconChainClient ethpb.BeaconChainClient
beaconNodeClient ethpb.NodeClient
beaconNodeValidatorClient ethpb.BeaconNodeValidatorClient
beaconNodeHealthClient healthpb.HealthClient
beaconNodeHealthClient pb.HealthClient
valDB db.Database
ctx context.Context
cancel context.CancelFunc
@@ -185,7 +184,7 @@ func (s *Server) Start() {
reflection.Register(s.grpcServer)
pb.RegisterAuthServer(s.grpcServer, s)
pb.RegisterWalletServer(s.grpcServer, s)
pb.RegisterHealthServer(s.grpcServer, s)
pb.RegisterValidatorHealthServer(s.grpcServer, s)
pb.RegisterBeaconServer(s.grpcServer, s)
pb.RegisterAccountsServer(s.grpcServer, s)
pb.RegisterSlashingProtectionServer(s.grpcServer, s)