Published on: 2019-02-01T17:56:49+00:00
ZkVM is a blockchain virtual machine that offers multi-asset transfers and zero-knowledge programmable constraints. It introduces the concept of Predicate Trees, which are a variant of Taproot and G'root. The Predicate Tree is represented by a single group element and can be satisfied in multiple ways, unlocking its contents. ZkVM provides four instructions to use the predicate trees: signtx, call, left/right, and delegate.The signtx instruction verifies the signature over the transaction ID, treating the predicate as a public key. The call instruction reveals and executes a pre-arranged program, while the delegate instruction allows choosing the program later, which can be signed with a pre-arranged public key. The left and right instructions replace the contract's predicate with one of the sub-predicates in a disjunction.To optimize performance, ZkVM defers all point operations, including signature checks, disjunction proofs, and program commitment proofs. These deferred operations are verified in a batch after the VM execution is complete, resulting in significant savings. Additionally, ZkVM uses a single aggregated signature for the entire transaction instead of accepting individual signatures.One notable feature of ZkVM is the absence of dynamic branching based on expensive operation outcomes. Signature checks and predicate tree traversals must unconditionally succeed, making program execution (excluding ECC ops) fast and proportional to the program length. This approach provides an accurate measurement of the validation cost based on the collected ECC ops and the constraint system proof blob included with the transaction.It's worth mentioning that the upstream protocol, also known as "blockchain rules," can impose soft or hard caps on program length and the number of ECC operations. This limitation is similar to the restriction on signature checks per block in Bitcoin. Overall, ZkVM offers a powerful and efficient solution for executing transactions with programmable constraints in a blockchain environment.
Updated on: 2023-08-02T00:26:42.501283+00:00