Closed ElusAegis closed 5 months ago
@vivianjeng thank you for the review and finding the issues. I have resolved them - ready to have another look
@oskarth the changes to other files out of the scope come due to rebasing to main with MSM PR. Likely as I have merged using IDE rebase vs GitHub built-in rebase they are shown in the preview (https://github.com/orgs/community/discussions/51948), however, if you look into the commit history, they will be shown to have been made by other PRs.
Right, it just requires a rebase to get a cleaner diff. If you just do it with normal git tools it shouldn't show up in any diff.
I already reviewed and approved PR. Let's wait for @vivianjeng if she had any other comments before merging.
@ElusAegis it still shows
This branch cannot be rebased due to conflicts
maybe some branch got merged again
Halo2 configuration
We currently support Halo2 circuits in an experimental stage. To use Halo2, you need to set the
kind
tohalo2
in themopro-config.toml
file.The
dir
should point to the directory where the Halo2 circuit is located. Thename
should be the name of the circuit.Note that currently the Halo2 circuit must be a cargo crate, with the package name hardcoded to
halo2-circuit
. This is due to us swapping out the default implementation of thehalo2-ciurcuit
crate with the user's circuit during the build process. This is done using thebuild.rs
script in themopro-core
crate, which changes the path to the defaultexamples/halo2/halo2-fibonacci
to$dir
. This also requires the name of the package to behalo2-circuit
for the substitution to work.Additionally, the
halo2-circuit
crate must implement and expose three items, which you can see in themopro-core/examples/halo2/halo2-fibonacci/src/lib.rs
:Circuit
- the struct that represents the circuitprove
- the function that generates the proofverify
- the function that verifies the proofThis is then used by the
mopro-core
crate to generate the proof and verify it.