2021-04-23 06:07:36 +00:00
|
|
|
---
|
|
|
|
slug: 19
|
|
|
|
title: 19/WAKU2-LIGHTPUSH
|
|
|
|
name: Waku v2 Light Push
|
2021-05-24 08:54:24 +00:00
|
|
|
status: draft
|
2024-01-15 15:01:06 +00:00
|
|
|
editor: Oskar Thorén <oskarth@titanproxy.com>
|
2023-01-12 10:30:09 +00:00
|
|
|
contributors:
|
|
|
|
- Daniel Kaiser <danielkaiser@status.im>
|
2021-04-23 06:07:36 +00:00
|
|
|
---
|
|
|
|
|
2021-06-02 15:01:25 +00:00
|
|
|
**Protocol identifier**: `/vac/waku/lightpush/2.0.0-beta1`
|
2021-04-23 06:07:36 +00:00
|
|
|
|
2022-12-13 10:45:58 +00:00
|
|
|
# Motivation and Goals
|
2021-04-23 06:07:36 +00:00
|
|
|
|
2022-12-13 10:45:58 +00:00
|
|
|
Light nodes with short connection windows and limited bandwidth wish to publish messages into the Waku network.
|
|
|
|
Additionally, there is sometimes a need for confirmation that a message has been received "by the network"
|
|
|
|
(here, at least one node).
|
2021-04-23 06:07:36 +00:00
|
|
|
|
2021-05-24 08:54:24 +00:00
|
|
|
`19/WAKU2-LIGHTPUSH` is a request/response protocol for this.
|
2021-04-23 06:07:36 +00:00
|
|
|
|
|
|
|
# Payloads
|
|
|
|
|
|
|
|
```protobuf
|
2021-05-19 01:56:26 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2021-04-23 06:07:36 +00:00
|
|
|
message PushRequest {
|
|
|
|
string pubsub_topic = 1;
|
|
|
|
WakuMessage message = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PushResponse {
|
2021-05-19 01:56:26 +00:00
|
|
|
bool is_success = 1;
|
2021-04-23 06:07:36 +00:00
|
|
|
// Error messages, etc
|
|
|
|
string info = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PushRPC {
|
|
|
|
string request_id = 1;
|
2021-05-19 01:56:26 +00:00
|
|
|
PushRequest request = 2;
|
2021-04-23 06:07:36 +00:00
|
|
|
PushResponse response = 3;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-12-13 10:45:58 +00:00
|
|
|
## Message Relaying
|
2021-04-23 06:07:36 +00:00
|
|
|
|
2022-12-13 10:45:58 +00:00
|
|
|
Nodes that respond to `PushRequests` MUST either
|
|
|
|
relay the encapsulated message via [11/WAKU2-RELAY](/spec/11) protocol on the specified `pubsub_topic`,
|
|
|
|
or forward the `PushRequest` via 19/LIGHTPUSH on a [44/WAKU2-DANDELION](https://rfc.vac.dev/spec/44/) stem.
|
2021-04-23 06:07:36 +00:00
|
|
|
If they are unable to do so for some reason, they SHOULD return an error code in `PushResponse`.
|
|
|
|
|
2022-12-13 10:45:58 +00:00
|
|
|
## Security Considerations
|
2021-04-23 06:07:36 +00:00
|
|
|
|
2022-12-13 10:45:58 +00:00
|
|
|
Since this can introduce an amplification factor, it is RECOMMENDED for the node relaying to the rest of the network to take extra precautions.
|
|
|
|
This can be done by rate limiting via [17/WAKU2-RLN-RELAY](https://rfc.vac.dev/spec/17/).
|
2021-05-24 08:54:24 +00:00
|
|
|
|
|
|
|
Note that the above is currently not fully implemented.
|
2021-04-23 06:07:36 +00:00
|
|
|
|
|
|
|
# Copyright
|
|
|
|
|
|
|
|
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
|
2022-12-13 10:45:58 +00:00
|
|
|
|
|
|
|
# References
|
|
|
|
|
|
|
|
* [11/WAKU2-RELAY](/spec/11)
|
|
|
|
* [44/WAKU2-DANDELION](https://rfc.vac.dev/spec/44/)
|
|
|
|
|