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 type alias for Protocol #32

Open
robinhundt opened this issue May 28, 2024 · 1 comment
Open

Circuit type alias for Protocol #32

robinhundt opened this issue May 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@robinhundt
Copy link
Collaborator

Doing the recent refactor #29 was painful because all the different circuit and iterator types needed to be changed. I think it is better to have these types be generic over the Plain and Gate type, but wen can increase the usability and maintainability by introducing type aliases of the form

type CircuitP<P> = Circuit<<P as  Protocol>>::Plain, <P as Protocol>::Gate<<P as  Protocol>>::Plain>>;

which allows us to write CircuitP<BooleanGMW> instead of the current Circuit<bool, BooleanGate>. This retains the flexibility, the underlying types are not changed, but increases usability and maintainability for those places where we can bound the circuit by a protocol (of which there are many).

@robinhundt robinhundt added the enhancement New feature or request label May 28, 2024
@robinhundt
Copy link
Collaborator Author

Maybe a new like type PCircuit<P>, standing for ProtocolCircuit would be better. Or something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant