waku-org / research

Waku Protocol Research
MIT License
3 stars 0 forks source link

Can RLN proof verification scale? #30

Open alrevuelta opened 9 months ago

alrevuelta commented 9 months ago

Without RLN it wasn't resource-intensive to validate relay messages. It was as simple as decoding it and accepting it if it complied with the WakuMessage type. This took almost no time and resources.

However with RLN in place, now each message has a proof that has to be verified. In https://github.com/waku-org/research/issues/23 we ran some simulations and found that the validation of said proofs takes around 0.012 seconds each. But we didn't really stress test nwaku with multiple messages per second.

So we must ensure that rln proof verification can scale to multiple messages per second, and what is even more important, that average computers can handle it.

So we need to:

rymnc commented 9 months ago

This is a great idea!

s-tikhomirov commented 9 months ago

Great question. A follow-up question could be: is it possible to outsource proof verification to a third party (with minimal trust assumptions)? Kinda like separate prover networks for ZK-rollups (that's for proof generation, not verification, but still). And by the way, how resource-heavy is proof generation?

rymnc commented 9 months ago

Great question. A follow-up question could be: is it possible to outsource proof verification to a third party (with minimal trust assumptions)? Kinda like separate prover networks for ZK-rollups (that's for proof generation, not verification, but still). And by the way, how resource-heavy is proof generation?

Err, outsourcing verification to a third party will introduce network latency (~200ms) which is much greater than verification times 😬

alrevuelta commented 8 months ago

Great question. A follow-up question could be: is it possible to outsource proof verification to a third party (with minimal trust assumptions)? Kinda like separate prover networks for ZK-rollups (that's for proof generation, not verification, but still). And by the way, how resource-heavy is proof generation?

Agree with @rymnc, outsourcing would introduce a latency that makes it not feasible. Even if we had a blackbox service with infinite resources validating proofs in 0 time, the network delay kills the idea.