Molly Cantillon
    • 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
    # Building a Zero Knowledge Proving Marketplace with Folding Schemes > Molly Cantillon [ToC] Zero Knowledge Succinct Non-Interactive Arguments of Knowledge (zk-SNARKs) are a powerful cryptographic primitive enabling one party to prove a certain statement to another party without revealing any information about the input or intermediate steps. zk-SNARKs possess an inherent succinctness, generating concise and easily verifiable proofs. Additionally, their non-interactive nature enables verifiers to authenticate these proofs without any involvement from the prover. As the feasibility of zk-SNARKs continues to expand, their prominence in discussions surrounding privacy and scalability is only set to soar. However, despite their remarkable potential, a noteworthy obstacle persists: the arduous and costly challenge of proof generation. Limitations in computational resources hinder the widespread adoption of zk-SNARKS. It is imperative to find ways to reduce the computational cost and improve efficiency of the prover. This is where the motivation for Incrementally Verifiable Computation arises, offering a promising solution to overcome the challenge. ### Incrementally Verifiable Computation (IVC) Incrementally Verifiable Computation (IVC) is a technique that enables, in theory, infinite computation to be run on a machine. In addition to demonstrating the integrity of a machine's execution by providing proofs of correctness at each step, it provides evidence that all preceding steps have been properly executed. Compared to traditional proving methods, IVC presents several advantages. IVC does not require static bounds on loop iterations, which is necessary for computations that require dynamic control flow. It minimizes memory overhead by only requiring space proportional to each step, which eliminates the need for storing the entire computation trace. IVC streamlines the process for parallel proof generation, enabling faster and more efficient computation. To recursively prove the correct execution of incremental computations, the prover takes an input $z_i$, along with some extra witness $w_i$, and applies a step computation $F$ to generate an output where $F^{i}(z_0) = z_i$. For each incremental step i, the prover uses a SNARK to construct a proof $\pi_i$ that demonstrates two things: (1) that it has applied $F$ correctly to the output of the previous step, i - 1, and (2) that the SNARK verifier has accepted the SNARK from i - 1. ** I'm not great at UML, will have to do a better job with the diagram ** ![](https://hackmd.io/_uploads/BkxSLf-P2.png =400x) ##### One step of IVC ```sequence Prover->Verifier: Step computation F, input x, & witness w Note right of Verifier: Verifier receives input Prover->Verifier: Apply F^i(x_0) to get x_i Note right of Verifier: Verifier checks computation Prover->Verifier: Construct SNARK proof π_i Note right of Verifier: Verifier checks proof ``` In this system, at each step, the prover needs to call a universal circuit as well as the verifier circuit, which makes the cost of proving this program proportional to the size of the universal circuit, impossibly large in some cases. To overcome this high cost, Nova introduces **folding schemes**, IVC for a single instruction. They recursive folds together N circuit instances into one. In more detail, they aggregate SNARKs by combining random linear combinations of witness vectors. This approach enables the verification of multiple incremental computations through a single proof. Folding schemes offer significant benefits: the verifier circuit remains of constant size, and the prover's workload is optimized. Generalizing Nova's high-speed recursive proof system, SuperNova implements folding schemes for non-uniform IVC. SuperNova enables parallel running instances for each function, which helps to further reduce the proving cost by allowing multiple steps to be proved simultaneously. Supernova handles a number of arbitrary polynomial-time functions $(F_1 .... F_n)$, where the choice of which function is executed, $F_i$ where $i \in [n]$, is determined by a selector function ϕ that chooses the instruction to execute at each step in the incremental computation. Thus, there exists witnesses $(w_0, ..., w_{i-1})$ such that: $$ z_{j+1} ← F_{ϕ(z_i, w_i)}(z_i, w_i) $$ SuperNova empowers the proof of universal machine executions without relying on universal circuits, using relaxed-committed R1CS, its significance lies in its support for machines with rich instruction sets. With Supernova, there can be N parallelized running instances for each function, which all fold together into the current steps' proof. So, how can IVC, Folding Schemes, Nova, and SuperNova, solve the problem of expensive zk-SNARK proving? ### Delegation of Computation As A Service As mentioned, the heavy computational resources required to prove zk-SNARK statements is unrealistic. Folding schemes serve as a solution to amortize the proving cost across multiple proofs of independent and unrelated statements. Now, instead of having to generate seperate computations for each statement, the prover only needs to produce a proof for one singular verifiable proof. Using a property called selective verification introduced by Ràfols and Zacharakis [CITE], the prover aggregates statements coming from multiple different parties and is able to provide evidence that a specific statement was considered in constructing the final aggregated statement. Importantly, the proofs remain sublinear in the number of aggregated statements, making selective verification a powerful tool for validating individual statements without needing knowledge of the entire aggregation process. In scenarios of computation delegation, the key value lies in deriving a single proof $\pi$ that enables the validation of multiple verifiers' proofs in a trustless manner. This becomes especially relevant when a prover outsources its computational resources to verifiers who require performing diverse, arbitrary computations. By consolidating these proofs into a single proof and verifying numerous computations in one singular job, proof generation becomes more efficient and reliable. ### Trees for Efficient Aggregation To efficiently aggregate SNARK proofs and reduce the proving time, we can employ the hierarchical data structure of a **statement aggregation tree**. With the use of a tree, the proof generation becomes logarithmic in the number of aggregated statements, significantly reducing computational resources for proof generation. Starting from the leaf nodes, where each leaf represents a distinct statement, we iteratively fold the leaf nodes to form their parent nodes. As we ascend the tree, pairs of parent nodes are again folded into higher-level parent nodes until a single root node is generated, which holds the final folded proof aggregating information from all the $2^k-1$ leaves. We build on the approach derived from Ràfols and Zacharakis to bootstrap any 2-instance folding scheme to a N-instance folding scheme. ** Replace this with own tree diagram ** ![](https://hackmd.io/_uploads/H1nlEXZw3.png =500x) This technique takes advantage of the incremental folding that we mentioned earlier in the context of SuperNova, as it propagates upwards through the tree and combines information from multiple statements at each level. The tree structure not only reduces the overhead of generating proofs but it also provides a natural parallelization mechanism for efficient verifications. By examining the proofs only pertaining to the relevant subtree, a verifier can selectively verify a specific aggregated statement without needing to validate the entire tree. This selective verification further improves the efficiency of the system by reducing the burden on the verifier and enabling rapid validations for individual statements, paving the way for formation of a marketplace. ### Construction of the Marketplace In order for a marketplace to exist and flourish, there must be a well-aligned incentive structure that drives demand and supply. In the context of zk-proof generation, this involves provers who offer computation services and verifiers seeking secure, trustless verification for various computations. Both parties, ranging from hobbyist gamers with idle GPU resources to smart contract developers looking to save gas on verification, must converge. This enables individuals from around the world to bring their unique statements to be proven in an efficient, secure, and accessible manner. The follwing architecture may further illuminate this proposal. Alice and Bob, as arbitrary verifiers, bring their statements to the marketplace to get their proofs generated. The market prover takes their public input, $z_i$ as well as their respective private input $w_i$ (which is omitted here for notational simplicity), and collapses the statements into one aggregate statement. This is done by inserting their statements as leaves in a statement aggregation tree and folding the tree upward to generate a single, compressed proof $\pi$ at the root. The marketplace prover then shares this proof with Alice and Bob, along with any additional data needed for selective verification. By participating in the marketplace, Alice and Bob can offload the computational burden of generating their respective zk-SNARK proofs onto the prover, who aggregates and optimizes the proof generation through the use of folding schemes and a tree structure. This arrangement benefits both parties: Alice and Bob save computational cost and time, while the prover is compensated for their services through fees or other incentives. The marketplace thus serves as a digital forum that connects parties in need of zk-proof generation with those who can efficiently generate the proofs. As the utilization of zk-SNARKs grows in the areas of privacy and scalability, a thriving marketplace will become an essential infrastructure for the widespread adoption of this powerful cryptographic primitive. ![](https://hackmd.io/_uploads/Bk416RZPn.png =500x) ## Extensions A different approach: Collaborative zk-SNARK Proving to split work among N provers who jointly produce a single proof over the distributed witness ## References [TODO] Nova - https://eprint.iacr.org/2021/370.pdf SuperNova - https://eprint.iacr.org/2022/1758.pdf?ref=hackernoon.com Folding Schemes with Selective Verification - https://eprint.iacr.org/2022/1576.pdf Nova-based ZKVM spec - https://hackmd.io/@monyverse/H1XSVmHNh Use this for further discussion? Protostar - https://eprint.iacr.org/2023/620.pdf Collaborative zk-SNARKs: https://www.usenix.org/system/files/sec22-ozdemir.pdf Room for more writing: More setting up defintions (ie commitment scheme, property definitions) R1CS Math for this type of computation Analysis on security with overcoming adversaries

    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