devgrants icon indicating copy to clipboard operation
devgrants copied to clipboard

RFP Proposal: zk-SNARKs Performance & Security Implementation Improvements

Open nemothenoone opened this issue 6 years ago • 2 comments

https://discuss.filecoin.io/t/devgrants-wave-2-q-a/673/8 claims that Groth16 construction implementation improvements are welcomed.

nemothenoone avatar Apr 14 '20 20:04 nemothenoone

Hi @nemothenoone,

Similarly, we would need to see this in Rust, not C++. Is that feasible?

eshon avatar Apr 27 '20 15:04 eshon

Hello, @eshon!

This particular project supposes for performance reasons we will eventually end up with assembly superoptimizations along with some high-level language interface (C/C++ or Rust - it does not matter). So, yeah. We could make it done in Rust, and ship it as Rust crate.

In general from our experience Rust usage is highly unrecommended because of performance reasons.

We have seen a case (Chia VDF contest), when pretty experienced guys (POA Networks) were trying to get things working (implement a VDF required by Chia) with Rust and some CPU-based assembly superoptimizations (mostly coming from GMP), but no matter how hard they tried, they failed to achieve even the reference implementation performance. (using the same algorithm as the reference implementation one) Here are the results of this contest: https://github.com/Chia-Network/vdftrack1results/blob/master/entry_results.txt. First place was taken by a guy with actually no assembly code at all, but only with algorithmic improvements in C/C++. Second contest turned out to be something similar. POA Networks with Rust-based implementation with lots of algorithmic improvements did not even submitted - the performance were not enough. And we took the 2-nd place with C-based code along with algorithmic improvements (https://github.com/Chia-Network/vdfcontest2results). First place was taken by a guy with C-based algorithmic improvements along with Assembly superoptimisations.

nemothenoone avatar Apr 27 '20 19:04 nemothenoone

Archived

FF-FOIT avatar Dec 03 '24 13:12 FF-FOIT