diff --git a/disperser/apiserver/server_v2.go b/disperser/apiserver/server_v2.go index 114f244093..2c502aaafa 100644 --- a/disperser/apiserver/server_v2.go +++ b/disperser/apiserver/server_v2.go @@ -10,6 +10,7 @@ import ( "github.com/Layr-Labs/eigenda/api" pbcommon "github.com/Layr-Labs/eigenda/api/grpc/common" + pbv1 "github.com/Layr-Labs/eigenda/api/grpc/disperser" pb "github.com/Layr-Labs/eigenda/api/grpc/disperser/v2" "github.com/Layr-Labs/eigenda/common" healthcheck "github.com/Layr-Labs/eigenda/common/healthcheck" @@ -32,6 +33,11 @@ type OnchainState struct { TTL time.Duration } +// Include disperser v1 protos to support grpcurl/reflection of v1 APIs +type DispersalServerV1 struct { + pbv1.UnimplementedDisperserServer +} + type DispersalServerV2 struct { pb.UnimplementedDisperserServer @@ -98,6 +104,9 @@ func (s *DispersalServerV2) Start(ctx context.Context) error { reflection.Register(gs) pb.RegisterDisperserServer(gs, s) + // Unimplemented v1 server for grpcurl/reflection support + pbv1.RegisterDisperserServer(gs, &DispersalServerV1{}) + // Register Server for Health Checks name := pb.Disperser_ServiceDesc.ServiceName healthcheck.RegisterHealthServer(name, gs)