zkmopro / mopro

Making client-side proving on mobile simple.
https://zkmopro.org
Apache License 2.0
118 stars 32 forks source link

Namespace circom and halo2 seperately #180

Closed chancehudson closed 3 months ago

chancehudson commented 3 months ago

We have a bunch of functions for generating proofs, serializing, etc. These functions are exposed in a global way to the mobile side and we're using compiler flags to swap which function is enabled. This is a bit of a mess when trying to parse the logic. It also prevents compiling with support for both circom and halo2 at the same time.

Instead we should namespace the halo2 and circom logic separately and use a single compiler flag to enable or disable the modules. Better yet, we could always compile support for both modules and avoid conditional compile logic altogether.

oskarth commented 3 months ago

Instead we should namespace the halo2 and circom logic separately and use a single compiler flag to enable or disable the modules.

Agree with this.

Better yet, we could always compile support for both modules and avoid conditional compile logic altogether.

This leads to library bloat which is a problem in resource restricted environments. We don't want this.