-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Waku message UID #9
Comments
From discord thread (@jm-clius):
I am also interested in @cammello's opinion about this. And more based on this comment on the RFC issue:
@cammellos I am interested in which are the issues you see in having user-set UIDs. Could you elaborate on what kind of "timing attacks" are you thinking of? |
This has been addressed by @s1fr0 in his response vacp2p/rfc#563 (comment) Basically, using a uuid as described initially, would be a public field, and anyone can tap into the network, and push a competing message with the same uuid, potentially causing a dos whereby messages from a peer are constantly raced by a malicious actor. In the reply it was elaborated that duplication is done through calculating a combination of
That would not cause the issue and is a solid solution. In general, I'd suggest to keep For example, this looks ok as it guarantees uniqueness (replay is possible of course, but that's just in the nature of the protocol and it's actually beneficial :) )
but we should not name I have also some questions about With regard of the app, But it's a perfectly fine solution as far as I can see, at the expense of slightly more data, if the benefits of selectively decrypting messages are there, then it would for sure be worth it (this is where I have some questions about, since I can see how it would work for existing sessions, but if it does not work in some instances, we might have to effectively still try to decrypt message in some cases, reducing the effectiveness, but that's a longer conversation :) ). |
Also, from the discord thread (@jm-clius):
There is one reason behind the intent of unifying the message uniqueness criteria between Waku Relay and the Waku Archive functionalities and building this idea of "durable streams":
This is an original idea that @Menduist and I discussed a couple of months ago and has the potential to cover the history synchronization requirements. But I don't have a strong opinion at this moment. |
In the proposal, I suggest that the UID attribute content should be application-specific. As a consequence is up to the application to specify a schema that is "timing attack resistant". I suggest four example schemas. I advocate for the last of the four options:
@s1fr0's |
Talking with @s1fr0, I noticed that this conversation could divert into "which UID schema use"? This is different from the objective of the proposal. The objective is to cover the following use cases:
And here, the proposal is to provide a new Waku Message attribute that supersedes the
|
Update after a discord conversation with @cammellos:
|
Generally, I'd say yes. But currently, SeM does not have enough ressources 😅 . Still, I will include this into the SeM roadmap and go through it / provide feedback asap. |
Note: add label |
Looking into more details on the original issue. Waku Filter protocol was not mentioned but I assume that one of the side effect of using the unique identifier to prevent duplication of messages over Waku Relay would be the prevention of messages served over Waku Filter too, right? |
For the record:
|
Yes, if messages are deduplicated at the dissemination network level, there is no need to add this mechanism to the Waku Filter "last-mile delivery" mechanism. The deduplication in the Waku Archive level is still necessary since we are considering supporting the shared backend (PostgreSQL) use case. |
After reviewing in depth the Gossipsub specification and the principal implementations (Go, Rust and Nim), I have updated the proposal with the feedback received (by @cammellos and @richard-ramos). The new Message UID (MUID) proposal can be found here: Waku_Message_UID_(v2).pdf NB: This is not an RFC. This is an ADR. |
Might have been easier if the PDF was a Markdown file.
Why concatenating |
The checksum is a signature, and if it matches the ID, it indicates the |
@fryorcraken I tried to push the document in markdown format to this repo, but I couldn't due to this: git push origin adr-muid
Can I get permission to push to this repo and create a PR? |
@LNSD you should have permissions now on the repo 👍
I assumed you a specific validation logic in mind here (maybe the Status Communities signature one?). I think a cocnrete example would help me understand. Will wait to see how the validation logic we are defining first will use the ID to better understand. Looking at solving duplicate messages over Waku Relay.
I thought the current issue is that the same message is received twice by the node, at an interval greater than the gossipsub message seen window. Meaning the message is then relayed again. But this document seems to imply that the current issue is that the seen cache key changes for each message? Or is there no seen cache in nwaku? |
#18 answered my questions 👍 |
Goal
Definition of a Waku message uniqueness identifier that can be used to deduplicate
Waku messages across the Waku platform.
Proposal
Proposal document: Waku_Message_UID_(v2).pdf
Inital proposal document Waku_Message_UID.pdfRelated issues:
WakuMessage
bytes vacp2p/rfc#563Implementation issues:
The text was updated successfully, but these errors were encountered: