gnosis / dex-zksnarks

Code to generate snark proofs for batch auction result validation of the Gnosis d.exchange
46 stars 7 forks source link

Parser solver output #32

Closed fleupold closed 5 years ago

fleupold commented 5 years ago

This change introduces a script which can parse a json output file from the optimization problem and convert it into public and private input (pepper format) required for the main trade execution snark.

It's currently not passing the main snark, because there are still some rounding errors, which we need to address in the solver itself (e.g. while buyVolume ≈ sellVolume, we have to make sure sellVolume >= buyVolume, to avoid a fractional reserve)

After we have a small valid output format, I'll add an e2e test to the main verification snark, that uses this script and tests the main snark e2e.

josojo commented 5 years ago

Thanks for adding this easy understandable e2e test. That is great. It really shows that it basically all works! AWESOME :+1: