From 18a16ae6954f49fba0046d8e418f7bc55ae4c7aa Mon Sep 17 00:00:00 2001 From: Jimmy Debe <91767824+jimstir@users.noreply.github.com> Date: Wed, 28 Feb 2024 21:55:14 -0500 Subject: [PATCH] Update and rename simple-scaling.md to simple-scaling.md --- {status => vac}/raw/57/simple-scaling.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) rename {status => vac}/raw/57/simple-scaling.md (98%) diff --git a/status/raw/57/simple-scaling.md b/vac/raw/57/simple-scaling.md similarity index 98% rename from status/raw/57/simple-scaling.md rename to vac/raw/57/simple-scaling.md index 5a40642..b5a3eb8 100644 --- a/status/raw/57/simple-scaling.md +++ b/vac/raw/57/simple-scaling.md @@ -325,26 +325,29 @@ is done via a register query: REGISTER{my-app, {QmA, AddrA}} ``` -The app name, `my-app` is used to encode a single shard in the form: +The app name, `my-app` contains the encoding of a single shard in string form: ``` - | <2-byte shard cluster index> | <2-byte shard index> +"rs/"| to_string(<2-byte shard cluster index>) | "/" | to_string(<2-byte shard index>) ``` +The string conversion SHOULD remove leading zeros. + +> *Note:* Since the [ns](https://github.com/libp2p/specs/blob/master/rendezvous/README.md#protobuf) field is of type string, +a more efficient byte encoding is not utilized. Registering shard 2 in the Status shard cluster (with shard cluster index 16, see [WAKU2-RELAY-STATIC-SHARD-ALLOC](https://github.com/waku-org/specs/blob/waku-RFC/informational/relay-static-shard-alloc.md), the register query would look like ``` -REGISTER{0x727300100002, {QmA, AddrA}} +REGISTER{"rs/16/2", {QmA, AddrA}} ``` Participation in further shards is registered with further queries; one register query per shard. -(0x7273 is the encoding of `rs`.) A discovery query for nodes that are part of this shard would look like ``` -DISCOVER{ns: 0x727300100002} +DISCOVER{ns: "rs/16/2"} ``` ## DoS Protection