-
Notifications
You must be signed in to change notification settings - Fork 15
Improve 14/WAKU2-MESSAGE RFC format etc #553
Conversation
95a6582
to
c7cccae
Compare
status: draft | ||
name: Waku v2 message RFC | ||
status: stable | ||
category: Standards Track |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if I picked the correct category for this RFC. Is this the right category for this RFC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where one can find descriptions of these categories?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you can find the template, but I cannot find the different categories description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think this is correct but defer to @kaiserd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add a category description to the COSS.
c7cccae
to
f85d1d4
Compare
content/docs/rfcs/14/README.md
Outdated
```protobuf | ||
syntax = "proto3"; | ||
|
||
message WakuMessage { | ||
bytes payload = 1; | ||
string contentTopic = 2; | ||
string content_topic = 2; | ||
uint32 version = 3; | ||
sint64 timestamp = 10; | ||
bool ephemeral = 31; | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TO-DO:
- Add this protobuf to the Waku protocol buffers' repository
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR opened here: waku-org/waku-proto#1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Shouldn't field names be under_score based on https://developers.google.com/protocol-buffers/docs/style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't field names be under_score based on developers.google.com/protocol-buffers/docs/style?
Yes, this is what I did here: contentTopic
-> content_topic
f85d1d4
to
0b2283b
Compare
content/docs/rfcs/14/README.md
Outdated
# References | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). | ||
TBD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unsure exactly what to put here 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say the links you have already put in the text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be summarized links that are in text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
status: draft | ||
name: Waku v2 message RFC | ||
status: stable | ||
category: Standards Track |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where one can find descriptions of these categories?
content/docs/rfcs/14/README.md
Outdated
|
||
### Version 1 | ||
- **Version 0:** The payload SHOULD be interpreted as unencrypted; additionally, it CAN indicate that the message payload has been encrypted at the application layer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **Version 0:** The payload SHOULD be interpreted as unencrypted; additionally, it CAN indicate that the message payload has been encrypted at the application layer. | |
- **Version 0:** The `payload` SHOULD be interpreted as unencrypted; additionally, it CAN indicate that the message payload has been encrypted at the application layer. |
content/docs/rfcs/14/README.md
Outdated
|
||
### Version 1 | ||
- **Version 0:** The payload SHOULD be interpreted as unencrypted; additionally, it CAN indicate that the message payload has been encrypted at the application layer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not MUST
? i.e., MUST
be interpreted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question for you, why not SHOULD
? Can you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sure; for reference, based on https://rfc.vac.dev/spec/1/#language and the document referred therein https://www.rfc-editor.org/rfc/rfc2119, the term SHOULD
indicates recommendation whereas MUST
indicates an absolute requirement. So in here, when the version is 0 (or 1), to me, the payload is absolutely unencrypted (or encrypted), i.e., there is no doubt. Hence the term MUST
looks more appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I agree, @staheri14. When version is 0
it simply means that Waku is not enforcing some encryption scheme. Applications are free to encrypt the payload as they wish (and most do). SHOULD
is therefore more appropriate, IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applications are free to encrypt the payload as they wish (and most do). SHOULD is therefore more appropriate, IMO.
I see what you mean, right, for version 0 it makes sense to use SHOULD
. But in the other cases i.e., version value of 1 and 2, I think that needs to be updated to MUST
following my previous reasoning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, are we going to argue that if the version is e.g., 1
, the application still can decide to use a different encryption scheme or none at all? @jm-clius if that is the case, then SHOULD
is appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. I don't think from an RFC perspective we can force applications to use version
in a certain way, although it's clearly recommended.
content/docs/rfcs/14/README.md
Outdated
- **Version 0:** The payload SHOULD be interpreted as unencrypted; additionally, it CAN indicate that the message payload has been encrypted at the application layer. | ||
- **Version 1:** The payload SHOULD be encrypted using Waku v1 payload encryption. [26/WAKU-PAYLOAD](/spec/26). | ||
This provides asymmetric and symmetric encryption. The key agreement is performed out of band. And provides an encrypted signature and padding for some form of unlinkability. | ||
- **Version 2:** The payload SHOULD be encrypted using [35/WAKU2-NOISE](/spec/35). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto about SHOULD
vs MUST
here
content/docs/rfcs/14/README.md
Outdated
# References | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). | ||
TBD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say the links you have already put in the text.
@staheri14 I see some of your questions as too vague. What do you expect me to do there? Could you be more precise about what you are suggesting? Or the things that are unclear to you? For the sake of time, please let's try to be more concise in our review comments. |
I am not sure which comment needs more clarification. let me know, and I will be happy to explain. :) |
@LNSD added further clarifications to my comments as I saw fit. |
status: draft | ||
name: Waku v2 message RFC | ||
status: stable | ||
category: Standards Track |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think this is correct but defer to @kaiserd
content/docs/rfcs/14/README.md
Outdated
```protobuf | ||
syntax = "proto3"; | ||
|
||
message WakuMessage { | ||
bytes payload = 1; | ||
string contentTopic = 2; | ||
string content_topic = 2; | ||
uint32 version = 3; | ||
sint64 timestamp = 10; | ||
bool ephemeral = 31; | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Shouldn't field names be under_score based on https://developers.google.com/protocol-buffers/docs/style?
content/docs/rfcs/14/README.md
Outdated
|
||
This indicates that the payload SHOULD be either unencrypted or that encryption is done at a separate layer outside of Waku. | ||
The waku message payload MAY be encrypted. The message `version` attribute indicates the schema used to encrypt the payload data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh diff is confusing, this line is no longer referring to version 0?
|
||
## Reliability of the WakuMessage timestamp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not removed, but with the format changes, it seems that the diff is not detecting it. Check line 113.
content/docs/rfcs/14/README.md
Outdated
# References | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). | ||
TBD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be summarized links that are in text
There's a lot of things going on here and I'm not sure I fully understand the purpose of some of the changes... I'd separate out:
This PR touches a lot of things right now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think this is on track to getting our message spec to stable. See my comments below. I agree that this spec should be decoupled from other protocol specs (because it is the foundational one), but it may be worth still adding concrete examples to clarify concepts such as ephemeral
.
content/docs/rfcs/14/README.md
Outdated
|
||
See [13/WAKU2-STORE](/spec/13) for more details. | ||
The `timestamp` attribute signifies the time at which the message was generated by its sender. This field SHOULD contain the Unix epoch time in nanoseconds. If the attribute is omitted, it SHOULD be interpreted as timestamp 0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the attribute is omitted, it SHOULD be interpreted as timestamp 0.
I'm not sure why this clause is necessary? Couldn't it also be interpreted as unset
to the same effect by some clients?
content/docs/rfcs/14/README.md
Outdated
|
||
## Payloads | ||
The `ephemeral` attribute signifies the transient nature of the message. If this field is set to `true`, the message SHOULD be interpreted as ephemeral. Else, if the field is omitted or set to `false`, the message SHOULD be interpreted as non-ephemeral. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that we probably don't want any coupling between this spec and the store specification, but I think it's OK to have an example here of what ephemeral MAY imply. Something like:
For example, nodes interested in storing historical messages MAY choose to ignore ephemeral messages.
content/docs/rfcs/14/README.md
Outdated
|
||
### Version 1 | ||
- **Version 0:** The payload SHOULD be interpreted as unencrypted; additionally, it CAN indicate that the message payload has been encrypted at the application layer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I agree, @staheri14. When version is 0
it simply means that Waku is not enforcing some encryption scheme. Applications are free to encrypt the payload as they wish (and most do). SHOULD
is therefore more appropriate, IMO.
content/docs/rfcs/14/README.md
Outdated
|
||
### Version 1 | ||
- **Version 0:** The payload SHOULD be interpreted as unencrypted; additionally, it CAN indicate that the message payload has been encrypted at the application layer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **Version 0:** The payload SHOULD be interpreted as unencrypted; additionally, it CAN indicate that the message payload has been encrypted at the application layer. | |
- **Version 0:** The payload SHOULD be interpreted as unencrypted; additionally, it MAY indicate that the message payload has been encrypted at the application layer. |
CAN
is not a recognised RFC keyword.
0b2283b
to
4adaeb5
Compare
10b6605
to
c701d23
Compare
1ac49dd
to
c918ed2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ! Left some comments/nitpick
c918ed2
to
bbc5b98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
I'd change some of the wording, especially the "One may" list.
I'll do an editing pass addressing that in a separate PR.
Generally, I suggest adding an editing pass by an editor (position we need to fill) before a PR can enter the stabalization phase.
As @oskarth suggested, the actual stabilization PR should just change the status, and it should be done after the respective RFC has been with out changes for a while.
The goal is to stabilize the
14/WAKU2-MESSAGE
RFC making it comply with VAC's RFC template.From @oskarth comment:
This PR covers the first item. It improves formatting/compliance with the RFC template and some style improvements and paraphrasing for clarity.
This PR resolves #551