mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Move RPC Protos Into V2 Namespace (#9254)
* moved rpc protos * gazelle * change pb * validator health * edit name * naming
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user