rfc/specs/waku/v2/waku-store.md
Dean Eigenmann f9ddafd3e8
fix/history-rpc (#191)
* Update waku-store.md

* Update wordlist.txt

* Update specs/waku/v2/waku-store.md

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>

* Update waku-store.md

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-09-28 11:04:58 +08:00

1.7 KiB

title version status authors
Waku 2.0.0-alpha6 Raw Oskar Thorén <oskar@status.im>, Dean Eigenmann <dean@status.im>

Table of Contents

Abstract

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-alpha6

Wire Specification

Peers communicate with each other using a request / response API. The messages sent are Protobuf RPC messages.

Protobuf

message HistoryQuery {
  repeated string topics = 2;
}

message HistoryResponse {
  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.

The uuid field MUST indicate current request UUID, it is used to identify the corresponding response.

The topics field MUST indicate the list of topics to query.

HistoryResponse

RPC call to respond to a HistoryQuery call.

The uuid field MUST indicate which query is being responded to.

The messages field MUST contain the messages found.

Copyright

Copyright and related rights waived via CC0.