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

bug: ApplicationInfo to PubsubTopic doesn't take clusterId into consideration

Open fbarbu15 opened this issue 11 months ago • 2 comments

This is a bug report

Problem

shardInfoToPubsubTopics and ensureShardingConfigured doesn't take clusterId into consideration when resolving the PubsubTopic for ApplicationInfo

IMO this needs to work because ApplicationInfo also contains clusterId and I expect the PubsubTopic to match it

Proposed Solutions

clusterId needs to be passed to contentTopicToPubsubTopic in those 2 functions

fbarbu15 avatar Mar 11 '24 13:03 fbarbu15

related to https://github.com/waku-org/nwaku/issues/2502

danisharora099 avatar Mar 13 '24 15:03 danisharora099

This was fixed on nwanku side here

fbarbu15 avatar Mar 13 '24 16:03 fbarbu15

@fbarbu15 I'm not sure I fully understand this issue. clusterId is indeed taken into account with ApplicationInfo. What am I missing? https://github.com/waku-org/js-waku/blob/4db508b962736426f4897995a2b525c82fe0ba37/packages/utils/src/common/sharding.ts#L63-L70

cc @waku-org/js-waku-developers

danisharora099 avatar Jul 08 '24 09:07 danisharora099

Sorry, totally forgot about this issue I've applied this fix when I worked on js-waku sharding tests If it's not correct please feel free to revert/fix it

fbarbu15 avatar Jul 08 '24 09:07 fbarbu15

Closing according to the above comment

fbarbu15 avatar Jul 08 '24 16:07 fbarbu15