Oskar
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Mopro progress reports Document for progress reports on Mopro (Mobile Prover). Aiming to do check-ins ~every 2-4 weeks. (There's also a grant document to cross-check with but link is private). ## Feb 1 - Apr 15 Done (abbreviated) - Improve DevEx significantly with mopro-cli as main interface - Demo https://www.loom.com/share/6ff382b0497c47aea9d0ef8b6e790dd8 - Finish up MoPerf: https://hackmd.io/5ItB2D50QcavF18cWIrmfQ - Understand limits of client-side proving (4gb phone ~= 2m constraints np) - Derisked enough for resuming AAMO project - AAMO collab: https://hackmd.io/321WjevGRBWMSPYe6g7mcw - Also with Proof of Passport - Generally good feedback loops, RN support etc - Found unexpected blockers with witness gen and app store - Witness generation notes - See https://github.com/oskarth/mopro/issues/109 for context - Unable to get current dylib setup working for App Store upload - Should be possible, we just couldn't figure it out - Lead some teams to look for alt approach - Found alt slower approach that works (wasm3) - Non-trivial to integrate witnesscalc (C++) with current stack - Native witness gen in Rust turns out to only work for some circuits - Promising in terms of perf (much faster than witnesscalc) - But non-trivial to make complete => more work needed - Talks and workshops - ETHTaipei (Taipei) - Slides https://hackmd.io/@oskarth/S1yGjF8C6#/ - ZK Day workshop (Taipei) - ZK Summit (Athens) ## Dec 1 - Jan 31 - Done - Improve API and DevEx - Simplify config with TOML file; start of CLI interface - ark-zkey better integrated - Misc bug fixes and clean up - Outreach and talking to users - Term Structure and ZK Identity talk at Taipei Blockchain Week - Talk to teams to understand needs (ProofOfPassport, Myna, AA, etc) - Support GPU grantee work - Initial Android support and generate calldata (Vivian) - Shape up Anon-Aadhaar ZK-ID Showcase App (AAMA) - See https://hackmd.io/321WjevGRBWMSPYe6g7mcw?both= - After circuit increased from ~160k to 1700k constraints technical risk went up - We decided to pause this and derisk perf bottlenecks first before resuming - Start MoPerf project collab with AA to find limits of client side proving on mobile - See https://hackmd.io/5ItB2D50QcavF18cWIrmfQ?view= - Understand unknowns and derisk these (see [GH issues](https://github.com/oskarth/mopro/issues/57) for more details) - Good news: Able to run latest AA circuits on new iPhone and clear direction for most unknowns - Next - Finish up MoPerf project (clarity, perf, write-up) - Resume Anon-Aadhaar showcase app (see doc above re scope) - FYI - This is for Dec-Jan; took some time off in middle - Oskar off Feb 5 - 12; Vivian Feb 14 - 20 - Some lack of clarity re grant agreement ## Nov 6 - Nov 30 (3-4 weeks) - Done - ZKHack: RSA Verify and Anon-aadhaar on mobile together with Yanis from Anon-aadhaar - [devfolio pres link](https://devfolio.co/projects/two-and-a-half-zk-pocketaadhaar-and-pocketkimchi-a8a6) ~6.5s (~5s witness gen, ~2s prover time); x10 faster vs browser on phone - PoC of new proof system; (Kimchi, Plonkish) to show ease of integrating new proof systems - RSA verify (zk email circuits) benchmark - arkzkey: zkey bottleneck; sped up by x10 with custom arkzkey format to ~10s; also 50% file size - ProgCrypto presentation: [slides](https://docs.google.com/presentation/d/1afIEgm8oYRvteWxUd04CcMOxChAiHaD55d5AKd0RkvY/edit#slide=id.g29a7b1abf9b_1_543) - Planning at Devconnect: https://hackmd.io/@oskarth/mopro-devconnect - Consider milestone 3 done (will turn talk into write-up too) - Next - Improve API and DevEx - More robust API - mopro CLI interface - Docs and tutorials - General clean up - Improve performance: Address bottlenecks mentioned in presentation - Integrate arkzkey and try to improve further - Experiment with native witness generation - Android support - Write-up - FYI - Quite a lot in next; milestone 4 cleanup before EOY - Oskar will take a bit of time off during holidays then continue in Jan - After milestone 4 inital grant finished, but we decided to continue grant, just less rigid milestones ## Oct 9 - Nov 6 (4 weeks) - Done - Got it working on real device - Lots of debugging related to witness generator wasmer memory restrictions problem; patched wasmer page size bug - Lots of experimentation with dylib to pre-load resources, etc - On modern iPhone (14 Pro Max), Keccak proof generation takes ~1.5s (~x20 vs comparable browser? see last note) - DevEx work to make it easier to use and contribute to - Onboarding second developer (Vivian), who helped with a bunch of DevExp work - Improve scripts, tests, configs, CI, separating out examples, etc - Generally making it easier for someone to run and use - Library maturity: zkey experimentation - Moving from doing in-line setup and .r1cs file to using zkey - Works but (i) Too slow for big circuits (ii) Some API changes needed - Experimentation with improving zkey loading/serializing, but not performant enough yet for e.g. Keccak - Wrote up several issues related to future work - GPU plan of attack: https://github.com/oskarth/mopro/issues/22 + subissues re micro benchmarking, etc - Many others here: https://github.com/oskarth/mopro/issues - related to different platforms, proof systems, setup/zkey, DevEx, RSA example, etc - Next - Disseminate work done so far, give talk at ProgCrypto and involve others - Fix zkey loading performance (proving key loading slow) and adjust API - RSA example - Blockers/FYI - Blocker: Zkey loading too slow for Keccak256, >1m - Some experimental work [here](https://github.com/oskarth/mopro/pull/26) - FYI: Adjusting milestone 2 scope and considering it done - Working on real device took longer than expected - Less GPU focus for now (clear next steps), esp with x20 perf boost; revisit later - Decided to focus more on DevEx to get tighter feedback loop and early usage ## Sep 18 - Oct 9 (3 weeks) - Done - Milestone 1 and PoC finished - Went from doing everything in Rust to exposing API for inputs/setup/prove/verify - Using a more involved circuit (Keccak256) - Open sourced repo [here](https://github.com/oskarth/mopro) (not publicly announced just yet) - Example app with basic Keccak proof and preliminary benchmark - iOS simulator on M1 MBP Keccak256 (150k constraints) ~1.2-1.3s - Comparable: ecdsa_verify 160k constraints ([link](https://github.com/personaelabs/efficient-zk-ecdsa#browser-proving)) in-browser ~35-40s - Preliminary results, need to run on real device and sanity check (see REQ below) - Demo of recent progress available [here](https://www.loom.com/share/1f36229c66534e16b5cf58abb5064add) - Next - Continue with benchmarking - Run app on real device - Do basic profiling (empirically identify bottlenecks) - Find comparable and reliable benchmarks to communicate perf diff with confidence - Improve API/UX for developers - Lots that can be done here, need to identify most low-hanging fruit - Depends on real-world demand (see REQ) - Continue GPU usage trial - Experiment with iOS GPU as a spike (likely requires quite a lot of new learning) - Experiment with Arkworks GPU usage on laptop - Revisit prior note and make plan of attack for incorporating recent advancements with GPU MSMs etc - Blockers/FYI/Requests - FYI: A lot of work spent on getting Rust/Swift to play nicely w.r.t. data types, serialization, error handling etc. This was identified as a risk in project scope, so good to get this done early. - REQ1: It would be useful to have a simple standard and up to date benchmark to compare with for in-browser proving, e.g. with ECDSA/RSA/Keccak. I can set this up myself but if there are any good existing canonical ones it'd be better to use that, as opposed to doing a side quest for messaging around with JS/Web ZK env. - REQ2: Prioritization regarding e.g. GPU vs API DevEx; if we have x20 perf improvement already it might be worth making it easier for Zupass/Aadhaard and similar projects to use at Devconnect. - REQ3: Contact for Circom/Polygon person also looking into mobile proving; any other person you think I should talk to, especially early users. - REQ4: I think it'd be useful to have mopro as a hacking target during Devconnect, either in terms of apps using it or improving tool. Any ideas for how to make this happen would be appreciated! ## Sep 4 - Sep 16 - Done - Library architecture illustration of how things fit together, see drawing - Setup separate components/libs for `mopro-{core, ffi, ios}` in [mopro repo](https://github.com/oskarth/mopro) - Get Arkworks to work on iOS simulator (though still with some errors) with CocoaPod lib and UniFFI Swift bindings - Evaluate easiest proof system/tooling for e2e, decide on circom-compat to start with but keeping it modular - Next - Expand PoC to make basic API (not just example but separate setup/prove/verify bindings), deal with errors etc; make tiny example app with buttons; use non-trivial circuit - Start to scope GPU work - Blockers/FYIs - No real blockers - FYI1: Keeping repo private for now until e2e works nicely, will open source soon but can add people if interest - FYI2: Toolchain/scripting needs work in terms of updating static libs in iOS, working on real device and working nicely for diffeent architectures/environments (aarch64-apple-ios{,-sim}, x86_64-apple-ios different libs libs) - leaving this for now to get e2e nice ### Artifacts Code: [mopro repo](https://github.com/oskarth/mopro) #### Architecture The following illustration shows how mopro and its components fit together into the wider ZKP ecosystem: ![](https://hackmd.io/_uploads/SJFvoIHyp.png) Zooming in a bit: ![](https://hackmd.io/_uploads/B1TvoLBka.png) ## Aug 21 - Sep 1 - Done - Scope out initial work, write grant, milestones - Initial research to understand options better (performance problems, current way, tooling, mobile bindings) - Do PoC spike `rust-swift-spike` to get Rust working on iOS with UniFFI bindings - Next - Draw out library architecture and make illustration of how things fit together - Take spike and split into components; integrate Arkworks for e2e proving on mobile - Blockers/FYIs - No real blockers - FYI: A lot of fiddling with Xcode/iOS toolchain, refamiliarizing myself with ecosystem, opaque configs, different architectures for embedding libraries, linking issues etc - on the flip side this is good because shows mopro can solve a clear pain point

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully