mirror of
https://github.com/vacp2p/rfc-index.git
synced 2026-01-07 23:04:09 -05:00
Update README.md
This commit is contained in:
@@ -11,7 +11,7 @@ contributors:
|
||||
---
|
||||
|
||||
This document outlines recommended usage of topic names in Waku v2.
|
||||
In [10/WAKU2 spec](../../standards/core/10/WAKU2.md) there are two types of topics:
|
||||
In [10/WAKU2 spec](../../standards/core/10/waku2.md) there are two types of topics:
|
||||
|
||||
- pubsub topics, used for routing
|
||||
- Content topics, used for content-based filtering
|
||||
@@ -19,7 +19,7 @@ In [10/WAKU2 spec](../../standards/core/10/WAKU2.md) there are two types of topi
|
||||
|
||||
## Pubsub Topics
|
||||
|
||||
Pubsub topics are used for routing of messages (see [11/WAKU2-RELAY](../../standards/core/11/RELAY.md)),
|
||||
Pubsub topics are used for routing of messages (see [11/WAKU2-RELAY](../../standards/core/11/relay.md)),
|
||||
and can be named implicitly by Waku sharding (see [51/WAKU2-RELAY-SHARDING](/spec/51)).
|
||||
This document comprises recommendations for explicitly naming pubsub topics (e.g. when choosing *named sharding* as specified in [51/WAKU2-RELAY-SHARDING](/spec/51)).
|
||||
|
||||
@@ -40,10 +40,10 @@ If applicable, it is RECOMMENDED to structure `{topic-name}` in a hierarchical w
|
||||
|
||||
> *Note*: In previous versions of this document, the structure was `/waku/2/{topic-name}/{encoding}`.
|
||||
The now deprecated `/{encoding}` was always set to `/proto`,
|
||||
which indicated that the [data field](/spec/11/#protobuf-definition) in pubsub is serialized/encoded as protobuf.
|
||||
which indicated that the [data field](../../standards/core/11/RELAY.md/#protobuf-definition) in pubsub is serialized/encoded as protobuf.
|
||||
The inspiration for this format was taken from
|
||||
[Ethereum 2 P2P spec](https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/p2p-interface.md#topics-and-messages).
|
||||
However, because the payload of messages transmitted over [11/WAKU2-RELAY](../../standards/core/11/RELAY.md) must be a [14/WAKU2-MESSAGE](/spec/14),
|
||||
However, because the payload of messages transmitted over [11/WAKU2-RELAY](../../standards/core/11/relay.md) must be a [14/WAKU2-MESSAGE](../../standards/core/14/message.md),
|
||||
which specifies the wire format as protobuf,`/proto` is the only valid encoding.
|
||||
This makes the `/proto` indication obsolete.
|
||||
The encoding of the `payload` field of a Waku Message is indicated by the `/{encoding}` part of the content topic name.
|
||||
@@ -86,10 +86,10 @@ This indicates explicitly that the network traffic has been partitioned into 10
|
||||
|
||||
The other type of topic that exists in Waku v2 is a content topic.
|
||||
This is used for content based filtering.
|
||||
See [14/WAKU2-MESSAGE spec](/spec/14) for where this is specified.
|
||||
See [14/WAKU2-MESSAGE spec](../../standards/core/14/message.md) for where this is specified.
|
||||
Note that this doesn't impact routing of messages between relaying nodes,
|
||||
but it does impact how request/reply protocols such as
|
||||
[12/WAKU2-FILTER](https://rfc.vac.dev/spec/12/) and [13/WAKU2-STORE](https://rfc.vac.dev/spec/13/) are used.
|
||||
[12/WAKU2-FILTER](../../standards/core/14/filter.md) and [13/WAKU2-STORE](../../standards/core/13/store.md) are used.
|
||||
|
||||
This is especially useful for nodes that have limited bandwidth,
|
||||
and only want to pull down messages that match this given content topic.
|
||||
@@ -115,11 +115,11 @@ Applications should specify their version (if applicable) in the version field.
|
||||
The `{content-topic-name}` portion of the content topic is up to the application,
|
||||
and depends on the problem domain.
|
||||
It can be hierarchical, for instance to separate content, or to indicate different bandwidth and privacy guarantees.
|
||||
The encoding field indicates the serialization/encoding scheme for the [WakuMessage payload](/spec/14/#payloads) field.
|
||||
The encoding field indicates the serialization/encoding scheme for the [WakuMessage payload](../../standards/core/14/message.md/#payloads) field.
|
||||
|
||||
## Differences with Waku v1
|
||||
|
||||
In [6/WAKU1](/spec/6) there is no actual routing.
|
||||
In [6/WAKU1](../../deprecated/5/WAKU0.md) there is no actual routing.
|
||||
All messages are sent to all other nodes.
|
||||
This means that we are implicitly using the same pubsub topic that would be something like:
|
||||
|
||||
@@ -131,7 +131,7 @@ Topics in Waku v1 correspond to Content Topics in Waku v2.
|
||||
|
||||
### Bridging Waku v1 and Waku v2
|
||||
|
||||
To bridge Waku v1 and Waku v2 we have a [15/WAKU-BRIDGE](/spec/15).
|
||||
To bridge Waku v1 and Waku v2 we have a [15/WAKU-BRIDGE](../../standards/core/15/bridge.md).
|
||||
For mapping Waku v1 topics to Waku v2 content topics,
|
||||
the following structure for the content topic SHOULD be used:
|
||||
|
||||
@@ -141,8 +141,8 @@ the following structure for the content topic SHOULD be used:
|
||||
|
||||
The `<4bytes-waku-v1-topic>` SHOULD be the lowercase hex representation of the 4-byte Waku v1 topic.
|
||||
A `0x` prefix SHOULD be used.
|
||||
`/rfc26` indicates that the bridged content is encoded according to RFC [26/WAKU-PAYLOAD](/spec/26).
|
||||
See [15/WAKU-BRIDGE](/spec/15) for a description of the bridged fields.
|
||||
`/rfc26` indicates that the bridged content is encoded according to RFC [26/WAKU-PAYLOAD](../../standards/application/26/readme.md).
|
||||
See [15/WAKU-BRIDGE](../../standards/core/15/bridge.md) for a description of the bridged fields.
|
||||
|
||||
This creates a direct mapping between the two protocols.
|
||||
For example:
|
||||
@@ -151,20 +151,20 @@ For example:
|
||||
/waku/1/0x007f80ff/rfc26
|
||||
```
|
||||
|
||||
# Copyright
|
||||
## Copyright
|
||||
|
||||
Copyright and related rights waived via
|
||||
[CC0](https://creativecommons.org/publicdomain/zero/1.0/).
|
||||
|
||||
# References
|
||||
## References
|
||||
|
||||
* [10/WAKU2 spec](../../standards/core/10/WAKU2.md)
|
||||
* [11/WAKU2-RELAY](../../standards/core/11/RELAY.md)
|
||||
* [51/WAKU2-RELAY-SHARDING](/spec/51)
|
||||
* [Ethereum 2 P2P spec](https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/p2p-interface.md#topics-and-messages)
|
||||
* [14/WAKU2-MESSAGE spec](/spec/14)
|
||||
* [12/WAKU2-FILTER](https://rfc.vac.dev/spec/12/)
|
||||
* [13/WAKU2-STORE](https://rfc.vac.dev/spec/13/)
|
||||
* [6/WAKU1](/spec/6)
|
||||
* [15/WAKU-BRIDGE](/spec/15)
|
||||
* [26/WAKU-PAYLOAD](/spec/26)
|
||||
* [14/WAKU2-MESSAGE](../../standards/core/14/message.md)
|
||||
* [12/WAKU2-FILTER](../../standards/core/14/filter.md)
|
||||
* [13/WAKU2-STORE](../../standards/core/13/store.md)
|
||||
* [6/WAKU1](../../deprecated/5/WAKU0.md)
|
||||
* [15/WAKU-BRIDGE](../../standards/core/15/bridge.md)
|
||||
* [26/WAKU-PAYLOAD](../../standards/application/26/readme.md)
|
||||
|
||||
Reference in New Issue
Block a user