Skip to content

Commit

Permalink
Add node service
Browse files Browse the repository at this point in the history
  • Loading branch information
kacpersaw committed Mar 15, 2024
1 parent 4f66419 commit 0f827c7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions spacemesh/v2alpha1/node.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
syntax = "proto3";

import "google/protobuf/empty.proto";

package spacemesh.v2alpha1;

message NodeStatusResponse {
uint64 connected_peers = 1; // number of connected neighbors
enum SyncStatus {
SYNC_STATUS_UNSPECIFIED = 0;
SYNC_STATUS_OFFLINE = 1;
SYNC_STATUS_SYNCING = 2;
SYNC_STATUS_SYNCED = 3;
}
SyncStatus status = 2;
uint32 synced_layer = 3; // last layer node has synced
uint32 verified_layer = 4; // last layer node has verified
uint32 head_layer = 5; // current chain head; the last layer the node has gossiped or seen
uint32 current_layer = 6; // current layer, based on clock time
uint32 head_block_id = 7;
}

service NodeService {
rpc Status(google.protobuf.Empty) returns (NodeStatusResponse);
}

0 comments on commit 0f827c7

Please sign in to comment.