Add gossipsub message-id specification
This commit is contained in:
parent
1f06026bf7
commit
8a03e6d291
|
@ -212,6 +212,13 @@ Topics are plain UTF-8 strings and are encoded on the wire as determined by prot
|
|||
|
||||
Each gossipsub [message](https://github.com/libp2p/go-libp2p-pubsub/blob/master/pb/rpc.proto#L17-L24) has a maximum size of `GOSSIP_MAX_SIZE`. Clients MUST reject (fail validation) messages that are over this size limit. Likewise, clients MUST NOT emit or propagate messages larger than this limit.
|
||||
|
||||
The message-id of a gossipsub message MUST be:
|
||||
|
||||
```python
|
||||
message-id: base64(SHA256(message.data))
|
||||
```
|
||||
where `base64` is the [URL-safe base64 alphabet](https://tools.ietf.org/html/rfc4648#section-3.2) with padding characters omitted.
|
||||
|
||||
The payload is carried in the `data` field of a gossipsub message, and varies depending on the topic:
|
||||
|
||||
| Topic | Message Type |
|
||||
|
|
Loading…
Reference in New Issue