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

Circuit shouldn't be required to be Default #715

Open
ureeves opened this issue Dec 5, 2022 · 0 comments · May be fixed by #716
Open

Circuit shouldn't be required to be Default #715

ureeves opened this issue Dec 5, 2022 · 0 comments · May be fixed by #716
Assignees
Labels
type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)

Comments

@ureeves
Copy link
Member

ureeves commented Dec 5, 2022

Describe what you want implemented
A circuit shouldn't be required to be Default to satisfy the Circuit trait. The proposal is to remove said bound, and adjust accordingly.

Describe "Why" this is needed
First this semantically makes no sense - why should a circuit need to have a default to be a circuit? - but it also leads to some dangerous uses.
Some circuits downstream, namely the execute circuits, actually shouldn't have a default implementation since they require padding to be performed prior to their compilation, and compiling with Compiler::compile will result in the wrong keys being generated.

Describe alternatives you've considered
N/A

Additional context
This shouldn't be a breaking change, as it it a lifting of bounds, rather than a restriction.

@ureeves ureeves added the type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc) label Dec 5, 2022
@ureeves ureeves self-assigned this Dec 5, 2022
ureeves pushed a commit that referenced this issue Dec 5, 2022
The `Compiler::compile` function keeps this bound since it actually
requires the circuit to have a `Default` implementation, but all other
functionality now works without said bound.

Resolves #715
@ureeves ureeves linked a pull request Dec 5, 2022 that will close this issue
ureeves pushed a commit that referenced this issue Dec 5, 2022
The `Compiler::compile` function keeps this bound since it actually
requires the circuit to have a `Default` implementation, but all other
functionality now works without said bound.

Resolves #715
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant