mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-17 21:16:52 +00:00
only use first 8 bytes of hash as message id
This commit is contained in:
parent
8f0b15f9f7
commit
deb58fd21e
@ -243,10 +243,10 @@ Each gossipsub [message](https://github.com/libp2p/go-libp2p-pubsub/blob/master/
|
|||||||
Clients MUST reject (fail validation) messages that are over this size limit.
|
Clients MUST reject (fail validation) messages that are over this size limit.
|
||||||
Likewise, clients MUST NOT emit or propagate messages larger than this limit.
|
Likewise, clients MUST NOT emit or propagate messages larger than this limit.
|
||||||
|
|
||||||
The `message-id` of a gossipsub message MUST be:
|
The `message-id` of a gossipsub message MUST be the first 8 bytes of the SHA-256 hash of the message data, i.e.:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
message-id: SHA256(message.data)
|
message-id: (SHA256(message.data))[0..8]
|
||||||
```
|
```
|
||||||
|
|
||||||
The payload is carried in the `data` field of a gossipsub message, and varies depending on the topic:
|
The payload is carried in the `data` field of a gossipsub message, and varies depending on the topic:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user