From 28135b83f15d1fb13d63d8b19ddcca4af431c377 Mon Sep 17 00:00:00 2001 From: Giulio Date: Fri, 2 Feb 2024 16:06:01 +0100 Subject: [PATCH] save --- p2psentinel/sentinel.proto | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/p2psentinel/sentinel.proto b/p2psentinel/sentinel.proto index 869cd45..52945a5 100644 --- a/p2psentinel/sentinel.proto +++ b/p2psentinel/sentinel.proto @@ -20,9 +20,6 @@ message Peer { string enr = 5; } -message PeerInfoRequest { - string pid = 1; -} message PeersInfoRequest { optional string direction = 1; @@ -66,6 +63,20 @@ message ResponseData { Peer peer = 3; } +message Metadata { + uint64 seq = 1; + string attnets = 2; + string syncnets = 3; +} + +message IdentityResponse { + string pid = 1; + string enr = 2; + repeated string p2p_addresses = 3; + repeated string discovery_addresses = 4; + Metadata metadata = 5; +} + service Sentinel { rpc SubscribeGossip(SubscriptionData) returns (stream GossipData); rpc SendRequest(RequestData) returns (ResponseData); @@ -76,7 +87,6 @@ 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 Identity(EmptyMessage) returns(IdentityResponse); // Returns the identity of the peer. rpc PeersInfo(PeersInfoRequest) returns(PeersInfoResponse); // Returns the identity of the peer. }