mirror of https://github.com/vacp2p/rfc.git
Add to wire section protocol
This commit is contained in:
parent
7660f39c2f
commit
cb66487af1
|
@ -105,17 +105,25 @@ TODO Detail this in a separate spec
|
||||||
|
|
||||||
## Wire Specification
|
## Wire Specification
|
||||||
|
|
||||||
We are using protobuf RPC messages between peers. Here's what a message looks
|
We are using protobuf RPC messages between peers. Here's what the protobuf messages looks like, as defined in the PubSub interface. Please see [PubSub interface spec](https://github.com/libp2p/specs/blob/master/pubsub/README.md) for more details.
|
||||||
like, as defined in the PubSub interface.
|
|
||||||
|
|
||||||
|
In this section we specify two things:
|
||||||
|
1) How WakuSub is using these messages.
|
||||||
|
2) Additional message types.
|
||||||
|
|
||||||
*NOTE: Should contain protobuf definitions that cover essentials of Waku v1. In
|
### Protobuf
|
||||||
cases where it doesn't cover, we can defer to siblings/child specs, e.g. such as
|
|
||||||
the data field for encryption, etc.*
|
|
||||||
|
|
||||||
### Messages
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
message RPC {
|
||||||
|
repeated SubOpts subscriptions = 1;
|
||||||
|
repeated Message publish = 2;
|
||||||
|
|
||||||
|
message SubOpts {
|
||||||
|
optional bool subscribe = 1;
|
||||||
|
optional string topicid = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
message Message {
|
message Message {
|
||||||
optional string from = 1;
|
optional string from = 1;
|
||||||
optional bytes data = 2;
|
optional bytes data = 2;
|
||||||
|
@ -126,11 +134,17 @@ message Message {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
TODO Detail options and what's in data, additional methods, etc
|
WakuSub does not currently use the `ControlMessage` defined in GossipSub. However, later versions will add likely add this capability.
|
||||||
|
|
||||||
### SubOpts
|
`TopicDescriptor` as defined in the PubSub interface spec is not currently used.
|
||||||
|
|
||||||
TODO
|
### Historical message support
|
||||||
|
|
||||||
|
TODO(Dean): Fill out this section with historical message API.
|
||||||
|
|
||||||
|
### Options used
|
||||||
|
|
||||||
|
*NOTE: Should contain protobuf definitions that cover essentials of Waku v1. In cases where it doesn't cover, we can defer to siblings/child specs, e.g. such as the data field for encryption, etc.*
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue