2020-09-17 10:43:38 +00:00
---
title: Waku
2020-10-06 22:28:08 +00:00
version: 2.0.0-beta1
status: Draft
2020-09-25 14:06:01 +00:00
authors: Oskar Thorén < oskar @ status . im > , Dean Eigenmann < dean @ status . im >
2020-09-17 10:43:38 +00:00
---
# Table of Contents
2020-09-25 14:06:01 +00:00
- [Abstract ](#abstract )
- [Wire Specification ](#wire-specification )
* [Protobuf ](#protobuf )
2020-10-06 22:28:08 +00:00
- [Changelog ](#changelog )
2020-09-25 14:06:01 +00:00
- [Copyright ](#copyright )
2020-09-17 10:43:38 +00:00
# Abstract
2020-09-25 14:06:01 +00:00
`WakuStore` is a protocol to enable querying of messages received through relay protocol and stored by other nodes.
2020-09-17 10:43:38 +00:00
2020-10-06 22:28:08 +00:00
**Protocol identifier***: `/vac/waku/store/2.0.0-beta1`
2020-09-17 10:43:38 +00:00
2020-09-25 14:06:01 +00:00
# Wire Specification
2020-09-17 10:43:38 +00:00
2020-09-25 14:06:01 +00:00
Peers communicate with each other using a request / response API. The messages sent are Protobuf RPC messages.
2020-09-17 10:43:38 +00:00
2020-09-25 14:06:01 +00:00
## Protobuf
2020-09-17 10:43:38 +00:00
```protobuf
message HistoryQuery {
repeated string topics = 2;
}
message HistoryResponse {
repeated WakuMessage messages = 2;
}
2020-09-28 03:04:58 +00:00
message HistoryRPC {
string request_id = 1;
HistoryQuery query = 2;
HistoryResponse response = 3;
}
2020-09-17 10:43:38 +00:00
```
2020-09-28 03:04:58 +00:00
##### HistoryRPC
A node MUST send all History messages (`HistoryQuery`, `HistoryResponse` ) wrapped inside a
2020-10-06 22:28:08 +00:00
`HistoryRPC` .
2020-09-28 03:04:58 +00:00
2020-10-06 22:28:08 +00:00
The `request_id` MUST be a uniquely generated string, the `HistoryResponse` and `HistoryQuery` `request_id` MUST match. The `HistoryResponse` message SHOULD contain any messages found
whose `topic` can be found in the `HistoryQuery` `topics` array. Any message whose `topic` does not match MUST NOT be included.
2020-09-28 03:04:58 +00:00
2020-09-17 10:43:38 +00:00
##### HistoryQuery
RPC call to query historical messages.
The `topics` field MUST indicate the list of topics to query.
##### HistoryResponse
RPC call to respond to a HistoryQuery call.
2020-10-06 22:28:08 +00:00
The `messages` field MUST contain the messages found, these are [`WakuMessage`] types as defined in the corresponding [specification ](./waku-message.md ).
# Changelog
2020-09-17 10:43:38 +00:00
2020-10-06 22:28:08 +00:00
2.0.0-beta1
2020-10-08 09:45:00 +00:00
Initial draft version. Released [2020-10-06 ](https://github.com/vacp2p/specs/commit/75b4c39e7945eb71ad3f9a0a62b99cff5dac42cf )
2020-09-17 10:43:38 +00:00
# Copyright
Copyright and related rights waived via
[CC0 ](https://creativecommons.org/publicdomain/zero/1.0/ ).