Getting Started with the SIEVE IR

Written: , Published: , Author: Kimberlee Model, Tags: WizToolKit, SIEVE IR, EMP, outdated,


By now, you’ve read up on the SIEVE IR, you’re interested in ZK, and you’re ready to try it out the IR, but you’re not sure where to start. For a ZK frontend, the IR opens up a world of backends, while for a backend it enables a wide variety of users to leverage your backend. Well, here’s where to start: Team Wizkit has open sourced WizToolKit a collection of tools and libraries for working with the IR and EMP-IR a ZK Backend which uses the IR.

For a ZK backend, a good place to start is with WizToolKit’s BOLT API. BOLT is a callback-based API for handling ZK gates interpreted from the IR. By implementing BOLT’s callbacks, your ZK Backend can easily and performantly ingest the SIEVE IR. To get started check out our tutorials for using BOLT and for parsing the IR.

For both frontends and backends, we have tools and demos to help you get started working the IR.

  • wtk-firealarm can help you test and debug your IR circuits before you prove them in ZK. Its trace modes (-t or -T flags) can also help you sanity check when you’re struggling to debug your own ZK backends by printing out correct values for each wire in a circuit.

  • wtk-press can convert between the IR’s text and binary formats. It can also convert the IR’s @switch statements into multiplexer sub circuits — eliminating a large chunk of complexity for a backend.

  • wtk-viz can convert an IR relation into a GraphViz graph so that you can visualize your circuits.

  • The matrix product python script can generate samples of the IR using various primes, test case sizes, and can switch between using loops or IR-Simple. Use these circuits to test and benchmark your backend and check out the source code for a demonstration of generating the IR.

  • Lastly, the EMP-IR is a ZK backend ready for use with the IR. Test it out, or integrate it into your product.

If the IR and our tooling sufficiently interests you, and you haven’t clicked away already then your best starting point is the WizToolKit install guide or the EMP-IR install guide.

This research was developed with funding from the Defense Advanced Research Projects Agency (DARPA) under Contract No. HR001120C0087. The views, opinions, and/or findings expressed are those of the author(s) and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government.