Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve API for circuit (de-)compression #804

Closed
moCello opened this issue Dec 21, 2023 · 0 comments · Fixed by #807
Closed

Improve API for circuit (de-)compression #804

moCello opened this issue Dec 21, 2023 · 0 comments · Fixed by #807

Comments

@moCello
Copy link
Member

moCello commented Dec 21, 2023

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();
moCello added a commit that referenced this issue Dec 21, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Resolves #804
moCello added a commit that referenced this issue Dec 21, 2023
moCello added a commit that referenced this issue Dec 21, 2023
moCello added a commit that referenced this issue Dec 21, 2023
Resolves #804
@moCello moCello changed the title Remove label and PublicParameter as parameter when decompressing a circuit Improve API for circuit (de-)compression Dec 21, 2023
moCello added a commit that referenced this issue Dec 21, 2023
Resolves #804
moCello added a commit that referenced this issue Dec 21, 2023
Resolves #804
moCello added a commit that referenced this issue Dec 22, 2023
Resolves #804
@moCello moCello mentioned this issue Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant