mirror of https://github.com/vacp2p/rfc.git
Addresses issues re store protocol specs (#323)
* changes receivedTime type to double * adds MUST for sorting based on Index
This commit is contained in:
parent
cea78cdfe8
commit
8636fb8c03
|
@ -38,7 +38,7 @@ Peers communicate with each other using a request / response API. The messages s
|
|||
```protobuf
|
||||
message Index {
|
||||
bytes digest = 1;
|
||||
float receivedTime = 2;
|
||||
double receivedTime = 2;
|
||||
}
|
||||
|
||||
message PagingInfo {
|
||||
|
@ -87,7 +87,7 @@ RPC call to query historical messages.
|
|||
|
||||
- The `topics` field MUST indicate the list of topics to query.
|
||||
- `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 MAY 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.
|
||||
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.
|
||||
|
||||
### HistoryResponse
|
||||
|
||||
|
|
Loading…
Reference in New Issue