HarryR / ethsnarks

A toolkit for viable zk-SNARKS on Ethereum, Web, Mobile and Desktop
GNU Lesser General Public License v3.0
240 stars 57 forks source link

Fixes #25 - Minimal build #50

Closed HarryR closed 5 years ago

HarryR commented 5 years ago

This reduces the amount of libsnark code being compiled by making a special cut-down version of libff with only altbn128 support and the necessities, everything else is templated code and doesn't need a library.

This also reduces the number of duplicate compile flags, the compile flags are fully controlled in the ethsnarks/CMakeLists.txt file.

By default it's built with DEBUG enabled, for this reasons some bugs were caught were previously I was building with debug / assertions turned off.

However, the CMakeLists.txt file could be cleaned up, and things like optimisations and aggressive optimisations added back in for release / non-debug builds.

When Travis is building a tag, I think the optimisations etc. should be turned on.

HarryR commented 5 years ago

It seems build times are down to about 6 mins on average, which is cutting 2-3 minutes off the build time :D

HarryR commented 5 years ago

I'm happy this also works with ethsnarks-emscripten too, and will make some changes there easier.