chore: added autosharding test vectors (#664)

This commit is contained in:
Simon-Pierre Vivier 2024-02-02 07:26:58 -05:00 committed by GitHub
parent 9c1f20ab34
commit fc2310dd75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -188,6 +188,14 @@ The shard to use is the modulo of the hash by the number of shards in the networ
- `0x8e541178adbd8126068c47be6a221d77d64837221893a8e4e53139fb802d4928` MOD `8` equals `0`
- The shard to use has index 0
### Test Vectors
- `/toychat/2/huilong/proto` -> Shard 3
- `/0/toychat/2/huilong/proto` -> Shard 3
- `/1/toychat/2/huilong/proto` -> Invalid
- `/statusim/1/community/cbor` -> Shard 4
- `/0/statusim/1/community/cbor` -> Shard 4
- `/1/statusim/1/community/cbor` -> Invalid
## Content Topics Format for Autosharding
Content topics MUST follow the format in [23/WAKU2-TOPICS](https://rfc.vac.dev/spec/23/#content-topic-format).
In addition, a generation prefix MAY be added to content topics.