Skip to content

Circuit type alias for Protocol #32

@robinhundt

Description

@robinhundt

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions