js-waku
js-waku copied to clipboard
bug: passing shard 0 to createEncoder will generate a pubsubtopic with shard 1
This is a bug report
Steps
- ContentTopic = "/waku/2/content/test.js";
- singleShardInfo = { clusterId: 0, shard: 0 }
- 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