diff --git a/api/grpcclient/client.go b/api/grpcclient/client.go index 31bf0c968040..8d28bc0c9226 100644 --- a/api/grpcclient/client.go +++ b/api/grpcclient/client.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "github.com/ava-labs/avalanchego/api/server" "github.com/ava-labs/avalanchego/ids" ) @@ -17,7 +18,7 @@ import ( // all requests func NewChainClient(uri string, chainID ids.ID, opts ...grpc.DialOption) (*grpc.ClientConn, error) { dialOpts := []grpc.DialOption{ - grpc.WithUnaryInterceptor(SetChainIDHeaderUnaryClientInterceptor(chainID)), + grpc.WithUnaryInterceptor(SetAPIRouteHeaderUnaryClientInterceptor(chainID)), grpc.WithStreamInterceptor(SetChainIDHeaderStreamClientInterceptor(chainID)), } @@ -31,9 +32,9 @@ func NewChainClient(uri string, chainID ids.ID, opts ...grpc.DialOption) (*grpc. return conn, nil } -// SetChainIDHeaderUnaryClientInterceptor sets the chain-id header for unary +// SetAPIRouteHeaderUnaryClientInterceptor sets the chain-id header for unary // requests -func SetChainIDHeaderUnaryClientInterceptor(chainID ids.ID) grpc.UnaryClientInterceptor { +func SetAPIRouteHeaderUnaryClientInterceptor(chainID ids.ID) grpc.UnaryClientInterceptor { return func( ctx context.Context, method string, @@ -67,5 +68,5 @@ func SetChainIDHeaderStreamClientInterceptor(chainID ids.ID) grpc.StreamClientIn // newContextWithChainHeader sets the chain-id header which the server uses // to route the client grpc request func newContextWithChainIDHeader(ctx context.Context, chainID ids.ID) context.Context { - return metadata.AppendToOutgoingContext(ctx, "chain-id", chainID.String()) + return metadata.AppendToOutgoingContext(ctx, server.HTTPHeaderRoute, chainID.String()) } diff --git a/api/info/connect_handler/connect_handler.go b/api/info/connect_handler/connect_handler.go new file mode 100644 index 000000000000..7573dd77af99 --- /dev/null +++ b/api/info/connect_handler/connect_handler.go @@ -0,0 +1,327 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package connecthandler + +import ( + "context" + "fmt" + "time" + + "connectrpc.com/connect" + "google.golang.org/protobuf/types/known/emptypb" + "google.golang.org/protobuf/types/known/timestamppb" + + "github.com/ava-labs/avalanchego/api/info" + "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/avalanchego/upgrade" + + v1 "github.com/ava-labs/avalanchego/proto/pb/info/v1" +) + +// NewConnectInfoService returns a ConnectRPC-compatible InfoServiceHandler +// that delegates calls to the existing Info implementation +func NewConnectInfoService(info *info.Info) *ConnectInfoService { + return &ConnectInfoService{ + Info: info, + } +} + +type ConnectInfoService struct { + *info.Info +} + +// GetNodeVersion returns the semantic version, database version, RPC protocol version, +// Git commit hash, and the list of VM versions this node is running +func (s *ConnectInfoService) GetNodeVersion( + _ context.Context, + _ *connect.Request[emptypb.Empty], +) (*connect.Response[v1.GetNodeVersionReply], error) { + var jsonReply info.GetNodeVersionReply + if err := s.Info.GetNodeVersion(nil, nil, &jsonReply); err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + + // Convert VM versions map to protobuf format + vmVersions := make(map[string]string) + for id, version := range jsonReply.VMVersions { + vmVersions[id] = version + } + + reply := &v1.GetNodeVersionReply{ + Version: jsonReply.Version, + DatabaseVersion: jsonReply.DatabaseVersion, + RpcProtocolVersion: uint32(jsonReply.RPCProtocolVersion), + GitCommit: jsonReply.GitCommit, + VmVersions: vmVersions, + } + + return connect.NewResponse(reply), nil +} + +// GetNodeID returns this node's unique identifier and proof-of-possession bytes +func (s *ConnectInfoService) GetNodeID( + _ context.Context, + _ *connect.Request[emptypb.Empty], +) (*connect.Response[v1.GetNodeIDReply], error) { + var jsonReply info.GetNodeIDReply + if err := s.Info.GetNodeID(nil, nil, &jsonReply); err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + + nodePOP := []byte{} + if jsonReply.NodePOP != nil { + // Use Marshal to serialize ProofOfPossession to bytes + // MarshalJSON is not ideal here. Ideally, we would use a binary serialization method (MarshalBinary, Marshal, etc.) + var err error + nodePOP, err = jsonReply.NodePOP.MarshalJSON() + if err != nil { + return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("failed to marshal NodePOP: %w", err)) + } + } + + reply := &v1.GetNodeIDReply{ + NodeId: jsonReply.NodeID.String(), + NodePop: nodePOP, + } + + return connect.NewResponse(reply), nil +} + +// GetNodeIP returns the primary IP address this node uses for P2P networking.\ +func (s *ConnectInfoService) GetNodeIP( + _ context.Context, + _ *connect.Request[emptypb.Empty], +) (*connect.Response[v1.GetNodeIPReply], error) { + var jsonReply info.GetNodeIPReply + if err := s.Info.GetNodeIP(nil, nil, &jsonReply); err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + + reply := &v1.GetNodeIPReply{ + Ip: jsonReply.IP.String(), + } + + return connect.NewResponse(reply), nil +} + +// GetNetworkID returns the numeric ID of the Avalanche network this node is connected to +func (s *ConnectInfoService) GetNetworkID( + _ context.Context, + _ *connect.Request[emptypb.Empty], +) (*connect.Response[v1.GetNetworkIDReply], error) { + var jsonReply info.GetNetworkIDReply + if err := s.Info.GetNetworkID(nil, nil, &jsonReply); err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + + reply := &v1.GetNetworkIDReply{ + NetworkId: uint32(jsonReply.NetworkID), + } + + return connect.NewResponse(reply), nil +} + +// GetNetworkName returns the name of the network +func (s *ConnectInfoService) GetNetworkName( + _ context.Context, + _ *connect.Request[emptypb.Empty], +) (*connect.Response[v1.GetNetworkNameReply], error) { + var jsonReply info.GetNetworkNameReply + if err := s.Info.GetNetworkName(nil, nil, &jsonReply); err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + + reply := &v1.GetNetworkNameReply{ + NetworkName: jsonReply.NetworkName, + } + + return connect.NewResponse(reply), nil +} + +// GetBlockchainID maps an ID string to its canonical chain ID +func (s *ConnectInfoService) GetBlockchainID( + _ context.Context, + req *connect.Request[v1.GetBlockchainIDArgs], +) (*connect.Response[v1.GetBlockchainIDReply], error) { + jsonArgs := info.GetBlockchainIDArgs{ + Alias: req.Msg.Alias, + } + + var jsonReply info.GetBlockchainIDReply + if err := s.Info.GetBlockchainID(nil, &jsonArgs, &jsonReply); err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + + reply := &v1.GetBlockchainIDReply{ + BlockchainId: jsonReply.BlockchainID.String(), + } + + return connect.NewResponse(reply), nil +} + +// Peers returns metadata (IP, nodeID, version, uptimes, subnets, etc.) for the given peer node IDs +func (s *ConnectInfoService) Peers( + _ context.Context, + req *connect.Request[v1.PeersArgs], +) (*connect.Response[v1.PeersReply], error) { + nodeIDs := make([]ids.NodeID, 0, len(req.Msg.NodeIds)) + for _, nodeIDStr := range req.Msg.NodeIds { + nodeID, err := ids.NodeIDFromString(nodeIDStr) + if err != nil { + return nil, connect.NewError( + connect.CodeInvalidArgument, fmt.Errorf("invalid nodeID %s: %w", nodeIDStr, err)) + } + nodeIDs = append(nodeIDs, nodeID) + } + + jsonArgs := info.PeersArgs{ + NodeIDs: nodeIDs, + } + + var jsonReply info.PeersReply + if err := s.Info.Peers(nil, &jsonArgs, &jsonReply); err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + + peers := make([]*v1.PeerInfo, 0, len(jsonReply.Peers)) + for _, peer := range jsonReply.Peers { + // Convert TrackedSubnets (set.Set[ids.ID]) to []string + trackedSubnetsIDs := peer.TrackedSubnets.List() + trackedSubnets := make([]string, len(trackedSubnetsIDs)) + for i, id := range trackedSubnetsIDs { + trackedSubnets[i] = id.String() + } + + benched := make([]string, len(peer.Benched)) + copy(benched, peer.Benched) + + peers = append(peers, &v1.PeerInfo{ + Ip: peer.IP.String(), + PublicIp: peer.PublicIP.String(), + NodeId: peer.ID.String(), + Version: peer.Version, + LastSent: formatTime(peer.LastSent), + LastReceived: formatTime(peer.LastReceived), + Benched: benched, + ObservedUptime: uint32(peer.ObservedUptime), + TrackedSubnets: trackedSubnets, + }) + } + + reply := &v1.PeersReply{ + NumPeers: uint32(jsonReply.NumPeers), + Peers: peers, + } + + return connect.NewResponse(reply), nil +} + +// Helper function to format time +func formatTime(t time.Time) string { + return t.Format(time.RFC3339) +} + +// IsBootstrapped returns whether the named chain has finished its bootstrap process on this node +func (s *ConnectInfoService) IsBootstrapped( + _ context.Context, + req *connect.Request[v1.IsBootstrappedArgs], +) (*connect.Response[v1.IsBootstrappedResponse], error) { + // Use the chain from the request + jsonArgs := info.IsBootstrappedArgs{ + Chain: req.Msg.Chain, + } + + var jsonReply info.IsBootstrappedResponse + if err := s.Info.IsBootstrapped(nil, &jsonArgs, &jsonReply); err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + + reply := &v1.IsBootstrappedResponse{ + IsBootstrapped: jsonReply.IsBootstrapped, + } + + return connect.NewResponse(reply), nil +} + +// Upgrades returns all the scheduled upgrade activation times and parameters for this node +func (s *ConnectInfoService) Upgrades( + _ context.Context, + _ *connect.Request[emptypb.Empty], +) (*connect.Response[v1.UpgradesReply], error) { + var config upgrade.Config + if err := s.Info.Upgrades(nil, nil, &config); err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + + reply := &v1.UpgradesReply{ + ApricotPhase1Time: timestamppb.New(config.ApricotPhase1Time), + ApricotPhase2Time: timestamppb.New(config.ApricotPhase2Time), + ApricotPhase3Time: timestamppb.New(config.ApricotPhase3Time), + ApricotPhase4Time: timestamppb.New(config.ApricotPhase4Time), + ApricotPhase4MinPChainHeight: config.ApricotPhase4MinPChainHeight, + ApricotPhase5Time: timestamppb.New(config.ApricotPhase5Time), + ApricotPhasePre6Time: timestamppb.New(config.ApricotPhasePre6Time), + ApricotPhase6Time: timestamppb.New(config.ApricotPhase6Time), + ApricotPhasePost6Time: timestamppb.New(config.ApricotPhasePost6Time), + BanffTime: timestamppb.New(config.BanffTime), + CortinaTime: timestamppb.New(config.CortinaTime), + CortinaXChainStopVertexId: config.CortinaXChainStopVertexID.String(), + DurangoTime: timestamppb.New(config.DurangoTime), + EtnaTime: timestamppb.New(config.EtnaTime), + FortunaTime: timestamppb.New(config.FortunaTime), + GraniteTime: timestamppb.New(config.GraniteTime), + } + + return connect.NewResponse(reply), nil +} + +// Uptime returns this node's uptime metrics (rewarding stake %, weighted average %, etc.) +func (s *ConnectInfoService) Uptime( + _ context.Context, + _ *connect.Request[emptypb.Empty], +) (*connect.Response[v1.UptimeResponse], error) { + var jsonReply info.UptimeResponse + if err := s.Info.Uptime(nil, nil, &jsonReply); err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + + reply := &v1.UptimeResponse{ + RewardingStakePercentage: float64(jsonReply.RewardingStakePercentage), + WeightedAveragePercentage: float64(jsonReply.WeightedAveragePercentage), + } + + return connect.NewResponse(reply), nil +} + +// GetVMs returns a map of VM IDs to their known aliases, plus FXs information +func (s *ConnectInfoService) GetVMs( + _ context.Context, + _ *connect.Request[emptypb.Empty], +) (*connect.Response[v1.GetVMsReply], error) { + var jsonReply info.GetVMsReply + if err := s.Info.GetVMs(nil, nil, &jsonReply); err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + + // Convert the VM map from JSON-RPC format to protobuf format + vms := make(map[string]*v1.VMAliases) + for vmID, aliases := range jsonReply.VMs { + vms[vmID.String()] = &v1.VMAliases{ + Aliases: aliases, + } + } + + // Convert the FXs map from JSON-RPC format to protobuf format + fxs := make(map[string]string) + for fxID, name := range jsonReply.Fxs { + fxs[fxID.String()] = name + } + + reply := &v1.GetVMsReply{ + Vms: vms, + Fxs: fxs, + } + + return connect.NewResponse(reply), nil +} diff --git a/api/info/service.go b/api/info/service.go index 14d88ca1d3b8..ba6edd5a047e 100644 --- a/api/info/service.go +++ b/api/info/service.go @@ -68,13 +68,13 @@ var ( // Info is the API service for unprivileged info on a node type Info struct { Parameters - log logging.Logger - validators validators.Manager - myIP *utils.Atomic[netip.AddrPort] - networking network.Network - chainManager chains.Manager - vmManager vms.Manager - benchlist benchlist.Manager + Log logging.Logger + Validators validators.Manager + MyIP *utils.Atomic[netip.AddrPort] + Networking network.Network + ChainManager chains.Manager + VMManager vms.Manager + Benchlist benchlist.Manager } type Parameters struct { @@ -98,24 +98,22 @@ func NewService( myIP *utils.Atomic[netip.AddrPort], network network.Network, benchlist benchlist.Manager, -) (http.Handler, error) { +) (http.Handler, *Info, error) { server := rpc.NewServer() codec := json.NewCodec() server.RegisterCodec(codec, "application/json") server.RegisterCodec(codec, "application/json;charset=UTF-8") - return server, server.RegisterService( - &Info{ - Parameters: parameters, - log: log, - validators: validators, - chainManager: chainManager, - vmManager: vmManager, - myIP: myIP, - networking: network, - benchlist: benchlist, - }, - "info", - ) + info := &Info{ + Parameters: parameters, + Log: log, + Validators: validators, + ChainManager: chainManager, + VMManager: vmManager, + MyIP: myIP, + Networking: network, + Benchlist: benchlist, + } + return server, info, server.RegisterService(info, "info") } // GetNodeVersionReply are the results from calling GetNodeVersion @@ -129,12 +127,12 @@ type GetNodeVersionReply struct { // GetNodeVersion returns the version this node is running func (i *Info) GetNodeVersion(_ *http.Request, _ *struct{}, reply *GetNodeVersionReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getNodeVersion"), ) - vmVersions, err := i.vmManager.Versions() + vmVersions, err := i.VMManager.Versions() if err != nil { return err } @@ -155,7 +153,7 @@ type GetNodeIDReply struct { // GetNodeID returns the node ID of this node func (i *Info) GetNodeID(_ *http.Request, _ *struct{}, reply *GetNodeIDReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getNodeID"), ) @@ -177,18 +175,18 @@ type GetNodeIPReply struct { // GetNodeIP returns the IP of this node func (i *Info) GetNodeIP(_ *http.Request, _ *struct{}, reply *GetNodeIPReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getNodeIP"), ) - reply.IP = i.myIP.Get() + reply.IP = i.MyIP.Get() return nil } // GetNetworkID returns the network ID this node is running on func (i *Info) GetNetworkID(_ *http.Request, _ *struct{}, reply *GetNetworkIDReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getNetworkID"), ) @@ -204,7 +202,7 @@ type GetNetworkNameReply struct { // GetNetworkName returns the network name this node is running on func (i *Info) GetNetworkName(_ *http.Request, _ *struct{}, reply *GetNetworkNameReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getNetworkName"), ) @@ -225,12 +223,12 @@ type GetBlockchainIDReply struct { // GetBlockchainID returns the blockchain ID that resolves the alias that was supplied func (i *Info) GetBlockchainID(_ *http.Request, args *GetBlockchainIDArgs, reply *GetBlockchainIDReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getBlockchainID"), ) - bID, err := i.chainManager.Lookup(args.Alias) + bID, err := i.ChainManager.Lookup(args.Alias) reply.BlockchainID = bID return err } @@ -256,18 +254,18 @@ type PeersReply struct { // Peers returns the list of current validators func (i *Info) Peers(_ *http.Request, args *PeersArgs, reply *PeersReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "peers"), ) - peers := i.networking.PeerInfo(args.NodeIDs) + peers := i.Networking.PeerInfo(args.NodeIDs) peerInfo := make([]Peer, len(peers)) for index, peer := range peers { - benchedIDs := i.benchlist.GetBenched(peer.ID) + benchedIDs := i.Benchlist.GetBenched(peer.ID) benchedAliases := make([]string, len(benchedIDs)) for idx, id := range benchedIDs { - alias, err := i.chainManager.PrimaryAlias(id) + alias, err := i.ChainManager.PrimaryAlias(id) if err != nil { return fmt.Errorf("failed to get primary alias for chain ID %s: %w", id, err) } @@ -300,7 +298,7 @@ type IsBootstrappedResponse struct { // IsBootstrapped returns nil and sets [reply.IsBootstrapped] == true iff [args.Chain] exists and is done bootstrapping // Returns an error if the chain doesn't exist func (i *Info) IsBootstrapped(_ *http.Request, args *IsBootstrappedArgs, reply *IsBootstrappedResponse) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "isBootstrapped"), logging.UserString("chain", args.Chain), @@ -309,17 +307,17 @@ func (i *Info) IsBootstrapped(_ *http.Request, args *IsBootstrappedArgs, reply * if args.Chain == "" { return errNoChainProvided } - chainID, err := i.chainManager.Lookup(args.Chain) + chainID, err := i.ChainManager.Lookup(args.Chain) if err != nil { return fmt.Errorf("there is no chain with alias/ID '%s'", args.Chain) } - reply.IsBootstrapped = i.chainManager.IsBootstrapped(chainID) + reply.IsBootstrapped = i.ChainManager.IsBootstrapped(chainID) return nil } // Upgrades returns the upgrade schedule this node is running. func (i *Info) Upgrades(_ *http.Request, _ *struct{}, reply *upgrade.Config) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "upgrades"), ) @@ -346,12 +344,12 @@ type UptimeResponse struct { } func (i *Info) Uptime(_ *http.Request, _ *struct{}, reply *UptimeResponse) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "uptime"), ) - result, err := i.networking.NodeUptime() + result, err := i.Networking.NodeUptime() if err != nil { return fmt.Errorf("couldn't get node uptime: %w", err) } @@ -382,15 +380,15 @@ func (a *ACPsReply) getACP(acpNum uint32) *ACP { } func (i *Info) Acps(_ *http.Request, _ *struct{}, reply *ACPsReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "acps"), ) reply.ACPs = make(map[uint32]*ACP, constants.CurrentACPs.Len()) - peers := i.networking.PeerInfo(nil) + peers := i.Networking.PeerInfo(nil) for _, peer := range peers { - weight := json.Uint64(i.validators.GetWeight(constants.PrimaryNetworkID, peer.ID)) + weight := json.Uint64(i.Validators.GetWeight(constants.PrimaryNetworkID, peer.ID)) if weight == 0 { continue } @@ -407,7 +405,7 @@ func (i *Info) Acps(_ *http.Request, _ *struct{}, reply *ACPsReply) error { } } - totalWeight, err := i.validators.TotalWeight(constants.PrimaryNetworkID) + totalWeight, err := i.Validators.TotalWeight(constants.PrimaryNetworkID) if err != nil { return err } @@ -432,7 +430,7 @@ type GetTxFeeResponse struct { // GetTxFee returns the transaction fee in nAVAX. func (i *Info) GetTxFee(_ *http.Request, _ *struct{}, reply *GetTxFeeResponse) error { - i.log.Warn("deprecated API called", + i.Log.Warn("deprecated API called", zap.String("service", "info"), zap.String("method", "getTxFee"), ) @@ -458,7 +456,7 @@ type GetVMsReply struct { // GetVMs lists the virtual machines installed on the node func (i *Info) GetVMs(_ *http.Request, _ *struct{}, reply *GetVMsReply) error { - i.log.Debug("API called", + i.Log.Debug("API called", zap.String("service", "info"), zap.String("method", "getVMs"), ) diff --git a/api/info/service_test.go b/api/info/service_test.go index 85a3fdf177c7..e7f7fcd9630f 100644 --- a/api/info/service_test.go +++ b/api/info/service_test.go @@ -30,7 +30,8 @@ func initGetVMsTest(t *testing.T) *getVMsTest { Parameters: Parameters{ VMManager: mockVMManager, }, - log: logging.NoLog{}, + VMManager: mockVMManager, + Log: logging.NoLog{}, }, mockVMManager: mockVMManager, } diff --git a/api/server/http2_router.go b/api/server/http2_router.go deleted file mode 100644 index ff630e4d443b..000000000000 --- a/api/server/http2_router.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package server - -import ( - "net/http" - "sync" - - "github.com/ava-labs/avalanchego/ids" -) - -var _ http.Handler = (*http2Router)(nil) - -type http2Router struct { - lock sync.RWMutex - handlers map[string]http.Handler -} - -func newHTTP2Router() *http2Router { - return &http2Router{ - handlers: make(map[string]http.Handler), - } -} - -func (h *http2Router) ServeHTTP(w http.ResponseWriter, r *http.Request) { - // the chain-id header must be set to route the request to the correct chain - // http2 handler - chainID := r.Header.Get("chain-id") - if len(chainID) == 0 { - w.WriteHeader(http.StatusBadRequest) - return - } - - h.lock.RLock() - handler, ok := h.handlers[chainID] - h.lock.RUnlock() - if !ok { - w.WriteHeader(http.StatusNotFound) - return - } - - handler.ServeHTTP(w, r) -} - -func (h *http2Router) Add(chainID ids.ID, handler http.Handler) bool { - h.lock.Lock() - defer h.lock.Unlock() - - chainIDStr := chainID.String() - if _, ok := h.handlers[chainIDStr]; ok { - return false - } - - h.handlers[chainIDStr] = handler - return true -} diff --git a/api/server/http2_router_test.go b/api/server/http2_router_test.go deleted file mode 100644 index 4123206405a7..000000000000 --- a/api/server/http2_router_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package server - -import ( - "net/http" - "net/http/httptest" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/ava-labs/avalanchego/ids" -) - -func TestHTTP2RouterAdd(t *testing.T) { - require := require.New(t) - h := newHTTP2Router() - handler := http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}) - - require.True(h.Add(ids.Empty, handler)) - require.False(h.Add(ids.Empty, handler)) -} - -func TestHTTP2RouterServeHTTP(t *testing.T) { - tests := []struct { - name string - chainIDs []ids.ID - header http.Header - wantCode int - }{ - { - name: "missing chain-id header", - wantCode: http.StatusBadRequest, - }, - { - name: "unknown referenced chain-id", - header: http.Header{ - http.CanonicalHeaderKey("chain-id"): []string{ids.Empty.String()}, - }, - wantCode: http.StatusNotFound, - }, - { - name: "valid handler", - chainIDs: []ids.ID{ids.Empty}, - header: http.Header{ - http.CanonicalHeaderKey("chain-id"): []string{ids.Empty.String()}, - }, - wantCode: http.StatusOK, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - require := require.New(t) - - h := newHTTP2Router() - handler := http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}) - writer := httptest.NewRecorder() - request := httptest.NewRequest(http.MethodPost, "/", nil) - request.Header = tt.header - - for _, chainID := range tt.chainIDs { - require.True(h.Add(chainID, handler)) - } - - h.ServeHTTP(writer, request) - require.Equal(tt.wantCode, writer.Code) - }) - } -} diff --git a/api/server/router.go b/api/server/router.go index 6adadf608be4..160c87d78f4c 100644 --- a/api/server/router.go +++ b/api/server/router.go @@ -15,7 +15,9 @@ import ( ) var ( - errUnknownBaseURL = errors.New("unknown base url") + // TODO normalize lowercase? + HTTPHeaderRoute = "Avalanche-API-Route" + errUnknownEndpoint = errors.New("unknown endpoint") errAlreadyReserved = errors.New("route is either already aliased or already maps to a handle") ) @@ -25,9 +27,13 @@ type router struct { router *mux.Router routeLock sync.Mutex - reservedRoutes set.Set[string] // Reserves routes so that there can't be alias that conflict - aliases map[string][]string // Maps a route to a set of reserved routes - routes map[string]map[string]http.Handler // Maps routes to a handler + reservedRoutes set.Set[string] // Reserves routes so that there can't be alias that conflict + aliases map[string][]string // Maps a route to a set of reserved routes + // headerRoutes contains routes based on http headers + // aliasing is not currently supported + headerRoutes map[string]http.Handler + // legacy url-based routing + routes map[string]http.Handler // Maps routes to a handler } func newRouter() *router { @@ -35,7 +41,8 @@ func newRouter() *router { router: mux.NewRouter(), reservedRoutes: set.Set[string]{}, aliases: make(map[string][]string), - routes: make(map[string]map[string]http.Handler), + headerRoutes: make(map[string]http.Handler), + routes: make(map[string]http.Handler), } } @@ -43,65 +50,92 @@ func (r *router) ServeHTTP(writer http.ResponseWriter, request *http.Request) { r.lock.RLock() defer r.lock.RUnlock() - r.router.ServeHTTP(writer, request) + route, ok := request.Header[http.CanonicalHeaderKey(HTTPHeaderRoute)] + if !ok { + // If there is no routing header, fall-back to the legacy path-based + // routing + r.router.ServeHTTP(writer, request) + return + } + + // Request specified the routing header key but did not provide a + // corresponding value + if len(route) == 0 { + writer.WriteHeader(http.StatusBadRequest) + return + } + + handler, ok := r.headerRoutes[route[0]] + if !ok { + writer.WriteHeader(http.StatusNotFound) + return + } + + handler.ServeHTTP(writer, request) } -func (r *router) GetHandler(base, endpoint string) (http.Handler, error) { +func (r *router) GetHandler(endpoint string) (http.Handler, error) { r.routeLock.Lock() defer r.routeLock.Unlock() - urlBase, exists := r.routes[base] - if !exists { - return nil, errUnknownBaseURL - } - handler, exists := urlBase[endpoint] + handler, exists := r.routes[endpoint] if !exists { return nil, errUnknownEndpoint } + return handler, nil } -func (r *router) AddRouter(base, endpoint string, handler http.Handler) error { +func (r *router) AddHeaderRoute(route string, handler http.Handler) bool { + // TODO which lock do i use + r.lock.Lock() + defer r.lock.Unlock() + + _, ok := r.headerRoutes[route] + if ok { + return false + } + + r.headerRoutes[route] = handler + return true +} + +func (r *router) AddRouter(endpoint string, handler http.Handler) error { r.lock.Lock() defer r.lock.Unlock() r.routeLock.Lock() defer r.routeLock.Unlock() - return r.addRouter(base, endpoint, handler) + return r.addRouter(endpoint, handler) } -func (r *router) addRouter(base, endpoint string, handler http.Handler) error { - if r.reservedRoutes.Contains(base) { - return fmt.Errorf("%w: %s", errAlreadyReserved, base) +func (r *router) addRouter(endpoint string, handler http.Handler) error { + if r.reservedRoutes.Contains(endpoint) { + return fmt.Errorf("%w: %s", errAlreadyReserved, endpoint) } - return r.forceAddRouter(base, endpoint, handler) + return r.forceAddRouter(endpoint, handler) } -func (r *router) forceAddRouter(base, endpoint string, handler http.Handler) error { - endpoints := r.routes[base] - if endpoints == nil { - endpoints = make(map[string]http.Handler) - } - url := base + endpoint - if _, exists := endpoints[endpoint]; exists { - return fmt.Errorf("failed to create endpoint as %s already exists", url) +func (r *router) forceAddRouter(endpoint string, handler http.Handler) error { + _, ok := r.routes[endpoint] + if ok { + return fmt.Errorf("failed to create endpoint as %s already exists", endpoint) } - endpoints[endpoint] = handler - r.routes[base] = endpoints + r.routes[endpoint] = handler // Name routes based on their URL for easy retrieval in the future - route := r.router.Handle(url, handler) + route := r.router.Handle(endpoint, handler) if route == nil { - return fmt.Errorf("failed to create new route for %s", url) + return fmt.Errorf("failed to create new route for %s", endpoint) } - route.Name(url) + route.Name(endpoint) var err error - if aliases, exists := r.aliases[base]; exists { + if aliases, exists := r.aliases[endpoint]; exists { for _, alias := range aliases { - if innerErr := r.forceAddRouter(alias, endpoint, handler); err == nil { + if innerErr := r.forceAddRouter(alias, handler); err == nil { err = innerErr } } @@ -128,12 +162,10 @@ func (r *router) AddAlias(base string, aliases ...string) error { r.aliases[base] = append(r.aliases[base], aliases...) var err error - if endpoints, exists := r.routes[base]; exists { - for endpoint, handler := range endpoints { - for _, alias := range aliases { - if innerErr := r.forceAddRouter(alias, endpoint, handler); err == nil { - err = innerErr - } + if handler, exists := r.routes[base]; exists { + for _, alias := range aliases { + if innerErr := r.forceAddRouter(alias, handler); err == nil { + err = innerErr } } } diff --git a/api/server/router_test.go b/api/server/router_test.go index f6676a3727a3..31d141fac02e 100644 --- a/api/server/router_test.go +++ b/api/server/router_test.go @@ -29,21 +29,21 @@ func TestAliasing(t *testing.T) { require.ErrorIs(err, errAlreadyReserved) handler1 := &testHandler{} - err = r.AddRouter("2", "", handler1) + err = r.AddRouter("2", handler1) require.ErrorIs(err, errAlreadyReserved) - require.NoError(r.AddRouter("5", "", handler1)) + require.NoError(r.AddRouter("5", handler1)) - handler, exists := r.routes["5"][""] + handler, exists := r.routes["5"] require.True(exists) require.Equal(handler1, handler) require.NoError(r.AddAlias("5", "7")) - handler, exists = r.routes["7"][""] + handler, exists = r.routes["7"] require.True(exists) require.Equal(handler1, handler) - handler, err = r.GetHandler("7", "") + handler, err = r.GetHandler("7") require.NoError(err) require.Equal(handler1, handler) } @@ -55,6 +55,6 @@ func TestBlock(t *testing.T) { require.NoError(r.AddAlias("1", "1")) handler1 := &testHandler{} - err := r.AddRouter("1", "", handler1) + err := r.AddRouter("1", handler1) require.ErrorIs(err, errAlreadyReserved) } diff --git a/api/server/server.go b/api/server/server.go index 6bbd0b610467..489d8ea7346b 100644 --- a/api/server/server.go +++ b/api/server/server.go @@ -8,7 +8,6 @@ import ( "fmt" "net" "net/http" - "net/url" "path" "time" @@ -39,7 +38,8 @@ var ( type PathAdder interface { // AddRoute registers a route to a handler. - AddRoute(handler http.Handler, base, endpoint string) error + AddRoute(handler http.Handler, endpoint string, metricName string) error + AddHeaderRoute(route string, handler http.Handler) bool // AddAliases registers aliases to the server AddAliases(endpoint string, aliases ...string) error @@ -88,8 +88,7 @@ type server struct { metrics *metrics // Maps endpoints to handlers - router *router - http2Router *http2Router + router *router srv *http.Server @@ -118,19 +117,9 @@ func New( router := newRouter() handler := wrapHandler(router, nodeID, allowedOrigins, allowedHosts) - http2Router := newHTTP2Router() - http2Handler := wrapHandler(http2Router, nodeID, allowedOrigins, allowedHosts) - httpServer := &http.Server{ Handler: h2c.NewHandler( - http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.ProtoMajor == 2 { - http2Handler.ServeHTTP(w, r) - return - } - - handler.ServeHTTP(w, r) - }), + handler, &http2.Server{ MaxConcurrentStreams: maxConcurrentStreams, }), @@ -151,7 +140,6 @@ func New( tracer: tracer, metrics: m, router: router, - http2Router: http2Router, srv: httpServer, listener: listener, }, nil @@ -163,7 +151,7 @@ func (s *server) Dispatch() error { func (s *server) RegisterChain(chainName string, ctx *snow.ConsensusContext, vm common.VM) { ctx.Lock.Lock() - handlers, err := vm.CreateHandlers(context.TODO()) + handler, err := vm.NewHTTPHandler(context.TODO()) ctx.Lock.Unlock() if err != nil { s.log.Error("failed to create handlers", @@ -178,59 +166,19 @@ func (s *server) RegisterChain(chainName string, ctx *snow.ConsensusContext, vm ) // all subroutes to a chain begin with "bc/" defaultEndpoint := path.Join(constants.ChainAliasPrefix, ctx.ChainID.String()) - - // Register each endpoint - for extension, handler := range handlers { - // Validate that the route being added is valid - // e.g. "/foo" and "" are ok but "\n" is not - _, err := url.ParseRequestURI(extension) - if extension != "" && err != nil { - s.log.Error("could not add route to chain's API handler", - zap.String("reason", "route is malformed"), - zap.Error(err), - ) - continue - } - if err := s.addChainRoute(chainName, handler, ctx, defaultEndpoint, extension); err != nil { - s.log.Error("error adding route", - zap.Error(err), - ) - } - } - - ctx.Lock.Lock() - http2Handler, err := vm.CreateHTTP2Handler(context.TODO()) - ctx.Lock.Unlock() - if err != nil { - s.log.Error("failed to create http2 handler", - zap.String("chainName", chainName), - zap.Error(err), - ) - return - } - - if http2Handler == nil { - return - } - - http2Handler = s.wrapMiddleware(chainName, http2Handler, ctx) - if !s.http2Router.Add(ctx.ChainID, http2Handler) { - s.log.Error( - "failed to add route to http2 handler", - zap.String("chainName", chainName), + if err := s.addChainRoute(chainName, handler, ctx, defaultEndpoint); err != nil { + s.log.Error("error adding route", zap.Error(err), ) } } -func (s *server) addChainRoute(chainName string, handler http.Handler, ctx *snow.ConsensusContext, base, endpoint string) error { +func (s *server) addChainRoute(chainName string, handler http.Handler, ctx *snow.ConsensusContext, base string) error { url := fmt.Sprintf("%s/%s", baseURL, base) - s.log.Info("adding route", - zap.String("url", url), - zap.String("endpoint", endpoint), - ) + s.log.Info("adding route", zap.String("url", url)) handler = s.wrapMiddleware(chainName, handler, ctx) - return s.router.AddRouter(url, endpoint, handler) + s.router.AddHeaderRoute(ctx.ChainID.String(), handler) + return s.router.AddRouter(url, handler) } func (s *server) wrapMiddleware(chainName string, handler http.Handler, ctx *snow.ConsensusContext) http.Handler { @@ -242,18 +190,22 @@ func (s *server) wrapMiddleware(chainName string, handler http.Handler, ctx *sno return s.metrics.wrapHandler(chainName, handler) } -func (s *server) AddRoute(handler http.Handler, base, endpoint string) error { - return s.addRoute(handler, base, endpoint) +func (s *server) AddRoute(handler http.Handler, endpoint string, metricName string) error { + return s.addRoute(handler, endpoint, metricName) +} + +func (s *server) AddHeaderRoute(route string, handler http.Handler) bool { + return s.router.AddHeaderRoute(route, handler) } -func (s *server) AddRouteWithReadLock(handler http.Handler, base, endpoint string) error { +func (s *server) AddRouteWithReadLock(handler http.Handler, endpoint string, metricName string) error { s.router.lock.RUnlock() defer s.router.lock.RLock() - return s.addRoute(handler, base, endpoint) + return s.addRoute(handler, endpoint, metricName) } -func (s *server) addRoute(handler http.Handler, base, endpoint string) error { - url := fmt.Sprintf("%s/%s", baseURL, base) +func (s *server) addRoute(handler http.Handler, endpoint string, metricName string) error { + url := fmt.Sprintf("%s/%s", baseURL, endpoint) s.log.Info("adding route", zap.String("url", url), zap.String("endpoint", endpoint), @@ -263,8 +215,8 @@ func (s *server) addRoute(handler http.Handler, base, endpoint string) error { handler = api.TraceHandler(handler, url, s.tracer) } - handler = s.metrics.wrapHandler(base, handler) - return s.router.AddRouter(url, endpoint, handler) + handler = s.metrics.wrapHandler(metricName, handler) + return s.router.AddRouter(url, handler) } // Reject middleware wraps a handler. If the chain that the context describes is @@ -312,18 +264,16 @@ type readPathAdder struct { pather PathAdderWithReadLock } -func PathWriterFromWithReadLock(pather PathAdderWithReadLock) PathAdder { - return readPathAdder{ - pather: pather, - } +func (r readPathAdder) AddHeaderRoute(string, http.Handler) bool { + panic("implement me") } -func (a readPathAdder) AddRoute(handler http.Handler, base, endpoint string) error { - return a.pather.AddRouteWithReadLock(handler, base, endpoint) +func (r readPathAdder) AddRoute(handler http.Handler, base, endpoint string) error { + return r.pather.AddRouteWithReadLock(handler, base, endpoint) } -func (a readPathAdder) AddAliases(endpoint string, aliases ...string) error { - return a.pather.AddAliasesWithReadLock(endpoint, aliases...) +func (r readPathAdder) AddAliases(endpoint string, aliases ...string) error { + return r.pather.AddAliasesWithReadLock(endpoint, aliases...) } func wrapHandler( diff --git a/connectproto/buf.gen.yaml b/connectproto/buf.gen.yaml new file mode 100644 index 000000000000..36b2d17fe235 --- /dev/null +++ b/connectproto/buf.gen.yaml @@ -0,0 +1,11 @@ +version: v1 +plugins: + - name: go + out: pb + opt: paths=source_relative + - name: go-grpc + out: pb + opt: paths=source_relative + - plugin: connect-go + out: pb + opt: paths=source_relative diff --git a/connectproto/buf.lock b/connectproto/buf.lock new file mode 100644 index 000000000000..28962534c4d5 --- /dev/null +++ b/connectproto/buf.lock @@ -0,0 +1,7 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: prometheus + repository: client-model + commit: 1d56a02d481a412a83b3c4984eb90c2e diff --git a/connectproto/buf.yaml b/connectproto/buf.yaml new file mode 100644 index 000000000000..d9849d239b6f --- /dev/null +++ b/connectproto/buf.yaml @@ -0,0 +1,32 @@ +version: v1 +name: buf.build/ava-labs/avalanche +build: + excludes: + # for golang we handle prometheus as a buf dep so we exclude it from generate, this proto + # file is required by languages such as rust. + - io/prometheus +breaking: + use: + - FILE +deps: + - buf.build/prometheus/client-model +lint: + use: + - STANDARD + except: + - SERVICE_SUFFIX # service requirement of +Service + - RPC_REQUEST_STANDARD_NAME # explicit +Request naming + - RPC_RESPONSE_STANDARD_NAME # explicit +Response naming + - PACKAGE_VERSION_SUFFIX # versioned naming .v1beta + ignore: + # TODO: how will fixing this affect functionality. Multiple fields are used as the request + # or response type for multiple RPCs + - aliasreader/aliasreader.proto + - net/conn/conn.proto + # allows RPC requests or responses to be google.protobuf.Empty messages. This can be set if you + # want to allow messages to be void forever, that is they will never take any parameters. + rpc_allow_google_protobuf_empty_requests: true + rpc_allow_google_protobuf_empty_responses: true + # allows the same message type to be used for a single RPC's request and response type. + # TODO: this should not be tolerated and if it is only perscriptivly. + rpc_allow_same_request_response: true diff --git a/connectproto/pb/xsvm/service.pb.go b/connectproto/pb/xsvm/service.pb.go new file mode 100644 index 000000000000..738007b356cc --- /dev/null +++ b/connectproto/pb/xsvm/service.pb.go @@ -0,0 +1,286 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc (unknown) +// source: xsvm/service.proto + +package xsvm + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *PingRequest) Reset() { + *x = PingRequest{} + mi := &file_xsvm_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingRequest) ProtoMessage() {} + +func (x *PingRequest) ProtoReflect() protoreflect.Message { + mi := &file_xsvm_service_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. +func (*PingRequest) Descriptor() ([]byte, []int) { + return file_xsvm_service_proto_rawDescGZIP(), []int{0} +} + +func (x *PingRequest) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type PingReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *PingReply) Reset() { + *x = PingReply{} + mi := &file_xsvm_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PingReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingReply) ProtoMessage() {} + +func (x *PingReply) ProtoReflect() protoreflect.Message { + mi := &file_xsvm_service_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingReply.ProtoReflect.Descriptor instead. +func (*PingReply) Descriptor() ([]byte, []int) { + return file_xsvm_service_proto_rawDescGZIP(), []int{1} +} + +func (x *PingReply) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type StreamPingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *StreamPingRequest) Reset() { + *x = StreamPingRequest{} + mi := &file_xsvm_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamPingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamPingRequest) ProtoMessage() {} + +func (x *StreamPingRequest) ProtoReflect() protoreflect.Message { + mi := &file_xsvm_service_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamPingRequest.ProtoReflect.Descriptor instead. +func (*StreamPingRequest) Descriptor() ([]byte, []int) { + return file_xsvm_service_proto_rawDescGZIP(), []int{2} +} + +func (x *StreamPingRequest) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type StreamPingReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *StreamPingReply) Reset() { + *x = StreamPingReply{} + mi := &file_xsvm_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamPingReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamPingReply) ProtoMessage() {} + +func (x *StreamPingReply) ProtoReflect() protoreflect.Message { + mi := &file_xsvm_service_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamPingReply.ProtoReflect.Descriptor instead. +func (*StreamPingReply) Descriptor() ([]byte, []int) { + return file_xsvm_service_proto_rawDescGZIP(), []int{3} +} + +func (x *StreamPingReply) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_xsvm_service_proto protoreflect.FileDescriptor + +var file_xsvm_service_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x78, 0x73, 0x76, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x78, 0x73, 0x76, 0x6d, 0x22, 0x27, 0x0a, 0x0b, 0x50, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x22, 0x25, 0x0a, 0x09, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2d, 0x0a, 0x11, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2b, 0x0a, 0x0f, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x74, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x2a, + 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x11, 0x2e, 0x78, 0x73, 0x76, 0x6d, 0x2e, 0x50, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x78, 0x73, 0x76, 0x6d, + 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x40, 0x0a, 0x0a, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x17, 0x2e, 0x78, 0x73, 0x76, 0x6d, 0x2e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x15, 0x2e, 0x78, 0x73, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x28, 0x01, 0x30, 0x01, 0x42, 0x2f, 0x5a, 0x2d, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, + 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x78, 0x73, 0x76, 0x6d, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xsvm_service_proto_rawDescOnce sync.Once + file_xsvm_service_proto_rawDescData = file_xsvm_service_proto_rawDesc +) + +func file_xsvm_service_proto_rawDescGZIP() []byte { + file_xsvm_service_proto_rawDescOnce.Do(func() { + file_xsvm_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_xsvm_service_proto_rawDescData) + }) + return file_xsvm_service_proto_rawDescData +} + +var file_xsvm_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_xsvm_service_proto_goTypes = []any{ + (*PingRequest)(nil), // 0: xsvm.PingRequest + (*PingReply)(nil), // 1: xsvm.PingReply + (*StreamPingRequest)(nil), // 2: xsvm.StreamPingRequest + (*StreamPingReply)(nil), // 3: xsvm.StreamPingReply +} +var file_xsvm_service_proto_depIdxs = []int32{ + 0, // 0: xsvm.Ping.Ping:input_type -> xsvm.PingRequest + 2, // 1: xsvm.Ping.StreamPing:input_type -> xsvm.StreamPingRequest + 1, // 2: xsvm.Ping.Ping:output_type -> xsvm.PingReply + 3, // 3: xsvm.Ping.StreamPing:output_type -> xsvm.StreamPingReply + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_xsvm_service_proto_init() } +func file_xsvm_service_proto_init() { + if File_xsvm_service_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xsvm_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_xsvm_service_proto_goTypes, + DependencyIndexes: file_xsvm_service_proto_depIdxs, + MessageInfos: file_xsvm_service_proto_msgTypes, + }.Build() + File_xsvm_service_proto = out.File + file_xsvm_service_proto_rawDesc = nil + file_xsvm_service_proto_goTypes = nil + file_xsvm_service_proto_depIdxs = nil +} diff --git a/connectproto/pb/xsvm/service_grpc.pb.go b/connectproto/pb/xsvm/service_grpc.pb.go new file mode 100644 index 000000000000..3a3c2e4cbf00 --- /dev/null +++ b/connectproto/pb/xsvm/service_grpc.pb.go @@ -0,0 +1,179 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: xsvm/service.proto + +package xsvm + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Ping_Ping_FullMethodName = "/xsvm.Ping/Ping" + Ping_StreamPing_FullMethodName = "/xsvm.Ping/StreamPing" +) + +// PingClient is the client API for Ping service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PingClient interface { + Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error) + StreamPing(ctx context.Context, opts ...grpc.CallOption) (Ping_StreamPingClient, error) +} + +type pingClient struct { + cc grpc.ClientConnInterface +} + +func NewPingClient(cc grpc.ClientConnInterface) PingClient { + return &pingClient{cc} +} + +func (c *pingClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error) { + out := new(PingReply) + err := c.cc.Invoke(ctx, Ping_Ping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pingClient) StreamPing(ctx context.Context, opts ...grpc.CallOption) (Ping_StreamPingClient, error) { + stream, err := c.cc.NewStream(ctx, &Ping_ServiceDesc.Streams[0], Ping_StreamPing_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &pingStreamPingClient{stream} + return x, nil +} + +type Ping_StreamPingClient interface { + Send(*StreamPingRequest) error + Recv() (*StreamPingReply, error) + grpc.ClientStream +} + +type pingStreamPingClient struct { + grpc.ClientStream +} + +func (x *pingStreamPingClient) Send(m *StreamPingRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *pingStreamPingClient) Recv() (*StreamPingReply, error) { + m := new(StreamPingReply) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// PingServer is the server API for Ping service. +// All implementations must embed UnimplementedPingServer +// for forward compatibility +type PingServer interface { + Ping(context.Context, *PingRequest) (*PingReply, error) + StreamPing(Ping_StreamPingServer) error + mustEmbedUnimplementedPingServer() +} + +// UnimplementedPingServer must be embedded to have forward compatible implementations. +type UnimplementedPingServer struct { +} + +func (UnimplementedPingServer) Ping(context.Context, *PingRequest) (*PingReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} +func (UnimplementedPingServer) StreamPing(Ping_StreamPingServer) error { + return status.Errorf(codes.Unimplemented, "method StreamPing not implemented") +} +func (UnimplementedPingServer) mustEmbedUnimplementedPingServer() {} + +// UnsafePingServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PingServer will +// result in compilation errors. +type UnsafePingServer interface { + mustEmbedUnimplementedPingServer() +} + +func RegisterPingServer(s grpc.ServiceRegistrar, srv PingServer) { + s.RegisterService(&Ping_ServiceDesc, srv) +} + +func _Ping_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PingServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Ping_Ping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PingServer).Ping(ctx, req.(*PingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Ping_StreamPing_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(PingServer).StreamPing(&pingStreamPingServer{stream}) +} + +type Ping_StreamPingServer interface { + Send(*StreamPingReply) error + Recv() (*StreamPingRequest, error) + grpc.ServerStream +} + +type pingStreamPingServer struct { + grpc.ServerStream +} + +func (x *pingStreamPingServer) Send(m *StreamPingReply) error { + return x.ServerStream.SendMsg(m) +} + +func (x *pingStreamPingServer) Recv() (*StreamPingRequest, error) { + m := new(StreamPingRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// Ping_ServiceDesc is the grpc.ServiceDesc for Ping service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Ping_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "xsvm.Ping", + HandlerType: (*PingServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Ping", + Handler: _Ping_Ping_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamPing", + Handler: _Ping_StreamPing_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "xsvm/service.proto", +} diff --git a/connectproto/pb/xsvm/xsvmconnect/service.connect.go b/connectproto/pb/xsvm/xsvmconnect/service.connect.go new file mode 100644 index 000000000000..a55282f8a9ce --- /dev/null +++ b/connectproto/pb/xsvm/xsvmconnect/service.connect.go @@ -0,0 +1,136 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: xsvm/service.proto + +package xsvmconnect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + xsvm "github.com/ava-labs/avalanchego/proto/pb/xsvm" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // PingName is the fully-qualified name of the Ping service. + PingName = "xsvm.Ping" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // PingPingProcedure is the fully-qualified name of the Ping's Ping RPC. + PingPingProcedure = "/xsvm.Ping/Ping" + // PingStreamPingProcedure is the fully-qualified name of the Ping's StreamPing RPC. + PingStreamPingProcedure = "/xsvm.Ping/StreamPing" +) + +// PingClient is a client for the xsvm.Ping service. +type PingClient interface { + Ping(context.Context, *connect.Request[xsvm.PingRequest]) (*connect.Response[xsvm.PingReply], error) + StreamPing(context.Context) *connect.BidiStreamForClient[xsvm.StreamPingRequest, xsvm.StreamPingReply] +} + +// NewPingClient constructs a client for the xsvm.Ping service. By default, it uses the Connect +// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed +// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or +// connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewPingClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PingClient { + baseURL = strings.TrimRight(baseURL, "/") + pingMethods := xsvm.File_xsvm_service_proto.Services().ByName("Ping").Methods() + return &pingClient{ + ping: connect.NewClient[xsvm.PingRequest, xsvm.PingReply]( + httpClient, + baseURL+PingPingProcedure, + connect.WithSchema(pingMethods.ByName("Ping")), + connect.WithClientOptions(opts...), + ), + streamPing: connect.NewClient[xsvm.StreamPingRequest, xsvm.StreamPingReply]( + httpClient, + baseURL+PingStreamPingProcedure, + connect.WithSchema(pingMethods.ByName("StreamPing")), + connect.WithClientOptions(opts...), + ), + } +} + +// pingClient implements PingClient. +type pingClient struct { + ping *connect.Client[xsvm.PingRequest, xsvm.PingReply] + streamPing *connect.Client[xsvm.StreamPingRequest, xsvm.StreamPingReply] +} + +// Ping calls xsvm.Ping.Ping. +func (c *pingClient) Ping(ctx context.Context, req *connect.Request[xsvm.PingRequest]) (*connect.Response[xsvm.PingReply], error) { + return c.ping.CallUnary(ctx, req) +} + +// StreamPing calls xsvm.Ping.StreamPing. +func (c *pingClient) StreamPing(ctx context.Context) *connect.BidiStreamForClient[xsvm.StreamPingRequest, xsvm.StreamPingReply] { + return c.streamPing.CallBidiStream(ctx) +} + +// PingHandler is an implementation of the xsvm.Ping service. +type PingHandler interface { + Ping(context.Context, *connect.Request[xsvm.PingRequest]) (*connect.Response[xsvm.PingReply], error) + StreamPing(context.Context, *connect.BidiStream[xsvm.StreamPingRequest, xsvm.StreamPingReply]) error +} + +// NewPingHandler builds an HTTP handler from the service implementation. It returns the path on +// which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewPingHandler(svc PingHandler, opts ...connect.HandlerOption) (string, http.Handler) { + pingMethods := xsvm.File_xsvm_service_proto.Services().ByName("Ping").Methods() + pingPingHandler := connect.NewUnaryHandler( + PingPingProcedure, + svc.Ping, + connect.WithSchema(pingMethods.ByName("Ping")), + connect.WithHandlerOptions(opts...), + ) + pingStreamPingHandler := connect.NewBidiStreamHandler( + PingStreamPingProcedure, + svc.StreamPing, + connect.WithSchema(pingMethods.ByName("StreamPing")), + connect.WithHandlerOptions(opts...), + ) + return "/xsvm.Ping/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case PingPingProcedure: + pingPingHandler.ServeHTTP(w, r) + case PingStreamPingProcedure: + pingStreamPingHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedPingHandler returns CodeUnimplemented from all methods. +type UnimplementedPingHandler struct{} + +func (UnimplementedPingHandler) Ping(context.Context, *connect.Request[xsvm.PingRequest]) (*connect.Response[xsvm.PingReply], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xsvm.Ping.Ping is not implemented")) +} + +func (UnimplementedPingHandler) StreamPing(context.Context, *connect.BidiStream[xsvm.StreamPingRequest, xsvm.StreamPingReply]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("xsvm.Ping.StreamPing is not implemented")) +} diff --git a/proto/xsvm/service.proto b/connectproto/xsvm/service.proto similarity index 100% rename from proto/xsvm/service.proto rename to connectproto/xsvm/service.proto diff --git a/go.mod b/go.mod index df1a61d3a10a..4d1206d1859c 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,8 @@ module github.com/ava-labs/avalanchego go 1.23.9 require ( + connectrpc.com/connect v1.18.1 + connectrpc.com/grpcreflect v1.3.0 github.com/DataDog/zstd v1.5.2 github.com/StephenButtolph/canoto v0.15.0 github.com/antithesishq/antithesis-sdk-go v0.3.8 diff --git a/go.sum b/go.sum index 35196931a746..a2e1c35734c7 100644 --- a/go.sum +++ b/go.sum @@ -35,6 +35,10 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +connectrpc.com/connect v1.18.1 h1:PAg7CjSAGvscaf6YZKUefjoih5Z/qYkyaTrBW8xvYPw= +connectrpc.com/connect v1.18.1/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8= +connectrpc.com/grpcreflect v1.3.0 h1:Y4V+ACf8/vOb1XOc251Qun7jMB75gCUNw6llvB9csXc= +connectrpc.com/grpcreflect v1.3.0/go.mod h1:nfloOtCS8VUQOQ1+GTdFzVg2CJo4ZGaat8JIovCtDYs= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= diff --git a/indexer/indexer_test.go b/indexer/indexer_test.go index 6958d8851a86..93babbd6134a 100644 --- a/indexer/indexer_test.go +++ b/indexer/indexer_test.go @@ -37,6 +37,10 @@ type apiServerMock struct { endpoints []string } +func (*apiServerMock) AddHTTP2Handler(http.Handler) bool { + panic("unimplemented") +} + func (a *apiServerMock) AddRoute(_ http.Handler, base, endpoint string) error { a.timesCalled++ a.bases = append(a.bases, base) diff --git a/node/node.go b/node/node.go index ee442c3d2953..da60729899e8 100644 --- a/node/node.go +++ b/node/node.go @@ -13,6 +13,7 @@ import ( "io" "io/fs" "net" + "net/http" "net/netip" "os" "path/filepath" @@ -20,6 +21,7 @@ import ( "sync" "time" + "connectrpc.com/grpcreflect" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/collectors" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -46,6 +48,7 @@ import ( "github.com/ava-labs/avalanchego/network/dialer" "github.com/ava-labs/avalanchego/network/peer" "github.com/ava-labs/avalanchego/network/throttling" + "github.com/ava-labs/avalanchego/proto/pb/info/v1/infov1connect" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/networking/benchlist" "github.com/ava-labs/avalanchego/snow/networking/router" @@ -77,6 +80,7 @@ import ( "github.com/ava-labs/avalanchego/vms/registry" "github.com/ava-labs/avalanchego/vms/rpcchainvm/runtime" + connecthandler "github.com/ava-labs/avalanchego/api/info/connect_handler" databasefactory "github.com/ava-labs/avalanchego/database/factory" avmconfig "github.com/ava-labs/avalanchego/vms/avm/config" platformconfig "github.com/ava-labs/avalanchego/vms/platformvm/config" @@ -1277,7 +1281,7 @@ func (n *Node) initMetricsAPI() error { promhttp.HandlerOpts{}, ), "metrics", - "", + "metrics", ) } @@ -1308,7 +1312,7 @@ func (n *Node) initAdminAPI() error { return n.APIServer.AddRoute( service, "admin", - "", + "admin", ) } @@ -1349,7 +1353,7 @@ func (n *Node) initInfoAPI() error { return fmt.Errorf("problem creating proof of possession: %w", err) } - service, err := info.NewService( + service, info, err := info.NewService( info.Parameters{ Version: version.CurrentApp, NodeID: n.ID, @@ -1372,10 +1376,29 @@ func (n *Node) initInfoAPI() error { if err != nil { return err } + + // Register the InfoService handler and gRPC reflection handler + infoPattern, infoHandler := infov1connect.NewInfoServiceHandler(connecthandler.NewConnectInfoService(info)) + + // Register the gRPC reflection handler for InfoService + refPattern, refHandler := grpcreflect.NewHandlerV1( + grpcreflect.NewStaticReflector(infov1connect.InfoServiceName), + ) + + // Create a new ServeMux to handle the InfoService and reflection handlers + mux := http.NewServeMux() + mux.Handle(infoPattern, infoHandler) + mux.Handle(refPattern, refHandler) + + if !n.APIServer.AddHeaderRoute("info", mux) { + // TODO do not panic + panic("could not add info route") + } + return n.APIServer.AddRoute( service, "info", - "", + "info", ) } @@ -1478,7 +1501,7 @@ func (n *Node) initHealthAPI() error { err = n.APIServer.AddRoute( handler, "health", - "", + "health", ) if err != nil { return err @@ -1486,8 +1509,8 @@ func (n *Node) initHealthAPI() error { err = n.APIServer.AddRoute( health.NewGetHandler(n.health.Readiness), + "health/readiness", "health", - "/readiness", ) if err != nil { return err @@ -1495,8 +1518,8 @@ func (n *Node) initHealthAPI() error { err = n.APIServer.AddRoute( health.NewGetHandler(n.health.Health), + "health/health", "health", - "/health", ) if err != nil { return err @@ -1504,8 +1527,8 @@ func (n *Node) initHealthAPI() error { return n.APIServer.AddRoute( health.NewGetHandler(n.health.Liveness), + "health/liveness", "health", - "/liveness", ) } diff --git a/proto/info/v1/service.proto b/proto/info/v1/service.proto new file mode 100644 index 000000000000..5c5d4cc97c29 --- /dev/null +++ b/proto/info/v1/service.proto @@ -0,0 +1,137 @@ +syntax = "proto3"; +package info.v1; + +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +// Reference: https://developers.google.com/protocol-buffers/docs/proto3 +option go_package = "github.com/ava-labs/avalanchego/proto/pb/info/v1;infov1"; + +// InfoService is the API service for unprivileged info on a node +service InfoService { + rpc GetNodeVersion(google.protobuf.Empty) returns (GetNodeVersionReply); + rpc GetNodeID(google.protobuf.Empty) returns (GetNodeIDReply); + rpc GetNodeIP(google.protobuf.Empty) returns (GetNodeIPReply); + rpc GetNetworkID(google.protobuf.Empty) returns (GetNetworkIDReply); + rpc GetNetworkName(google.protobuf.Empty) returns (GetNetworkNameReply); + rpc GetBlockchainID(GetBlockchainIDArgs) returns (GetBlockchainIDReply); + rpc Peers(PeersArgs) returns (PeersReply); + rpc IsBootstrapped(IsBootstrappedArgs) returns (IsBootstrappedResponse); + rpc Upgrades(google.protobuf.Empty) returns (UpgradesReply); + rpc Uptime(google.protobuf.Empty) returns (UptimeResponse); + rpc GetVMs(google.protobuf.Empty) returns (GetVMsReply); +} + +// GetNodeVersionReply are the results from calling GetNodeVersion +message GetNodeVersionReply { + string version = 1; + string database_version = 2; + uint32 rpc_protocol_version = 3; + string git_commit = 4; + map vm_versions = 5; +} + +// GetNodeIDReply are the results from calling GetNodeID +message GetNodeIDReply { + string node_id = 1; + bytes node_pop = 2; +} + +// GetNodeIPReply are the results from calling GetNodeIP +message GetNodeIPReply { + string ip = 1; +} + +// GetNetworkIDReply are the results from calling GetNetworkID +message GetNetworkIDReply { + uint32 network_id = 1; +} + +// GetNetworkNameReply is the result from calling GetNetworkName +message GetNetworkNameReply { + string network_name = 1; +} + +// GetBlockchainIDArgs are the arguments for calling GetBlockchainID +message GetBlockchainIDArgs { + string alias = 1; +} + +// GetBlockchainIDReply are the results from calling GetBlockchainID +message GetBlockchainIDReply { + string blockchain_id = 1; +} + +// PeersArgs are the arguments for calling Peers +message PeersArgs { + repeated string node_ids = 1; +} + +// PeerInfo provides metadata about a connected peer in the network +message PeerInfo { + string ip = 1; + string public_ip = 2; + string node_id = 3; + string version = 4; + string last_sent = 5; + string last_received = 6; + repeated string benched = 7; + uint32 observed_uptime = 8; + repeated string tracked_subnets = 9; +} + +// PeersReply are the results from calling Peers +message PeersReply { + uint32 num_peers = 1; + repeated PeerInfo peers = 2; +} + +// IsBootstrappedArgs are the arguments for calling IsBootstrapped +message IsBootstrappedArgs { + // Alias of the chain + // Can also be the string representation of the chain's ID + string chain = 1; +} + +// IsBootstrappedResponse are the results from calling IsBootstrapped +message IsBootstrappedResponse { + // True iff the chain exists and is done bootstrapping + bool is_bootstrapped = 1; +} + +// UpgradesReply contains the scheduled activation times for each protocol upgrade +message UpgradesReply { + google.protobuf.Timestamp apricot_phase1_time = 1; + google.protobuf.Timestamp apricot_phase2_time = 2; + google.protobuf.Timestamp apricot_phase3_time = 3; + google.protobuf.Timestamp apricot_phase4_time = 4; + uint64 apricot_phase4_min_p_chain_height = 5; + google.protobuf.Timestamp apricot_phase5_time = 6; + google.protobuf.Timestamp apricot_phase_pre6_time = 7; + google.protobuf.Timestamp apricot_phase6_time = 8; + google.protobuf.Timestamp apricot_phase_post6_time = 9; + google.protobuf.Timestamp banff_time = 10; + google.protobuf.Timestamp cortina_time = 11; + string cortina_x_chain_stop_vertex_id = 12; + google.protobuf.Timestamp durango_time = 13; + google.protobuf.Timestamp etna_time = 14; + google.protobuf.Timestamp fortuna_time = 15; + google.protobuf.Timestamp granite_time = 16; +} + +// UptimeResponse are the results from calling Uptime +message UptimeResponse { + double rewarding_stake_percentage = 1; + double weighted_average_percentage = 2; +} + +// GetVMsReply contains the response metadata for VMAliases +message GetVMsReply { + map vms = 1; + map fxs = 2; +} + +// VMAliases lists all known aliases for a given VM +message VMAliases { + repeated string aliases = 1; +} diff --git a/proto/io/reader/reader.proto b/proto/io/reader/reader.proto index ec3e275b120c..4d85a4b9f0a2 100644 --- a/proto/io/reader/reader.proto +++ b/proto/io/reader/reader.proto @@ -18,5 +18,16 @@ message ReadResponse { // read is the payload in bytes bytes read = 1; // error is an error message - optional string error = 2; + optional Error error = 2; +} + +message Error { + ErrorCode error_code = 1; + string message = 2; +} + +// ErrorCode provides information for special sentinel error types +enum ErrorCode { + ERROR_CODE_UNSPECIFIED = 0; + ERROR_CODE_EOF = 1; } diff --git a/proto/pb/info/v1/infov1connect/service.connect.go b/proto/pb/info/v1/infov1connect/service.connect.go new file mode 100644 index 000000000000..6a0de31b23d3 --- /dev/null +++ b/proto/pb/info/v1/infov1connect/service.connect.go @@ -0,0 +1,397 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// Code generated by protoc-gen-connect. DO NOT EDIT. +// +// Source: info/v1/service.proto + +package infov1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/ava-labs/avalanchego/proto/pb/info/v1" + emptypb "google.golang.org/protobuf/types/known/emptypb" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // InfoServiceName is the fully-qualified name of the InfoService service. + InfoServiceName = "info.v1.InfoService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // InfoServiceGetNodeVersionProcedure is the fully-qualified name of the InfoService's + // GetNodeVersion RPC. + InfoServiceGetNodeVersionProcedure = "/info.v1.InfoService/GetNodeVersion" + // InfoServiceGetNodeIDProcedure is the fully-qualified name of the InfoService's GetNodeID RPC. + InfoServiceGetNodeIDProcedure = "/info.v1.InfoService/GetNodeID" + // InfoServiceGetNodeIPProcedure is the fully-qualified name of the InfoService's GetNodeIP RPC. + InfoServiceGetNodeIPProcedure = "/info.v1.InfoService/GetNodeIP" + // InfoServiceGetNetworkIDProcedure is the fully-qualified name of the InfoService's GetNetworkID + // RPC. + InfoServiceGetNetworkIDProcedure = "/info.v1.InfoService/GetNetworkID" + // InfoServiceGetNetworkNameProcedure is the fully-qualified name of the InfoService's + // GetNetworkName RPC. + InfoServiceGetNetworkNameProcedure = "/info.v1.InfoService/GetNetworkName" + // InfoServiceGetBlockchainIDProcedure is the fully-qualified name of the InfoService's + // GetBlockchainID RPC. + InfoServiceGetBlockchainIDProcedure = "/info.v1.InfoService/GetBlockchainID" + // InfoServicePeersProcedure is the fully-qualified name of the InfoService's Peers RPC. + InfoServicePeersProcedure = "/info.v1.InfoService/Peers" + // InfoServiceIsBootstrappedProcedure is the fully-qualified name of the InfoService's + // IsBootstrapped RPC. + InfoServiceIsBootstrappedProcedure = "/info.v1.InfoService/IsBootstrapped" + // InfoServiceUpgradesProcedure is the fully-qualified name of the InfoService's Upgrades RPC. + InfoServiceUpgradesProcedure = "/info.v1.InfoService/Upgrades" + // InfoServiceUptimeProcedure is the fully-qualified name of the InfoService's Uptime RPC. + InfoServiceUptimeProcedure = "/info.v1.InfoService/Uptime" + // InfoServiceGetVMsProcedure is the fully-qualified name of the InfoService's GetVMs RPC. + InfoServiceGetVMsProcedure = "/info.v1.InfoService/GetVMs" +) + +// InfoServiceClient is a client for the info.v1.InfoService service. +type InfoServiceClient interface { + GetNodeVersion(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNodeVersionReply], error) + GetNodeID(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNodeIDReply], error) + GetNodeIP(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNodeIPReply], error) + GetNetworkID(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNetworkIDReply], error) + GetNetworkName(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNetworkNameReply], error) + GetBlockchainID(context.Context, *connect.Request[v1.GetBlockchainIDArgs]) (*connect.Response[v1.GetBlockchainIDReply], error) + Peers(context.Context, *connect.Request[v1.PeersArgs]) (*connect.Response[v1.PeersReply], error) + IsBootstrapped(context.Context, *connect.Request[v1.IsBootstrappedArgs]) (*connect.Response[v1.IsBootstrappedResponse], error) + Upgrades(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.UpgradesReply], error) + Uptime(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.UptimeResponse], error) + GetVMs(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetVMsReply], error) +} + +// NewInfoServiceClient constructs a client for the info.v1.InfoService service. By default, it uses +// the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends +// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or +// connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewInfoServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) InfoServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + infoServiceMethods := v1.File_info_v1_service_proto.Services().ByName("InfoService").Methods() + return &infoServiceClient{ + getNodeVersion: connect.NewClient[emptypb.Empty, v1.GetNodeVersionReply]( + httpClient, + baseURL+InfoServiceGetNodeVersionProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetNodeVersion")), + connect.WithClientOptions(opts...), + ), + getNodeID: connect.NewClient[emptypb.Empty, v1.GetNodeIDReply]( + httpClient, + baseURL+InfoServiceGetNodeIDProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetNodeID")), + connect.WithClientOptions(opts...), + ), + getNodeIP: connect.NewClient[emptypb.Empty, v1.GetNodeIPReply]( + httpClient, + baseURL+InfoServiceGetNodeIPProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetNodeIP")), + connect.WithClientOptions(opts...), + ), + getNetworkID: connect.NewClient[emptypb.Empty, v1.GetNetworkIDReply]( + httpClient, + baseURL+InfoServiceGetNetworkIDProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetNetworkID")), + connect.WithClientOptions(opts...), + ), + getNetworkName: connect.NewClient[emptypb.Empty, v1.GetNetworkNameReply]( + httpClient, + baseURL+InfoServiceGetNetworkNameProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetNetworkName")), + connect.WithClientOptions(opts...), + ), + getBlockchainID: connect.NewClient[v1.GetBlockchainIDArgs, v1.GetBlockchainIDReply]( + httpClient, + baseURL+InfoServiceGetBlockchainIDProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetBlockchainID")), + connect.WithClientOptions(opts...), + ), + peers: connect.NewClient[v1.PeersArgs, v1.PeersReply]( + httpClient, + baseURL+InfoServicePeersProcedure, + connect.WithSchema(infoServiceMethods.ByName("Peers")), + connect.WithClientOptions(opts...), + ), + isBootstrapped: connect.NewClient[v1.IsBootstrappedArgs, v1.IsBootstrappedResponse]( + httpClient, + baseURL+InfoServiceIsBootstrappedProcedure, + connect.WithSchema(infoServiceMethods.ByName("IsBootstrapped")), + connect.WithClientOptions(opts...), + ), + upgrades: connect.NewClient[emptypb.Empty, v1.UpgradesReply]( + httpClient, + baseURL+InfoServiceUpgradesProcedure, + connect.WithSchema(infoServiceMethods.ByName("Upgrades")), + connect.WithClientOptions(opts...), + ), + uptime: connect.NewClient[emptypb.Empty, v1.UptimeResponse]( + httpClient, + baseURL+InfoServiceUptimeProcedure, + connect.WithSchema(infoServiceMethods.ByName("Uptime")), + connect.WithClientOptions(opts...), + ), + getVMs: connect.NewClient[emptypb.Empty, v1.GetVMsReply]( + httpClient, + baseURL+InfoServiceGetVMsProcedure, + connect.WithSchema(infoServiceMethods.ByName("GetVMs")), + connect.WithClientOptions(opts...), + ), + } +} + +// infoServiceClient implements InfoServiceClient. +type infoServiceClient struct { + getNodeVersion *connect.Client[emptypb.Empty, v1.GetNodeVersionReply] + getNodeID *connect.Client[emptypb.Empty, v1.GetNodeIDReply] + getNodeIP *connect.Client[emptypb.Empty, v1.GetNodeIPReply] + getNetworkID *connect.Client[emptypb.Empty, v1.GetNetworkIDReply] + getNetworkName *connect.Client[emptypb.Empty, v1.GetNetworkNameReply] + getBlockchainID *connect.Client[v1.GetBlockchainIDArgs, v1.GetBlockchainIDReply] + peers *connect.Client[v1.PeersArgs, v1.PeersReply] + isBootstrapped *connect.Client[v1.IsBootstrappedArgs, v1.IsBootstrappedResponse] + upgrades *connect.Client[emptypb.Empty, v1.UpgradesReply] + uptime *connect.Client[emptypb.Empty, v1.UptimeResponse] + getVMs *connect.Client[emptypb.Empty, v1.GetVMsReply] +} + +// GetNodeVersion calls info.v1.InfoService.GetNodeVersion. +func (c *infoServiceClient) GetNodeVersion(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNodeVersionReply], error) { + return c.getNodeVersion.CallUnary(ctx, req) +} + +// GetNodeID calls info.v1.InfoService.GetNodeID. +func (c *infoServiceClient) GetNodeID(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNodeIDReply], error) { + return c.getNodeID.CallUnary(ctx, req) +} + +// GetNodeIP calls info.v1.InfoService.GetNodeIP. +func (c *infoServiceClient) GetNodeIP(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNodeIPReply], error) { + return c.getNodeIP.CallUnary(ctx, req) +} + +// GetNetworkID calls info.v1.InfoService.GetNetworkID. +func (c *infoServiceClient) GetNetworkID(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNetworkIDReply], error) { + return c.getNetworkID.CallUnary(ctx, req) +} + +// GetNetworkName calls info.v1.InfoService.GetNetworkName. +func (c *infoServiceClient) GetNetworkName(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNetworkNameReply], error) { + return c.getNetworkName.CallUnary(ctx, req) +} + +// GetBlockchainID calls info.v1.InfoService.GetBlockchainID. +func (c *infoServiceClient) GetBlockchainID(ctx context.Context, req *connect.Request[v1.GetBlockchainIDArgs]) (*connect.Response[v1.GetBlockchainIDReply], error) { + return c.getBlockchainID.CallUnary(ctx, req) +} + +// Peers calls info.v1.InfoService.Peers. +func (c *infoServiceClient) Peers(ctx context.Context, req *connect.Request[v1.PeersArgs]) (*connect.Response[v1.PeersReply], error) { + return c.peers.CallUnary(ctx, req) +} + +// IsBootstrapped calls info.v1.InfoService.IsBootstrapped. +func (c *infoServiceClient) IsBootstrapped(ctx context.Context, req *connect.Request[v1.IsBootstrappedArgs]) (*connect.Response[v1.IsBootstrappedResponse], error) { + return c.isBootstrapped.CallUnary(ctx, req) +} + +// Upgrades calls info.v1.InfoService.Upgrades. +func (c *infoServiceClient) Upgrades(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[v1.UpgradesReply], error) { + return c.upgrades.CallUnary(ctx, req) +} + +// Uptime calls info.v1.InfoService.Uptime. +func (c *infoServiceClient) Uptime(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[v1.UptimeResponse], error) { + return c.uptime.CallUnary(ctx, req) +} + +// GetVMs calls info.v1.InfoService.GetVMs. +func (c *infoServiceClient) GetVMs(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetVMsReply], error) { + return c.getVMs.CallUnary(ctx, req) +} + +// InfoServiceHandler is an implementation of the info.v1.InfoService service. +type InfoServiceHandler interface { + GetNodeVersion(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNodeVersionReply], error) + GetNodeID(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNodeIDReply], error) + GetNodeIP(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNodeIPReply], error) + GetNetworkID(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNetworkIDReply], error) + GetNetworkName(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNetworkNameReply], error) + GetBlockchainID(context.Context, *connect.Request[v1.GetBlockchainIDArgs]) (*connect.Response[v1.GetBlockchainIDReply], error) + Peers(context.Context, *connect.Request[v1.PeersArgs]) (*connect.Response[v1.PeersReply], error) + IsBootstrapped(context.Context, *connect.Request[v1.IsBootstrappedArgs]) (*connect.Response[v1.IsBootstrappedResponse], error) + Upgrades(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.UpgradesReply], error) + Uptime(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.UptimeResponse], error) + GetVMs(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetVMsReply], error) +} + +// NewInfoServiceHandler builds an HTTP handler from the service implementation. It returns the path +// on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewInfoServiceHandler(svc InfoServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + infoServiceMethods := v1.File_info_v1_service_proto.Services().ByName("InfoService").Methods() + infoServiceGetNodeVersionHandler := connect.NewUnaryHandler( + InfoServiceGetNodeVersionProcedure, + svc.GetNodeVersion, + connect.WithSchema(infoServiceMethods.ByName("GetNodeVersion")), + connect.WithHandlerOptions(opts...), + ) + infoServiceGetNodeIDHandler := connect.NewUnaryHandler( + InfoServiceGetNodeIDProcedure, + svc.GetNodeID, + connect.WithSchema(infoServiceMethods.ByName("GetNodeID")), + connect.WithHandlerOptions(opts...), + ) + infoServiceGetNodeIPHandler := connect.NewUnaryHandler( + InfoServiceGetNodeIPProcedure, + svc.GetNodeIP, + connect.WithSchema(infoServiceMethods.ByName("GetNodeIP")), + connect.WithHandlerOptions(opts...), + ) + infoServiceGetNetworkIDHandler := connect.NewUnaryHandler( + InfoServiceGetNetworkIDProcedure, + svc.GetNetworkID, + connect.WithSchema(infoServiceMethods.ByName("GetNetworkID")), + connect.WithHandlerOptions(opts...), + ) + infoServiceGetNetworkNameHandler := connect.NewUnaryHandler( + InfoServiceGetNetworkNameProcedure, + svc.GetNetworkName, + connect.WithSchema(infoServiceMethods.ByName("GetNetworkName")), + connect.WithHandlerOptions(opts...), + ) + infoServiceGetBlockchainIDHandler := connect.NewUnaryHandler( + InfoServiceGetBlockchainIDProcedure, + svc.GetBlockchainID, + connect.WithSchema(infoServiceMethods.ByName("GetBlockchainID")), + connect.WithHandlerOptions(opts...), + ) + infoServicePeersHandler := connect.NewUnaryHandler( + InfoServicePeersProcedure, + svc.Peers, + connect.WithSchema(infoServiceMethods.ByName("Peers")), + connect.WithHandlerOptions(opts...), + ) + infoServiceIsBootstrappedHandler := connect.NewUnaryHandler( + InfoServiceIsBootstrappedProcedure, + svc.IsBootstrapped, + connect.WithSchema(infoServiceMethods.ByName("IsBootstrapped")), + connect.WithHandlerOptions(opts...), + ) + infoServiceUpgradesHandler := connect.NewUnaryHandler( + InfoServiceUpgradesProcedure, + svc.Upgrades, + connect.WithSchema(infoServiceMethods.ByName("Upgrades")), + connect.WithHandlerOptions(opts...), + ) + infoServiceUptimeHandler := connect.NewUnaryHandler( + InfoServiceUptimeProcedure, + svc.Uptime, + connect.WithSchema(infoServiceMethods.ByName("Uptime")), + connect.WithHandlerOptions(opts...), + ) + infoServiceGetVMsHandler := connect.NewUnaryHandler( + InfoServiceGetVMsProcedure, + svc.GetVMs, + connect.WithSchema(infoServiceMethods.ByName("GetVMs")), + connect.WithHandlerOptions(opts...), + ) + return "/info.v1.InfoService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case InfoServiceGetNodeVersionProcedure: + infoServiceGetNodeVersionHandler.ServeHTTP(w, r) + case InfoServiceGetNodeIDProcedure: + infoServiceGetNodeIDHandler.ServeHTTP(w, r) + case InfoServiceGetNodeIPProcedure: + infoServiceGetNodeIPHandler.ServeHTTP(w, r) + case InfoServiceGetNetworkIDProcedure: + infoServiceGetNetworkIDHandler.ServeHTTP(w, r) + case InfoServiceGetNetworkNameProcedure: + infoServiceGetNetworkNameHandler.ServeHTTP(w, r) + case InfoServiceGetBlockchainIDProcedure: + infoServiceGetBlockchainIDHandler.ServeHTTP(w, r) + case InfoServicePeersProcedure: + infoServicePeersHandler.ServeHTTP(w, r) + case InfoServiceIsBootstrappedProcedure: + infoServiceIsBootstrappedHandler.ServeHTTP(w, r) + case InfoServiceUpgradesProcedure: + infoServiceUpgradesHandler.ServeHTTP(w, r) + case InfoServiceUptimeProcedure: + infoServiceUptimeHandler.ServeHTTP(w, r) + case InfoServiceGetVMsProcedure: + infoServiceGetVMsHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedInfoServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedInfoServiceHandler struct{} + +func (UnimplementedInfoServiceHandler) GetNodeVersion(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNodeVersionReply], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNodeVersion is not implemented")) +} + +func (UnimplementedInfoServiceHandler) GetNodeID(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNodeIDReply], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNodeID is not implemented")) +} + +func (UnimplementedInfoServiceHandler) GetNodeIP(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNodeIPReply], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNodeIP is not implemented")) +} + +func (UnimplementedInfoServiceHandler) GetNetworkID(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNetworkIDReply], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNetworkID is not implemented")) +} + +func (UnimplementedInfoServiceHandler) GetNetworkName(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetNetworkNameReply], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetNetworkName is not implemented")) +} + +func (UnimplementedInfoServiceHandler) GetBlockchainID(context.Context, *connect.Request[v1.GetBlockchainIDArgs]) (*connect.Response[v1.GetBlockchainIDReply], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetBlockchainID is not implemented")) +} + +func (UnimplementedInfoServiceHandler) Peers(context.Context, *connect.Request[v1.PeersArgs]) (*connect.Response[v1.PeersReply], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.Peers is not implemented")) +} + +func (UnimplementedInfoServiceHandler) IsBootstrapped(context.Context, *connect.Request[v1.IsBootstrappedArgs]) (*connect.Response[v1.IsBootstrappedResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.IsBootstrapped is not implemented")) +} + +func (UnimplementedInfoServiceHandler) Upgrades(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.UpgradesReply], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.Upgrades is not implemented")) +} + +func (UnimplementedInfoServiceHandler) Uptime(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.UptimeResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.Uptime is not implemented")) +} + +func (UnimplementedInfoServiceHandler) GetVMs(context.Context, *connect.Request[emptypb.Empty]) (*connect.Response[v1.GetVMsReply], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("info.v1.InfoService.GetVMs is not implemented")) +} diff --git a/proto/pb/info/v1/service.pb.go b/proto/pb/info/v1/service.pb.go new file mode 100644 index 000000000000..6a793cecc857 --- /dev/null +++ b/proto/pb/info/v1/service.pb.go @@ -0,0 +1,1352 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.1 +// protoc v5.29.3 +// source: info/v1/service.proto + +package infov1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// GetNodeVersionReply are the results from calling GetNodeVersion +type GetNodeVersionReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + DatabaseVersion string `protobuf:"bytes,2,opt,name=database_version,json=databaseVersion,proto3" json:"database_version,omitempty"` + RpcProtocolVersion uint32 `protobuf:"varint,3,opt,name=rpc_protocol_version,json=rpcProtocolVersion,proto3" json:"rpc_protocol_version,omitempty"` + GitCommit string `protobuf:"bytes,4,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` + VmVersions map[string]string `protobuf:"bytes,5,rep,name=vm_versions,json=vmVersions,proto3" json:"vm_versions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GetNodeVersionReply) Reset() { + *x = GetNodeVersionReply{} + mi := &file_info_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNodeVersionReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeVersionReply) ProtoMessage() {} + +func (x *GetNodeVersionReply) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeVersionReply.ProtoReflect.Descriptor instead. +func (*GetNodeVersionReply) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetNodeVersionReply) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *GetNodeVersionReply) GetDatabaseVersion() string { + if x != nil { + return x.DatabaseVersion + } + return "" +} + +func (x *GetNodeVersionReply) GetRpcProtocolVersion() uint32 { + if x != nil { + return x.RpcProtocolVersion + } + return 0 +} + +func (x *GetNodeVersionReply) GetGitCommit() string { + if x != nil { + return x.GitCommit + } + return "" +} + +func (x *GetNodeVersionReply) GetVmVersions() map[string]string { + if x != nil { + return x.VmVersions + } + return nil +} + +// GetNodeIDReply are the results from calling GetNodeID +type GetNodeIDReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + NodePop []byte `protobuf:"bytes,2,opt,name=node_pop,json=nodePop,proto3" json:"node_pop,omitempty"` +} + +func (x *GetNodeIDReply) Reset() { + *x = GetNodeIDReply{} + mi := &file_info_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNodeIDReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeIDReply) ProtoMessage() {} + +func (x *GetNodeIDReply) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeIDReply.ProtoReflect.Descriptor instead. +func (*GetNodeIDReply) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetNodeIDReply) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *GetNodeIDReply) GetNodePop() []byte { + if x != nil { + return x.NodePop + } + return nil +} + +// GetNodeIPReply are the results from calling GetNodeIP +type GetNodeIPReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` +} + +func (x *GetNodeIPReply) Reset() { + *x = GetNodeIPReply{} + mi := &file_info_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNodeIPReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeIPReply) ProtoMessage() {} + +func (x *GetNodeIPReply) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNodeIPReply.ProtoReflect.Descriptor instead. +func (*GetNodeIPReply) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{2} +} + +func (x *GetNodeIPReply) GetIp() string { + if x != nil { + return x.Ip + } + return "" +} + +// GetNetworkIDReply are the results from calling GetNetworkID +type GetNetworkIDReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NetworkId uint32 `protobuf:"varint,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` +} + +func (x *GetNetworkIDReply) Reset() { + *x = GetNetworkIDReply{} + mi := &file_info_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNetworkIDReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkIDReply) ProtoMessage() {} + +func (x *GetNetworkIDReply) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNetworkIDReply.ProtoReflect.Descriptor instead. +func (*GetNetworkIDReply) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{3} +} + +func (x *GetNetworkIDReply) GetNetworkId() uint32 { + if x != nil { + return x.NetworkId + } + return 0 +} + +// GetNetworkNameReply is the result from calling GetNetworkName +type GetNetworkNameReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NetworkName string `protobuf:"bytes,1,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"` +} + +func (x *GetNetworkNameReply) Reset() { + *x = GetNetworkNameReply{} + mi := &file_info_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNetworkNameReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkNameReply) ProtoMessage() {} + +func (x *GetNetworkNameReply) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNetworkNameReply.ProtoReflect.Descriptor instead. +func (*GetNetworkNameReply) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{4} +} + +func (x *GetNetworkNameReply) GetNetworkName() string { + if x != nil { + return x.NetworkName + } + return "" +} + +// GetBlockchainIDArgs are the arguments for calling GetBlockchainID +type GetBlockchainIDArgs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` +} + +func (x *GetBlockchainIDArgs) Reset() { + *x = GetBlockchainIDArgs{} + mi := &file_info_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBlockchainIDArgs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockchainIDArgs) ProtoMessage() {} + +func (x *GetBlockchainIDArgs) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBlockchainIDArgs.ProtoReflect.Descriptor instead. +func (*GetBlockchainIDArgs) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{5} +} + +func (x *GetBlockchainIDArgs) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +// GetBlockchainIDReply are the results from calling GetBlockchainID +type GetBlockchainIDReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockchainId string `protobuf:"bytes,1,opt,name=blockchain_id,json=blockchainId,proto3" json:"blockchain_id,omitempty"` +} + +func (x *GetBlockchainIDReply) Reset() { + *x = GetBlockchainIDReply{} + mi := &file_info_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBlockchainIDReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockchainIDReply) ProtoMessage() {} + +func (x *GetBlockchainIDReply) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBlockchainIDReply.ProtoReflect.Descriptor instead. +func (*GetBlockchainIDReply) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{6} +} + +func (x *GetBlockchainIDReply) GetBlockchainId() string { + if x != nil { + return x.BlockchainId + } + return "" +} + +// PeersArgs are the arguments for calling Peers +type PeersArgs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeIds []string `protobuf:"bytes,1,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"` +} + +func (x *PeersArgs) Reset() { + *x = PeersArgs{} + mi := &file_info_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PeersArgs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeersArgs) ProtoMessage() {} + +func (x *PeersArgs) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeersArgs.ProtoReflect.Descriptor instead. +func (*PeersArgs) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{7} +} + +func (x *PeersArgs) GetNodeIds() []string { + if x != nil { + return x.NodeIds + } + return nil +} + +// PeerInfo provides metadata about a connected peer in the network +type PeerInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` + PublicIp string `protobuf:"bytes,2,opt,name=public_ip,json=publicIp,proto3" json:"public_ip,omitempty"` + NodeId string `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + LastSent string `protobuf:"bytes,5,opt,name=last_sent,json=lastSent,proto3" json:"last_sent,omitempty"` + LastReceived string `protobuf:"bytes,6,opt,name=last_received,json=lastReceived,proto3" json:"last_received,omitempty"` + Benched []string `protobuf:"bytes,7,rep,name=benched,proto3" json:"benched,omitempty"` + ObservedUptime uint32 `protobuf:"varint,8,opt,name=observed_uptime,json=observedUptime,proto3" json:"observed_uptime,omitempty"` + TrackedSubnets []string `protobuf:"bytes,9,rep,name=tracked_subnets,json=trackedSubnets,proto3" json:"tracked_subnets,omitempty"` +} + +func (x *PeerInfo) Reset() { + *x = PeerInfo{} + mi := &file_info_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PeerInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerInfo) ProtoMessage() {} + +func (x *PeerInfo) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead. +func (*PeerInfo) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{8} +} + +func (x *PeerInfo) GetIp() string { + if x != nil { + return x.Ip + } + return "" +} + +func (x *PeerInfo) GetPublicIp() string { + if x != nil { + return x.PublicIp + } + return "" +} + +func (x *PeerInfo) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *PeerInfo) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *PeerInfo) GetLastSent() string { + if x != nil { + return x.LastSent + } + return "" +} + +func (x *PeerInfo) GetLastReceived() string { + if x != nil { + return x.LastReceived + } + return "" +} + +func (x *PeerInfo) GetBenched() []string { + if x != nil { + return x.Benched + } + return nil +} + +func (x *PeerInfo) GetObservedUptime() uint32 { + if x != nil { + return x.ObservedUptime + } + return 0 +} + +func (x *PeerInfo) GetTrackedSubnets() []string { + if x != nil { + return x.TrackedSubnets + } + return nil +} + +// PeersReply are the results from calling Peers +type PeersReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NumPeers uint32 `protobuf:"varint,1,opt,name=num_peers,json=numPeers,proto3" json:"num_peers,omitempty"` + Peers []*PeerInfo `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` +} + +func (x *PeersReply) Reset() { + *x = PeersReply{} + mi := &file_info_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PeersReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeersReply) ProtoMessage() {} + +func (x *PeersReply) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeersReply.ProtoReflect.Descriptor instead. +func (*PeersReply) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{9} +} + +func (x *PeersReply) GetNumPeers() uint32 { + if x != nil { + return x.NumPeers + } + return 0 +} + +func (x *PeersReply) GetPeers() []*PeerInfo { + if x != nil { + return x.Peers + } + return nil +} + +// IsBootstrappedArgs are the arguments for calling IsBootstrapped +type IsBootstrappedArgs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Alias of the chain + // Can also be the string representation of the chain's ID + Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` +} + +func (x *IsBootstrappedArgs) Reset() { + *x = IsBootstrappedArgs{} + mi := &file_info_v1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsBootstrappedArgs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsBootstrappedArgs) ProtoMessage() {} + +func (x *IsBootstrappedArgs) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsBootstrappedArgs.ProtoReflect.Descriptor instead. +func (*IsBootstrappedArgs) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{10} +} + +func (x *IsBootstrappedArgs) GetChain() string { + if x != nil { + return x.Chain + } + return "" +} + +// IsBootstrappedResponse are the results from calling IsBootstrapped +type IsBootstrappedResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // True iff the chain exists and is done bootstrapping + IsBootstrapped bool `protobuf:"varint,1,opt,name=is_bootstrapped,json=isBootstrapped,proto3" json:"is_bootstrapped,omitempty"` +} + +func (x *IsBootstrappedResponse) Reset() { + *x = IsBootstrappedResponse{} + mi := &file_info_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsBootstrappedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsBootstrappedResponse) ProtoMessage() {} + +func (x *IsBootstrappedResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsBootstrappedResponse.ProtoReflect.Descriptor instead. +func (*IsBootstrappedResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{11} +} + +func (x *IsBootstrappedResponse) GetIsBootstrapped() bool { + if x != nil { + return x.IsBootstrapped + } + return false +} + +// UpgradesReply contains the scheduled activation times for each protocol upgrade +type UpgradesReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApricotPhase1Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=apricot_phase1_time,json=apricotPhase1Time,proto3" json:"apricot_phase1_time,omitempty"` + ApricotPhase2Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=apricot_phase2_time,json=apricotPhase2Time,proto3" json:"apricot_phase2_time,omitempty"` + ApricotPhase3Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=apricot_phase3_time,json=apricotPhase3Time,proto3" json:"apricot_phase3_time,omitempty"` + ApricotPhase4Time *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=apricot_phase4_time,json=apricotPhase4Time,proto3" json:"apricot_phase4_time,omitempty"` + ApricotPhase4MinPChainHeight uint64 `protobuf:"varint,5,opt,name=apricot_phase4_min_p_chain_height,json=apricotPhase4MinPChainHeight,proto3" json:"apricot_phase4_min_p_chain_height,omitempty"` + ApricotPhase5Time *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=apricot_phase5_time,json=apricotPhase5Time,proto3" json:"apricot_phase5_time,omitempty"` + ApricotPhasePre6Time *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=apricot_phase_pre6_time,json=apricotPhasePre6Time,proto3" json:"apricot_phase_pre6_time,omitempty"` + ApricotPhase6Time *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=apricot_phase6_time,json=apricotPhase6Time,proto3" json:"apricot_phase6_time,omitempty"` + ApricotPhasePost6Time *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=apricot_phase_post6_time,json=apricotPhasePost6Time,proto3" json:"apricot_phase_post6_time,omitempty"` + BanffTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=banff_time,json=banffTime,proto3" json:"banff_time,omitempty"` + CortinaTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=cortina_time,json=cortinaTime,proto3" json:"cortina_time,omitempty"` + CortinaXChainStopVertexId string `protobuf:"bytes,12,opt,name=cortina_x_chain_stop_vertex_id,json=cortinaXChainStopVertexId,proto3" json:"cortina_x_chain_stop_vertex_id,omitempty"` + DurangoTime *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=durango_time,json=durangoTime,proto3" json:"durango_time,omitempty"` + EtnaTime *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=etna_time,json=etnaTime,proto3" json:"etna_time,omitempty"` + FortunaTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=fortuna_time,json=fortunaTime,proto3" json:"fortuna_time,omitempty"` + GraniteTime *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=granite_time,json=graniteTime,proto3" json:"granite_time,omitempty"` +} + +func (x *UpgradesReply) Reset() { + *x = UpgradesReply{} + mi := &file_info_v1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpgradesReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpgradesReply) ProtoMessage() {} + +func (x *UpgradesReply) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpgradesReply.ProtoReflect.Descriptor instead. +func (*UpgradesReply) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{12} +} + +func (x *UpgradesReply) GetApricotPhase1Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhase1Time + } + return nil +} + +func (x *UpgradesReply) GetApricotPhase2Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhase2Time + } + return nil +} + +func (x *UpgradesReply) GetApricotPhase3Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhase3Time + } + return nil +} + +func (x *UpgradesReply) GetApricotPhase4Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhase4Time + } + return nil +} + +func (x *UpgradesReply) GetApricotPhase4MinPChainHeight() uint64 { + if x != nil { + return x.ApricotPhase4MinPChainHeight + } + return 0 +} + +func (x *UpgradesReply) GetApricotPhase5Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhase5Time + } + return nil +} + +func (x *UpgradesReply) GetApricotPhasePre6Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhasePre6Time + } + return nil +} + +func (x *UpgradesReply) GetApricotPhase6Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhase6Time + } + return nil +} + +func (x *UpgradesReply) GetApricotPhasePost6Time() *timestamppb.Timestamp { + if x != nil { + return x.ApricotPhasePost6Time + } + return nil +} + +func (x *UpgradesReply) GetBanffTime() *timestamppb.Timestamp { + if x != nil { + return x.BanffTime + } + return nil +} + +func (x *UpgradesReply) GetCortinaTime() *timestamppb.Timestamp { + if x != nil { + return x.CortinaTime + } + return nil +} + +func (x *UpgradesReply) GetCortinaXChainStopVertexId() string { + if x != nil { + return x.CortinaXChainStopVertexId + } + return "" +} + +func (x *UpgradesReply) GetDurangoTime() *timestamppb.Timestamp { + if x != nil { + return x.DurangoTime + } + return nil +} + +func (x *UpgradesReply) GetEtnaTime() *timestamppb.Timestamp { + if x != nil { + return x.EtnaTime + } + return nil +} + +func (x *UpgradesReply) GetFortunaTime() *timestamppb.Timestamp { + if x != nil { + return x.FortunaTime + } + return nil +} + +func (x *UpgradesReply) GetGraniteTime() *timestamppb.Timestamp { + if x != nil { + return x.GraniteTime + } + return nil +} + +// UptimeResponse are the results from calling Uptime +type UptimeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RewardingStakePercentage float64 `protobuf:"fixed64,1,opt,name=rewarding_stake_percentage,json=rewardingStakePercentage,proto3" json:"rewarding_stake_percentage,omitempty"` + WeightedAveragePercentage float64 `protobuf:"fixed64,2,opt,name=weighted_average_percentage,json=weightedAveragePercentage,proto3" json:"weighted_average_percentage,omitempty"` +} + +func (x *UptimeResponse) Reset() { + *x = UptimeResponse{} + mi := &file_info_v1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UptimeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UptimeResponse) ProtoMessage() {} + +func (x *UptimeResponse) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UptimeResponse.ProtoReflect.Descriptor instead. +func (*UptimeResponse) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{13} +} + +func (x *UptimeResponse) GetRewardingStakePercentage() float64 { + if x != nil { + return x.RewardingStakePercentage + } + return 0 +} + +func (x *UptimeResponse) GetWeightedAveragePercentage() float64 { + if x != nil { + return x.WeightedAveragePercentage + } + return 0 +} + +// GetVMsReply contains the response metadata for VMAliases +type GetVMsReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Vms map[string]*VMAliases `protobuf:"bytes,1,rep,name=vms,proto3" json:"vms,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Fxs map[string]string `protobuf:"bytes,2,rep,name=fxs,proto3" json:"fxs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GetVMsReply) Reset() { + *x = GetVMsReply{} + mi := &file_info_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetVMsReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVMsReply) ProtoMessage() {} + +func (x *GetVMsReply) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVMsReply.ProtoReflect.Descriptor instead. +func (*GetVMsReply) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{14} +} + +func (x *GetVMsReply) GetVms() map[string]*VMAliases { + if x != nil { + return x.Vms + } + return nil +} + +func (x *GetVMsReply) GetFxs() map[string]string { + if x != nil { + return x.Fxs + } + return nil +} + +// VMAliases lists all known aliases for a given VM +type VMAliases struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Aliases []string `protobuf:"bytes,1,rep,name=aliases,proto3" json:"aliases,omitempty"` +} + +func (x *VMAliases) Reset() { + *x = VMAliases{} + mi := &file_info_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VMAliases) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VMAliases) ProtoMessage() {} + +func (x *VMAliases) ProtoReflect() protoreflect.Message { + mi := &file_info_v1_service_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VMAliases.ProtoReflect.Descriptor instead. +func (*VMAliases) Descriptor() ([]byte, []int) { + return file_info_v1_service_proto_rawDescGZIP(), []int{15} +} + +func (x *VMAliases) GetAliases() []string { + if x != nil { + return x.Aliases + } + return nil +} + +var File_info_v1_service_proto protoreflect.FileDescriptor + +var file_info_v1_service_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, + 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, + 0x02, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x29, 0x0a, 0x10, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x72, + 0x70, 0x63, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x72, 0x70, 0x63, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, + 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x4d, 0x0a, 0x0b, + 0x76, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, + 0x56, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0a, 0x76, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x56, + 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x44, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x17, 0x0a, 0x07, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, + 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x6f, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x70, + 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x70, 0x22, 0x32, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x49, 0x44, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x21, 0x0a, + 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, + 0x22, 0x2b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x44, 0x41, 0x72, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x3b, 0x0a, + 0x14, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x26, 0x0a, 0x09, 0x50, 0x65, + 0x65, 0x72, 0x73, 0x41, 0x72, 0x67, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x49, + 0x64, 0x73, 0x22, 0x98, 0x02, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x12, 0x17, 0x0a, 0x07, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, + 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x1b, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, + 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x65, 0x64, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x55, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, + 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x74, + 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x22, 0x52, 0x0a, + 0x0a, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6e, + 0x75, 0x6d, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, + 0x6e, 0x75, 0x6d, 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, + 0x73, 0x22, 0x2a, 0x0a, 0x12, 0x49, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, + 0x70, 0x65, 0x64, 0x41, 0x72, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x41, 0x0a, + 0x16, 0x49, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x62, 0x6f, + 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0e, 0x69, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, + 0x22, 0xfb, 0x08, 0x0a, 0x0d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, + 0x61, 0x73, 0x65, 0x31, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x61, 0x70, 0x72, + 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x31, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, + 0x0a, 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x32, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, + 0x50, 0x68, 0x61, 0x73, 0x65, 0x32, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, + 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x33, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x11, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, + 0x65, 0x33, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, + 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x34, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x11, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x34, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x21, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, + 0x61, 0x73, 0x65, 0x34, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1c, 0x61, + 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, 0x65, 0x34, 0x4d, 0x69, 0x6e, 0x50, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4a, 0x0a, 0x13, 0x61, + 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x35, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, + 0x73, 0x65, 0x35, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x17, 0x61, 0x70, 0x72, 0x69, 0x63, + 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x36, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x14, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, + 0x73, 0x65, 0x50, 0x72, 0x65, 0x36, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x61, 0x70, + 0x72, 0x69, 0x63, 0x6f, 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x36, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x11, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, 0x73, + 0x65, 0x36, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x18, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, + 0x74, 0x5f, 0x70, 0x68, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x36, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x15, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x50, 0x68, 0x61, + 0x73, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x36, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x62, + 0x61, 0x6e, 0x66, 0x66, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x62, 0x61, 0x6e, + 0x66, 0x66, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x6f, 0x72, 0x74, 0x69, 0x6e, + 0x61, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x6f, 0x72, 0x74, 0x69, 0x6e, + 0x61, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x1e, 0x63, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x61, + 0x5f, 0x78, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x76, 0x65, + 0x72, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x63, + 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x61, 0x58, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x6f, 0x70, + 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x75, 0x72, 0x61, + 0x6e, 0x67, 0x6f, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x64, 0x75, 0x72, 0x61, + 0x6e, 0x67, 0x6f, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x74, 0x6e, 0x61, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x65, 0x74, 0x6e, 0x61, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x3d, 0x0a, 0x0c, 0x66, 0x6f, 0x72, 0x74, 0x75, 0x6e, 0x61, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0b, 0x66, 0x6f, 0x72, 0x74, 0x75, 0x6e, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x3d, 0x0a, 0x0c, 0x67, 0x72, 0x61, 0x6e, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8e, + 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x18, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, + 0x3e, 0x0a, 0x1b, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x76, 0x65, 0x72, + 0x61, 0x67, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x19, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x41, 0x76, + 0x65, 0x72, 0x61, 0x67, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x22, + 0xf3, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x2f, 0x0a, 0x03, 0x76, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x69, + 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x2e, 0x56, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x76, 0x6d, 0x73, + 0x12, 0x2f, 0x0a, 0x03, 0x66, 0x78, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x2e, 0x46, 0x78, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x66, 0x78, + 0x73, 0x1a, 0x4a, 0x0a, 0x08, 0x56, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x4d, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x36, 0x0a, + 0x08, 0x46, 0x78, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x25, 0x0a, 0x09, 0x56, 0x4d, 0x41, 0x6c, 0x69, 0x61, 0x73, + 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x32, 0xde, 0x05, 0x0a, + 0x0b, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3c, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, + 0x44, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x69, 0x6e, 0x66, 0x6f, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x44, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x3c, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x42, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x44, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x44, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x46, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, + 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x4e, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x12, + 0x1c, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1d, 0x2e, + 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x05, + 0x50, 0x65, 0x65, 0x72, 0x73, 0x12, 0x12, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x65, 0x65, 0x72, 0x73, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x13, 0x2e, 0x69, 0x6e, 0x66, 0x6f, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x4e, + 0x0a, 0x0e, 0x49, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, + 0x12, 0x1b, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x42, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1f, 0x2e, + 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, + 0x0a, 0x08, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x55, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x69, + 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x56, 0x4d, 0x73, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x4d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x39, 0x5a, + 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, + 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x76, + 0x31, 0x3b, 0x69, 0x6e, 0x66, 0x6f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_info_v1_service_proto_rawDescOnce sync.Once + file_info_v1_service_proto_rawDescData = file_info_v1_service_proto_rawDesc +) + +func file_info_v1_service_proto_rawDescGZIP() []byte { + file_info_v1_service_proto_rawDescOnce.Do(func() { + file_info_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_info_v1_service_proto_rawDescData) + }) + return file_info_v1_service_proto_rawDescData +} + +var file_info_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_info_v1_service_proto_goTypes = []any{ + (*GetNodeVersionReply)(nil), // 0: info.v1.GetNodeVersionReply + (*GetNodeIDReply)(nil), // 1: info.v1.GetNodeIDReply + (*GetNodeIPReply)(nil), // 2: info.v1.GetNodeIPReply + (*GetNetworkIDReply)(nil), // 3: info.v1.GetNetworkIDReply + (*GetNetworkNameReply)(nil), // 4: info.v1.GetNetworkNameReply + (*GetBlockchainIDArgs)(nil), // 5: info.v1.GetBlockchainIDArgs + (*GetBlockchainIDReply)(nil), // 6: info.v1.GetBlockchainIDReply + (*PeersArgs)(nil), // 7: info.v1.PeersArgs + (*PeerInfo)(nil), // 8: info.v1.PeerInfo + (*PeersReply)(nil), // 9: info.v1.PeersReply + (*IsBootstrappedArgs)(nil), // 10: info.v1.IsBootstrappedArgs + (*IsBootstrappedResponse)(nil), // 11: info.v1.IsBootstrappedResponse + (*UpgradesReply)(nil), // 12: info.v1.UpgradesReply + (*UptimeResponse)(nil), // 13: info.v1.UptimeResponse + (*GetVMsReply)(nil), // 14: info.v1.GetVMsReply + (*VMAliases)(nil), // 15: info.v1.VMAliases + nil, // 16: info.v1.GetNodeVersionReply.VmVersionsEntry + nil, // 17: info.v1.GetVMsReply.VmsEntry + nil, // 18: info.v1.GetVMsReply.FxsEntry + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 20: google.protobuf.Empty +} +var file_info_v1_service_proto_depIdxs = []int32{ + 16, // 0: info.v1.GetNodeVersionReply.vm_versions:type_name -> info.v1.GetNodeVersionReply.VmVersionsEntry + 8, // 1: info.v1.PeersReply.peers:type_name -> info.v1.PeerInfo + 19, // 2: info.v1.UpgradesReply.apricot_phase1_time:type_name -> google.protobuf.Timestamp + 19, // 3: info.v1.UpgradesReply.apricot_phase2_time:type_name -> google.protobuf.Timestamp + 19, // 4: info.v1.UpgradesReply.apricot_phase3_time:type_name -> google.protobuf.Timestamp + 19, // 5: info.v1.UpgradesReply.apricot_phase4_time:type_name -> google.protobuf.Timestamp + 19, // 6: info.v1.UpgradesReply.apricot_phase5_time:type_name -> google.protobuf.Timestamp + 19, // 7: info.v1.UpgradesReply.apricot_phase_pre6_time:type_name -> google.protobuf.Timestamp + 19, // 8: info.v1.UpgradesReply.apricot_phase6_time:type_name -> google.protobuf.Timestamp + 19, // 9: info.v1.UpgradesReply.apricot_phase_post6_time:type_name -> google.protobuf.Timestamp + 19, // 10: info.v1.UpgradesReply.banff_time:type_name -> google.protobuf.Timestamp + 19, // 11: info.v1.UpgradesReply.cortina_time:type_name -> google.protobuf.Timestamp + 19, // 12: info.v1.UpgradesReply.durango_time:type_name -> google.protobuf.Timestamp + 19, // 13: info.v1.UpgradesReply.etna_time:type_name -> google.protobuf.Timestamp + 19, // 14: info.v1.UpgradesReply.fortuna_time:type_name -> google.protobuf.Timestamp + 19, // 15: info.v1.UpgradesReply.granite_time:type_name -> google.protobuf.Timestamp + 17, // 16: info.v1.GetVMsReply.vms:type_name -> info.v1.GetVMsReply.VmsEntry + 18, // 17: info.v1.GetVMsReply.fxs:type_name -> info.v1.GetVMsReply.FxsEntry + 15, // 18: info.v1.GetVMsReply.VmsEntry.value:type_name -> info.v1.VMAliases + 20, // 19: info.v1.InfoService.GetNodeVersion:input_type -> google.protobuf.Empty + 20, // 20: info.v1.InfoService.GetNodeID:input_type -> google.protobuf.Empty + 20, // 21: info.v1.InfoService.GetNodeIP:input_type -> google.protobuf.Empty + 20, // 22: info.v1.InfoService.GetNetworkID:input_type -> google.protobuf.Empty + 20, // 23: info.v1.InfoService.GetNetworkName:input_type -> google.protobuf.Empty + 5, // 24: info.v1.InfoService.GetBlockchainID:input_type -> info.v1.GetBlockchainIDArgs + 7, // 25: info.v1.InfoService.Peers:input_type -> info.v1.PeersArgs + 10, // 26: info.v1.InfoService.IsBootstrapped:input_type -> info.v1.IsBootstrappedArgs + 20, // 27: info.v1.InfoService.Upgrades:input_type -> google.protobuf.Empty + 20, // 28: info.v1.InfoService.Uptime:input_type -> google.protobuf.Empty + 20, // 29: info.v1.InfoService.GetVMs:input_type -> google.protobuf.Empty + 0, // 30: info.v1.InfoService.GetNodeVersion:output_type -> info.v1.GetNodeVersionReply + 1, // 31: info.v1.InfoService.GetNodeID:output_type -> info.v1.GetNodeIDReply + 2, // 32: info.v1.InfoService.GetNodeIP:output_type -> info.v1.GetNodeIPReply + 3, // 33: info.v1.InfoService.GetNetworkID:output_type -> info.v1.GetNetworkIDReply + 4, // 34: info.v1.InfoService.GetNetworkName:output_type -> info.v1.GetNetworkNameReply + 6, // 35: info.v1.InfoService.GetBlockchainID:output_type -> info.v1.GetBlockchainIDReply + 9, // 36: info.v1.InfoService.Peers:output_type -> info.v1.PeersReply + 11, // 37: info.v1.InfoService.IsBootstrapped:output_type -> info.v1.IsBootstrappedResponse + 12, // 38: info.v1.InfoService.Upgrades:output_type -> info.v1.UpgradesReply + 13, // 39: info.v1.InfoService.Uptime:output_type -> info.v1.UptimeResponse + 14, // 40: info.v1.InfoService.GetVMs:output_type -> info.v1.GetVMsReply + 30, // [30:41] is the sub-list for method output_type + 19, // [19:30] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_info_v1_service_proto_init() } +func file_info_v1_service_proto_init() { + if File_info_v1_service_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_info_v1_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 19, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_info_v1_service_proto_goTypes, + DependencyIndexes: file_info_v1_service_proto_depIdxs, + MessageInfos: file_info_v1_service_proto_msgTypes, + }.Build() + File_info_v1_service_proto = out.File + file_info_v1_service_proto_rawDesc = nil + file_info_v1_service_proto_goTypes = nil + file_info_v1_service_proto_depIdxs = nil +} diff --git a/proto/pb/info/v1/service_grpc.pb.go b/proto/pb/info/v1/service_grpc.pb.go new file mode 100644 index 000000000000..be5e86f354e3 --- /dev/null +++ b/proto/pb/info/v1/service_grpc.pb.go @@ -0,0 +1,480 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v5.29.3 +// source: info/v1/service.proto + +package infov1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + InfoService_GetNodeVersion_FullMethodName = "/info.v1.InfoService/GetNodeVersion" + InfoService_GetNodeID_FullMethodName = "/info.v1.InfoService/GetNodeID" + InfoService_GetNodeIP_FullMethodName = "/info.v1.InfoService/GetNodeIP" + InfoService_GetNetworkID_FullMethodName = "/info.v1.InfoService/GetNetworkID" + InfoService_GetNetworkName_FullMethodName = "/info.v1.InfoService/GetNetworkName" + InfoService_GetBlockchainID_FullMethodName = "/info.v1.InfoService/GetBlockchainID" + InfoService_Peers_FullMethodName = "/info.v1.InfoService/Peers" + InfoService_IsBootstrapped_FullMethodName = "/info.v1.InfoService/IsBootstrapped" + InfoService_Upgrades_FullMethodName = "/info.v1.InfoService/Upgrades" + InfoService_Uptime_FullMethodName = "/info.v1.InfoService/Uptime" + InfoService_GetVMs_FullMethodName = "/info.v1.InfoService/GetVMs" +) + +// InfoServiceClient is the client API for InfoService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type InfoServiceClient interface { + GetNodeVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetNodeVersionReply, error) + GetNodeID(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetNodeIDReply, error) + GetNodeIP(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetNodeIPReply, error) + GetNetworkID(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetNetworkIDReply, error) + GetNetworkName(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetNetworkNameReply, error) + GetBlockchainID(ctx context.Context, in *GetBlockchainIDArgs, opts ...grpc.CallOption) (*GetBlockchainIDReply, error) + Peers(ctx context.Context, in *PeersArgs, opts ...grpc.CallOption) (*PeersReply, error) + IsBootstrapped(ctx context.Context, in *IsBootstrappedArgs, opts ...grpc.CallOption) (*IsBootstrappedResponse, error) + Upgrades(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UpgradesReply, error) + Uptime(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UptimeResponse, error) + GetVMs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetVMsReply, error) +} + +type infoServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewInfoServiceClient(cc grpc.ClientConnInterface) InfoServiceClient { + return &infoServiceClient{cc} +} + +func (c *infoServiceClient) GetNodeVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetNodeVersionReply, error) { + out := new(GetNodeVersionReply) + err := c.cc.Invoke(ctx, InfoService_GetNodeVersion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) GetNodeID(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetNodeIDReply, error) { + out := new(GetNodeIDReply) + err := c.cc.Invoke(ctx, InfoService_GetNodeID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) GetNodeIP(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetNodeIPReply, error) { + out := new(GetNodeIPReply) + err := c.cc.Invoke(ctx, InfoService_GetNodeIP_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) GetNetworkID(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetNetworkIDReply, error) { + out := new(GetNetworkIDReply) + err := c.cc.Invoke(ctx, InfoService_GetNetworkID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) GetNetworkName(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetNetworkNameReply, error) { + out := new(GetNetworkNameReply) + err := c.cc.Invoke(ctx, InfoService_GetNetworkName_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) GetBlockchainID(ctx context.Context, in *GetBlockchainIDArgs, opts ...grpc.CallOption) (*GetBlockchainIDReply, error) { + out := new(GetBlockchainIDReply) + err := c.cc.Invoke(ctx, InfoService_GetBlockchainID_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) Peers(ctx context.Context, in *PeersArgs, opts ...grpc.CallOption) (*PeersReply, error) { + out := new(PeersReply) + err := c.cc.Invoke(ctx, InfoService_Peers_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) IsBootstrapped(ctx context.Context, in *IsBootstrappedArgs, opts ...grpc.CallOption) (*IsBootstrappedResponse, error) { + out := new(IsBootstrappedResponse) + err := c.cc.Invoke(ctx, InfoService_IsBootstrapped_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) Upgrades(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UpgradesReply, error) { + out := new(UpgradesReply) + err := c.cc.Invoke(ctx, InfoService_Upgrades_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) Uptime(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UptimeResponse, error) { + out := new(UptimeResponse) + err := c.cc.Invoke(ctx, InfoService_Uptime_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infoServiceClient) GetVMs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetVMsReply, error) { + out := new(GetVMsReply) + err := c.cc.Invoke(ctx, InfoService_GetVMs_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InfoServiceServer is the server API for InfoService service. +// All implementations must embed UnimplementedInfoServiceServer +// for forward compatibility +type InfoServiceServer interface { + GetNodeVersion(context.Context, *emptypb.Empty) (*GetNodeVersionReply, error) + GetNodeID(context.Context, *emptypb.Empty) (*GetNodeIDReply, error) + GetNodeIP(context.Context, *emptypb.Empty) (*GetNodeIPReply, error) + GetNetworkID(context.Context, *emptypb.Empty) (*GetNetworkIDReply, error) + GetNetworkName(context.Context, *emptypb.Empty) (*GetNetworkNameReply, error) + GetBlockchainID(context.Context, *GetBlockchainIDArgs) (*GetBlockchainIDReply, error) + Peers(context.Context, *PeersArgs) (*PeersReply, error) + IsBootstrapped(context.Context, *IsBootstrappedArgs) (*IsBootstrappedResponse, error) + Upgrades(context.Context, *emptypb.Empty) (*UpgradesReply, error) + Uptime(context.Context, *emptypb.Empty) (*UptimeResponse, error) + GetVMs(context.Context, *emptypb.Empty) (*GetVMsReply, error) + mustEmbedUnimplementedInfoServiceServer() +} + +// UnimplementedInfoServiceServer must be embedded to have forward compatible implementations. +type UnimplementedInfoServiceServer struct { +} + +func (UnimplementedInfoServiceServer) GetNodeVersion(context.Context, *emptypb.Empty) (*GetNodeVersionReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNodeVersion not implemented") +} +func (UnimplementedInfoServiceServer) GetNodeID(context.Context, *emptypb.Empty) (*GetNodeIDReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNodeID not implemented") +} +func (UnimplementedInfoServiceServer) GetNodeIP(context.Context, *emptypb.Empty) (*GetNodeIPReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNodeIP not implemented") +} +func (UnimplementedInfoServiceServer) GetNetworkID(context.Context, *emptypb.Empty) (*GetNetworkIDReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNetworkID not implemented") +} +func (UnimplementedInfoServiceServer) GetNetworkName(context.Context, *emptypb.Empty) (*GetNetworkNameReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNetworkName not implemented") +} +func (UnimplementedInfoServiceServer) GetBlockchainID(context.Context, *GetBlockchainIDArgs) (*GetBlockchainIDReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockchainID not implemented") +} +func (UnimplementedInfoServiceServer) Peers(context.Context, *PeersArgs) (*PeersReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method Peers not implemented") +} +func (UnimplementedInfoServiceServer) IsBootstrapped(context.Context, *IsBootstrappedArgs) (*IsBootstrappedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsBootstrapped not implemented") +} +func (UnimplementedInfoServiceServer) Upgrades(context.Context, *emptypb.Empty) (*UpgradesReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method Upgrades not implemented") +} +func (UnimplementedInfoServiceServer) Uptime(context.Context, *emptypb.Empty) (*UptimeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Uptime not implemented") +} +func (UnimplementedInfoServiceServer) GetVMs(context.Context, *emptypb.Empty) (*GetVMsReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetVMs not implemented") +} +func (UnimplementedInfoServiceServer) mustEmbedUnimplementedInfoServiceServer() {} + +// UnsafeInfoServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InfoServiceServer will +// result in compilation errors. +type UnsafeInfoServiceServer interface { + mustEmbedUnimplementedInfoServiceServer() +} + +func RegisterInfoServiceServer(s grpc.ServiceRegistrar, srv InfoServiceServer) { + s.RegisterService(&InfoService_ServiceDesc, srv) +} + +func _InfoService_GetNodeVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetNodeVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetNodeVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetNodeVersion(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_GetNodeID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetNodeID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetNodeID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetNodeID(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_GetNodeIP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetNodeIP(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetNodeIP_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetNodeIP(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_GetNetworkID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetNetworkID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetNetworkID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetNetworkID(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_GetNetworkName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetNetworkName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetNetworkName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetNetworkName(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_GetBlockchainID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlockchainIDArgs) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetBlockchainID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetBlockchainID_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetBlockchainID(ctx, req.(*GetBlockchainIDArgs)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_Peers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PeersArgs) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).Peers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_Peers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).Peers(ctx, req.(*PeersArgs)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_IsBootstrapped_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsBootstrappedArgs) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).IsBootstrapped(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_IsBootstrapped_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).IsBootstrapped(ctx, req.(*IsBootstrappedArgs)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_Upgrades_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).Upgrades(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_Upgrades_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).Upgrades(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_Uptime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).Uptime(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_Uptime_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).Uptime(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _InfoService_GetVMs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetVMs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: InfoService_GetVMs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetVMs(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +// InfoService_ServiceDesc is the grpc.ServiceDesc for InfoService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InfoService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "info.v1.InfoService", + HandlerType: (*InfoServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetNodeVersion", + Handler: _InfoService_GetNodeVersion_Handler, + }, + { + MethodName: "GetNodeID", + Handler: _InfoService_GetNodeID_Handler, + }, + { + MethodName: "GetNodeIP", + Handler: _InfoService_GetNodeIP_Handler, + }, + { + MethodName: "GetNetworkID", + Handler: _InfoService_GetNetworkID_Handler, + }, + { + MethodName: "GetNetworkName", + Handler: _InfoService_GetNetworkName_Handler, + }, + { + MethodName: "GetBlockchainID", + Handler: _InfoService_GetBlockchainID_Handler, + }, + { + MethodName: "Peers", + Handler: _InfoService_Peers_Handler, + }, + { + MethodName: "IsBootstrapped", + Handler: _InfoService_IsBootstrapped_Handler, + }, + { + MethodName: "Upgrades", + Handler: _InfoService_Upgrades_Handler, + }, + { + MethodName: "Uptime", + Handler: _InfoService_Uptime_Handler, + }, + { + MethodName: "GetVMs", + Handler: _InfoService_GetVMs_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "info/v1/service.proto", +} diff --git a/proto/pb/io/reader/reader.pb.go b/proto/pb/io/reader/reader.pb.go index d4165453fd1a..86d25c02151d 100644 --- a/proto/pb/io/reader/reader.pb.go +++ b/proto/pb/io/reader/reader.pb.go @@ -20,6 +20,53 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// ErrorCode provides information for special sentinel error types +type ErrorCode int32 + +const ( + ErrorCode_ERROR_CODE_UNSPECIFIED ErrorCode = 0 + ErrorCode_ERROR_CODE_EOF ErrorCode = 1 +) + +// Enum value maps for ErrorCode. +var ( + ErrorCode_name = map[int32]string{ + 0: "ERROR_CODE_UNSPECIFIED", + 1: "ERROR_CODE_EOF", + } + ErrorCode_value = map[string]int32{ + "ERROR_CODE_UNSPECIFIED": 0, + "ERROR_CODE_EOF": 1, + } +) + +func (x ErrorCode) Enum() *ErrorCode { + p := new(ErrorCode) + *p = x + return p +} + +func (x ErrorCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrorCode) Descriptor() protoreflect.EnumDescriptor { + return file_io_reader_reader_proto_enumTypes[0].Descriptor() +} + +func (ErrorCode) Type() protoreflect.EnumType { + return &file_io_reader_reader_proto_enumTypes[0] +} + +func (x ErrorCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ErrorCode.Descriptor instead. +func (ErrorCode) EnumDescriptor() ([]byte, []int) { + return file_io_reader_reader_proto_rawDescGZIP(), []int{0} +} + type ReadRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -74,7 +121,7 @@ type ReadResponse struct { // read is the payload in bytes Read []byte `protobuf:"bytes,1,opt,name=read,proto3" json:"read,omitempty"` // error is an error message - Error *string `protobuf:"bytes,2,opt,name=error,proto3,oneof" json:"error,omitempty"` + Error *Error `protobuf:"bytes,2,opt,name=error,proto3,oneof" json:"error,omitempty"` } func (x *ReadResponse) Reset() { @@ -114,9 +161,62 @@ func (x *ReadResponse) GetRead() []byte { return nil } -func (x *ReadResponse) GetError() string { - if x != nil && x.Error != nil { - return *x.Error +func (x *ReadResponse) GetError() *Error { + if x != nil { + return x.Error + } + return nil +} + +type Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ErrorCode ErrorCode `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3,enum=io.reader.ErrorCode" json:"error_code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *Error) Reset() { + *x = Error{} + mi := &file_io_reader_reader_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Error) ProtoMessage() {} + +func (x *Error) ProtoReflect() protoreflect.Message { + mi := &file_io_reader_reader_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Error.ProtoReflect.Descriptor instead. +func (*Error) Descriptor() ([]byte, []int) { + return file_io_reader_reader_proto_rawDescGZIP(), []int{2} +} + +func (x *Error) GetErrorCode() ErrorCode { + if x != nil { + return x.ErrorCode + } + return ErrorCode_ERROR_CODE_UNSPECIFIED +} + +func (x *Error) GetMessage() string { + if x != nil { + return x.Message } return "" } @@ -128,20 +228,30 @@ var file_io_reader_reader_proto_rawDesc = []byte{ 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x25, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x47, 0x0a, 0x0c, 0x52, 0x65, + 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x59, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x65, - 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x72, 0x65, 0x61, 0x64, 0x12, 0x19, - 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x32, 0x41, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x37, 0x0a, - 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x16, 0x2e, 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, - 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x70, 0x62, 0x2f, 0x69, 0x6f, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x72, 0x65, 0x61, 0x64, 0x12, 0x2b, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, + 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x56, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x33, + 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x3b, 0x0a, + 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x4f, 0x46, 0x10, 0x01, 0x32, 0x41, 0x0a, 0x06, 0x52, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x16, 0x2e, 0x69, + 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x69, 0x6f, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x34, 0x5a, + 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, + 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x69, 0x6f, 0x2f, 0x72, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -156,19 +266,24 @@ func file_io_reader_reader_proto_rawDescGZIP() []byte { return file_io_reader_reader_proto_rawDescData } -var file_io_reader_reader_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_io_reader_reader_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_io_reader_reader_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_io_reader_reader_proto_goTypes = []any{ - (*ReadRequest)(nil), // 0: io.reader.ReadRequest - (*ReadResponse)(nil), // 1: io.reader.ReadResponse + (ErrorCode)(0), // 0: io.reader.ErrorCode + (*ReadRequest)(nil), // 1: io.reader.ReadRequest + (*ReadResponse)(nil), // 2: io.reader.ReadResponse + (*Error)(nil), // 3: io.reader.Error } var file_io_reader_reader_proto_depIdxs = []int32{ - 0, // 0: io.reader.Reader.Read:input_type -> io.reader.ReadRequest - 1, // 1: io.reader.Reader.Read:output_type -> io.reader.ReadResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 3, // 0: io.reader.ReadResponse.error:type_name -> io.reader.Error + 0, // 1: io.reader.Error.error_code:type_name -> io.reader.ErrorCode + 1, // 2: io.reader.Reader.Read:input_type -> io.reader.ReadRequest + 2, // 3: io.reader.Reader.Read:output_type -> io.reader.ReadResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_io_reader_reader_proto_init() } @@ -182,13 +297,14 @@ func file_io_reader_reader_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_io_reader_reader_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, + NumEnums: 1, + NumMessages: 3, NumExtensions: 0, NumServices: 1, }, GoTypes: file_io_reader_reader_proto_goTypes, DependencyIndexes: file_io_reader_reader_proto_depIdxs, + EnumInfos: file_io_reader_reader_proto_enumTypes, MessageInfos: file_io_reader_reader_proto_msgTypes, }.Build() File_io_reader_reader_proto = out.File diff --git a/proto/pb/vm/vm.pb.go b/proto/pb/vm/vm.pb.go index 9ad3b5d3b5d2..807b05f080f2 100644 --- a/proto/pb/vm/vm.pb.go +++ b/proto/pb/vm/vm.pb.go @@ -177,7 +177,7 @@ func (x StateSummaryAcceptResponse_Mode) Number() protoreflect.EnumNumber { // Deprecated: Use StateSummaryAcceptResponse_Mode.Descriptor instead. func (StateSummaryAcceptResponse_Mode) EnumDescriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{42, 0} + return file_vm_vm_proto_rawDescGZIP(), []int{40, 0} } type InitializeRequest struct { @@ -706,52 +706,7 @@ func (x *SetStateResponse) GetTimestamp() *timestamppb.Timestamp { return nil } -type CreateHandlersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Handlers []*Handler `protobuf:"bytes,1,rep,name=handlers,proto3" json:"handlers,omitempty"` -} - -func (x *CreateHandlersResponse) Reset() { - *x = CreateHandlersResponse{} - mi := &file_vm_vm_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateHandlersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateHandlersResponse) ProtoMessage() {} - -func (x *CreateHandlersResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateHandlersResponse.ProtoReflect.Descriptor instead. -func (*CreateHandlersResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{5} -} - -func (x *CreateHandlersResponse) GetHandlers() []*Handler { - if x != nil { - return x.Handlers - } - return nil -} - -type CreateHTTP2HandlerResponse struct { +type NewHTTPHandlerResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -761,69 +716,21 @@ type CreateHTTP2HandlerResponse struct { ServerAddr string `protobuf:"bytes,1,opt,name=server_addr,json=serverAddr,proto3" json:"server_addr,omitempty"` } -func (x *CreateHTTP2HandlerResponse) Reset() { - *x = CreateHTTP2HandlerResponse{} - mi := &file_vm_vm_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateHTTP2HandlerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateHTTP2HandlerResponse) ProtoMessage() {} - -func (x *CreateHTTP2HandlerResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateHTTP2HandlerResponse.ProtoReflect.Descriptor instead. -func (*CreateHTTP2HandlerResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{6} -} - -func (x *CreateHTTP2HandlerResponse) GetServerAddr() string { - if x != nil { - return x.ServerAddr - } - return "" -} - -type Handler struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` - // server_addr is the address of the gRPC server which serves the - // HTTP service - ServerAddr string `protobuf:"bytes,2,opt,name=server_addr,json=serverAddr,proto3" json:"server_addr,omitempty"` -} - -func (x *Handler) Reset() { - *x = Handler{} - mi := &file_vm_vm_proto_msgTypes[7] +func (x *NewHTTPHandlerResponse) Reset() { + *x = NewHTTPHandlerResponse{} + mi := &file_vm_vm_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Handler) String() string { +func (x *NewHTTPHandlerResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Handler) ProtoMessage() {} +func (*NewHTTPHandlerResponse) ProtoMessage() {} -func (x *Handler) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[7] +func (x *NewHTTPHandlerResponse) ProtoReflect() protoreflect.Message { + mi := &file_vm_vm_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -834,19 +741,12 @@ func (x *Handler) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Handler.ProtoReflect.Descriptor instead. -func (*Handler) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{7} -} - -func (x *Handler) GetPrefix() string { - if x != nil { - return x.Prefix - } - return "" +// Deprecated: Use NewHTTPHandlerResponse.ProtoReflect.Descriptor instead. +func (*NewHTTPHandlerResponse) Descriptor() ([]byte, []int) { + return file_vm_vm_proto_rawDescGZIP(), []int{5} } -func (x *Handler) GetServerAddr() string { +func (x *NewHTTPHandlerResponse) GetServerAddr() string { if x != nil { return x.ServerAddr } @@ -863,7 +763,7 @@ type BuildBlockRequest struct { func (x *BuildBlockRequest) Reset() { *x = BuildBlockRequest{} - mi := &file_vm_vm_proto_msgTypes[8] + mi := &file_vm_vm_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -875,7 +775,7 @@ func (x *BuildBlockRequest) String() string { func (*BuildBlockRequest) ProtoMessage() {} func (x *BuildBlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[8] + mi := &file_vm_vm_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -888,7 +788,7 @@ func (x *BuildBlockRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BuildBlockRequest.ProtoReflect.Descriptor instead. func (*BuildBlockRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{8} + return file_vm_vm_proto_rawDescGZIP(), []int{6} } func (x *BuildBlockRequest) GetPChainHeight() uint64 { @@ -914,7 +814,7 @@ type BuildBlockResponse struct { func (x *BuildBlockResponse) Reset() { *x = BuildBlockResponse{} - mi := &file_vm_vm_proto_msgTypes[9] + mi := &file_vm_vm_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -926,7 +826,7 @@ func (x *BuildBlockResponse) String() string { func (*BuildBlockResponse) ProtoMessage() {} func (x *BuildBlockResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[9] + mi := &file_vm_vm_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -939,7 +839,7 @@ func (x *BuildBlockResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BuildBlockResponse.ProtoReflect.Descriptor instead. func (*BuildBlockResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{9} + return file_vm_vm_proto_rawDescGZIP(), []int{7} } func (x *BuildBlockResponse) GetId() []byte { @@ -994,7 +894,7 @@ type ParseBlockRequest struct { func (x *ParseBlockRequest) Reset() { *x = ParseBlockRequest{} - mi := &file_vm_vm_proto_msgTypes[10] + mi := &file_vm_vm_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1006,7 +906,7 @@ func (x *ParseBlockRequest) String() string { func (*ParseBlockRequest) ProtoMessage() {} func (x *ParseBlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[10] + mi := &file_vm_vm_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1019,7 +919,7 @@ func (x *ParseBlockRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ParseBlockRequest.ProtoReflect.Descriptor instead. func (*ParseBlockRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{10} + return file_vm_vm_proto_rawDescGZIP(), []int{8} } func (x *ParseBlockRequest) GetBytes() []byte { @@ -1043,7 +943,7 @@ type ParseBlockResponse struct { func (x *ParseBlockResponse) Reset() { *x = ParseBlockResponse{} - mi := &file_vm_vm_proto_msgTypes[11] + mi := &file_vm_vm_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1055,7 +955,7 @@ func (x *ParseBlockResponse) String() string { func (*ParseBlockResponse) ProtoMessage() {} func (x *ParseBlockResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[11] + mi := &file_vm_vm_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1068,7 +968,7 @@ func (x *ParseBlockResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ParseBlockResponse.ProtoReflect.Descriptor instead. func (*ParseBlockResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{11} + return file_vm_vm_proto_rawDescGZIP(), []int{9} } func (x *ParseBlockResponse) GetId() []byte { @@ -1116,7 +1016,7 @@ type GetBlockRequest struct { func (x *GetBlockRequest) Reset() { *x = GetBlockRequest{} - mi := &file_vm_vm_proto_msgTypes[12] + mi := &file_vm_vm_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1128,7 +1028,7 @@ func (x *GetBlockRequest) String() string { func (*GetBlockRequest) ProtoMessage() {} func (x *GetBlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[12] + mi := &file_vm_vm_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1141,7 +1041,7 @@ func (x *GetBlockRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlockRequest.ProtoReflect.Descriptor instead. func (*GetBlockRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{12} + return file_vm_vm_proto_rawDescGZIP(), []int{10} } func (x *GetBlockRequest) GetId() []byte { @@ -1167,7 +1067,7 @@ type GetBlockResponse struct { func (x *GetBlockResponse) Reset() { *x = GetBlockResponse{} - mi := &file_vm_vm_proto_msgTypes[13] + mi := &file_vm_vm_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1179,7 +1079,7 @@ func (x *GetBlockResponse) String() string { func (*GetBlockResponse) ProtoMessage() {} func (x *GetBlockResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[13] + mi := &file_vm_vm_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1192,7 +1092,7 @@ func (x *GetBlockResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlockResponse.ProtoReflect.Descriptor instead. func (*GetBlockResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{13} + return file_vm_vm_proto_rawDescGZIP(), []int{11} } func (x *GetBlockResponse) GetParentId() []byte { @@ -1247,7 +1147,7 @@ type SetPreferenceRequest struct { func (x *SetPreferenceRequest) Reset() { *x = SetPreferenceRequest{} - mi := &file_vm_vm_proto_msgTypes[14] + mi := &file_vm_vm_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1259,7 +1159,7 @@ func (x *SetPreferenceRequest) String() string { func (*SetPreferenceRequest) ProtoMessage() {} func (x *SetPreferenceRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[14] + mi := &file_vm_vm_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1272,7 +1172,7 @@ func (x *SetPreferenceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetPreferenceRequest.ProtoReflect.Descriptor instead. func (*SetPreferenceRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{14} + return file_vm_vm_proto_rawDescGZIP(), []int{12} } func (x *SetPreferenceRequest) GetId() []byte { @@ -1295,7 +1195,7 @@ type BlockVerifyRequest struct { func (x *BlockVerifyRequest) Reset() { *x = BlockVerifyRequest{} - mi := &file_vm_vm_proto_msgTypes[15] + mi := &file_vm_vm_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1307,7 +1207,7 @@ func (x *BlockVerifyRequest) String() string { func (*BlockVerifyRequest) ProtoMessage() {} func (x *BlockVerifyRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[15] + mi := &file_vm_vm_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1320,7 +1220,7 @@ func (x *BlockVerifyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockVerifyRequest.ProtoReflect.Descriptor instead. func (*BlockVerifyRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{15} + return file_vm_vm_proto_rawDescGZIP(), []int{13} } func (x *BlockVerifyRequest) GetBytes() []byte { @@ -1347,7 +1247,7 @@ type BlockVerifyResponse struct { func (x *BlockVerifyResponse) Reset() { *x = BlockVerifyResponse{} - mi := &file_vm_vm_proto_msgTypes[16] + mi := &file_vm_vm_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1359,7 +1259,7 @@ func (x *BlockVerifyResponse) String() string { func (*BlockVerifyResponse) ProtoMessage() {} func (x *BlockVerifyResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[16] + mi := &file_vm_vm_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1372,7 +1272,7 @@ func (x *BlockVerifyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockVerifyResponse.ProtoReflect.Descriptor instead. func (*BlockVerifyResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{16} + return file_vm_vm_proto_rawDescGZIP(), []int{14} } func (x *BlockVerifyResponse) GetTimestamp() *timestamppb.Timestamp { @@ -1392,7 +1292,7 @@ type BlockAcceptRequest struct { func (x *BlockAcceptRequest) Reset() { *x = BlockAcceptRequest{} - mi := &file_vm_vm_proto_msgTypes[17] + mi := &file_vm_vm_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1404,7 +1304,7 @@ func (x *BlockAcceptRequest) String() string { func (*BlockAcceptRequest) ProtoMessage() {} func (x *BlockAcceptRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[17] + mi := &file_vm_vm_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1417,7 +1317,7 @@ func (x *BlockAcceptRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockAcceptRequest.ProtoReflect.Descriptor instead. func (*BlockAcceptRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{17} + return file_vm_vm_proto_rawDescGZIP(), []int{15} } func (x *BlockAcceptRequest) GetId() []byte { @@ -1437,7 +1337,7 @@ type BlockRejectRequest struct { func (x *BlockRejectRequest) Reset() { *x = BlockRejectRequest{} - mi := &file_vm_vm_proto_msgTypes[18] + mi := &file_vm_vm_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1449,7 +1349,7 @@ func (x *BlockRejectRequest) String() string { func (*BlockRejectRequest) ProtoMessage() {} func (x *BlockRejectRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[18] + mi := &file_vm_vm_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1462,7 +1362,7 @@ func (x *BlockRejectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockRejectRequest.ProtoReflect.Descriptor instead. func (*BlockRejectRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{18} + return file_vm_vm_proto_rawDescGZIP(), []int{16} } func (x *BlockRejectRequest) GetId() []byte { @@ -1482,7 +1382,7 @@ type HealthResponse struct { func (x *HealthResponse) Reset() { *x = HealthResponse{} - mi := &file_vm_vm_proto_msgTypes[19] + mi := &file_vm_vm_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1494,7 +1394,7 @@ func (x *HealthResponse) String() string { func (*HealthResponse) ProtoMessage() {} func (x *HealthResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[19] + mi := &file_vm_vm_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1507,7 +1407,7 @@ func (x *HealthResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HealthResponse.ProtoReflect.Descriptor instead. func (*HealthResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{19} + return file_vm_vm_proto_rawDescGZIP(), []int{17} } func (x *HealthResponse) GetDetails() []byte { @@ -1527,7 +1427,7 @@ type VersionResponse struct { func (x *VersionResponse) Reset() { *x = VersionResponse{} - mi := &file_vm_vm_proto_msgTypes[20] + mi := &file_vm_vm_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1539,7 +1439,7 @@ func (x *VersionResponse) String() string { func (*VersionResponse) ProtoMessage() {} func (x *VersionResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[20] + mi := &file_vm_vm_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1552,7 +1452,7 @@ func (x *VersionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead. func (*VersionResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{20} + return file_vm_vm_proto_rawDescGZIP(), []int{18} } func (x *VersionResponse) GetVersion() string { @@ -1579,7 +1479,7 @@ type AppRequestMsg struct { func (x *AppRequestMsg) Reset() { *x = AppRequestMsg{} - mi := &file_vm_vm_proto_msgTypes[21] + mi := &file_vm_vm_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1591,7 +1491,7 @@ func (x *AppRequestMsg) String() string { func (*AppRequestMsg) ProtoMessage() {} func (x *AppRequestMsg) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[21] + mi := &file_vm_vm_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1604,7 +1504,7 @@ func (x *AppRequestMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use AppRequestMsg.ProtoReflect.Descriptor instead. func (*AppRequestMsg) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{21} + return file_vm_vm_proto_rawDescGZIP(), []int{19} } func (x *AppRequestMsg) GetNodeId() []byte { @@ -1652,7 +1552,7 @@ type AppRequestFailedMsg struct { func (x *AppRequestFailedMsg) Reset() { *x = AppRequestFailedMsg{} - mi := &file_vm_vm_proto_msgTypes[22] + mi := &file_vm_vm_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1664,7 +1564,7 @@ func (x *AppRequestFailedMsg) String() string { func (*AppRequestFailedMsg) ProtoMessage() {} func (x *AppRequestFailedMsg) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[22] + mi := &file_vm_vm_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1677,7 +1577,7 @@ func (x *AppRequestFailedMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use AppRequestFailedMsg.ProtoReflect.Descriptor instead. func (*AppRequestFailedMsg) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{22} + return file_vm_vm_proto_rawDescGZIP(), []int{20} } func (x *AppRequestFailedMsg) GetNodeId() []byte { @@ -1723,7 +1623,7 @@ type AppResponseMsg struct { func (x *AppResponseMsg) Reset() { *x = AppResponseMsg{} - mi := &file_vm_vm_proto_msgTypes[23] + mi := &file_vm_vm_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1735,7 +1635,7 @@ func (x *AppResponseMsg) String() string { func (*AppResponseMsg) ProtoMessage() {} func (x *AppResponseMsg) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[23] + mi := &file_vm_vm_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1748,7 +1648,7 @@ func (x *AppResponseMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use AppResponseMsg.ProtoReflect.Descriptor instead. func (*AppResponseMsg) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{23} + return file_vm_vm_proto_rawDescGZIP(), []int{21} } func (x *AppResponseMsg) GetNodeId() []byte { @@ -1785,7 +1685,7 @@ type AppGossipMsg struct { func (x *AppGossipMsg) Reset() { *x = AppGossipMsg{} - mi := &file_vm_vm_proto_msgTypes[24] + mi := &file_vm_vm_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1797,7 +1697,7 @@ func (x *AppGossipMsg) String() string { func (*AppGossipMsg) ProtoMessage() {} func (x *AppGossipMsg) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[24] + mi := &file_vm_vm_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1810,7 +1710,7 @@ func (x *AppGossipMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use AppGossipMsg.ProtoReflect.Descriptor instead. func (*AppGossipMsg) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{24} + return file_vm_vm_proto_rawDescGZIP(), []int{22} } func (x *AppGossipMsg) GetNodeId() []byte { @@ -1843,7 +1743,7 @@ type ConnectedRequest struct { func (x *ConnectedRequest) Reset() { *x = ConnectedRequest{} - mi := &file_vm_vm_proto_msgTypes[25] + mi := &file_vm_vm_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1855,7 +1755,7 @@ func (x *ConnectedRequest) String() string { func (*ConnectedRequest) ProtoMessage() {} func (x *ConnectedRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[25] + mi := &file_vm_vm_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1868,7 +1768,7 @@ func (x *ConnectedRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ConnectedRequest.ProtoReflect.Descriptor instead. func (*ConnectedRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{25} + return file_vm_vm_proto_rawDescGZIP(), []int{23} } func (x *ConnectedRequest) GetNodeId() []byte { @@ -1916,7 +1816,7 @@ type DisconnectedRequest struct { func (x *DisconnectedRequest) Reset() { *x = DisconnectedRequest{} - mi := &file_vm_vm_proto_msgTypes[26] + mi := &file_vm_vm_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1928,7 +1828,7 @@ func (x *DisconnectedRequest) String() string { func (*DisconnectedRequest) ProtoMessage() {} func (x *DisconnectedRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[26] + mi := &file_vm_vm_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1941,7 +1841,7 @@ func (x *DisconnectedRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DisconnectedRequest.ProtoReflect.Descriptor instead. func (*DisconnectedRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{26} + return file_vm_vm_proto_rawDescGZIP(), []int{24} } func (x *DisconnectedRequest) GetNodeId() []byte { @@ -1964,7 +1864,7 @@ type GetAncestorsRequest struct { func (x *GetAncestorsRequest) Reset() { *x = GetAncestorsRequest{} - mi := &file_vm_vm_proto_msgTypes[27] + mi := &file_vm_vm_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1976,7 +1876,7 @@ func (x *GetAncestorsRequest) String() string { func (*GetAncestorsRequest) ProtoMessage() {} func (x *GetAncestorsRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[27] + mi := &file_vm_vm_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1989,7 +1889,7 @@ func (x *GetAncestorsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAncestorsRequest.ProtoReflect.Descriptor instead. func (*GetAncestorsRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{27} + return file_vm_vm_proto_rawDescGZIP(), []int{25} } func (x *GetAncestorsRequest) GetBlkId() []byte { @@ -2030,7 +1930,7 @@ type GetAncestorsResponse struct { func (x *GetAncestorsResponse) Reset() { *x = GetAncestorsResponse{} - mi := &file_vm_vm_proto_msgTypes[28] + mi := &file_vm_vm_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2042,7 +1942,7 @@ func (x *GetAncestorsResponse) String() string { func (*GetAncestorsResponse) ProtoMessage() {} func (x *GetAncestorsResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[28] + mi := &file_vm_vm_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2055,7 +1955,7 @@ func (x *GetAncestorsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAncestorsResponse.ProtoReflect.Descriptor instead. func (*GetAncestorsResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{28} + return file_vm_vm_proto_rawDescGZIP(), []int{26} } func (x *GetAncestorsResponse) GetBlksBytes() [][]byte { @@ -2075,7 +1975,7 @@ type BatchedParseBlockRequest struct { func (x *BatchedParseBlockRequest) Reset() { *x = BatchedParseBlockRequest{} - mi := &file_vm_vm_proto_msgTypes[29] + mi := &file_vm_vm_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2087,7 +1987,7 @@ func (x *BatchedParseBlockRequest) String() string { func (*BatchedParseBlockRequest) ProtoMessage() {} func (x *BatchedParseBlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[29] + mi := &file_vm_vm_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2100,7 +2000,7 @@ func (x *BatchedParseBlockRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BatchedParseBlockRequest.ProtoReflect.Descriptor instead. func (*BatchedParseBlockRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{29} + return file_vm_vm_proto_rawDescGZIP(), []int{27} } func (x *BatchedParseBlockRequest) GetRequest() [][]byte { @@ -2120,7 +2020,7 @@ type BatchedParseBlockResponse struct { func (x *BatchedParseBlockResponse) Reset() { *x = BatchedParseBlockResponse{} - mi := &file_vm_vm_proto_msgTypes[30] + mi := &file_vm_vm_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2132,7 +2032,7 @@ func (x *BatchedParseBlockResponse) String() string { func (*BatchedParseBlockResponse) ProtoMessage() {} func (x *BatchedParseBlockResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[30] + mi := &file_vm_vm_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2145,7 +2045,7 @@ func (x *BatchedParseBlockResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BatchedParseBlockResponse.ProtoReflect.Descriptor instead. func (*BatchedParseBlockResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{30} + return file_vm_vm_proto_rawDescGZIP(), []int{28} } func (x *BatchedParseBlockResponse) GetResponse() []*ParseBlockResponse { @@ -2165,7 +2065,7 @@ type GetBlockIDAtHeightRequest struct { func (x *GetBlockIDAtHeightRequest) Reset() { *x = GetBlockIDAtHeightRequest{} - mi := &file_vm_vm_proto_msgTypes[31] + mi := &file_vm_vm_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2177,7 +2077,7 @@ func (x *GetBlockIDAtHeightRequest) String() string { func (*GetBlockIDAtHeightRequest) ProtoMessage() {} func (x *GetBlockIDAtHeightRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[31] + mi := &file_vm_vm_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2190,7 +2090,7 @@ func (x *GetBlockIDAtHeightRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlockIDAtHeightRequest.ProtoReflect.Descriptor instead. func (*GetBlockIDAtHeightRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{31} + return file_vm_vm_proto_rawDescGZIP(), []int{29} } func (x *GetBlockIDAtHeightRequest) GetHeight() uint64 { @@ -2211,7 +2111,7 @@ type GetBlockIDAtHeightResponse struct { func (x *GetBlockIDAtHeightResponse) Reset() { *x = GetBlockIDAtHeightResponse{} - mi := &file_vm_vm_proto_msgTypes[32] + mi := &file_vm_vm_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2223,7 +2123,7 @@ func (x *GetBlockIDAtHeightResponse) String() string { func (*GetBlockIDAtHeightResponse) ProtoMessage() {} func (x *GetBlockIDAtHeightResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[32] + mi := &file_vm_vm_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2236,7 +2136,7 @@ func (x *GetBlockIDAtHeightResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlockIDAtHeightResponse.ProtoReflect.Descriptor instead. func (*GetBlockIDAtHeightResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{32} + return file_vm_vm_proto_rawDescGZIP(), []int{30} } func (x *GetBlockIDAtHeightResponse) GetBlkId() []byte { @@ -2263,7 +2163,7 @@ type GatherResponse struct { func (x *GatherResponse) Reset() { *x = GatherResponse{} - mi := &file_vm_vm_proto_msgTypes[33] + mi := &file_vm_vm_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2275,7 +2175,7 @@ func (x *GatherResponse) String() string { func (*GatherResponse) ProtoMessage() {} func (x *GatherResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[33] + mi := &file_vm_vm_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2288,7 +2188,7 @@ func (x *GatherResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GatherResponse.ProtoReflect.Descriptor instead. func (*GatherResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{33} + return file_vm_vm_proto_rawDescGZIP(), []int{31} } func (x *GatherResponse) GetMetricFamilies() []*_go.MetricFamily { @@ -2309,7 +2209,7 @@ type StateSyncEnabledResponse struct { func (x *StateSyncEnabledResponse) Reset() { *x = StateSyncEnabledResponse{} - mi := &file_vm_vm_proto_msgTypes[34] + mi := &file_vm_vm_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2321,7 +2221,7 @@ func (x *StateSyncEnabledResponse) String() string { func (*StateSyncEnabledResponse) ProtoMessage() {} func (x *StateSyncEnabledResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[34] + mi := &file_vm_vm_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2334,7 +2234,7 @@ func (x *StateSyncEnabledResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StateSyncEnabledResponse.ProtoReflect.Descriptor instead. func (*StateSyncEnabledResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{34} + return file_vm_vm_proto_rawDescGZIP(), []int{32} } func (x *StateSyncEnabledResponse) GetEnabled() bool { @@ -2364,7 +2264,7 @@ type GetOngoingSyncStateSummaryResponse struct { func (x *GetOngoingSyncStateSummaryResponse) Reset() { *x = GetOngoingSyncStateSummaryResponse{} - mi := &file_vm_vm_proto_msgTypes[35] + mi := &file_vm_vm_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2376,7 +2276,7 @@ func (x *GetOngoingSyncStateSummaryResponse) String() string { func (*GetOngoingSyncStateSummaryResponse) ProtoMessage() {} func (x *GetOngoingSyncStateSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[35] + mi := &file_vm_vm_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2389,7 +2289,7 @@ func (x *GetOngoingSyncStateSummaryResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetOngoingSyncStateSummaryResponse.ProtoReflect.Descriptor instead. func (*GetOngoingSyncStateSummaryResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{35} + return file_vm_vm_proto_rawDescGZIP(), []int{33} } func (x *GetOngoingSyncStateSummaryResponse) GetId() []byte { @@ -2433,7 +2333,7 @@ type GetLastStateSummaryResponse struct { func (x *GetLastStateSummaryResponse) Reset() { *x = GetLastStateSummaryResponse{} - mi := &file_vm_vm_proto_msgTypes[36] + mi := &file_vm_vm_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2445,7 +2345,7 @@ func (x *GetLastStateSummaryResponse) String() string { func (*GetLastStateSummaryResponse) ProtoMessage() {} func (x *GetLastStateSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[36] + mi := &file_vm_vm_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2458,7 +2358,7 @@ func (x *GetLastStateSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetLastStateSummaryResponse.ProtoReflect.Descriptor instead. func (*GetLastStateSummaryResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{36} + return file_vm_vm_proto_rawDescGZIP(), []int{34} } func (x *GetLastStateSummaryResponse) GetId() []byte { @@ -2499,7 +2399,7 @@ type ParseStateSummaryRequest struct { func (x *ParseStateSummaryRequest) Reset() { *x = ParseStateSummaryRequest{} - mi := &file_vm_vm_proto_msgTypes[37] + mi := &file_vm_vm_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2511,7 +2411,7 @@ func (x *ParseStateSummaryRequest) String() string { func (*ParseStateSummaryRequest) ProtoMessage() {} func (x *ParseStateSummaryRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[37] + mi := &file_vm_vm_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2524,7 +2424,7 @@ func (x *ParseStateSummaryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ParseStateSummaryRequest.ProtoReflect.Descriptor instead. func (*ParseStateSummaryRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{37} + return file_vm_vm_proto_rawDescGZIP(), []int{35} } func (x *ParseStateSummaryRequest) GetBytes() []byte { @@ -2546,7 +2446,7 @@ type ParseStateSummaryResponse struct { func (x *ParseStateSummaryResponse) Reset() { *x = ParseStateSummaryResponse{} - mi := &file_vm_vm_proto_msgTypes[38] + mi := &file_vm_vm_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2558,7 +2458,7 @@ func (x *ParseStateSummaryResponse) String() string { func (*ParseStateSummaryResponse) ProtoMessage() {} func (x *ParseStateSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[38] + mi := &file_vm_vm_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2571,7 +2471,7 @@ func (x *ParseStateSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ParseStateSummaryResponse.ProtoReflect.Descriptor instead. func (*ParseStateSummaryResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{38} + return file_vm_vm_proto_rawDescGZIP(), []int{36} } func (x *ParseStateSummaryResponse) GetId() []byte { @@ -2605,7 +2505,7 @@ type GetStateSummaryRequest struct { func (x *GetStateSummaryRequest) Reset() { *x = GetStateSummaryRequest{} - mi := &file_vm_vm_proto_msgTypes[39] + mi := &file_vm_vm_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2617,7 +2517,7 @@ func (x *GetStateSummaryRequest) String() string { func (*GetStateSummaryRequest) ProtoMessage() {} func (x *GetStateSummaryRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[39] + mi := &file_vm_vm_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2630,7 +2530,7 @@ func (x *GetStateSummaryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStateSummaryRequest.ProtoReflect.Descriptor instead. func (*GetStateSummaryRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{39} + return file_vm_vm_proto_rawDescGZIP(), []int{37} } func (x *GetStateSummaryRequest) GetHeight() uint64 { @@ -2652,7 +2552,7 @@ type GetStateSummaryResponse struct { func (x *GetStateSummaryResponse) Reset() { *x = GetStateSummaryResponse{} - mi := &file_vm_vm_proto_msgTypes[40] + mi := &file_vm_vm_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2664,7 +2564,7 @@ func (x *GetStateSummaryResponse) String() string { func (*GetStateSummaryResponse) ProtoMessage() {} func (x *GetStateSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[40] + mi := &file_vm_vm_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2677,7 +2577,7 @@ func (x *GetStateSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStateSummaryResponse.ProtoReflect.Descriptor instead. func (*GetStateSummaryResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{40} + return file_vm_vm_proto_rawDescGZIP(), []int{38} } func (x *GetStateSummaryResponse) GetId() []byte { @@ -2711,7 +2611,7 @@ type StateSummaryAcceptRequest struct { func (x *StateSummaryAcceptRequest) Reset() { *x = StateSummaryAcceptRequest{} - mi := &file_vm_vm_proto_msgTypes[41] + mi := &file_vm_vm_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2723,7 +2623,7 @@ func (x *StateSummaryAcceptRequest) String() string { func (*StateSummaryAcceptRequest) ProtoMessage() {} func (x *StateSummaryAcceptRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[41] + mi := &file_vm_vm_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2736,7 +2636,7 @@ func (x *StateSummaryAcceptRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StateSummaryAcceptRequest.ProtoReflect.Descriptor instead. func (*StateSummaryAcceptRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{41} + return file_vm_vm_proto_rawDescGZIP(), []int{39} } func (x *StateSummaryAcceptRequest) GetBytes() []byte { @@ -2757,7 +2657,7 @@ type StateSummaryAcceptResponse struct { func (x *StateSummaryAcceptResponse) Reset() { *x = StateSummaryAcceptResponse{} - mi := &file_vm_vm_proto_msgTypes[42] + mi := &file_vm_vm_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2769,7 +2669,7 @@ func (x *StateSummaryAcceptResponse) String() string { func (*StateSummaryAcceptResponse) ProtoMessage() {} func (x *StateSummaryAcceptResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[42] + mi := &file_vm_vm_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2782,7 +2682,7 @@ func (x *StateSummaryAcceptResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StateSummaryAcceptResponse.ProtoReflect.Descriptor instead. func (*StateSummaryAcceptResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{42} + return file_vm_vm_proto_rawDescGZIP(), []int{40} } func (x *StateSummaryAcceptResponse) GetMode() StateSummaryAcceptResponse_Mode { @@ -2946,370 +2846,357 @@ var file_vm_vm_proto_rawDesc = []byte{ 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x41, 0x0a, - 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x08, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x6d, 0x2e, 0x48, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x08, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, - 0x22, 0x3d, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x32, 0x48, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x22, - 0x42, 0x0a, 0x07, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x22, 0x51, 0x0a, 0x11, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x5f, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x00, 0x52, 0x0c, 0x70, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xd9, 0x01, 0x0a, 0x12, 0x42, 0x75, 0x69, 0x6c, 0x64, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, - 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x77, 0x69, 0x74, - 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x22, 0x29, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xc3, 0x01, - 0x0a, 0x12, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x77, 0x69, - 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0xe4, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, - 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x12, 0x2e, 0x0a, - 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x26, 0x0a, - 0x14, 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x68, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, - 0x5f, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, - 0x4f, 0x0a, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x22, 0x24, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x24, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, - 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x0e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x2b, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x99, 0x01, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, - 0x36, 0x0a, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x64, - 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x91, 0x01, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, - 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x0e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, - 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x0a, 0x0c, 0x41, - 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, - 0x64, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x81, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, - 0x64, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14, - 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, - 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x22, 0x2e, 0x0a, 0x13, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0xb3, 0x01, 0x0a, 0x13, 0x47, - 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x6c, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x4e, 0x75, 0x6d, 0x12, - 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x74, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, - 0x22, 0x35, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6b, 0x73, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, - 0x6b, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x34, 0x0a, 0x18, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, - 0x19, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, - 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, - 0x0a, 0x19, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x22, 0x50, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, - 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x6c, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x5d, 0x0a, 0x0e, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, - 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, - 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, - 0x6c, 0x69, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x18, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, - 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x7f, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x4f, 0x6e, - 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, - 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x78, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4c, - 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x39, 0x0a, + 0x16, 0x4e, 0x65, 0x77, 0x48, 0x54, 0x54, 0x50, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x22, 0x51, 0x0a, 0x11, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, + 0x0e, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x5f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xd9, 0x01, 0x0a, 0x12, + 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x57, 0x69, 0x74, 0x68, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x29, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x73, 0x65, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x22, 0xc3, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x57, 0x69, 0x74, + 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0xe4, 0x01, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, - 0x72, 0x72, 0x22, 0x30, 0x0a, 0x18, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x19, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x30, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x72, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x77, 0x69, 0x74, + 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x22, 0x26, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x68, 0x0a, 0x12, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, + 0x52, 0x0c, 0x70, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, + 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x22, 0x4f, 0x0a, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x24, 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, + 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x24, 0x0a, 0x12, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x2a, 0x0a, 0x0e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x2b, 0x0a, + 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x99, 0x01, 0x0a, 0x0d, 0x41, + 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, + 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x17, + 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x0e, 0x41, 0x70, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, + 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x39, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x4d, 0x73, 0x67, + 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x81, 0x01, 0x0a, 0x10, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x61, + 0x6a, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x22, + 0x2e, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, + 0xb3, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x6c, 0x6b, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x24, + 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x6e, 0x75, 0x6d, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x4e, 0x75, 0x6d, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, + 0x61, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x18, + 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, + 0x76, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, + 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x74, 0x72, 0x69, 0x76, 0x61, + 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x35, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x6c, 0x6b, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6b, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x34, 0x0a, 0x18, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, + 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x33, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, + 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x5c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x31, 0x0a, 0x19, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x50, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x6c, 0x6b, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x1b, 0x0a, + 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x5d, 0x0a, 0x0e, 0x47, 0x61, + 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, + 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x18, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, + 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, + 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x7f, 0x0a, 0x22, + 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, + 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x78, 0x0a, + 0x1b, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x30, 0x0a, 0x18, 0x50, 0x61, 0x72, 0x73, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x1a, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, - 0x65, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, - 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x51, - 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, - 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, - 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x02, 0x12, - 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x59, 0x4e, 0x41, 0x4d, 0x49, 0x43, 0x10, - 0x03, 0x2a, 0x65, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x49, 0x4e, - 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x52, - 0x4d, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x10, 0x03, 0x2a, 0x6b, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x12, - 0x24, 0x0a, 0x20, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, - 0x59, 0x4e, 0x43, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, - 0x54, 0x45, 0x44, 0x10, 0x03, 0x32, 0xdf, 0x0f, 0x0a, 0x02, 0x56, 0x4d, 0x12, 0x3b, 0x0a, 0x0a, - 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, - 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x53, 0x65, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, 0x2e, - 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3a, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, - 0x32, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x1e, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, - 0x32, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x39, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x14, 0x2e, - 0x76, 0x6d, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x0c, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x17, 0x2e, 0x76, 0x6d, - 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0a, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x50, 0x61, 0x72, - 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, - 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, - 0x0d, 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x18, - 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x12, 0x34, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x19, 0x50, 0x61, 0x72, + 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, + 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, + 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x30, 0x0a, 0x16, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x5c, 0x0a, + 0x17, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, + 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, + 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x31, 0x0a, 0x19, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xc5, + 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, + 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, + 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x76, 0x6d, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, + 0x65, 0x72, 0x72, 0x22, 0x51, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, + 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x49, 0x43, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x59, 0x4e, + 0x41, 0x4d, 0x49, 0x43, 0x10, 0x03, 0x2a, 0x65, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, + 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x10, 0x03, 0x2a, 0x6b, 0x0a, + 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, + 0x13, 0x0a, 0x0f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, + 0x4e, 0x44, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x50, + 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x03, 0x32, 0x91, 0x0f, 0x0a, 0x02, 0x56, + 0x4d, 0x12, 0x3b, 0x0a, 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, + 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x49, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, + 0x0a, 0x08, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, + 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, - 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x11, 0x2e, 0x76, - 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x17, 0x2e, 0x76, 0x6d, - 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x0b, - 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x2e, 0x76, 0x6d, - 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x1a, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x12, 0x44, 0x0a, 0x0e, 0x4e, 0x65, 0x77, 0x48, 0x54, 0x54, 0x50, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x76, 0x6d, + 0x2e, 0x4e, 0x65, 0x77, 0x48, 0x54, 0x54, 0x50, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x12, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x75, + 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3b, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, + 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, + 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, + 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x47, 0x6f, - 0x73, 0x73, 0x69, 0x70, 0x12, 0x10, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, - 0x73, 0x69, 0x70, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, - 0x0a, 0x06, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, + 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, - 0x74, 0x6f, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, - 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, - 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x2e, 0x76, - 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, - 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x47, 0x65, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, - 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, - 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, - 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, - 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4f, - 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x26, - 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, - 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, - 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x76, 0x6d, - 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x50, - 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x2e, 0x76, 0x6d, - 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x79, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x6d, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, - 0x65, 0x70, 0x74, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, - 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x1a, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x11, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, + 0x0a, 0x10, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, + 0x65, 0x64, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x12, 0x53, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, - 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x35, + 0x0a, 0x09, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x12, 0x10, 0x2e, 0x76, 0x6d, + 0x2e, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x61, 0x74, + 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x47, + 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x76, 0x6d, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, + 0x0a, 0x11, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, + 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, + 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x53, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, + 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x1a, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5c, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, + 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x26, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x6e, + 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, + 0x13, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, 0x2e, 0x76, + 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, + 0x11, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x12, 0x1a, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x53, 0x0a, 0x12, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, + 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2d, + 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, + 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, + 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x6d, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3325,7 +3212,7 @@ func file_vm_vm_proto_rawDescGZIP() []byte { } var file_vm_vm_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_vm_vm_proto_msgTypes = make([]protoimpl.MessageInfo, 43) +var file_vm_vm_proto_msgTypes = make([]protoimpl.MessageInfo, 41) var file_vm_vm_proto_goTypes = []any{ (State)(0), // 0: vm.State (Error)(0), // 1: vm.Error @@ -3335,149 +3222,144 @@ var file_vm_vm_proto_goTypes = []any{ (*InitializeResponse)(nil), // 5: vm.InitializeResponse (*SetStateRequest)(nil), // 6: vm.SetStateRequest (*SetStateResponse)(nil), // 7: vm.SetStateResponse - (*CreateHandlersResponse)(nil), // 8: vm.CreateHandlersResponse - (*CreateHTTP2HandlerResponse)(nil), // 9: vm.CreateHTTP2HandlerResponse - (*Handler)(nil), // 10: vm.Handler - (*BuildBlockRequest)(nil), // 11: vm.BuildBlockRequest - (*BuildBlockResponse)(nil), // 12: vm.BuildBlockResponse - (*ParseBlockRequest)(nil), // 13: vm.ParseBlockRequest - (*ParseBlockResponse)(nil), // 14: vm.ParseBlockResponse - (*GetBlockRequest)(nil), // 15: vm.GetBlockRequest - (*GetBlockResponse)(nil), // 16: vm.GetBlockResponse - (*SetPreferenceRequest)(nil), // 17: vm.SetPreferenceRequest - (*BlockVerifyRequest)(nil), // 18: vm.BlockVerifyRequest - (*BlockVerifyResponse)(nil), // 19: vm.BlockVerifyResponse - (*BlockAcceptRequest)(nil), // 20: vm.BlockAcceptRequest - (*BlockRejectRequest)(nil), // 21: vm.BlockRejectRequest - (*HealthResponse)(nil), // 22: vm.HealthResponse - (*VersionResponse)(nil), // 23: vm.VersionResponse - (*AppRequestMsg)(nil), // 24: vm.AppRequestMsg - (*AppRequestFailedMsg)(nil), // 25: vm.AppRequestFailedMsg - (*AppResponseMsg)(nil), // 26: vm.AppResponseMsg - (*AppGossipMsg)(nil), // 27: vm.AppGossipMsg - (*ConnectedRequest)(nil), // 28: vm.ConnectedRequest - (*DisconnectedRequest)(nil), // 29: vm.DisconnectedRequest - (*GetAncestorsRequest)(nil), // 30: vm.GetAncestorsRequest - (*GetAncestorsResponse)(nil), // 31: vm.GetAncestorsResponse - (*BatchedParseBlockRequest)(nil), // 32: vm.BatchedParseBlockRequest - (*BatchedParseBlockResponse)(nil), // 33: vm.BatchedParseBlockResponse - (*GetBlockIDAtHeightRequest)(nil), // 34: vm.GetBlockIDAtHeightRequest - (*GetBlockIDAtHeightResponse)(nil), // 35: vm.GetBlockIDAtHeightResponse - (*GatherResponse)(nil), // 36: vm.GatherResponse - (*StateSyncEnabledResponse)(nil), // 37: vm.StateSyncEnabledResponse - (*GetOngoingSyncStateSummaryResponse)(nil), // 38: vm.GetOngoingSyncStateSummaryResponse - (*GetLastStateSummaryResponse)(nil), // 39: vm.GetLastStateSummaryResponse - (*ParseStateSummaryRequest)(nil), // 40: vm.ParseStateSummaryRequest - (*ParseStateSummaryResponse)(nil), // 41: vm.ParseStateSummaryResponse - (*GetStateSummaryRequest)(nil), // 42: vm.GetStateSummaryRequest - (*GetStateSummaryResponse)(nil), // 43: vm.GetStateSummaryResponse - (*StateSummaryAcceptRequest)(nil), // 44: vm.StateSummaryAcceptRequest - (*StateSummaryAcceptResponse)(nil), // 45: vm.StateSummaryAcceptResponse - (*timestamppb.Timestamp)(nil), // 46: google.protobuf.Timestamp - (*_go.MetricFamily)(nil), // 47: io.prometheus.client.MetricFamily - (*emptypb.Empty)(nil), // 48: google.protobuf.Empty + (*NewHTTPHandlerResponse)(nil), // 8: vm.NewHTTPHandlerResponse + (*BuildBlockRequest)(nil), // 9: vm.BuildBlockRequest + (*BuildBlockResponse)(nil), // 10: vm.BuildBlockResponse + (*ParseBlockRequest)(nil), // 11: vm.ParseBlockRequest + (*ParseBlockResponse)(nil), // 12: vm.ParseBlockResponse + (*GetBlockRequest)(nil), // 13: vm.GetBlockRequest + (*GetBlockResponse)(nil), // 14: vm.GetBlockResponse + (*SetPreferenceRequest)(nil), // 15: vm.SetPreferenceRequest + (*BlockVerifyRequest)(nil), // 16: vm.BlockVerifyRequest + (*BlockVerifyResponse)(nil), // 17: vm.BlockVerifyResponse + (*BlockAcceptRequest)(nil), // 18: vm.BlockAcceptRequest + (*BlockRejectRequest)(nil), // 19: vm.BlockRejectRequest + (*HealthResponse)(nil), // 20: vm.HealthResponse + (*VersionResponse)(nil), // 21: vm.VersionResponse + (*AppRequestMsg)(nil), // 22: vm.AppRequestMsg + (*AppRequestFailedMsg)(nil), // 23: vm.AppRequestFailedMsg + (*AppResponseMsg)(nil), // 24: vm.AppResponseMsg + (*AppGossipMsg)(nil), // 25: vm.AppGossipMsg + (*ConnectedRequest)(nil), // 26: vm.ConnectedRequest + (*DisconnectedRequest)(nil), // 27: vm.DisconnectedRequest + (*GetAncestorsRequest)(nil), // 28: vm.GetAncestorsRequest + (*GetAncestorsResponse)(nil), // 29: vm.GetAncestorsResponse + (*BatchedParseBlockRequest)(nil), // 30: vm.BatchedParseBlockRequest + (*BatchedParseBlockResponse)(nil), // 31: vm.BatchedParseBlockResponse + (*GetBlockIDAtHeightRequest)(nil), // 32: vm.GetBlockIDAtHeightRequest + (*GetBlockIDAtHeightResponse)(nil), // 33: vm.GetBlockIDAtHeightResponse + (*GatherResponse)(nil), // 34: vm.GatherResponse + (*StateSyncEnabledResponse)(nil), // 35: vm.StateSyncEnabledResponse + (*GetOngoingSyncStateSummaryResponse)(nil), // 36: vm.GetOngoingSyncStateSummaryResponse + (*GetLastStateSummaryResponse)(nil), // 37: vm.GetLastStateSummaryResponse + (*ParseStateSummaryRequest)(nil), // 38: vm.ParseStateSummaryRequest + (*ParseStateSummaryResponse)(nil), // 39: vm.ParseStateSummaryResponse + (*GetStateSummaryRequest)(nil), // 40: vm.GetStateSummaryRequest + (*GetStateSummaryResponse)(nil), // 41: vm.GetStateSummaryResponse + (*StateSummaryAcceptRequest)(nil), // 42: vm.StateSummaryAcceptRequest + (*StateSummaryAcceptResponse)(nil), // 43: vm.StateSummaryAcceptResponse + (*timestamppb.Timestamp)(nil), // 44: google.protobuf.Timestamp + (*_go.MetricFamily)(nil), // 45: io.prometheus.client.MetricFamily + (*emptypb.Empty)(nil), // 46: google.protobuf.Empty } var file_vm_vm_proto_depIdxs = []int32{ 4, // 0: vm.InitializeRequest.network_upgrades:type_name -> vm.NetworkUpgrades - 46, // 1: vm.NetworkUpgrades.apricot_phase_1_time:type_name -> google.protobuf.Timestamp - 46, // 2: vm.NetworkUpgrades.apricot_phase_2_time:type_name -> google.protobuf.Timestamp - 46, // 3: vm.NetworkUpgrades.apricot_phase_3_time:type_name -> google.protobuf.Timestamp - 46, // 4: vm.NetworkUpgrades.apricot_phase_4_time:type_name -> google.protobuf.Timestamp - 46, // 5: vm.NetworkUpgrades.apricot_phase_5_time:type_name -> google.protobuf.Timestamp - 46, // 6: vm.NetworkUpgrades.apricot_phase_pre_6_time:type_name -> google.protobuf.Timestamp - 46, // 7: vm.NetworkUpgrades.apricot_phase_6_time:type_name -> google.protobuf.Timestamp - 46, // 8: vm.NetworkUpgrades.apricot_phase_post_6_time:type_name -> google.protobuf.Timestamp - 46, // 9: vm.NetworkUpgrades.banff_time:type_name -> google.protobuf.Timestamp - 46, // 10: vm.NetworkUpgrades.cortina_time:type_name -> google.protobuf.Timestamp - 46, // 11: vm.NetworkUpgrades.durango_time:type_name -> google.protobuf.Timestamp - 46, // 12: vm.NetworkUpgrades.etna_time:type_name -> google.protobuf.Timestamp - 46, // 13: vm.NetworkUpgrades.fortuna_time:type_name -> google.protobuf.Timestamp - 46, // 14: vm.NetworkUpgrades.granite_time:type_name -> google.protobuf.Timestamp - 46, // 15: vm.InitializeResponse.timestamp:type_name -> google.protobuf.Timestamp + 44, // 1: vm.NetworkUpgrades.apricot_phase_1_time:type_name -> google.protobuf.Timestamp + 44, // 2: vm.NetworkUpgrades.apricot_phase_2_time:type_name -> google.protobuf.Timestamp + 44, // 3: vm.NetworkUpgrades.apricot_phase_3_time:type_name -> google.protobuf.Timestamp + 44, // 4: vm.NetworkUpgrades.apricot_phase_4_time:type_name -> google.protobuf.Timestamp + 44, // 5: vm.NetworkUpgrades.apricot_phase_5_time:type_name -> google.protobuf.Timestamp + 44, // 6: vm.NetworkUpgrades.apricot_phase_pre_6_time:type_name -> google.protobuf.Timestamp + 44, // 7: vm.NetworkUpgrades.apricot_phase_6_time:type_name -> google.protobuf.Timestamp + 44, // 8: vm.NetworkUpgrades.apricot_phase_post_6_time:type_name -> google.protobuf.Timestamp + 44, // 9: vm.NetworkUpgrades.banff_time:type_name -> google.protobuf.Timestamp + 44, // 10: vm.NetworkUpgrades.cortina_time:type_name -> google.protobuf.Timestamp + 44, // 11: vm.NetworkUpgrades.durango_time:type_name -> google.protobuf.Timestamp + 44, // 12: vm.NetworkUpgrades.etna_time:type_name -> google.protobuf.Timestamp + 44, // 13: vm.NetworkUpgrades.fortuna_time:type_name -> google.protobuf.Timestamp + 44, // 14: vm.NetworkUpgrades.granite_time:type_name -> google.protobuf.Timestamp + 44, // 15: vm.InitializeResponse.timestamp:type_name -> google.protobuf.Timestamp 0, // 16: vm.SetStateRequest.state:type_name -> vm.State - 46, // 17: vm.SetStateResponse.timestamp:type_name -> google.protobuf.Timestamp - 10, // 18: vm.CreateHandlersResponse.handlers:type_name -> vm.Handler - 46, // 19: vm.BuildBlockResponse.timestamp:type_name -> google.protobuf.Timestamp - 46, // 20: vm.ParseBlockResponse.timestamp:type_name -> google.protobuf.Timestamp - 46, // 21: vm.GetBlockResponse.timestamp:type_name -> google.protobuf.Timestamp - 1, // 22: vm.GetBlockResponse.err:type_name -> vm.Error - 46, // 23: vm.BlockVerifyResponse.timestamp:type_name -> google.protobuf.Timestamp - 46, // 24: vm.AppRequestMsg.deadline:type_name -> google.protobuf.Timestamp - 14, // 25: vm.BatchedParseBlockResponse.response:type_name -> vm.ParseBlockResponse - 1, // 26: vm.GetBlockIDAtHeightResponse.err:type_name -> vm.Error - 47, // 27: vm.GatherResponse.metric_families:type_name -> io.prometheus.client.MetricFamily - 1, // 28: vm.StateSyncEnabledResponse.err:type_name -> vm.Error - 1, // 29: vm.GetOngoingSyncStateSummaryResponse.err:type_name -> vm.Error - 1, // 30: vm.GetLastStateSummaryResponse.err:type_name -> vm.Error - 1, // 31: vm.ParseStateSummaryResponse.err:type_name -> vm.Error - 1, // 32: vm.GetStateSummaryResponse.err:type_name -> vm.Error - 2, // 33: vm.StateSummaryAcceptResponse.mode:type_name -> vm.StateSummaryAcceptResponse.Mode - 1, // 34: vm.StateSummaryAcceptResponse.err:type_name -> vm.Error - 3, // 35: vm.VM.Initialize:input_type -> vm.InitializeRequest - 6, // 36: vm.VM.SetState:input_type -> vm.SetStateRequest - 48, // 37: vm.VM.Shutdown:input_type -> google.protobuf.Empty - 48, // 38: vm.VM.CreateHandlers:input_type -> google.protobuf.Empty - 48, // 39: vm.VM.CreateHTTP2Handler:input_type -> google.protobuf.Empty - 28, // 40: vm.VM.Connected:input_type -> vm.ConnectedRequest - 29, // 41: vm.VM.Disconnected:input_type -> vm.DisconnectedRequest - 11, // 42: vm.VM.BuildBlock:input_type -> vm.BuildBlockRequest - 13, // 43: vm.VM.ParseBlock:input_type -> vm.ParseBlockRequest - 15, // 44: vm.VM.GetBlock:input_type -> vm.GetBlockRequest - 17, // 45: vm.VM.SetPreference:input_type -> vm.SetPreferenceRequest - 48, // 46: vm.VM.Health:input_type -> google.protobuf.Empty - 48, // 47: vm.VM.Version:input_type -> google.protobuf.Empty - 24, // 48: vm.VM.AppRequest:input_type -> vm.AppRequestMsg - 25, // 49: vm.VM.AppRequestFailed:input_type -> vm.AppRequestFailedMsg - 26, // 50: vm.VM.AppResponse:input_type -> vm.AppResponseMsg - 27, // 51: vm.VM.AppGossip:input_type -> vm.AppGossipMsg - 48, // 52: vm.VM.Gather:input_type -> google.protobuf.Empty - 30, // 53: vm.VM.GetAncestors:input_type -> vm.GetAncestorsRequest - 32, // 54: vm.VM.BatchedParseBlock:input_type -> vm.BatchedParseBlockRequest - 34, // 55: vm.VM.GetBlockIDAtHeight:input_type -> vm.GetBlockIDAtHeightRequest - 48, // 56: vm.VM.StateSyncEnabled:input_type -> google.protobuf.Empty - 48, // 57: vm.VM.GetOngoingSyncStateSummary:input_type -> google.protobuf.Empty - 48, // 58: vm.VM.GetLastStateSummary:input_type -> google.protobuf.Empty - 40, // 59: vm.VM.ParseStateSummary:input_type -> vm.ParseStateSummaryRequest - 42, // 60: vm.VM.GetStateSummary:input_type -> vm.GetStateSummaryRequest - 18, // 61: vm.VM.BlockVerify:input_type -> vm.BlockVerifyRequest - 20, // 62: vm.VM.BlockAccept:input_type -> vm.BlockAcceptRequest - 21, // 63: vm.VM.BlockReject:input_type -> vm.BlockRejectRequest - 44, // 64: vm.VM.StateSummaryAccept:input_type -> vm.StateSummaryAcceptRequest - 5, // 65: vm.VM.Initialize:output_type -> vm.InitializeResponse - 7, // 66: vm.VM.SetState:output_type -> vm.SetStateResponse - 48, // 67: vm.VM.Shutdown:output_type -> google.protobuf.Empty - 8, // 68: vm.VM.CreateHandlers:output_type -> vm.CreateHandlersResponse - 9, // 69: vm.VM.CreateHTTP2Handler:output_type -> vm.CreateHTTP2HandlerResponse - 48, // 70: vm.VM.Connected:output_type -> google.protobuf.Empty - 48, // 71: vm.VM.Disconnected:output_type -> google.protobuf.Empty - 12, // 72: vm.VM.BuildBlock:output_type -> vm.BuildBlockResponse - 14, // 73: vm.VM.ParseBlock:output_type -> vm.ParseBlockResponse - 16, // 74: vm.VM.GetBlock:output_type -> vm.GetBlockResponse - 48, // 75: vm.VM.SetPreference:output_type -> google.protobuf.Empty - 22, // 76: vm.VM.Health:output_type -> vm.HealthResponse - 23, // 77: vm.VM.Version:output_type -> vm.VersionResponse - 48, // 78: vm.VM.AppRequest:output_type -> google.protobuf.Empty - 48, // 79: vm.VM.AppRequestFailed:output_type -> google.protobuf.Empty - 48, // 80: vm.VM.AppResponse:output_type -> google.protobuf.Empty - 48, // 81: vm.VM.AppGossip:output_type -> google.protobuf.Empty - 36, // 82: vm.VM.Gather:output_type -> vm.GatherResponse - 31, // 83: vm.VM.GetAncestors:output_type -> vm.GetAncestorsResponse - 33, // 84: vm.VM.BatchedParseBlock:output_type -> vm.BatchedParseBlockResponse - 35, // 85: vm.VM.GetBlockIDAtHeight:output_type -> vm.GetBlockIDAtHeightResponse - 37, // 86: vm.VM.StateSyncEnabled:output_type -> vm.StateSyncEnabledResponse - 38, // 87: vm.VM.GetOngoingSyncStateSummary:output_type -> vm.GetOngoingSyncStateSummaryResponse - 39, // 88: vm.VM.GetLastStateSummary:output_type -> vm.GetLastStateSummaryResponse - 41, // 89: vm.VM.ParseStateSummary:output_type -> vm.ParseStateSummaryResponse - 43, // 90: vm.VM.GetStateSummary:output_type -> vm.GetStateSummaryResponse - 19, // 91: vm.VM.BlockVerify:output_type -> vm.BlockVerifyResponse - 48, // 92: vm.VM.BlockAccept:output_type -> google.protobuf.Empty - 48, // 93: vm.VM.BlockReject:output_type -> google.protobuf.Empty - 45, // 94: vm.VM.StateSummaryAccept:output_type -> vm.StateSummaryAcceptResponse - 65, // [65:95] is the sub-list for method output_type - 35, // [35:65] is the sub-list for method input_type - 35, // [35:35] is the sub-list for extension type_name - 35, // [35:35] is the sub-list for extension extendee - 0, // [0:35] is the sub-list for field type_name + 44, // 17: vm.SetStateResponse.timestamp:type_name -> google.protobuf.Timestamp + 44, // 18: vm.BuildBlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 44, // 19: vm.ParseBlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 44, // 20: vm.GetBlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 1, // 21: vm.GetBlockResponse.err:type_name -> vm.Error + 44, // 22: vm.BlockVerifyResponse.timestamp:type_name -> google.protobuf.Timestamp + 44, // 23: vm.AppRequestMsg.deadline:type_name -> google.protobuf.Timestamp + 12, // 24: vm.BatchedParseBlockResponse.response:type_name -> vm.ParseBlockResponse + 1, // 25: vm.GetBlockIDAtHeightResponse.err:type_name -> vm.Error + 45, // 26: vm.GatherResponse.metric_families:type_name -> io.prometheus.client.MetricFamily + 1, // 27: vm.StateSyncEnabledResponse.err:type_name -> vm.Error + 1, // 28: vm.GetOngoingSyncStateSummaryResponse.err:type_name -> vm.Error + 1, // 29: vm.GetLastStateSummaryResponse.err:type_name -> vm.Error + 1, // 30: vm.ParseStateSummaryResponse.err:type_name -> vm.Error + 1, // 31: vm.GetStateSummaryResponse.err:type_name -> vm.Error + 2, // 32: vm.StateSummaryAcceptResponse.mode:type_name -> vm.StateSummaryAcceptResponse.Mode + 1, // 33: vm.StateSummaryAcceptResponse.err:type_name -> vm.Error + 3, // 34: vm.VM.Initialize:input_type -> vm.InitializeRequest + 6, // 35: vm.VM.SetState:input_type -> vm.SetStateRequest + 46, // 36: vm.VM.Shutdown:input_type -> google.protobuf.Empty + 46, // 37: vm.VM.NewHTTPHandler:input_type -> google.protobuf.Empty + 26, // 38: vm.VM.Connected:input_type -> vm.ConnectedRequest + 27, // 39: vm.VM.Disconnected:input_type -> vm.DisconnectedRequest + 9, // 40: vm.VM.BuildBlock:input_type -> vm.BuildBlockRequest + 11, // 41: vm.VM.ParseBlock:input_type -> vm.ParseBlockRequest + 13, // 42: vm.VM.GetBlock:input_type -> vm.GetBlockRequest + 15, // 43: vm.VM.SetPreference:input_type -> vm.SetPreferenceRequest + 46, // 44: vm.VM.Health:input_type -> google.protobuf.Empty + 46, // 45: vm.VM.Version:input_type -> google.protobuf.Empty + 22, // 46: vm.VM.AppRequest:input_type -> vm.AppRequestMsg + 23, // 47: vm.VM.AppRequestFailed:input_type -> vm.AppRequestFailedMsg + 24, // 48: vm.VM.AppResponse:input_type -> vm.AppResponseMsg + 25, // 49: vm.VM.AppGossip:input_type -> vm.AppGossipMsg + 46, // 50: vm.VM.Gather:input_type -> google.protobuf.Empty + 28, // 51: vm.VM.GetAncestors:input_type -> vm.GetAncestorsRequest + 30, // 52: vm.VM.BatchedParseBlock:input_type -> vm.BatchedParseBlockRequest + 32, // 53: vm.VM.GetBlockIDAtHeight:input_type -> vm.GetBlockIDAtHeightRequest + 46, // 54: vm.VM.StateSyncEnabled:input_type -> google.protobuf.Empty + 46, // 55: vm.VM.GetOngoingSyncStateSummary:input_type -> google.protobuf.Empty + 46, // 56: vm.VM.GetLastStateSummary:input_type -> google.protobuf.Empty + 38, // 57: vm.VM.ParseStateSummary:input_type -> vm.ParseStateSummaryRequest + 40, // 58: vm.VM.GetStateSummary:input_type -> vm.GetStateSummaryRequest + 16, // 59: vm.VM.BlockVerify:input_type -> vm.BlockVerifyRequest + 18, // 60: vm.VM.BlockAccept:input_type -> vm.BlockAcceptRequest + 19, // 61: vm.VM.BlockReject:input_type -> vm.BlockRejectRequest + 42, // 62: vm.VM.StateSummaryAccept:input_type -> vm.StateSummaryAcceptRequest + 5, // 63: vm.VM.Initialize:output_type -> vm.InitializeResponse + 7, // 64: vm.VM.SetState:output_type -> vm.SetStateResponse + 46, // 65: vm.VM.Shutdown:output_type -> google.protobuf.Empty + 8, // 66: vm.VM.NewHTTPHandler:output_type -> vm.NewHTTPHandlerResponse + 46, // 67: vm.VM.Connected:output_type -> google.protobuf.Empty + 46, // 68: vm.VM.Disconnected:output_type -> google.protobuf.Empty + 10, // 69: vm.VM.BuildBlock:output_type -> vm.BuildBlockResponse + 12, // 70: vm.VM.ParseBlock:output_type -> vm.ParseBlockResponse + 14, // 71: vm.VM.GetBlock:output_type -> vm.GetBlockResponse + 46, // 72: vm.VM.SetPreference:output_type -> google.protobuf.Empty + 20, // 73: vm.VM.Health:output_type -> vm.HealthResponse + 21, // 74: vm.VM.Version:output_type -> vm.VersionResponse + 46, // 75: vm.VM.AppRequest:output_type -> google.protobuf.Empty + 46, // 76: vm.VM.AppRequestFailed:output_type -> google.protobuf.Empty + 46, // 77: vm.VM.AppResponse:output_type -> google.protobuf.Empty + 46, // 78: vm.VM.AppGossip:output_type -> google.protobuf.Empty + 34, // 79: vm.VM.Gather:output_type -> vm.GatherResponse + 29, // 80: vm.VM.GetAncestors:output_type -> vm.GetAncestorsResponse + 31, // 81: vm.VM.BatchedParseBlock:output_type -> vm.BatchedParseBlockResponse + 33, // 82: vm.VM.GetBlockIDAtHeight:output_type -> vm.GetBlockIDAtHeightResponse + 35, // 83: vm.VM.StateSyncEnabled:output_type -> vm.StateSyncEnabledResponse + 36, // 84: vm.VM.GetOngoingSyncStateSummary:output_type -> vm.GetOngoingSyncStateSummaryResponse + 37, // 85: vm.VM.GetLastStateSummary:output_type -> vm.GetLastStateSummaryResponse + 39, // 86: vm.VM.ParseStateSummary:output_type -> vm.ParseStateSummaryResponse + 41, // 87: vm.VM.GetStateSummary:output_type -> vm.GetStateSummaryResponse + 17, // 88: vm.VM.BlockVerify:output_type -> vm.BlockVerifyResponse + 46, // 89: vm.VM.BlockAccept:output_type -> google.protobuf.Empty + 46, // 90: vm.VM.BlockReject:output_type -> google.protobuf.Empty + 43, // 91: vm.VM.StateSummaryAccept:output_type -> vm.StateSummaryAcceptResponse + 63, // [63:92] is the sub-list for method output_type + 34, // [34:63] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name } func init() { file_vm_vm_proto_init() } @@ -3485,15 +3367,15 @@ func file_vm_vm_proto_init() { if File_vm_vm_proto != nil { return } - file_vm_vm_proto_msgTypes[8].OneofWrappers = []any{} - file_vm_vm_proto_msgTypes[15].OneofWrappers = []any{} + file_vm_vm_proto_msgTypes[6].OneofWrappers = []any{} + file_vm_vm_proto_msgTypes[13].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vm_vm_proto_rawDesc, NumEnums: 3, - NumMessages: 43, + NumMessages: 41, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/pb/vm/vm_grpc.pb.go b/proto/pb/vm/vm_grpc.pb.go index 498daeb57a84..4491d7145e0f 100644 --- a/proto/pb/vm/vm_grpc.pb.go +++ b/proto/pb/vm/vm_grpc.pb.go @@ -23,8 +23,7 @@ const ( VM_Initialize_FullMethodName = "/vm.VM/Initialize" VM_SetState_FullMethodName = "/vm.VM/SetState" VM_Shutdown_FullMethodName = "/vm.VM/Shutdown" - VM_CreateHandlers_FullMethodName = "/vm.VM/CreateHandlers" - VM_CreateHTTP2Handler_FullMethodName = "/vm.VM/CreateHTTP2Handler" + VM_NewHTTPHandler_FullMethodName = "/vm.VM/NewHTTPHandler" VM_Connected_FullMethodName = "/vm.VM/Connected" VM_Disconnected_FullMethodName = "/vm.VM/Disconnected" VM_BuildBlock_FullMethodName = "/vm.VM/BuildBlock" @@ -65,8 +64,7 @@ type VMClient interface { // Shutdown is called when the node is shutting down. Shutdown(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) // Creates the HTTP handlers for custom chain network calls. - CreateHandlers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateHandlersResponse, error) - CreateHTTP2Handler(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateHTTP2HandlerResponse, error) + NewHTTPHandler(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NewHTTPHandlerResponse, error) Connected(ctx context.Context, in *ConnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Disconnected(ctx context.Context, in *DisconnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Attempt to create a new block from data contained in the VM. @@ -154,18 +152,9 @@ func (c *vMClient) Shutdown(ctx context.Context, in *emptypb.Empty, opts ...grpc return out, nil } -func (c *vMClient) CreateHandlers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateHandlersResponse, error) { - out := new(CreateHandlersResponse) - err := c.cc.Invoke(ctx, VM_CreateHandlers_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *vMClient) CreateHTTP2Handler(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateHTTP2HandlerResponse, error) { - out := new(CreateHTTP2HandlerResponse) - err := c.cc.Invoke(ctx, VM_CreateHTTP2Handler_FullMethodName, in, out, opts...) +func (c *vMClient) NewHTTPHandler(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NewHTTPHandlerResponse, error) { + out := new(NewHTTPHandlerResponse) + err := c.cc.Invoke(ctx, VM_NewHTTPHandler_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -410,8 +399,7 @@ type VMServer interface { // Shutdown is called when the node is shutting down. Shutdown(context.Context, *emptypb.Empty) (*emptypb.Empty, error) // Creates the HTTP handlers for custom chain network calls. - CreateHandlers(context.Context, *emptypb.Empty) (*CreateHandlersResponse, error) - CreateHTTP2Handler(context.Context, *emptypb.Empty) (*CreateHTTP2HandlerResponse, error) + NewHTTPHandler(context.Context, *emptypb.Empty) (*NewHTTPHandlerResponse, error) Connected(context.Context, *ConnectedRequest) (*emptypb.Empty, error) Disconnected(context.Context, *DisconnectedRequest) (*emptypb.Empty, error) // Attempt to create a new block from data contained in the VM. @@ -478,11 +466,8 @@ func (UnimplementedVMServer) SetState(context.Context, *SetStateRequest) (*SetSt func (UnimplementedVMServer) Shutdown(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Shutdown not implemented") } -func (UnimplementedVMServer) CreateHandlers(context.Context, *emptypb.Empty) (*CreateHandlersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateHandlers not implemented") -} -func (UnimplementedVMServer) CreateHTTP2Handler(context.Context, *emptypb.Empty) (*CreateHTTP2HandlerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateHTTP2Handler not implemented") +func (UnimplementedVMServer) NewHTTPHandler(context.Context, *emptypb.Empty) (*NewHTTPHandlerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NewHTTPHandler not implemented") } func (UnimplementedVMServer) Connected(context.Context, *ConnectedRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Connected not implemented") @@ -626,38 +611,20 @@ func _VM_Shutdown_Handler(srv interface{}, ctx context.Context, dec func(interfa return interceptor(ctx, in, info, handler) } -func _VM_CreateHandlers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _VM_NewHTTPHandler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(VMServer).CreateHandlers(ctx, in) + return srv.(VMServer).NewHTTPHandler(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: VM_CreateHandlers_FullMethodName, + FullMethod: VM_NewHTTPHandler_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VMServer).CreateHandlers(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _VM_CreateHTTP2Handler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VMServer).CreateHTTP2Handler(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: VM_CreateHTTP2Handler_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VMServer).CreateHTTP2Handler(ctx, req.(*emptypb.Empty)) + return srv.(VMServer).NewHTTPHandler(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } @@ -1132,12 +1099,8 @@ var VM_ServiceDesc = grpc.ServiceDesc{ Handler: _VM_Shutdown_Handler, }, { - MethodName: "CreateHandlers", - Handler: _VM_CreateHandlers_Handler, - }, - { - MethodName: "CreateHTTP2Handler", - Handler: _VM_CreateHTTP2Handler_Handler, + MethodName: "NewHTTPHandler", + Handler: _VM_NewHTTPHandler_Handler, }, { MethodName: "Connected", diff --git a/proto/vm/vm.proto b/proto/vm/vm.proto index 34334e8e540a..fa35c85a394e 100644 --- a/proto/vm/vm.proto +++ b/proto/vm/vm.proto @@ -20,8 +20,7 @@ service VM { // Shutdown is called when the node is shutting down. rpc Shutdown(google.protobuf.Empty) returns (google.protobuf.Empty); // Creates the HTTP handlers for custom chain network calls. - rpc CreateHandlers(google.protobuf.Empty) returns (CreateHandlersResponse); - rpc CreateHTTP2Handler(google.protobuf.Empty) returns (CreateHTTP2HandlerResponse); + rpc NewHTTPHandler(google.protobuf.Empty) returns (NewHTTPHandlerResponse); rpc Connected(ConnectedRequest) returns (google.protobuf.Empty); rpc Disconnected(DisconnectedRequest) returns (google.protobuf.Empty); // Attempt to create a new block from data contained in the VM. @@ -155,23 +154,12 @@ message SetStateResponse { google.protobuf.Timestamp timestamp = 5; } -message CreateHandlersResponse { - repeated Handler handlers = 1; -} - -message CreateHTTP2HandlerResponse { +message NewHTTPHandlerResponse { // server_addr is the address of the gRPC server which serves the // HTTP service string server_addr = 1; } -message Handler { - string prefix = 1; - // server_addr is the address of the gRPC server which serves the - // HTTP service - string server_addr = 2; -} - message BuildBlockRequest { optional uint64 p_chain_height = 1; } diff --git a/scripts/build.sh b/scripts/build.sh index 9ca888030cd0..8a624b4e1698 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -34,4 +34,5 @@ source "${REPO_ROOT}"/scripts/git_commit.sh echo "Building AvalancheGo with [$(go version)]..." go build ${race} -o "${avalanchego_path}" \ -ldflags "-X github.com/ava-labs/avalanchego/version.GitCommit=$git_commit $static_ld_flags" \ + -gcflags="all=-N -l" \ "${REPO_ROOT}"/main diff --git a/scripts/protobuf_codegen.sh b/scripts/protobuf_codegen.sh index 7e97c4efc152..f509dbb493c7 100755 --- a/scripts/protobuf_codegen.sh +++ b/scripts/protobuf_codegen.sh @@ -30,25 +30,31 @@ if [[ $(protoc-gen-go-grpc --version | cut -f2 -d' ') != "${PROTOC_GEN_GO_GRPC_V exit 255 fi -TARGET=$PWD/proto -if [ -n "${1:-}" ]; then - TARGET="$1" -fi - -# move to api directory -cd "$TARGET" - -echo "Running protobuf fmt..." -buf format -w - -echo "Running protobuf lint check..." -if ! buf lint; then - echo "ERROR: protobuf linter failed" - exit 1 -fi - -echo "Re-generating protobuf..." -if ! buf generate; then - echo "ERROR: protobuf generation failed" - exit 1 -fi +BUF_MODULES=("proto" "connectproto") + +REPO_ROOT=$PWD +for BUF_MODULE in "${BUF_MODULES[@]}"; do + TARGET=$REPO_ROOT/$BUF_MODULE + if [ -n "${1:-}" ]; then + TARGET="$1" + fi + + # move to api directory + cd "$TARGET" + + echo "Generating for buf module $BUF_MODULE" + echo "Running protobuf fmt for..." + buf format -w + + echo "Running protobuf lint check..." + if ! buf lint; then + echo "ERROR: protobuf linter failed" + exit 1 + fi + + echo "Re-generating protobuf..." + if ! buf generate; then + echo "ERROR: protobuf generation failed" + exit 1 + fi +done diff --git a/snow/engine/avalanche/vertex/vertexmock/linearizable_vm.go b/snow/engine/avalanche/vertex/vertexmock/linearizable_vm.go index abd1acc33599..705b7d34c04d 100644 --- a/snow/engine/avalanche/vertex/vertexmock/linearizable_vm.go +++ b/snow/engine/avalanche/vertex/vertexmock/linearizable_vm.go @@ -134,36 +134,6 @@ func (mr *LinearizableVMMockRecorder) Connected(ctx, nodeID, nodeVersion any) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connected", reflect.TypeOf((*LinearizableVM)(nil).Connected), ctx, nodeID, nodeVersion) } -// CreateHTTP2Handler mocks base method. -func (m *LinearizableVM) CreateHTTP2Handler(ctx context.Context) (http.Handler, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateHTTP2Handler", ctx) - ret0, _ := ret[0].(http.Handler) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateHTTP2Handler indicates an expected call of CreateHTTP2Handler. -func (mr *LinearizableVMMockRecorder) CreateHTTP2Handler(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHTTP2Handler", reflect.TypeOf((*LinearizableVM)(nil).CreateHTTP2Handler), ctx) -} - -// CreateHandlers mocks base method. -func (m *LinearizableVM) CreateHandlers(arg0 context.Context) (map[string]http.Handler, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateHandlers", arg0) - ret0, _ := ret[0].(map[string]http.Handler) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateHandlers indicates an expected call of CreateHandlers. -func (mr *LinearizableVMMockRecorder) CreateHandlers(arg0 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHandlers", reflect.TypeOf((*LinearizableVM)(nil).CreateHandlers), arg0) -} - // Disconnected mocks base method. func (m *LinearizableVM) Disconnected(ctx context.Context, nodeID ids.NodeID) error { m.ctrl.T.Helper() @@ -266,6 +236,21 @@ func (mr *LinearizableVMMockRecorder) Linearize(ctx, stopVertexID any) *gomock.C return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Linearize", reflect.TypeOf((*LinearizableVM)(nil).Linearize), ctx, stopVertexID) } +// NewHTTPHandler mocks base method. +func (m *LinearizableVM) NewHTTPHandler(arg0 context.Context) (http.Handler, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NewHTTPHandler", arg0) + ret0, _ := ret[0].(http.Handler) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// NewHTTPHandler indicates an expected call of NewHTTPHandler. +func (mr *LinearizableVMMockRecorder) NewHTTPHandler(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewHTTPHandler", reflect.TypeOf((*LinearizableVM)(nil).NewHTTPHandler), arg0) +} + // ParseBlock mocks base method. func (m *LinearizableVM) ParseBlock(ctx context.Context, blockBytes []byte) (snowman.Block, error) { m.ctrl.T.Helper() diff --git a/snow/engine/common/vm.go b/snow/engine/common/vm.go index 3d9c021d208d..91e5c643f145 100644 --- a/snow/engine/common/vm.go +++ b/snow/engine/common/vm.go @@ -65,6 +65,8 @@ type VM interface { // Version returns the version of the VM. Version(context.Context) (string, error) + // TODO update doc + // TODO deprecate route return value for header based routing // Creates the HTTP handlers for custom chain network calls. // // This exposes handlers that the outside world can use to communicate with @@ -76,9 +78,5 @@ type VM interface { // For example, if this VM implements an account-based payments system, // it have an extension called `accounts`, where clients could get // information about their accounts. - CreateHandlers(context.Context) (map[string]http.Handler, error) - - // CreateHTTP2Handler returns the http/2 handler to register into the - // avalanchego api server. - CreateHTTP2Handler(ctx context.Context) (http.Handler, error) + NewHTTPHandler(context.Context) (http.Handler, error) } diff --git a/snow/engine/enginetest/vm.go b/snow/engine/enginetest/vm.go index 6a69b70a1a4c..39313bdb485b 100644 --- a/snow/engine/enginetest/vm.go +++ b/snow/engine/enginetest/vm.go @@ -20,19 +20,18 @@ import ( ) var ( - errInitialize = errors.New("unexpectedly called Initialize") - errSetState = errors.New("unexpectedly called SetState") - errShutdown = errors.New("unexpectedly called Shutdown") - errCreateHandlers = errors.New("unexpectedly called CreateHandlers") - errCreateHTTP2Handler = errors.New("unexpectedly called CreateHTTP2Handler") - errHealthCheck = errors.New("unexpectedly called HealthCheck") - errConnected = errors.New("unexpectedly called Connected") - errDisconnected = errors.New("unexpectedly called Disconnected") - errVersion = errors.New("unexpectedly called Version") - errAppRequest = errors.New("unexpectedly called AppRequest") - errAppResponse = errors.New("unexpectedly called AppResponse") - errAppRequestFailed = errors.New("unexpectedly called AppRequestFailed") - errAppGossip = errors.New("unexpectedly called AppGossip") + errInitialize = errors.New("unexpectedly called Initialize") + errSetState = errors.New("unexpectedly called SetState") + errShutdown = errors.New("unexpectedly called Shutdown") + errNewHTTPHandler = errors.New("unexpectedly called NewHTTPHandler") + errHealthCheck = errors.New("unexpectedly called HealthCheck") + errConnected = errors.New("unexpectedly called Connected") + errDisconnected = errors.New("unexpectedly called Disconnected") + errVersion = errors.New("unexpectedly called Version") + errAppRequest = errors.New("unexpectedly called AppRequest") + errAppResponse = errors.New("unexpectedly called AppResponse") + errAppRequestFailed = errors.New("unexpectedly called AppRequestFailed") + errAppGossip = errors.New("unexpectedly called AppGossip") _ common.VM = (*VM)(nil) ) @@ -42,14 +41,14 @@ type VM struct { T *testing.T CantInitialize, CantSetState, - CantShutdown, CantCreateHandlers, CantCreateHTTP2Handler, + CantShutdown, CantNewHTTPHandler, CantCreateHTTP2Handler, CantHealthCheck, CantConnected, CantDisconnected, CantVersion, CantAppRequest, CantAppResponse, CantAppGossip, CantAppRequestFailed bool InitializeF func(ctx context.Context, chainCtx *snow.Context, db database.Database, genesisBytes []byte, upgradeBytes []byte, configBytes []byte, msgChan chan<- common.Message, fxs []*common.Fx, appSender common.AppSender) error SetStateF func(ctx context.Context, state snow.State) error ShutdownF func(context.Context) error - CreateHandlersF func(context.Context) (map[string]http.Handler, error) + NewHTTPHandlerF func(context.Context) (http.Handler, error) CreateHTTP2HandlerF func(context.Context) (http.Handler, error) ConnectedF func(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error DisconnectedF func(ctx context.Context, nodeID ids.NodeID) error @@ -65,7 +64,7 @@ func (vm *VM) Default(cant bool) { vm.CantInitialize = cant vm.CantSetState = cant vm.CantShutdown = cant - vm.CantCreateHandlers = cant + vm.CantNewHTTPHandler = cant vm.CantHealthCheck = cant vm.CantAppRequest = cant vm.CantAppRequestFailed = cant @@ -132,27 +131,16 @@ func (vm *VM) Shutdown(ctx context.Context) error { return nil } -func (vm *VM) CreateHandlers(ctx context.Context) (map[string]http.Handler, error) { - if vm.CreateHandlersF != nil { - return vm.CreateHandlersF(ctx) +func (vm *VM) NewHTTPHandler(ctx context.Context) (http.Handler, error) { + if vm.NewHTTPHandlerF != nil { + return vm.NewHTTPHandlerF(ctx) } - if vm.CantCreateHandlers && vm.T != nil { - require.FailNow(vm.T, errCreateHandlers.Error()) + if vm.CantNewHTTPHandler && vm.T != nil { + require.FailNow(vm.T, errNewHTTPHandler.Error()) } return nil, nil } -func (vm *VM) CreateHTTP2Handler(ctx context.Context) (http.Handler, error) { - if vm.CreateHandlersF != nil { - return vm.CreateHTTP2HandlerF(ctx) - } - if vm.CantCreateHTTP2Handler && vm.T != nil { - require.FailNow(vm.T, errCreateHTTP2Handler.Error()) - } - - return nil, nil -} - func (vm *VM) HealthCheck(ctx context.Context) (interface{}, error) { if vm.HealthCheckF != nil { return vm.HealthCheckF(ctx) diff --git a/snow/engine/snowman/block/blockmock/chain_vm.go b/snow/engine/snowman/block/blockmock/chain_vm.go index a93f1be66e88..3d16f9d4487c 100644 --- a/snow/engine/snowman/block/blockmock/chain_vm.go +++ b/snow/engine/snowman/block/blockmock/chain_vm.go @@ -133,36 +133,6 @@ func (mr *ChainVMMockRecorder) Connected(ctx, nodeID, nodeVersion any) *gomock.C return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connected", reflect.TypeOf((*ChainVM)(nil).Connected), ctx, nodeID, nodeVersion) } -// CreateHTTP2Handler mocks base method. -func (m *ChainVM) CreateHTTP2Handler(ctx context.Context) (http.Handler, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateHTTP2Handler", ctx) - ret0, _ := ret[0].(http.Handler) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateHTTP2Handler indicates an expected call of CreateHTTP2Handler. -func (mr *ChainVMMockRecorder) CreateHTTP2Handler(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHTTP2Handler", reflect.TypeOf((*ChainVM)(nil).CreateHTTP2Handler), ctx) -} - -// CreateHandlers mocks base method. -func (m *ChainVM) CreateHandlers(arg0 context.Context) (map[string]http.Handler, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateHandlers", arg0) - ret0, _ := ret[0].(map[string]http.Handler) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateHandlers indicates an expected call of CreateHandlers. -func (mr *ChainVMMockRecorder) CreateHandlers(arg0 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHandlers", reflect.TypeOf((*ChainVM)(nil).CreateHandlers), arg0) -} - // Disconnected mocks base method. func (m *ChainVM) Disconnected(ctx context.Context, nodeID ids.NodeID) error { m.ctrl.T.Helper() @@ -251,6 +221,21 @@ func (mr *ChainVMMockRecorder) LastAccepted(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastAccepted", reflect.TypeOf((*ChainVM)(nil).LastAccepted), arg0) } +// NewHTTPHandler mocks base method. +func (m *ChainVM) NewHTTPHandler(arg0 context.Context) (http.Handler, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NewHTTPHandler", arg0) + ret0, _ := ret[0].(http.Handler) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// NewHTTPHandler indicates an expected call of NewHTTPHandler. +func (mr *ChainVMMockRecorder) NewHTTPHandler(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewHTTPHandler", reflect.TypeOf((*ChainVM)(nil).NewHTTPHandler), arg0) +} + // ParseBlock mocks base method. func (m *ChainVM) ParseBlock(ctx context.Context, blockBytes []byte) (snowman.Block, error) { m.ctrl.T.Helper() diff --git a/utils/constants/aliases.go b/utils/constants/aliases.go index dd8388246d39..6b03822178f4 100644 --- a/utils/constants/aliases.go +++ b/utils/constants/aliases.go @@ -4,4 +4,5 @@ package constants // ChainAliasPrefix denotes a prefix for an alias that belongs to a blockchain ID. +// TODO remove const ChainAliasPrefix string = "bc" diff --git a/version/compatibility.json b/version/compatibility.json index 685f687fc070..a2f4631a143f 100644 --- a/version/compatibility.json +++ b/version/compatibility.json @@ -1,4 +1,7 @@ { + "42": [ + "v1.13.3" + ], "41": [ "v1.13.2" ], diff --git a/version/constants.go b/version/constants.go index 53abef0dab99..fc0386a52261 100644 --- a/version/constants.go +++ b/version/constants.go @@ -4,10 +4,9 @@ package version import ( + _ "embed" "encoding/json" "time" - - _ "embed" ) const ( @@ -15,7 +14,7 @@ const ( // RPCChainVMProtocol should be bumped anytime changes are made which // require the plugin vm to upgrade to latest avalanchego release to be // compatible. - RPCChainVMProtocol uint = 41 + RPCChainVMProtocol uint = 42 ) // These are globals that describe network upgrades and node versions @@ -23,7 +22,7 @@ var ( Current = &Semantic{ Major: 1, Minor: 13, - Patch: 2, + Patch: 3, } CurrentApp = &Application{ Name: Client, diff --git a/vms/avm/vm.go b/vms/avm/vm.go index dd4c6d0ddc1b..be38bedd77ad 100644 --- a/vms/avm/vm.go +++ b/vms/avm/vm.go @@ -9,6 +9,7 @@ import ( "fmt" "net/http" "reflect" + "strings" "sync" "github.com/gorilla/rpc/v2" @@ -291,7 +292,7 @@ func (*VM) Version(context.Context) (string, error) { return version.Current.String(), nil } -func (vm *VM) CreateHandlers(context.Context) (map[string]http.Handler, error) { +func (vm *VM) NewHTTPHandler(context.Context) (http.Handler, error) { codec := json.NewCodec() rpcServer := rpc.NewServer() @@ -311,11 +312,23 @@ func (vm *VM) CreateHandlers(context.Context) (map[string]http.Handler, error) { walletServer.RegisterAfterFunc(vm.metrics.AfterRequest) // name this service "wallet" err := walletServer.RegisterService(&vm.walletService, "wallet") + if err != nil { + return nil, err + } + + mux := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + path := r.URL.Path + + if strings.HasSuffix(path, "/wallet") { + walletServer.ServeHTTP(w, r) + return + } + + rpcServer.ServeHTTP(w, r) + return + }) - return map[string]http.Handler{ - "": rpcServer, - "/wallet": walletServer, - }, err + return mux, nil } func (*VM) CreateHTTP2Handler(context.Context) (http.Handler, error) { diff --git a/vms/example/xsvm/api/ping.go b/vms/example/xsvm/api/ping.go index f8c901c759e1..fec0d7273355 100644 --- a/vms/example/xsvm/api/ping.go +++ b/vms/example/xsvm/api/ping.go @@ -9,16 +9,18 @@ import ( "fmt" "io" + "connectrpc.com/connect" "go.uber.org/zap" "google.golang.org/grpc" "github.com/ava-labs/avalanchego/api/grpcclient" + "github.com/ava-labs/avalanchego/connectproto/pb/xsvm/xsvmconnect" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/proto/pb/xsvm" "github.com/ava-labs/avalanchego/utils/logging" ) -var _ xsvm.PingServer = (*PingService)(nil) +var _ xsvmconnect.PingHandler = (*PingService)(nil) type PingService struct { xsvm.UnsafePingServer @@ -26,16 +28,18 @@ type PingService struct { Log logging.Logger } -func (p *PingService) Ping(_ context.Context, request *xsvm.PingRequest) (*xsvm.PingReply, error) { - p.Log.Debug("ping", zap.String("message", request.Message)) - return &xsvm.PingReply{ - Message: request.Message, - }, nil +func (p PingService) Ping(_ context.Context, request *connect.Request[xsvm.PingRequest]) (*connect.Response[xsvm.PingReply], error) { + p.Log.Debug("ping", zap.String("message", request.Msg.Message)) + return connect.NewResponse[xsvm.PingReply]( + &xsvm.PingReply{ + Message: request.Msg.Message, + }, + ), nil } -func (p *PingService) StreamPing(server xsvm.Ping_StreamPingServer) error { +func (p PingService) StreamPing(_ context.Context, server *connect.BidiStream[xsvm.StreamPingRequest, xsvm.StreamPingReply]) error { for { - request, err := server.Recv() + request, err := server.Receive() if errors.Is(err, io.EOF) { // Client closed the send stream return nil diff --git a/vms/example/xsvm/vm.go b/vms/example/xsvm/vm.go index 9fd85f8e77bc..badeefdca876 100644 --- a/vms/example/xsvm/vm.go +++ b/vms/example/xsvm/vm.go @@ -4,27 +4,29 @@ package xsvm import ( + "bytes" "context" + "encoding/json" "fmt" + "io" "net/http" + "strings" + "connectrpc.com/grpcreflect" "github.com/gorilla/rpc/v2" "github.com/prometheus/client_golang/prometheus" "go.uber.org/zap" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" + "github.com/ava-labs/avalanchego/connectproto/pb/xsvm/xsvmconnect" "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/database/versiondb" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/network/p2p" "github.com/ava-labs/avalanchego/network/p2p/acp118" - "github.com/ava-labs/avalanchego/proto/pb/xsvm" "github.com/ava-labs/avalanchego/snow" "github.com/ava-labs/avalanchego/snow/consensus/snowman" "github.com/ava-labs/avalanchego/snow/engine/common" "github.com/ava-labs/avalanchego/utils/constants" - "github.com/ava-labs/avalanchego/utils/json" "github.com/ava-labs/avalanchego/vms/example/xsvm/api" "github.com/ava-labs/avalanchego/vms/example/xsvm/builder" "github.com/ava-labs/avalanchego/vms/example/xsvm/chain" @@ -33,6 +35,7 @@ import ( "github.com/ava-labs/avalanchego/vms/example/xsvm/state" smblock "github.com/ava-labs/avalanchego/snow/engine/snowman/block" + jsonutil "github.com/ava-labs/avalanchego/utils/json" xsblock "github.com/ava-labs/avalanchego/vms/example/xsvm/block" ) @@ -139,27 +142,76 @@ func (*VM) Version(context.Context) (string, error) { return Version.String(), nil } -func (vm *VM) CreateHandlers(context.Context) (map[string]http.Handler, error) { +func (vm *VM) NewHTTPHandler(context.Context) (http.Handler, error) { server := rpc.NewServer() - server.RegisterCodec(json.NewCodec(), "application/json") - server.RegisterCodec(json.NewCodec(), "application/json;charset=UTF-8") - api := api.NewServer( + server.RegisterCodec(jsonutil.NewCodec(), "application/json") + server.RegisterCodec(jsonutil.NewCodec(), "application/json;charset=UTF-8") + jsonRPCAPI := api.NewServer( vm.chainContext, vm.genesis, vm.db, vm.chain, vm.builder, ) - return map[string]http.Handler{ - "": server, - }, server.RegisterService(api, constants.XSVMName) + if err := server.RegisterService(jsonRPCAPI, constants.XSVMName); err != nil { + return nil, err + } + + reflectionPattern, reflectionHandler := grpcreflect.NewHandlerV1( + grpcreflect.NewStaticReflector(xsvmconnect.PingName), + ) + + pingService := api.PingService{Log: vm.chainContext.Log} + pingPath, pingHandler := xsvmconnect.NewPingHandler(pingService) + + mux := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if isJSONRPCRequest(r) { + server.ServeHTTP(w, r) + return + } + + // Match requests to any exact matches or anything under the path + if strings.HasPrefix(r.URL.Path, pingPath) { + pingHandler.ServeHTTP(w, r) + return + } + + if strings.HasPrefix(r.URL.Path, reflectionPattern) { + reflectionHandler.ServeHTTP(w, r) + return + } + + w.WriteHeader(http.StatusNotFound) + }) + + return mux, nil } -func (vm *VM) CreateHTTP2Handler(context.Context) (http.Handler, error) { - server := grpc.NewServer() - server.RegisterService(&xsvm.Ping_ServiceDesc, &api.PingService{Log: vm.chainContext.Log}) - reflection.Register(server) - return server, nil +func isJSONRPCRequest(r *http.Request) bool { + // Must be a POST with Content-Type application/json + if r.Method != http.MethodPost || !strings.HasPrefix(r.Header.Get("Content-Type"), "application/json") { + return false + } + + // Read the request body (and preserve it for later use) + body, err := io.ReadAll(r.Body) + if err != nil { + return false + } + r.Body = io.NopCloser(bytes.NewReader(body)) // Reset body for the actual handler + + // Minimal struct to detect JSON-RPC 2.0 + var msg struct { + JSONRPC string `json:"jsonrpc"` + Method string `json:"method"` + } + + // Must parse as JSON and have the JSON-RPC marker + if err := json.Unmarshal(body, &msg); err != nil { + return false + } + + return msg.JSONRPC == "2.0" && msg.Method != "" } func (*VM) HealthCheck(context.Context) (interface{}, error) { diff --git a/vms/platformvm/vm.go b/vms/platformvm/vm.go index e541452609e9..296efe0d0693 100644 --- a/vms/platformvm/vm.go +++ b/vms/platformvm/vm.go @@ -446,10 +446,10 @@ func (*VM) Version(context.Context) (string, error) { return version.Current.String(), nil } -// CreateHandlers returns a map where: +// NewHTTPHandler returns a map where: // * keys are API endpoint extensions // * values are API handlers -func (vm *VM) CreateHandlers(context.Context) (map[string]http.Handler, error) { +func (vm *VM) NewHTTPHandler(context.Context) (http.Handler, error) { server := rpc.NewServer() server.RegisterCodec(json.NewCodec(), "application/json") server.RegisterCodec(json.NewCodec(), "application/json;charset=UTF-8") @@ -461,13 +461,8 @@ func (vm *VM) CreateHandlers(context.Context) (map[string]http.Handler, error) { stakerAttributesCache: lru.NewCache[ids.ID, *stakerAttributes](stakerAttributesCacheSize), } err := server.RegisterService(service, "platform") - return map[string]http.Handler{ - "": server, - }, err -} -func (*VM) CreateHTTP2Handler(context.Context) (http.Handler, error) { - return nil, nil + return server, err } func (vm *VM) Connected(ctx context.Context, nodeID ids.NodeID, version *version.Application) error { diff --git a/vms/rpcchainvm/ghttp/greader/greader_test.go b/vms/rpcchainvm/ghttp/greader/greader_test.go new file mode 100644 index 000000000000..5940aa5034c3 --- /dev/null +++ b/vms/rpcchainvm/ghttp/greader/greader_test.go @@ -0,0 +1,51 @@ +// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package greader + +import ( + "context" + "io" + "net" + "testing" + "testing/iotest" + + "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/test/bufconn" + + "github.com/ava-labs/avalanchego/proto/pb/io/reader" +) + +// TestEOF tests that if an io.EOF is returned by an io.Reader, it propagates +// the same error type. This is important because the io.EOF type is used as a +// sentinel error value for a lot of things. +func TestEOF(t *testing.T) { + require := require.New(t) + + server := grpc.NewServer() + listener := bufconn.Listen(1024) + + readerServer := NewServer(iotest.ErrReader(io.EOF)) + reader.RegisterReaderServer(server, readerServer) + + go func() { + require.NoError(server.Serve(listener)) + }() + + conn, err := grpc.DialContext(context.Background(), "bufnet", + grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { + return listener.Dial() + }), + grpc.WithInsecure(), + ) + require.NoError(err) + + client := NewClient(reader.NewReaderClient(conn)) + + buf := make([]byte, 1) + n, err := client.Read(buf) + require.Zero(n) + // Do not use require.ErrorIs because callers use equality checks on io.EOF + require.Equal(err, io.EOF) +} diff --git a/vms/rpcchainvm/ghttp/greader/reader_client.go b/vms/rpcchainvm/ghttp/greader/reader_client.go index be0f2a1a7ee6..12789803d659 100644 --- a/vms/rpcchainvm/ghttp/greader/reader_client.go +++ b/vms/rpcchainvm/ghttp/greader/reader_client.go @@ -31,8 +31,11 @@ func (c *Client) Read(p []byte) (int, error) { copy(p, resp.Read) - if resp.Error != nil { - err = errors.New(*resp.Error) + // Sentinel errors must be special-cased through an error code + if resp.Error != nil && resp.Error.ErrorCode == readerpb.ErrorCode_ERROR_CODE_EOF { + err = io.EOF + } else if resp.Error != nil { + err = errors.New(resp.Error.Message) } return len(resp.Read), err } diff --git a/vms/rpcchainvm/ghttp/greader/reader_server.go b/vms/rpcchainvm/ghttp/greader/reader_server.go index 4d85f674ffc6..3782e42aa736 100644 --- a/vms/rpcchainvm/ghttp/greader/reader_server.go +++ b/vms/rpcchainvm/ghttp/greader/reader_server.go @@ -30,8 +30,14 @@ func (s *Server) Read(_ context.Context, req *readerpb.ReadRequest) (*readerpb.R Read: buf[:n], } if err != nil { - errStr := err.Error() - resp.Error = &errStr + resp.Error = &readerpb.Error{ + Message: err.Error(), + } + + // Sentinel errors must be special-cased through an error code + if err == io.EOF { + resp.Error.ErrorCode = readerpb.ErrorCode_ERROR_CODE_EOF + } } return resp, nil } diff --git a/vms/rpcchainvm/vm_client.go b/vms/rpcchainvm/vm_client.go index 1125e054fc2f..eb4b9fead0be 100644 --- a/vms/rpcchainvm/vm_client.go +++ b/vms/rpcchainvm/vm_client.go @@ -41,6 +41,10 @@ import ( "github.com/ava-labs/avalanchego/vms/rpcchainvm/messenger" "github.com/ava-labs/avalanchego/vms/rpcchainvm/runtime" + grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" + dto "github.com/prometheus/client_model/go" + healthpb "google.golang.org/grpc/health/grpc_health_v1" + aliasreaderpb "github.com/ava-labs/avalanchego/proto/pb/aliasreader" appsenderpb "github.com/ava-labs/avalanchego/proto/pb/appsender" httppb "github.com/ava-labs/avalanchego/proto/pb/http" @@ -50,9 +54,6 @@ import ( validatorstatepb "github.com/ava-labs/avalanchego/proto/pb/validatorstate" vmpb "github.com/ava-labs/avalanchego/proto/pb/vm" warppb "github.com/ava-labs/avalanchego/proto/pb/warp" - grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" - dto "github.com/prometheus/client_model/go" - healthpb "google.golang.org/grpc/health/grpc_health_v1" ) // TODO: Enable these to be configured by the user @@ -370,42 +371,21 @@ func (vm *VMClient) Shutdown(ctx context.Context) error { return errs.Err } -func (vm *VMClient) CreateHandlers(ctx context.Context) (map[string]http.Handler, error) { - resp, err := vm.client.CreateHandlers(ctx, &emptypb.Empty{}) +func (vm *VMClient) NewHTTPHandler(ctx context.Context) (http.Handler, error) { + resp, err := vm.client.NewHTTPHandler(ctx, &emptypb.Empty{}) if err != nil { return nil, err } - handlers := make(map[string]http.Handler, len(resp.Handlers)) - for _, handler := range resp.Handlers { - clientConn, err := grpcutils.Dial(handler.ServerAddr) - if err != nil { - return nil, err - } - - vm.conns = append(vm.conns, clientConn) - handlers[handler.Prefix] = ghttp.NewClient(httppb.NewHTTPClient(clientConn)) - } - return handlers, nil -} - -func (vm *VMClient) CreateHTTP2Handler(ctx context.Context) (http.Handler, error) { - resp, err := vm.client.CreateHTTP2Handler(ctx, &emptypb.Empty{}) - if err != nil { - return nil, err - } - - if resp.ServerAddr == "" { - return nil, nil - } - clientConn, err := grpcutils.Dial(resp.ServerAddr) if err != nil { return nil, err } vm.conns = append(vm.conns, clientConn) - return ghttp.NewClient(httppb.NewHTTPClient(clientConn)), nil + handler := ghttp.NewClient(httppb.NewHTTPClient(clientConn)) + + return handler, nil } func (vm *VMClient) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error { diff --git a/vms/rpcchainvm/vm_server.go b/vms/rpcchainvm/vm_server.go index 370f8ad633b8..b6bd9aff339e 100644 --- a/vms/rpcchainvm/vm_server.go +++ b/vms/rpcchainvm/vm_server.go @@ -38,6 +38,8 @@ import ( "github.com/ava-labs/avalanchego/vms/rpcchainvm/grpcutils" "github.com/ava-labs/avalanchego/vms/rpcchainvm/messenger" + grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" + aliasreaderpb "github.com/ava-labs/avalanchego/proto/pb/aliasreader" appsenderpb "github.com/ava-labs/avalanchego/proto/pb/appsender" httppb "github.com/ava-labs/avalanchego/proto/pb/http" @@ -47,7 +49,6 @@ import ( validatorstatepb "github.com/ava-labs/avalanchego/proto/pb/validatorstate" vmpb "github.com/ava-labs/avalanchego/proto/pb/vm" warppb "github.com/ava-labs/avalanchego/proto/pb/warp" - grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" ) var ( @@ -333,48 +334,16 @@ func (vm *VMServer) Shutdown(ctx context.Context, _ *emptypb.Empty) (*emptypb.Em return &emptypb.Empty{}, errs.Err } -func (vm *VMServer) CreateHandlers(ctx context.Context, _ *emptypb.Empty) (*vmpb.CreateHandlersResponse, error) { - handlers, err := vm.vm.CreateHandlers(ctx) - if err != nil { - return nil, err - } - resp := &vmpb.CreateHandlersResponse{} - for prefix, handler := range handlers { - serverListener, err := grpcutils.NewListener() - if err != nil { - return nil, err - } - server := grpcutils.NewServer() - vm.serverCloser.Add(server) - httppb.RegisterHTTPServer(server, ghttp.NewServer(handler)) - - // Start HTTP service - go grpcutils.Serve(serverListener, server) - - resp.Handlers = append(resp.Handlers, &vmpb.Handler{ - Prefix: prefix, - ServerAddr: serverListener.Addr().String(), - }) - } - return resp, nil -} - -func (vm *VMServer) CreateHTTP2Handler(ctx context.Context, _ *emptypb.Empty) (*vmpb.CreateHTTP2HandlerResponse, error) { - handler, err := vm.vm.CreateHTTP2Handler(ctx) +func (vm *VMServer) NewHTTPHandler(ctx context.Context, _ *emptypb.Empty) (*vmpb.NewHTTPHandlerResponse, error) { + handler, err := vm.vm.NewHTTPHandler(ctx) if err != nil { return nil, err } - // The vm does not expose an HTTP2 handler - if handler == nil { - return &vmpb.CreateHTTP2HandlerResponse{}, nil - } - serverListener, err := grpcutils.NewListener() if err != nil { return nil, err } - server := grpcutils.NewServer() vm.serverCloser.Add(server) httppb.RegisterHTTPServer(server, ghttp.NewServer(handler)) @@ -382,7 +351,7 @@ func (vm *VMServer) CreateHTTP2Handler(ctx context.Context, _ *emptypb.Empty) (* // Start HTTP service go grpcutils.Serve(serverListener, server) - return &vmpb.CreateHTTP2HandlerResponse{ + return &vmpb.NewHTTPHandlerResponse{ ServerAddr: serverListener.Addr().String(), }, nil }