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

tracking #182 (bob de boumaa rework) #183

Closed
wants to merge 24 commits into from

Conversation

chancehudson
Copy link
Collaborator

@chancehudson chancehudson commented Jun 25, 2024

  • move mopro-core logic into mopro-ffi
  • separate UDL interfaces for circom and halo2
  • clean up examples
    • only store srs/zkey/vkey/wasm files
    • move the halo2/circom source to a different repo
  • refactor cli
    • translate build_ios, build_android, build_core into rust (don't simply invoke shell scripts from rust)
      • ios
      • android
    • delete TOML/mopro-config parsing logic
    • delete shell script cli implementation
    • delete circom build logic (delegate to mopro user)
    • export these functions as functions designed to be used in a build script
  • write an example mobile app project in a separate repo
    • add a build.rs that calls the above rust implementations (build_ios, build_android, etc)
    • build mobile project using cargo build instead of mopro build
    • build lib_mopro_ffi.a from source, specify config in rust source
    • delete toml project config
    • copy zkeys/vkeys/srs/etc to app bundle
    • only use mopro cli for initializing projects
  • build template from example project

This PR transfers the proving logic from mopro-core to mopro-ffi. The examples directory is removed and the artifacts are committed directly into mopro-ffi/test-vectors. All the circuits except for multiplier2 and keccak256 have been removed.

Proving functions are now:

  • generate_circom_proof
  • verify_circom_proof
  • generate_halo2_proof
  • verify_halo2_proof

The halo2/circom logic is also separated so they can be enabled at the same time.

Related #182
Closes #180

* chore: rename rsa circuit from main to main_rsa
remove wasmer dep
remove static proof generation logic, in memory zkey, etc
add rust_witness

chore: switch to git copy of rust-witness

fix: rsa circuit path

fix: mutability

fix: re-enable example

fix: move witness fn into scope

refactor: register list of proofs

fix: build anonaadhaar wasm to fix ci

refactor: remove wasm path

fix: zkey pathing

chore: remove wasmer ref

chore: switch to wasm delete copy of circom-compat

* chore: remove mutability and ignore

* chore: comment anonaadhaar build

chore: switch to zkmopro circom-compat fork

chore: update cargo lock

* fix: compile error in build script

* fix: put anonaadhaar tests behind feature flag

* chore: remove wasmer deps

* refactor: pass zkey path through ffi bridge

* chore: rebase, revert name changes

* chore: comments

* chore: fix halo2 build

* chore: conditionals...............
refactor: separate circom/halo2 functions in udl
chore(ci): split circom and halo2 tests
@chancehudson chancehudson changed the title refactor: remove mopro-core, transfer logic to mopro-ffi tracking #182 Jun 25, 2024
@chancehudson chancehudson changed the title tracking #182 tracking #182 (bob de boumaa rework) Jun 25, 2024
@oskarth oskarth self-requested a review June 27, 2024 05:17
Copy link
Collaborator

@oskarth oskarth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spike to integrate rust-witness.

However, this PR is too big with a massive surface area, impossible to review. It is also not actually targeting any specific identified issue, and probably contains 5-10 different issues, that may or may not be a problem.

See message in group chat.

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

Successfully merging this pull request may close these issues.

Namespace circom and halo2 seperately
2 participants