Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: sharding tests refactor #1883

Merged
merged 25 commits into from
Mar 18, 2024
Merged

test: sharding tests refactor #1883

merged 25 commits into from
Mar 18, 2024

Conversation

fbarbu15
Copy link
Collaborator

@fbarbu15 fbarbu15 commented Mar 4, 2024

  • Extend sharding utils unit tests in packages/utils/src/common/sharding.spec.ts
  • Add static and auto sharding interop tests in packages/tests/tests/sharding/
  • Add contentTopic flag to nwaku start (used for autosharding)
  • Fix sendMessageAutosharding typo
  • Adjust existing autosharding tests to use clusterID != 1 because starting with nwaku 0.26.0, clusterID 1 is reserved for TWN and it uses RLN-RELAY by default while we don't have RLN support yet in this framework (and thus nwaku will not start and fail the tests). However nwaku will allow autosharding for clusterID != 1 only starting with 0.27.0 (see fix: Enable autosharding in any cluster nwaku#2505). So I've skipped autosharding tests until js-waku uses 0.27.0

Issues found:

Copy link

github-actions bot commented Mar 4, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 185.47 KB (+0.15% 🔺) 3.8 s (+0.15% 🔺) 15.6 s (-17.12% 🔽) 19.3 s
Waku Simple Light Node 185.39 KB (-0.02% 🔽) 3.8 s (-0.02% 🔽) 16.4 s (+42.7% 🔺) 20.1 s
ECIES encryption 22.88 KB (0%) 458 ms (0%) 5.4 s (+94.5% 🔺) 5.9 s
Symmetric encryption 22.42 KB (0%) 449 ms (0%) 4.9 s (+85.69% 🔺) 5.3 s
DNS discovery 73.67 KB (0%) 1.5 s (0%) 8.4 s (-36.36% 🔽) 9.8 s
Peer Exchange discovery 75.37 KB (+0.16% 🔺) 1.6 s (+0.16% 🔺) 7.2 s (-29.01% 🔽) 8.7 s
Local Peer Cache Discovery 68.99 KB (0%) 1.4 s (0%) 9.8 s (+57.87% 🔺) 11.1 s
Privacy preserving protocols 39.97 KB (0%) 800 ms (0%) 5.1 s (-36.91% 🔽) 5.9 s
Waku Filter 20.11 KB (-0.11% 🔽) 403 ms (-0.11% 🔽) 3 s (+27.99% 🔺) 3.4 s
Waku LightPush 115.54 KB (+0.04% 🔺) 2.4 s (+0.04% 🔺) 9.8 s (-20.18% 🔽) 12.1 s
History retrieval protocols 19.32 KB (-0.02% 🔽) 387 ms (-0.02% 🔽) 4.3 s (+76.99% 🔺) 4.7 s
Deterministic Message Hashing 4.96 KB (0%) 100 ms (0%) 343 ms (-6.22% 🔽) 442 ms

@fbarbu15 fbarbu15 marked this pull request as ready for review March 13, 2024 08:26
@fbarbu15 fbarbu15 requested a review from a team as a code owner March 13, 2024 08:26
@@ -66,7 +66,8 @@ export const shardInfoToPubsubTopics = (
// Autosharding: single shard from application and version
return [
contentTopicToPubsubTopic(
`/${shardInfo.application}/${shardInfo.version}/default/default`
`/${shardInfo.application}/${shardInfo.version}/default/default`,
shardInfo.clusterId
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need this fix here because Autosharding is possible on other clusterIds

@@ -293,7 +294,8 @@ export const ensureShardingConfigured = (

if (isApplicationVersionConfigured) {
const pubsubTopic = contentTopicToPubsubTopic(
`/${application}/${version}/default/default`
`/${application}/${version}/default/default`,
clusterId
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Collaborator

@danisharora099 danisharora099 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I've skipped autosharding tests until js-waku uses 0.27.0

can we open an issue to track this? (put it in the blocked column on the board)

clusterID 1 is reserved for TWN and it uses RLN-RELAY by default while we don't have RLN support yet in this framework (and thus nwaku will not start and fail the tests)

this is being tracked in #1914

@fbarbu15 fbarbu15 merged commit f4c7c02 into master Mar 18, 2024
9 of 10 checks passed
@fbarbu15 fbarbu15 deleted the test/sharding-refactor branch March 18, 2024 11:40
@fbarbu15
Copy link
Collaborator Author

can we open an issue to track this? (put it in the blocked column on the board)

Added Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants