fix(WAKU2-STORE|WAKU2-MESSAGE): replace ephemeral flag with ttl field

This commit is contained in:
rymnc 2022-09-08 13:27:27 +05:30
parent 69a8f7cc71
commit 6e31e450fc
No known key found for this signature in database
GPG Key ID: C740033EE3F41EBD
2 changed files with 10 additions and 5 deletions

View File

@ -22,8 +22,13 @@ The high uptime requirement makes sure that no message is missed out hence a com
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.
The concept of "ephemeral" messages exists while using `13/WAKU2-STORE` as well.
Any `WakuMessage` that has the `ephemeral` flag set to `true` MAY be ignored by the store service node, thereby reducing the amount of one-time use messages stored.
Nodes SHOULD NOT not store messages with the `ephemeral` flag set to `true`.
Any `WakuMessage` that has the `ttl` field set to `0` MAY be ignored by the store service node, thereby reducing the amount of one-time use messages stored.
Nodes SHOULD NOT not store messages with the `ttl` field set to `0`.
Nodes SHOULD store messages which satisfy the following constraints -
1. `ttl > currentTime + Thr`, where `Thr` describes the network latency as well as clock asynchrony.
2. `ttl` is unset, for backwards compatibility.
# Security Consideration

View File

@ -38,9 +38,9 @@ The `timestamp` field MAY be filled out to signify the time at which the message
This field holds the Unix epoch time in nanoseconds.
Omitting it means the timestamp is unspecified.
The `ephemeral` field MAY be set to signify the transient nature of the message.
If the message SHOULD be stored by the [store protocol](/spec/13), then this field MUST be set to `false`, which is equivalent to omitting the field.
If the message SHOULD NOT be stored by the [store protocol](/spec/13), then this field MUST be set to `true`.
The `ttl` field MAY be filled out to signify the time at which the message must be considered invalid.
This field holds the Unix epoch time in nanoseconds.
Omitting it means the timestamp is unspecified, and by extension, the message SHOULD be stored without a time-to-live.
See [13/WAKU2-STORE](/spec/13) for more details.