From 51269d8c48aa8ca862a44c5d6afce19d4aee29ee Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 24 Oct 2023 15:31:06 -0400 Subject: [PATCH 1/2] fix: make the store.proto match the RFC definition --- waku/store/v2beta4/store.proto | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/waku/store/v2beta4/store.proto b/waku/store/v2beta4/store.proto index c208262..46b1e7b 100644 --- a/waku/store/v2beta4/store.proto +++ b/waku/store/v2beta4/store.proto @@ -14,13 +14,13 @@ message Index { } message PagingInfo { - optional uint64 page_size = 1; - optional Index cursor = 2; + uint64 page_size = 1; + Index cursor = 2; enum Direction { BACKWARD = 0; FORWARD = 1; } - optional Direction direction = 3; + Direction direction = 3; } message ContentFilter { @@ -29,17 +29,17 @@ message ContentFilter { message HistoryQuery { // The first field is reserved for future use - optional string pubsub_topic = 2; + string pubsub_topic = 2; repeated ContentFilter content_filters = 3; - optional PagingInfo paging_info = 4; + PagingInfo paging_info = 4; optional sint64 start_time = 5; optional sint64 end_time = 6; } message HistoryResponse { - // The first field is reserved for future use + // the first field is reserved for future use repeated waku.message.v1.WakuMessage messages = 2; - optional PagingInfo paging_info = 3; + PagingInfo paging_info = 3; enum Error { NONE = 0; INVALID_CURSOR = 1; @@ -49,6 +49,6 @@ message HistoryResponse { message HistoryRPC { string request_id = 1; - optional HistoryQuery query = 2; - optional HistoryResponse response = 3; + HistoryQuery query = 2; + HistoryResponse response = 3; } From cc1baf0ac80a8851f461d6e80ee729a3a047fc7e Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 24 Oct 2023 15:31:45 -0400 Subject: [PATCH 2/2] feat: add RateLimitProof field and message definition --- waku/message/v1/message.proto | 1 + waku/rln/v1/rln.proto | 14 ++++++++++++++ waku/store/v2beta4/store.proto | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 waku/rln/v1/rln.proto diff --git a/waku/message/v1/message.proto b/waku/message/v1/message.proto index b48b22e..292db84 100644 --- a/waku/message/v1/message.proto +++ b/waku/message/v1/message.proto @@ -10,4 +10,5 @@ message WakuMessage { optional sint64 timestamp = 10; optional bytes meta = 11; optional bool ephemeral = 31; + optional bytes rate_limit_proof = 21; } diff --git a/waku/rln/v1/rln.proto b/waku/rln/v1/rln.proto new file mode 100644 index 0000000..99fb517 --- /dev/null +++ b/waku/rln/v1/rln.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +// rfc: https://rfc.vac.dev/spec/17/ +package waku.rln.v1; + +message RateLimitProof { + bytes proof = 1; + bytes merkle_root = 2; + bytes epoch = 3; + bytes share_x = 4; + bytes share_y = 5; + bytes nullifier = 6; + bytes rln_identifier = 7; +} diff --git a/waku/store/v2beta4/store.proto b/waku/store/v2beta4/store.proto index 46b1e7b..27f9c3c 100644 --- a/waku/store/v2beta4/store.proto +++ b/waku/store/v2beta4/store.proto @@ -37,7 +37,7 @@ message HistoryQuery { } message HistoryResponse { - // the first field is reserved for future use + // The first field is reserved for future use repeated waku.message.v1.WakuMessage messages = 2; PagingInfo paging_info = 3; enum Error {