rfc/content/docs/rfcs/13/README.md

157 lines
10 KiB
Markdown
Raw Normal View History

---
Merge repo with rfc.vac.dev (#310) * Hugo init * Init Hugo book * Add basic README and title * Import RFC: 1/COSS * Move example content to dedicated folder * Basic menu * Tweak single layout * Fix base url and permalink * Basic index tweaks * Add netifly config * gitignore * 1/COSS: Add COSS lifecycle * Remove public artifact * Add basic numbers in menu * Empty READMEs init * Import mvds spec raw * 2/MVDS: Simplify * 3/REMOTE-LOG: Import * 3/REMOTE-LOG: Simplify * 4/MVDS-META: Import * 4/MVDS-META Simplify * Tweaks * 5/WAKU0: Import * 5: Simplify * 6/WAKU1: Import * 6/WAKU1: Simplify * 7/WAKU-DATA: Import * 7/WAKU-DATA: Simplify * 8/WAKU-MAIL: Import * 8/WAKU-MAIL: Simplify * Tweak * 9/WAKU-RPC: Import * 9/WAKU-RPC: Simplify * 10/WAKU2: Import * 10/WAKU2: Simplify * 11/WAKU-RELAY: Import * Tweaks * 11/WAKU-RELAY: Simplify * 12/WAKU-FILTER: Import * 12/WAKU2-FILTER: Simplify * 13/WAKU-STORE: Import * 13/WAKU-STORE: Simplify * 14/WAKU-MESSAGE: Import * 14/WAKU-MESSAGE: Simplify * 15/WAKU-BRIDGE: Import * 15: Simplify * 16: Import * 16: Simplify * 17: Import * 17: Simplify * 18: Import * 18: Simplify * 12: Bump update * 14: Bump update * 11: Bump update * 17: Bump update * 18: Bump update * 16: Bump update * Fix slug for 18 * Editor changes for 11, 12, 15 * Revert "Editor changes for 11, 12, 15" This reverts commit 5c32fe791bec57ca1d5326e0d2724339f12a784a. * Revert "Revert "Editor changes for 11, 12, 15"" This reverts commit ccd75131d72a1f1c43b701f445fe66ebd6857fc4. * Editor changes for 13, 2, 4 * Move current specs to archive * Update README * bump
2021-04-01 04:03:14 +00:00
slug: 13
title: 13/WAKU2-STORE
name: Waku v2 Store
status: draft
tags: waku-core
Merge repo with rfc.vac.dev (#310) * Hugo init * Init Hugo book * Add basic README and title * Import RFC: 1/COSS * Move example content to dedicated folder * Basic menu * Tweak single layout * Fix base url and permalink * Basic index tweaks * Add netifly config * gitignore * 1/COSS: Add COSS lifecycle * Remove public artifact * Add basic numbers in menu * Empty READMEs init * Import mvds spec raw * 2/MVDS: Simplify * 3/REMOTE-LOG: Import * 3/REMOTE-LOG: Simplify * 4/MVDS-META: Import * 4/MVDS-META Simplify * Tweaks * 5/WAKU0: Import * 5: Simplify * 6/WAKU1: Import * 6/WAKU1: Simplify * 7/WAKU-DATA: Import * 7/WAKU-DATA: Simplify * 8/WAKU-MAIL: Import * 8/WAKU-MAIL: Simplify * Tweak * 9/WAKU-RPC: Import * 9/WAKU-RPC: Simplify * 10/WAKU2: Import * 10/WAKU2: Simplify * 11/WAKU-RELAY: Import * Tweaks * 11/WAKU-RELAY: Simplify * 12/WAKU-FILTER: Import * 12/WAKU2-FILTER: Simplify * 13/WAKU-STORE: Import * 13/WAKU-STORE: Simplify * 14/WAKU-MESSAGE: Import * 14/WAKU-MESSAGE: Simplify * 15/WAKU-BRIDGE: Import * 15: Simplify * 16: Import * 16: Simplify * 17: Import * 17: Simplify * 18: Import * 18: Simplify * 12: Bump update * 14: Bump update * 11: Bump update * 17: Bump update * 18: Bump update * 16: Bump update * Fix slug for 18 * Editor changes for 11, 12, 15 * Revert "Editor changes for 11, 12, 15" This reverts commit 5c32fe791bec57ca1d5326e0d2724339f12a784a. * Revert "Revert "Editor changes for 11, 12, 15"" This reverts commit ccd75131d72a1f1c43b701f445fe66ebd6857fc4. * Editor changes for 13, 2, 4 * Move current specs to archive * Update README * bump
2021-04-01 04:03:14 +00:00
editor: Sanaz Taheri <sanaz@status.im>
contributors:
- Dean Eigenmann <dean@status.im>
- Oskar Thorén <oskar@status.im>
---
This specification explains the Waku `13/WAKU2-STORE` protocol which enables querying of messages received through relay protocol and stored by other nodes.
It also supports pagination for more efficient querying of historical messages.
**Protocol identifier***: `/vac/waku/store/2.0.0-beta3`
# Design Requirements
Nodes willing to provide storage service using `13/WAKU2-STORE` protocol SHOULD provide a complete and full view of message history.
As such, they are required to be *highly available* and in specific have a *high uptime* to consistently receive and store network messages.
The high uptime requirement makes sure that no message is missed out hence a complete and intact view of the message history is delivered to the querying nodes.
Nevertheless, in case that storage provider nodes cannot afford high availability, the querying nodes may retrieve the historical messages from multiple sources to achieve a full and intact view of the past.
# Security Consideration
The main security consideration to take into account while using `13/WAKU2-STORE` is that a querying node have to reveal their content filters of interest to the queried node, hence potentially compromising their privacy.
## Terminology
The term Personally identifiable information (PII) refers to any piece of data that can be used to uniquely identify a user.
For example, the signature verification key, and the hash of one's static IP address are unique for each user and hence count as PII.
# Adversarial Model
Any peer running the `13/WAKU2-STORE` protocol, i.e. both the querying node and the queried node, are considered as an adversary.
Furthermore, we currently consider the adversary as a passive entity that attempts to collect information from other peers to conduct an attack but it does so without violating protocol definitions and instructions.
As we evolve the protocol, further adversarial models will be considered.
For example, under the passive adversarial model, no malicious node hides or lies about the history of messages as it is against the description of the `13/WAKU2-STORE` protocol.
The following are not considered as part of the adversarial model:
- An adversary with a global view of all the peers and their connections.
- An adversary that can eavesdrop on communication links between arbitrary pairs of peers (unless the adversary is one end of the communication).
In specific, the communication channels are assumed to be secure.
# Wire Specification
Peers communicate with each other using a request / response API.
The messages sent are Protobuf RPC messages which are implemented using [protocol buffers v3](https://developers.google.com/protocol-buffers/).
The followings are the specifications of the Protobuf messages.
## Payloads
```protobuf
syntax = "proto3";
adds pagination specs adds some edits fixes minor typo WIP: integrates the pagination into store protocol updates wordlist.txt WIP: minor updates updates wordlist minor updates updates TOC updates the specs fixes a typo beta1 to beta2 deletes waku-store-pagination.md updates TOC with an autogenerated markdown-toc Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> itemizes the message fields of HistoryRPC some updates Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> WIP: initial reorganization WIP: shortens the pagination spec removes some comments and adds more details to the wire spec minor updates beta1 to beta2 converts direction to enum edits the Index description Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> shortens the abstract Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> edits changelog Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> minor minor reformats the change log Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> edits version numbers updates the release date removes Table of content from Table of content! Update specs/waku/v2/waku-store.md Co-authored-by: Kim De Mey <kim.demey@gmail.com> edits the wordlist explains the case where pageSize is zero Update waku-store.md Update waku-v2.md adds an overview of the sorting approach minor Update waku-store.md
2020-11-05 19:29:05 +00:00
message Index {
bytes digest = 1;
double receivedTime = 2;
adds pagination specs adds some edits fixes minor typo WIP: integrates the pagination into store protocol updates wordlist.txt WIP: minor updates updates wordlist minor updates updates TOC updates the specs fixes a typo beta1 to beta2 deletes waku-store-pagination.md updates TOC with an autogenerated markdown-toc Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> itemizes the message fields of HistoryRPC some updates Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> WIP: initial reorganization WIP: shortens the pagination spec removes some comments and adds more details to the wire spec minor updates beta1 to beta2 converts direction to enum edits the Index description Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> shortens the abstract Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> edits changelog Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> minor minor reformats the change log Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> edits version numbers updates the release date removes Table of content from Table of content! Update specs/waku/v2/waku-store.md Co-authored-by: Kim De Mey <kim.demey@gmail.com> edits the wordlist explains the case where pageSize is zero Update waku-store.md Update waku-v2.md adds an overview of the sorting approach minor Update waku-store.md
2020-11-05 19:29:05 +00:00
}
message PagingInfo {
uint64 pageSize = 1;
adds pagination specs adds some edits fixes minor typo WIP: integrates the pagination into store protocol updates wordlist.txt WIP: minor updates updates wordlist minor updates updates TOC updates the specs fixes a typo beta1 to beta2 deletes waku-store-pagination.md updates TOC with an autogenerated markdown-toc Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> itemizes the message fields of HistoryRPC some updates Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> WIP: initial reorganization WIP: shortens the pagination spec removes some comments and adds more details to the wire spec minor updates beta1 to beta2 converts direction to enum edits the Index description Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> shortens the abstract Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> edits changelog Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> minor minor reformats the change log Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> edits version numbers updates the release date removes Table of content from Table of content! Update specs/waku/v2/waku-store.md Co-authored-by: Kim De Mey <kim.demey@gmail.com> edits the wordlist explains the case where pageSize is zero Update waku-store.md Update waku-v2.md adds an overview of the sorting approach minor Update waku-store.md
2020-11-05 19:29:05 +00:00
Index cursor = 2;
enum Direction {
BACKWARD = 0;
FORWARD = 1;
adds pagination specs adds some edits fixes minor typo WIP: integrates the pagination into store protocol updates wordlist.txt WIP: minor updates updates wordlist minor updates updates TOC updates the specs fixes a typo beta1 to beta2 deletes waku-store-pagination.md updates TOC with an autogenerated markdown-toc Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> itemizes the message fields of HistoryRPC some updates Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> WIP: initial reorganization WIP: shortens the pagination spec removes some comments and adds more details to the wire spec minor updates beta1 to beta2 converts direction to enum edits the Index description Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> shortens the abstract Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> edits changelog Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> minor minor reformats the change log Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> edits version numbers updates the release date removes Table of content from Table of content! Update specs/waku/v2/waku-store.md Co-authored-by: Kim De Mey <kim.demey@gmail.com> edits the wordlist explains the case where pageSize is zero Update waku-store.md Update waku-v2.md adds an overview of the sorting approach minor Update waku-store.md
2020-11-05 19:29:05 +00:00
}
Direction direction = 3;
}
message ContentFilter {
string contentTopic = 1;
}
message HistoryQuery {
// the first field is reserved for future use
string pubsubtopic = 2;
repeated ContentFilter contentFilters = 3;
PagingInfo pagingInfo = 4;
}
message HistoryResponse {
// the first field is reserved for future use
repeated WakuMessage messages = 2;
PagingInfo pagingInfo = 3;
}
message HistoryRPC {
string request_id = 1;
HistoryQuery query = 2;
HistoryResponse response = 3;
}
```
adds pagination specs adds some edits fixes minor typo WIP: integrates the pagination into store protocol updates wordlist.txt WIP: minor updates updates wordlist minor updates updates TOC updates the specs fixes a typo beta1 to beta2 deletes waku-store-pagination.md updates TOC with an autogenerated markdown-toc Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> itemizes the message fields of HistoryRPC some updates Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> WIP: initial reorganization WIP: shortens the pagination spec removes some comments and adds more details to the wire spec minor updates beta1 to beta2 converts direction to enum edits the Index description Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> shortens the abstract Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> edits changelog Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> minor minor reformats the change log Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> edits version numbers updates the release date removes Table of content from Table of content! Update specs/waku/v2/waku-store.md Co-authored-by: Kim De Mey <kim.demey@gmail.com> edits the wordlist explains the case where pageSize is zero Update waku-store.md Update waku-v2.md adds an overview of the sorting approach minor Update waku-store.md
2020-11-05 19:29:05 +00:00
### Index
To perform pagination, each `WakuMessage` stored at a node running the `13/WAKU2-STORE` protocol is associated with a unique `Index` that encapsulates the following parts.
- `digest`: a sequence of bytes representing the SHA256 hash of a `WakuMessage`.
The hash is computed over the concatenation of `contentTopic` and `payload` fields of a `WakuMessage` (see [14/WAKU2-MESSAGE](/spec/14)).
- `receivedTime`: the UNIX time at which the waku message is received by the node running the `13/WAKU2-STORE` protocol.
adds pagination specs adds some edits fixes minor typo WIP: integrates the pagination into store protocol updates wordlist.txt WIP: minor updates updates wordlist minor updates updates TOC updates the specs fixes a typo beta1 to beta2 deletes waku-store-pagination.md updates TOC with an autogenerated markdown-toc Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> itemizes the message fields of HistoryRPC some updates Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> WIP: initial reorganization WIP: shortens the pagination spec removes some comments and adds more details to the wire spec minor updates beta1 to beta2 converts direction to enum edits the Index description Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> shortens the abstract Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> edits changelog Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> minor minor reformats the change log Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> edits version numbers updates the release date removes Table of content from Table of content! Update specs/waku/v2/waku-store.md Co-authored-by: Kim De Mey <kim.demey@gmail.com> edits the wordlist explains the case where pageSize is zero Update waku-store.md Update waku-v2.md adds an overview of the sorting approach minor Update waku-store.md
2020-11-05 19:29:05 +00:00
### PagingInfo
adds pagination specs adds some edits fixes minor typo WIP: integrates the pagination into store protocol updates wordlist.txt WIP: minor updates updates wordlist minor updates updates TOC updates the specs fixes a typo beta1 to beta2 deletes waku-store-pagination.md updates TOC with an autogenerated markdown-toc Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> itemizes the message fields of HistoryRPC some updates Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> WIP: initial reorganization WIP: shortens the pagination spec removes some comments and adds more details to the wire spec minor updates beta1 to beta2 converts direction to enum edits the Index description Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> shortens the abstract Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> edits changelog Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> minor minor reformats the change log Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> edits version numbers updates the release date removes Table of content from Table of content! Update specs/waku/v2/waku-store.md Co-authored-by: Kim De Mey <kim.demey@gmail.com> edits the wordlist explains the case where pageSize is zero Update waku-store.md Update waku-v2.md adds an overview of the sorting approach minor Update waku-store.md
2020-11-05 19:29:05 +00:00
`PagingInfo` holds the information required for pagination. It consists of the following components.
- `pageSize`: A positive integer indicating the number of queried `WakuMessage`s in a `HistoryQuery` (or retrieved `WakuMessage`s in a `HistoryResponse`).
- `cursor`: holds the `Index` of a `WakuMessage`.
- `direction`: indicates the direction of paging which can be either `FORWARD` or `BACKWARD`.
### ContentFilter
`ContentFilter` carries the information required for filtering historical messages.
- `contentTopic` represents the content topic of the queried historical Waku messages.
This field maps to the `contentTopic` field of the [14/WAKU2-MESSAGE](/spec/14).
adds pagination specs adds some edits fixes minor typo WIP: integrates the pagination into store protocol updates wordlist.txt WIP: minor updates updates wordlist minor updates updates TOC updates the specs fixes a typo beta1 to beta2 deletes waku-store-pagination.md updates TOC with an autogenerated markdown-toc Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> itemizes the message fields of HistoryRPC some updates Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> WIP: initial reorganization WIP: shortens the pagination spec removes some comments and adds more details to the wire spec minor updates beta1 to beta2 converts direction to enum edits the Index description Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> shortens the abstract Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> edits changelog Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> minor minor reformats the change log Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> edits version numbers updates the release date removes Table of content from Table of content! Update specs/waku/v2/waku-store.md Co-authored-by: Kim De Mey <kim.demey@gmail.com> edits the wordlist explains the case where pageSize is zero Update waku-store.md Update waku-v2.md adds an overview of the sorting approach minor Update waku-store.md
2020-11-05 19:29:05 +00:00
### HistoryQuery
RPC call to query historical messages.
- The `pubsubTopic` field MUST indicate the pubsub topic of the historical messages to be retrieved.
This field denotes the pubsub topic on which waku messages are published.
This field maps to `topicIDs` field of `Message` in [`11/WAKU2-RELAY`](/spec/11).
Leaving this field empty means no filter on the pubsub topic of message history is requested.
This field SHOULD be left empty in order to retrieve the historical waku messages regardless of the pubsub topics on which they are published.
- The `contentFilters` field MUST indicate the list of content filters based on which the historical messages are to be retrieved.
Leaving this field empty means no filter on the content topic of message history is required.
This field SHOULD be left empty in order to retrieve historical waku messages regardless of their content topics.
adds pagination specs adds some edits fixes minor typo WIP: integrates the pagination into store protocol updates wordlist.txt WIP: minor updates updates wordlist minor updates updates TOC updates the specs fixes a typo beta1 to beta2 deletes waku-store-pagination.md updates TOC with an autogenerated markdown-toc Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> itemizes the message fields of HistoryRPC some updates Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> WIP: initial reorganization WIP: shortens the pagination spec removes some comments and adds more details to the wire spec minor updates beta1 to beta2 converts direction to enum edits the Index description Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> shortens the abstract Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> edits changelog Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> minor minor reformats the change log Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> edits version numbers updates the release date removes Table of content from Table of content! Update specs/waku/v2/waku-store.md Co-authored-by: Kim De Mey <kim.demey@gmail.com> edits the wordlist explains the case where pageSize is zero Update waku-store.md Update waku-v2.md adds an overview of the sorting approach minor Update waku-store.md
2020-11-05 19:29:05 +00:00
- `PagingInfo` holds the information required for pagination. Its `pageSize` field indicates the number of `WakuMessage`s to be included in the corresponding `HistoryResponse`. If the `pageSize` is zero then no pagination is required. If the `pageSize` exceeds a threshold then the threshold value shall be used instead. In the forward pagination request, the `messages` field of the `HistoryResponse` shall contain at maximum the `pageSize` amount of waku messages whose `Index` values are larger than the given `cursor` (and vise versa for the backward pagination). Note that the `cursor` of a `HistoryQuery` may be empty (e.g., for the initial query), as such, and depending on whether the `direction` is `BACKWARD` or `FORWARD` the last or the first `pageSize` waku messages shall be returned, respectively.
The queried node MUST sort the `WakuMessage`s based on their `Index`, where the `receivedTime` constitutes the most significant part and the `digest` comes next, and then perform pagination on the sorted result. As such, the retrieved page contains an ordered list of `WakuMessage`s from the oldest message to the most recent one.
adds pagination specs adds some edits fixes minor typo WIP: integrates the pagination into store protocol updates wordlist.txt WIP: minor updates updates wordlist minor updates updates TOC updates the specs fixes a typo beta1 to beta2 deletes waku-store-pagination.md updates TOC with an autogenerated markdown-toc Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> itemizes the message fields of HistoryRPC some updates Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> WIP: initial reorganization WIP: shortens the pagination spec removes some comments and adds more details to the wire spec minor updates beta1 to beta2 converts direction to enum edits the Index description Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> shortens the abstract Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> edits changelog Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> minor minor reformats the change log Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> edits version numbers updates the release date removes Table of content from Table of content! Update specs/waku/v2/waku-store.md Co-authored-by: Kim De Mey <kim.demey@gmail.com> edits the wordlist explains the case where pageSize is zero Update waku-store.md Update waku-v2.md adds an overview of the sorting approach minor Update waku-store.md
2020-11-05 19:29:05 +00:00
### HistoryResponse
RPC call to respond to a HistoryQuery call.
adds pagination specs adds some edits fixes minor typo WIP: integrates the pagination into store protocol updates wordlist.txt WIP: minor updates updates wordlist minor updates updates TOC updates the specs fixes a typo beta1 to beta2 deletes waku-store-pagination.md updates TOC with an autogenerated markdown-toc Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> itemizes the message fields of HistoryRPC some updates Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> WIP: initial reorganization WIP: shortens the pagination spec removes some comments and adds more details to the wire spec minor updates beta1 to beta2 converts direction to enum edits the Index description Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> shortens the abstract Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> Update specs/waku/v2/waku-store.md Co-authored-by: Oskar Thorén <ot@oskarthoren.com> edits changelog Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> minor minor reformats the change log Update specs/waku/v2/waku-store.md Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com> edits version numbers updates the release date removes Table of content from Table of content! Update specs/waku/v2/waku-store.md Co-authored-by: Kim De Mey <kim.demey@gmail.com> edits the wordlist explains the case where pageSize is zero Update waku-store.md Update waku-v2.md adds an overview of the sorting approach minor Update waku-store.md
2020-11-05 19:29:05 +00:00
- The `messages` field MUST contain the messages found, these are [`WakuMessage`] types as defined in the corresponding [specification](./waku-message.md).
- `PagingInfo` holds the paging information based on which the querying node can resume its further history queries.
The `pageSize` indicates the number of returned waku messages (i.e., the number of messages included in the `messages` field of `HistoryResponse`).
The `direction` is the same direction as in the corresponding `HistoryQuery`.
In the forward pagination, the `cursor` holds the `Index` of the last message in the `HistoryResponse` `messages` (and the first message in the backward paging).
The requester shall embed the returned `cursor` inside its next `HistoryQuery` to retrieve the next page of the waku messages.
The `cursor` obtained from one node SHOULD NOT be used in a request to another node because the result MAY be different.
# Future Work
- **Anonymous query**: This feature guarantees that nodes can anonymously query historical messages from other nodes i.e., without disclosing the exact topics of waku messages they are interested in.
As such, no adversary in the `13/WAKU2-STORE` protocol would be able to learn which peer is interested in which content filters i.e., content topics of waku message.
The current version of the `13/WAKU2-STORE` protocol does not provide anonymity for historical queries as the querying node needs to directly connect to another node in the `13/WAKU2-STORE` protocol and explicitly disclose the content filters of its interest to retrieve the corresponding messages.
However, one can consider preserving anonymity through one of the following ways:
- By hiding the source of the request i.e., anonymous communication. That is the querying node shall hide all its PII in its history request e.g., its IP address.
This can happen by the utilization of a proxy server or by using Tor.
Note that the current structure of historical requests does not embody any piece of PII, otherwise, such data fields must be treated carefully to achieve query anonymity.
<!-- TODO: if nodes have to disclose their PeerIDs (e.g., for authentication purposes) when connecting to other nodes in the store protocol, then Tor does not preserve anonymity since it only helps in hiding the IP. So, the PeerId usage in switches must be investigated further. Depending on how PeerId is used, one may be able to link between a querying node and its queried topics despite hiding the IP address-->
- By deploying secure 2-party computations in which the querying node obtains the historical messages of a certain topic whereas the queried node learns nothing about the query.
Examples of such 2PC protocols are secure one-way Private Set Intersections (PSI).
<!-- TODO: add a reference for PSIs? --> <!-- TODO: more techniques to be included -->
<!-- TODO: Censorship resistant: this is about a node that hides the historical messages from other nodes. This attack is not included in the specs since it does not fit the passive adversarial model (the attacker needs to deviate from the store protocol).-->
Merge repo with rfc.vac.dev (#310) * Hugo init * Init Hugo book * Add basic README and title * Import RFC: 1/COSS * Move example content to dedicated folder * Basic menu * Tweak single layout * Fix base url and permalink * Basic index tweaks * Add netifly config * gitignore * 1/COSS: Add COSS lifecycle * Remove public artifact * Add basic numbers in menu * Empty READMEs init * Import mvds spec raw * 2/MVDS: Simplify * 3/REMOTE-LOG: Import * 3/REMOTE-LOG: Simplify * 4/MVDS-META: Import * 4/MVDS-META Simplify * Tweaks * 5/WAKU0: Import * 5: Simplify * 6/WAKU1: Import * 6/WAKU1: Simplify * 7/WAKU-DATA: Import * 7/WAKU-DATA: Simplify * 8/WAKU-MAIL: Import * 8/WAKU-MAIL: Simplify * Tweak * 9/WAKU-RPC: Import * 9/WAKU-RPC: Simplify * 10/WAKU2: Import * 10/WAKU2: Simplify * 11/WAKU-RELAY: Import * Tweaks * 11/WAKU-RELAY: Simplify * 12/WAKU-FILTER: Import * 12/WAKU2-FILTER: Simplify * 13/WAKU-STORE: Import * 13/WAKU-STORE: Simplify * 14/WAKU-MESSAGE: Import * 14/WAKU-MESSAGE: Simplify * 15/WAKU-BRIDGE: Import * 15: Simplify * 16: Import * 16: Simplify * 17: Import * 17: Simplify * 18: Import * 18: Simplify * 12: Bump update * 14: Bump update * 11: Bump update * 17: Bump update * 18: Bump update * 16: Bump update * Fix slug for 18 * Editor changes for 11, 12, 15 * Revert "Editor changes for 11, 12, 15" This reverts commit 5c32fe791bec57ca1d5326e0d2724339f12a784a. * Revert "Revert "Editor changes for 11, 12, 15"" This reverts commit ccd75131d72a1f1c43b701f445fe66ebd6857fc4. * Editor changes for 13, 2, 4 * Move current specs to archive * Update README * bump
2021-04-01 04:03:14 +00:00
# Copyright
Copyright and related rights waived via
[CC0](https://creativecommons.org/publicdomain/zero/1.0/).