js-waku icon indicating copy to clipboard operation
js-waku copied to clipboard

bug: passing shard 0 to createEncoder will generate a pubsubtopic with shard 1

Open fbarbu15 opened this issue 11 months ago • 0 comments

This is a bug report

Steps

  1. ContentTopic = "/waku/2/content/test.js";
  2. singleShardInfo = { clusterId: 0, shard: 0 }
  3. encoder = createEncoder({ contentTopic: ContentTopic, pubsubTopicShardInfo: singleShardInfo });

Generates:

Encoder {
  contentTopic: '/waku/2/content/test.js',
  ephemeral: false,
  pubsubTopic: '/waku/2/rs/0/1',
  metaSetter: undefined
}

I was expecting /waku/2/rs/0/0 since shard 0 should be valid according to https://rfc.vac.dev/spec/51//#algorithm

fbarbu15 avatar Feb 29 '24 14:02 fbarbu15