Improve API for circuit (de-)compression
moCello opened this issue · 0 comments
moCello commented
Summary
When decompressing a circuit, we immediately compile the circuit and return the prover
and verifier
, and because of this we require the label
and publicparameter
at decompression time which is counter intuitive.
At the same time we compress the circuit as part of the compile module which is also counter intuitive.
We can improve the API as follows:
Current API:
let compressed = Compiler::compress::<DummyCircuit>().unwrap();
let (decompressed_prover, decompressed_verifier) =
Compiler::decompress(&pp, label, &compressed).unwrap();
Proposed new API:
let compressed = DummyCircuit::compress().unwrap();
let (decompressed_prover, decompressed_verifier) =
Compiler::compile_with_compressed(&pp, label, &compressed).unwrap();