-
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
feat: lightpush new protobuf proposal #20
Conversation
…ol definition is proposed.
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, left some comments.
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! A couple of comments below, but direction lgtm
… definition as requested.
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 for it! 🥳
Just added some comments so far that I hope you find useful
#20 (comment) |
hahah yes I've noticed that :) The following comment is related to that and why I consider we should have fewer assumptions in light-node side and more on the full-node side: waku-org/nwaku#1004 (comment)
Sorry, but I can't quite follow that statement. |
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 except topic
see my comment
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.
Approving as I will be AFK for a couple of days and don't want to be a bottleneck. A couple of comments below. :)
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.
looks good and added some comments
@weboko , @SionoiS, @Ivansete-status : Please take a last look if acceptable. I'm heading to merge this PR. It's time to make some coding soon. :-) |
I changed my mind as was thinking of comments from @jm-clius and @weboko... #20 (comment) I removed SERVICE_UNAVAILABLE and replaced with NO_PEERS_TO_RELAY as in this particular application for lightpush it means exactly that. |
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! Thanks so much for it and the patience 🙌 !
I'm just leaving a couple of minor comments.
From my PoV we need to make it a bit clearer the meaning of relay_peer_count
.
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
@Ivansete-status yes you are right, I will lately extent explanation of relay peer count as it may not matching mesh node count. |
The ref. comment is answered after others opinions are taken into account. I see not other request up front.
@SionoiS: Please take a look and approve if it is now in acceptable form. Thank you. |
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 have added some minor comments, but lgtm now. :)
Co-authored-by: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com>
|
||
## Motivation and Goals | ||
|
||
Light nodes with short connection windows and limited bandwidth wish to push messages to other nodes in the Waku network to request message services.<br> |
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.
instead of <br>
(<br />
seems to be the correct tag), just put an empty new line next.
Additionally, there is sometimes a need for confirmation that a message has been received "by the network" | ||
(here, at least one node). | ||
|
||
`WAKU-LIGHTPUSH` is a request/response protocol for this. |
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.
Are we officially moving from WAKU2
@jm-clius ?
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.
Since this spec is not numbered yet (a.k.a. it's not a Vac RFC), the title is not critical.
For this to be promoted to Vac RFC, I suggest we keep using WAKU2
in the official title (also for consistency with other protocols, including the new Store). We can drop the "v2" from the name though - this is simply Waku Lightpush.
The title will be:
XX/WAKU2-LIGHTPUSH
where XX is the Vac-assigned RFC number.
|
||
If the node is unable to perform the request for some reason, it SHOULD return an error code in `LightPushResponse`.<br> | ||
|
||
Once the relay is successful, the `relay_peer_count` will indicate the number of peers that the node has managed to relay the message to. It's important to note that this number may vary depending on the node subscriptions and support for the requested pubsub_topic. The client can use this information to either consider the relay as successful or take further action, such as switching to a lightpush service peer with better connectivity.<br> |
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.
sembr
|
||
> The list of error codes is not complete and can be extended in the future. | ||
|
||
## Security Considerations |
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 would add that the content of the response node does not provide guarantees that the messages was relayed and that the requesting node should mitigate appropriately.
|
||
- Add support attaching RLN proof for the message requested to be relayed. | ||
- Add support for other request types. | ||
- Incentivization of the service |
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.
Definition of strategy to improve reliable usage of this service
@fryorcraken thank you for the comments, let's continue tracking those here: #29 |
Based on waku-org/pm#93 this new version of lightpush protobuf protocol definition is proposed.
As this is a breaking change compared to the original definition, we may consider to version the protocol allow clients to get adapted to new protocol format.
Open discussion topic: Can't we make pubsub_topic optional for lightpush protocol, indicating to handle message as auto-sharded routing? Currently we require from clients to know about how to compute proper shard from content-topic and make light push request properly with that computed shard topic. Although this can be simple handled on the service side. WDYT?