# Mopro 2025 Project Planning
## 🗺️ Roadmap
- *What is the high level plan (with major phases if applicable)?*
- *Phase 1: Improve developer experience*
- Milestone: Update the documentation to reflect the latest version.
- Milestone: Create a step-by-step tutorial on getting started with the mopro CLI and share it on YouTube.
- *Phase 2: Enhance the Rust ecosystem for programmable cryptography applications.*
- Milestone: build zk-kit in Rust
- Milestone: build Semaphore in Rust
- Milestone: build other projects that will build mobile apps in Rust
- *Phase 3: Integrate mopro with projects*
- Milestone: build package for projects in Rust/mobile native
- PSE projects (Anon Aadhaar, Bandada, MACI, TLSNotary, Cursive, zkEmail,...)
- 0xparc projects (ZuPass)
- Milestone: build example apps or product apps
- *Phase 4: Integrate research result in mopro*
- Milestone: Integrate GPU acceleration research result
- Milestone: Integrate client-side friendly proving system
## ⛔ Obstacles / Challenges / Risks
- *What is slowing the project down?*
- *What is slowing the project down or preventing completion of the project’s goal?*
- Certain Rust crates encounter compilation issues in mobile or browser (WASM) environments.
- e.g. wasmer in circom-compat doesn't work for iOS
- current rust-witness solution doesn't work for browser
- Collaborating between teams and projects takes time
- *Are there any legal, resource, or organizational risks you can think of?*
- We might need mobile engineer to support projects building apps (It could also be a grant)
- *What challenges does the project face?*
- I think the ecosystem lacks mobile engineers, which might make it challenging for projects to adopt mopro.
- *What clarity does the project need?*
## 🚩 Milestones
### Previous 6 Weeks (for context)
- Milestone 1 Add support for the website platform (WASM)
- Milestone 2 Improve developer experience (customized UDL, improve building speed)
- Milestone 3 Benchmark for Android devices
### Next 6-12 Weeks (1.5-3 Months)
- **Milestone 1 Integrate witnesscalc/rapidsnark stack**
The latest rapidsnark is more performant than current mopro stack (ark-works)
Check the benchmark here https://github.com/zkmopro/mopro/tree/benchmark-update?tab=readme-ov-file#performance
- Task 1 Try to integrate in Rust
- witnesscalc/rapidsnark are written in CPP. Ideally we can genrate rust interface to call these functions
- (previously we have encountered the issue that the `gmp` library is platform specific. We can try to specify different target in Rust and use different `gmp` library)
- Task 2 (If we cannot integrate in Rust) Try to use `mopro` CLI to generate bindings for iOS and Android
> iOS reference: https://github.com/ulag/witnesscalc
> Android: just follow README for Android
- Steps:
1. Read user specified circuit (the `.cpp` output and `.dat` file)
2. We need to change the `CMakeLists.txt` to specify the circuit
e.g. for circuit called `cncircuit`
```cmake
# cncircuit
set(CNUB_SOURCES ${LIB_SOURCES}
cncircuit.cpp
witnesscalc_cncircuit.h
witnesscalc_cncircuit.cpp
)
add_library(witnesscalc_cncircuit SHARED ${CNUB_SOURCES})
add_library(witnesscalc_cncircuitStatic STATIC ${CNUB_SOURCES})
set_target_properties(witnesscalc_cncircuitStatic PROPERTIES OUTPUT_NAME witnesscalc_cncircuit)
```
3. build the library and xcframework (1-3 will be used in `mopro build`)
See [build_witnesscalc.sh](https://github.com/ulag/witnesscalc/blob/main/build_witnesscalc.sh) file
4. build template for witnesscalc/rapidsnark stack (will be used in `mopro create`)
See https://github.com/zkmopro/android-benchmark-app
- Task 3 Update documentation
- Current witnesscalc/rapidsnark stack is not trivial for developers to integrate in iOS/Android
- We should document this steps or record in a video and shard on YouTube
- **Milestone 2 Build typescript packages in Rust**
- Task 1 Build zk-kit in Rust
- only generating proofs/ verifying proofs are not enough for building a ZK app. Like in TS/JS ecosystem, only `snarkjs` is not enough for building ZK apps.
- So the first and more general package/tool we need is `zk-kit`
- Building these tools in Rust is not only for mobile environment but also for laptop or even browser (with WASM bindings)
We can also do benchmark to compare the performance between tools written in TS/JS and tools with WASM bindings
- packages in zk-kit can be found in the list: https://github.com/privacy-scaling-explorations/zk-kit?tab=readme-ov-file#-packages
- Task 2 Build Semaphore in Rust
- There are several projects using Semaphore protocol. One of the examples is worldcoin, so they maintain their own Semphore-rs (V3), but it is not updated to the latest Semaphore version (V4 or V5 in the future).
- And the other example is ZuPass. If they want to use mopro to build mobile app, they need the semaphore package to easily generate identity, merkle tree, proofs,....
- With Semaphore in Rust, we can also speed up computation in desktop (we can benchmark the execution in TS/JS and in Rust)
- The implementation can be refered here: https://github.com/worldcoin/semaphore-rs
We will collaborate with semaphore team to implement the correct semaphroe V4
We will also improve the package with the experience in mopro
e.g. remove `wasmer` dependencies, use `circom-witnesscalc` for better performance
- Task 3 Build pipelines for different platforms
- With Rust crate and `mopro-ffi`, we can create Android, iOS bindings for mobile apps. We can furthur improve this by making them mobile native libraries.
- **iOS:** build pipelines for iOS bindings to publish to Cocoapods
So devs can use e.g. `pod 'Semaphore'` in their podfile
- **Android:** build pipelines for Android bindings to publish to Gradle
So devs can use e.g. `implementation(dev.pse.semaphore)` in gradle file
- **React native:** publish to npm
So devs can use e.g. `npm i react-native-semaphore`
- **Flutter:** publish to pub.dev
So devs can use e.g. `dependencies:
semaphore: ^x.y.z`
### 3-6 Months
- **Priority Milestones**
- **Milestone 1 Start building ZuPass apps**
- Ideally, ZuPass will integrate mopro, and we will need to implement the whole ZuPass stack in Rust or mobile native languages
- ZuPass will be more urgent because there is a high probability it will be used in the next DevCon or other Ethereum events.
- **Milestone 2 Provide the mobile native packages in hackathons**
- We can give prizes for hackers to integrate e.g. Semaphore, zk-kit in mobile apps
:::info
Ideally we want to see people building mobile apps like building web apps. e.g. they can use `semaphore` package directly building a chat app, a social media app in mobile
:::
- And getting feedback how easy/hard they integrate. What is missing?
- We can target ETHGlobal hackathon or mobile development hackathon
- ETHGlobal Taipei Apr 4th-Apr 6th (Vivi & Alex is based here)
- ETHGlobal Cannes Jul 4th-Jul 6th (Could be the bigest hackathon event in this period)
- *TODO: find mobile dev hackathons*
- **Other Milestones/tasks**
- Support other PSE projects if they want to build mobile apps
We can do a servey to see which project is more urgent/ with a clear goal
- Anon Aadhaar:
- Similar to semaphore. and build package like: https://github.com/anon-aadhaar/anon-aadhaar?tab=readme-ov-file#-packages in Rust
- and the usage is also similar to Semaphore. Developers can use anon aadhaar package to build applications
- TLSNotary: Notarize mobile apps/data
- Not sure if we can capture mobile apps' TLS
- We need to explore more and collab with TLSNotary team
- MACI
- Cursive
- zkEmail
- MPC
- https://github.com/voltrevo/mpc-framework
- Explore webGPU in `snarkjs`
- Though mobile native is faster than `snarkjs`, we can still figure out how to speed up browser proving for some applications (e.g. zkEmail)
- ZPrize winners
- some examples: https://github.com/sampritipanda/msm-webgpu
### 6-12 Months
- **Milestones**
- Start working on new projects integration
- (list above)
- Integrate GPU research result, integrate client-side friendly proving system
- GPU research result: https://github.com/zkmopro/gpu-acceleration
The second grant will be finished in 2025 Apr or May
- Client side proving research will be started in PSE soon
### 12+ Months
- **Milestones**
- New proving system will appear and we can try to integrate them
Or new FHE, MPC frameworks we can integrate in mopro
Or start building new applications
- Besides web browser, mobile native, there is also platforms for gaming
e.g. C# in Unity
Then we can build desktop games, console games on Nintendo Switch, PS5,...
- We can start looking for collaboration outside PSE team
e.g. building a daily used app (e.g. farcaster, daimo, luma,...)
---
# Additional Content
## Past Reflection (if applicable)
*Please share highlights, wins, **challenges**, or major items shipped over the past 6 months.*
- Mopro tool itself is not enough for developers to build mobile apps. Currently it only works for apps that *only* execute proving e.g. Proof of passport, Anon Aadhaar, Myna Wallet. But for applications like Semaphore, ZuPass, it depends on many typescript/javascript packages. So it is not easy for them building mobile apps. Therefore, I think we should focus on the whole mobile native **ecosystem** instead of only focusing on mopro tools.
- We need to keep in touch with projects that want to build mobile apps.
1. know the challenges they face
2. what we can build for them
- The current Mopro CLI tool is quite complete ane useful
Please check this: https://hackmd.io/@vivi432/2024-tbw-mopro-workshop
And now it can also build for browser (WASM bindings)
It is a super powerful tool for devs to build apps cross different platforms
They can easily import rust crates, and define the function API, and the functions can be used in iOS/Android/web browsers
## Specification:
*Are you working on a specification? Please link it below.*
*If you want help/guidance for writing a specification, AnonAadhaar did an example specification here:* https://github.com/zkspecs/zkspecs/tree/main/specs/2
## **Resource requirements**
*As best as you’re able, please anticipate any additional needs for your project.*
- What support do you expect to need from bridge teams ([PSE Core Group](https://www.notion.so/PSE-Core-Group-15ad57e8dd7e80539bf7fa3ddf8651ec?pvs=21))?
- Need help from coordinator to find PSE internal collaboration
- Need help from Devrel to promote or outreach projects
- Need help from ops to hire or look for mobile developer
- Travel or events you plan to attend (unique to your team) and why
- Some ETHGlobal events to let users integrate with mopro and getting feadbacks
- ETHGlobal Taipei Apr 4th-Apr 6th (Vivi & Alex is based here)
- ETHGlobal Cannes Jul 4th-Jul 6th (Could be the bigest hackathon event in this period)
- *TODO: find mobile dev hackathons*
- Cloud or other infrastructure costs
- Any other expenses