Accelerating zk-SNARKs on FPGAs with Hardcaml

@andyman, Ben Devlin, @rahuly and myself (@fyquah95) recently competed in the ZPrize competition in our free time. We used Hardcaml to create our submissions, and we we came first and second in two of the competition tracks!

All source code is open source at github. A big motivation for joining the contest was to increase the amount of publicly available open source Hardcaml examples. Using Hardcaml enabled us to productively create large FPGA designs with competitive performance in the short time-frame of the competition.

We have a blog post with an overview of our work:

We also have a much more technical write-up with details about methods, results and build instructions:

We also developed a small web frontend made with Js_of_ocaml and Brr to showcase our designs in the browser. Our frontend allows users to configure their designs, download RTL, view statistics, run simulations, and even view waveforms from the comfort of their browser (even on your phone!). Source code is available at GitHub - hardcamls/hardcaml_web. (Special thanks to @TyOverby for helping us put this together.)