mirror of
https://github.com/logos-messaging/specs.git
synced 2026-01-08 17:13:11 +00:00
cluster & shards
This commit is contained in:
parent
f2df957ace
commit
9a76ea6009
@ -114,15 +114,21 @@ All _varints_ MUST be little-endian base 128 variable length integers (LEB128) a
|
|||||||
The wire level payload MUST be encoded as follow.
|
The wire level payload MUST be encoded as follow.
|
||||||
> The & denote concatenation.
|
> The & denote concatenation.
|
||||||
|
|
||||||
1. _varint_ bytes of the delta encoded timestamp &
|
> Refer to [RELAY-SHARDING](https://github.com/waku-org/specs/blob/master/standards/core/relay-sharding.md#static-sharding)
|
||||||
2. if timestamp is zero, 1 byte for the hash bytes length & the hash bytes &
|
RFC for cluster and shard specification.
|
||||||
3. 1 byte, the _range_ type &
|
|
||||||
4. either
|
1. _varint_ bytes of the node's cluster ID &
|
||||||
|
2. _varint_ bytes of the node's number of shard supported &
|
||||||
|
3. _varint_ bytes for each shard index supported &
|
||||||
|
4. _varint_ bytes of the delta encoded timestamp &
|
||||||
|
5. if timestamp is zero, 1 byte for the hash bytes length & the hash bytes &
|
||||||
|
6. 1 byte, the _range_ type &
|
||||||
|
7. either
|
||||||
- 32 bytes _fingerprint_ or
|
- 32 bytes _fingerprint_ or
|
||||||
- _varint_ bytes of the item set length & bytes of every items or
|
- _varint_ bytes of the item set length & bytes of every items or
|
||||||
- if _skip range_, do nothing
|
- if _skip range_, do nothing
|
||||||
|
|
||||||
5. repeat steps 1 to 4 for all ranges.
|
8. repeat steps 1 to 4 for all ranges.
|
||||||
|
|
||||||
## Transfer Protocol
|
## Transfer Protocol
|
||||||
|
|
||||||
@ -154,6 +160,11 @@ The flexibility of the protocol implies that much is left to the implementers.
|
|||||||
What will follow is NOT part of the specification.
|
What will follow is NOT part of the specification.
|
||||||
This section was created to inform implementations.
|
This section was created to inform implementations.
|
||||||
|
|
||||||
|
#### Cluster & Shards
|
||||||
|
To prevent nodes from synchronizing messages from shard they don't support,
|
||||||
|
cluster and shards information has been added to each payload.
|
||||||
|
On reception, if two peers don't share the same set of shards the sync is aborted.
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
Two useful parameters to add to your implementation are partitioning count and the item set threshold.
|
Two useful parameters to add to your implementation are partitioning count and the item set threshold.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user