This repository was archived by the owner on Feb 16, 2025. It is now read-only.
feat: js-rln optimizations #85
Labels
enhancement
New feature or request
track:rln
RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications
This is a feature request
Problem
@waku/rln
is slow. This investigation is done without measuring contract implications as for now it is lower than RLN problemsIt takes ~20s to initialize RLN on fast internet and ~40s on 3g internet
Following breakdown will be done on 3g internet
Breakdown:
rln_wasm_bg.wasm
: ~6931.32 mszeroRLN
hook: 0.034 msrln.wasm
(witness calculator): ~3676.94 msrln_final.zkey
: ~18692.76 mszerokitRLN.newRLN
: 12444.46 msWhat is interesting is that (3) and (4) take significantly less time on fast internet.
(3) and (4) happens on slow internet and most likely because of the size - (3) is 1.2 mb and (4) is 3.2 mb
Further breakdown for (1):
WebAssembly.instantiateStreaming
of therln_wasm_bg.wasm
takes: 6496.60 msFurther breakdown for (3):
wasm
file: 572.31 msFurther breakdown for (4):
Further breakdown for (5):
zerokit
operation - 12444.46 msProposed Solutions
instantiateStreaming
instead of reading bytes + check if possible to shrink files;zkey/vkey
) should be changed, in future should be improved with new version;Notes
Ref: waku-org/research#45
The text was updated successfully, but these errors were encountered: