From 45bf6c8afcdc7d730fb7c8e86f9372d474e24a57 Mon Sep 17 00:00:00 2001 From: a Date: Sat, 27 Jan 2024 16:29:26 -0600 Subject: [PATCH 1/5] topics field --- p2psentinel/sentinel.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/p2psentinel/sentinel.proto b/p2psentinel/sentinel.proto index 57634da..18507d3 100644 --- a/p2psentinel/sentinel.proto +++ b/p2psentinel/sentinel.proto @@ -10,6 +10,7 @@ message EmptyMessage {} message SubscriptionData { optional string filter = 1; + optional repeated string topics = 2; } message Peer { From 14b9c2d822e1ad41a4171bd08240d9ead6ec859e Mon Sep 17 00:00:00 2001 From: a Date: Sat, 27 Jan 2024 16:30:43 -0600 Subject: [PATCH 2/5] oops --- p2psentinel/sentinel.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2psentinel/sentinel.proto b/p2psentinel/sentinel.proto index 18507d3..18595bc 100644 --- a/p2psentinel/sentinel.proto +++ b/p2psentinel/sentinel.proto @@ -10,7 +10,7 @@ message EmptyMessage {} message SubscriptionData { optional string filter = 1; - optional repeated string topics = 2; + repeated string topics = 2; } message Peer { From 89868cb8910300c0aed450bdfce7eaabd6d0fbea Mon Sep 17 00:00:00 2001 From: a Date: Sun, 28 Jan 2024 20:41:29 -0600 Subject: [PATCH 3/5] interfaces --- p2psentinel/sentinel.proto | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/p2psentinel/sentinel.proto b/p2psentinel/sentinel.proto index 18595bc..fb12ac2 100644 --- a/p2psentinel/sentinel.proto +++ b/p2psentinel/sentinel.proto @@ -46,6 +46,12 @@ message ResponseData { Peer peer = 3; } +message EnrEntry { + string key = 1; // the key of the data + bool remove = 2; // if set, remove this entry instead of updating. data is ignored if remove is true + bytes data = 3; // rlp compatible enr data +} + service Sentinel { rpc SubscribeGossip(SubscriptionData) returns (stream GossipData); rpc SendRequest(RequestData) returns (ResponseData); @@ -56,4 +62,5 @@ service Sentinel { rpc PenalizePeer(Peer) returns(EmptyMessage); rpc RewardPeer(Peer) returns(EmptyMessage); rpc PublishGossip(GossipData) returns(EmptyMessage); + rpc UpdateEnr(EnrEntry) returns(EmptyMessage); } From 1ef395cc0c119c85ac3977792e5f4ccecd338161 Mon Sep 17 00:00:00 2001 From: a Date: Sun, 28 Jan 2024 21:52:34 -0600 Subject: [PATCH 4/5] node data --- p2psentinel/sentinel.proto | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/p2psentinel/sentinel.proto b/p2psentinel/sentinel.proto index fb12ac2..a2c80fa 100644 --- a/p2psentinel/sentinel.proto +++ b/p2psentinel/sentinel.proto @@ -48,10 +48,15 @@ message ResponseData { message EnrEntry { string key = 1; // the key of the data - bool remove = 2; // if set, remove this entry instead of updating. data is ignored if remove is true + bool remove = 2; // if set, remove this entry instead of updating. bytes data = 3; // rlp compatible enr data } +message NodeData { + bytes NodeId = 1; // 32 byte node id +} + + service Sentinel { rpc SubscribeGossip(SubscriptionData) returns (stream GossipData); rpc SendRequest(RequestData) returns (ResponseData); @@ -63,4 +68,5 @@ service Sentinel { rpc RewardPeer(Peer) returns(EmptyMessage); rpc PublishGossip(GossipData) returns(EmptyMessage); rpc UpdateEnr(EnrEntry) returns(EmptyMessage); + rpc GetNodeInfo(EmptyMessage) returns (NodeData) } From 641f93151a37c64c0f02c80a6f6a001135209bc2 Mon Sep 17 00:00:00 2001 From: a Date: Sun, 28 Jan 2024 21:57:49 -0600 Subject: [PATCH 5/5] forgot a ; --- p2psentinel/sentinel.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2psentinel/sentinel.proto b/p2psentinel/sentinel.proto index a2c80fa..5bb438a 100644 --- a/p2psentinel/sentinel.proto +++ b/p2psentinel/sentinel.proto @@ -68,5 +68,5 @@ service Sentinel { rpc RewardPeer(Peer) returns(EmptyMessage); rpc PublishGossip(GossipData) returns(EmptyMessage); rpc UpdateEnr(EnrEntry) returns(EmptyMessage); - rpc GetNodeInfo(EmptyMessage) returns (NodeData) + rpc GetNodeInfo(EmptyMessage) returns (NodeData); }