waku-org / js-waku

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

feat: make message hash compatible with decoded message #1993

Closed weboko closed 2 months ago

weboko commented 2 months ago

Problem

It is convenient to use messageHash for end users against DecodedMessage as it is the version they get from Filter.

Solution

Make messageHash compatible with IDecodedMessage

github-actions[bot] commented 2 months ago

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 181.22 KB (+0.03% 🔺) 3.7 s (+0.03% 🔺) 12 s (-21.11% 🔽) 15.7 s
Waku Simple Light Node 181.3 KB (+0.09% 🔺) 3.7 s (+0.09% 🔺) 21.8 s (+74.41% 🔺) 25.4 s
ECIES encryption 23.08 KB (0%) 462 ms (0%) 6.4 s (+125.11% 🔺) 6.9 s
Symmetric encryption 22.55 KB (0%) 452 ms (0%) 6 s (+37.94% 🔺) 6.4 s
DNS discovery 72.42 KB (0%) 1.5 s (0%) 12.6 s (+6.74% 🔺) 14 s
Peer Exchange discovery 74.1 KB (0%) 1.5 s (0%) 8 s (-32.72% 🔽) 9.5 s
Local Peer Cache Discovery 67.64 KB (0%) 1.4 s (0%) 9 s (-22.49% 🔽) 10.3 s
Privacy preserving protocols 38.87 KB (0%) 778 ms (0%) 8.7 s (+7.75% 🔺) 9.5 s
Waku Filter 111.79 KB (+0.2% 🔺) 2.3 s (+0.2% 🔺) 11.5 s (-5.32% 🔽) 13.7 s
Waku LightPush 110.15 KB (0%) 2.3 s (0%) 14.9 s (+52.22% 🔺) 17.1 s
History retrieval protocols 110.74 KB (0%) 2.3 s (0%) 9.8 s (-32.58% 🔽) 12 s
Deterministic Message Hashing 7.25 KB (-0.54% 🔽) 145 ms (-0.54% 🔽) 1.4 s (+28.91% 🔺) 1.6 s