diff --git a/p2psentinel/sentinel.proto b/p2psentinel/sentinel.proto index 57634da..869cd45 100644 --- a/p2psentinel/sentinel.proto +++ b/p2psentinel/sentinel.proto @@ -14,6 +14,23 @@ message SubscriptionData { message Peer { string pid = 1; + string state = 2; + string direction = 3; + string address = 4; + string enr = 5; +} + +message PeerInfoRequest { + string pid = 1; +} + +message PeersInfoRequest { + optional string direction = 1; + optional string state = 2; +} + +message PeersInfoResponse { + repeated Peer peers = 1; } message GossipData { @@ -31,7 +48,11 @@ message Status { } message PeerCount { - uint64 amount = 1; + uint64 active = 1; // Amount of peers that are active. + uint64 connected = 2; + uint64 disconnected = 3; + uint64 connecting = 4; + uint64 disconnecting = 5; } message RequestData { @@ -55,4 +76,7 @@ service Sentinel { rpc PenalizePeer(Peer) returns(EmptyMessage); rpc RewardPeer(Peer) returns(EmptyMessage); rpc PublishGossip(GossipData) returns(EmptyMessage); + rpc Identity(EmptyMessage) returns(Peer); // Returns the identity of the peer. + rpc PeerInfo(PeerInfoRequest) returns(Peer); // Returns the identity of the peer. + rpc PeersInfo(PeersInfoRequest) returns(PeersInfoResponse); // Returns the identity of the peer. }