From f9ddafd3e86423b54c05fea8d3e5141aa58050be Mon Sep 17 00:00:00 2001 From: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Date: Mon, 28 Sep 2020 05:04:58 +0200 Subject: [PATCH] fix/history-rpc (#191) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update waku-store.md * Update wordlist.txt * Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén * Update waku-store.md Co-authored-by: Oskar Thorén --- specs/waku/v2/waku-store.md | 20 ++++++++++++++++---- wordlist.txt | 1 + 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/specs/waku/v2/waku-store.md b/specs/waku/v2/waku-store.md index 8eaec38d..14449eef 100644 --- a/specs/waku/v2/waku-store.md +++ b/specs/waku/v2/waku-store.md @@ -1,6 +1,6 @@ --- title: Waku -version: 2.0.0-alpha5 +version: 2.0.0-alpha6 status: Raw authors: Oskar Thorén , Dean Eigenmann --- @@ -16,7 +16,7 @@ authors: Oskar Thorén , Dean Eigenmann `WakuStore` is a protocol to enable querying of messages received through relay protocol and stored by other nodes. -**Protocol identifier***: `/vac/waku/store/2.0.0-alpha5` +**Protocol identifier***: `/vac/waku/store/2.0.0-alpha6` # Wire Specification @@ -26,16 +26,28 @@ Peers communicate with each other using a request / response API. The messages s ```protobuf message HistoryQuery { - string uuid = 1; repeated string topics = 2; } message HistoryResponse { - string uuid = 1; repeated WakuMessage messages = 2; } + +message HistoryRPC { + string request_id = 1; + HistoryQuery query = 2; + HistoryResponse response = 3; +} ``` +##### HistoryRPC + +A node MUST send all History messages (`HistoryQuery`, `HistoryResponse`) wrapped inside a +`HistoryRPC`. This allows the node handler to determine how to handle a message as the Waku +Filter protocol is not a request response based protocol but instead a push based system. + +The `request_id` MUST be a uniquely generated string. + ##### HistoryQuery RPC call to query historical messages. diff --git a/wordlist.txt b/wordlist.txt index 11509008..e083a0e4 100644 --- a/wordlist.txt +++ b/wordlist.txt @@ -65,6 +65,7 @@ historyQuery HistoryQuery historyResponse HistoryResponse +HistoryRPC html http https