Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
Timestamps refactored to int64 (nanoseconds resolution). Related to w…
Browse files Browse the repository at this point in the history
  • Loading branch information
s1fr0 committed Feb 9, 2022
1 parent 29d1675 commit 1a314dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions content/docs/rfcs/13/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ syntax = "proto3";
message Index {
bytes digest = 1;
double receiverTime = 2;
double senderTime = 3;
int64 receiverTime = 2;
int64 senderTime = 3;
}
message PagingInfo {
Expand Down Expand Up @@ -101,8 +101,8 @@ message HistoryRPC {
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)).
- `receiverTime`: the UNIX time at which the waku message is received by the receiving node.
- `senderTime`: the UNIX time at which the waku message is generated by its sender.
- `receiverTime`: the UNIX time in nanoseconds at which the waku message is received by the receiving node.
- `senderTime`: the UNIX time in nanoseconds at which the waku message is generated by its sender.

### PagingInfo

Expand Down
5 changes: 2 additions & 3 deletions content/docs/rfcs/14/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ The `version` field MAY be filled out to allow for various types of payload encr
Omitting it means the version is 0.

The `timestamp` field MAY be filled out to signify the time at which the message is generated by its sender.
This field holds the Unix epoch time in seconds.
The fractional part represents the sub-seconds.
This field holds the Unix epoch time in nanoseconds.
Omitting it means the timestamp is unspecified.

## Payloads
Expand All @@ -50,7 +49,7 @@ message WakuMessage {
bytes payload = 1;
string contentTopic = 2;
uint32 version = 3;
double timestamp = 4;
int64 timestamp = 4;
}
```

Expand Down

0 comments on commit 1a314dc

Please sign in to comment.