waku-org / js-waku

JavaScript implementation of Waku v2
https://js.waku.org
Apache License 2.0
167 stars 42 forks source link

chore(lightpush)!: move protocol implementation to `@waku/sdk` (1/n) #1964

Closed danisharora099 closed 5 months ago

danisharora099 commented 5 months ago

Problem

Part of https://github.com/waku-org/js-waku/issues/1886, the current Filter implementation is quite coupled in terms of the RFC specs + our opinions of using peers, handling subscriptions, etc

Solution

Decouple Filter into SDK and Core

Notes

Contribution checklist:

github-actions[bot] commented 5 months ago

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 180.77 KB (-0.02% 🔽) 3.7 s (-0.02% 🔽) 3.3 s (+28.19% 🔺) 6.9 s
Waku Simple Light Node 180.85 KB (+0.05% 🔺) 3.7 s (+0.05% 🔺) 3.6 s (+31.37% 🔺) 7.2 s
ECIES encryption 23.12 KB (0%) 463 ms (0%) 762 ms (-6.32% 🔽) 1.3 s
Symmetric encryption 22.57 KB (0%) 452 ms (0%) 668 ms (+29.94% 🔺) 1.2 s
DNS discovery 72.44 KB (0%) 1.5 s (0%) 1.7 s (+36.43% 🔺) 3.2 s
Peer Exchange discovery 73.96 KB (0%) 1.5 s (0%) 1.8 s (-4.02% 🔽) 3.3 s
Local Peer Cache Discovery 67.68 KB (0%) 1.4 s (0%) 1.4 s (+28.42% 🔺) 2.7 s
Privacy preserving protocols 38.78 KB (0%) 776 ms (0%) 1.4 s (+15.53% 🔺) 2.2 s
Waku Filter 111.38 KB (+450.83% 🔺) 2.3 s (+450.83% 🔺) 3.1 s (+440.29% 🔺) 5.3 s
Waku LightPush 110.15 KB (+0.02% 🔺) 2.3 s (+0.02% 🔺) 2.6 s (+38.54% 🔺) 4.8 s
History retrieval protocols 110.66 KB (-0.07% 🔽) 2.3 s (-0.07% 🔽) 2.4 s (+25.56% 🔺) 4.7 s
Deterministic Message Hashing 4.83 KB (0%) 97 ms (0%) 22 ms (+2.88% 🔺) 119 ms