# Recursion in Gen 1.0 and Gen 2.0 VMs

Most VMs for validity roll-ups today employ recursion as a means to accelerate proof computations. Recursions enable a parallel prover architecture, where a system of provers forms a binary tree, and each prover node computes proofs attesting to the correctness of the proofs generated by its children. The proof computed by the prover acting as the root node attests to the correctness of the proofs computed by all the leaf nodes. Such a recursive architecture affords massive parallelism but in a Gen 1.0 VM, is limited by the tradeoff between algebraic and non-algebraic hashes. The overheads to computing proofs corresponding to algebraic hashes in a Gen 1.0 VM are significantly lower but computing an algebraic hash like Poseidon on off-the-shelf hardware is at least 100x slower compared to computing a non-algebraic hash like Keccak. Since hash computations are such a central part of SNARKs, this reduces the overall proof computation times at each layer when employed using a Gen 1.0 VM. In the context of Gen 2 VM, such a recursive architecture can be effectively employed using a non-algebraic hash like Keccak, offering massive speed gains.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://arithmic-labs.gitbook.io/arithmic-documentation/gen-1.0-gen-2.0-vms-and-staking/recursion-in-gen-1.0-and-gen-2.0-vms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
