Skip to content

Protocol 3 Testing

Brecht Devos edited this page May 4, 2019 · 13 revisions

Large blocks

Getting started

  • One time step: For testing you can just create new keys, for production these keys are generated in the trusted setup. The proving key is very large!

dex_circuit -createkeys [inBlock.json]

Make sure you have a keys folder in your working directory.

  • Proving a block

dex_circuit -prove [inBlock.json] [outProof.json]

If the necessary keys aren't generated yet this will also generate the keys.

System requirements

Requirements increase linearly with the number of constraints.

For the maximum 256M constraints (~512 ring settlements):

  • Memory: Up to ~512GB. Yes, this is memory (not storage). 512GB RAM is probably very expensive (if even possible), having a large swap file on an SSD is probably more realistic to make sure we don't go out of memory. Still, the more RAM the better. When testing with a swap file I noticed long periods of time the CPU wasn't doing much, I suspect it was swapping data in and out of RAM.

  • Storage: The proving key is ~130GB. This data is read at the start so this probably doesn't need to be on a quick drive. If we need to use a swap file we also need enough quick storage to store that. The blocks and the proofs are very small.

Performance

32M constraints 64M constraints 128M constraints 256M constraints
i7 (4 cores), 16GB RAM, SSD ~19 minutes ~55 minutes ~114 minutes

Generating the keys takes a bit longer than creating a proof, but that doesn't matter because it only needs to be done once for a circuit.

nothing here

Clone this wiki locally