CoBBL: Dynamic Constraint Generation for SNARKs
Kunming Jiang, Fraser Brown, Riad S. Wahby
Abstract
General-purpose probabilistic proof systems operate on programs expressed as systems of arithmetic constraints-an unfriendly representation. There are two broad approaches in the literature to turning friendlier, high-level programs into constraints suitable for proof systems: direct translation and CPU emulation. Direct translators compile a program into highly optimized constraints; unfortunately, this process requires expressing all possible paths through the program, which results in compile times that scale with the program's runtime rather than its size. In addition, the prover must pay the cost of every possible program path, even those untaken by a given input. In contrast, CPU emulators don't compile programs to constraints; instead, they “execute” those programs, expressed as CPU instructions, on a CPU emulator that is itself expressed as constraints. As a result, this approach can't perform powerful, program-specific optimizations, and may require thousands of constraints where direct translation could use a clever handful. Worse, CPU emulators inherit an impractically expensive program state representation from the CPUs they emulate. This paper presents a compiler and proof system, CoBBL, that combines the benefits of CPU emulation and direct translation: it takes advantage of program-specific optimizations, but doesn't pay for an unnecessary state representation or unexecuted computation. CoBBL outperforms CirC, a state-of-the-art direct translator, by 1-30× on compile time and 26–350 ×on prover time, and outperforms Jolt, a state-of-the-art CPU emulator, on prover time by 1.1-1.8× on Jolt-friendly benchmarks, and up to 100× on other benchmarks.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext c17f753e-73fc-4f4d-8fa1-62c47cce804bCited by top-tier papers1
Ask how each one uses itBuilds on22
- Poseidon: A New Hash Function for Zero-Knowledge Proof SystemsLorenzo Grassi, Dmitry Khovratovich, Christian Rechberger, Arnab Roy et al.USENIX Security 2021 · 410 citations
- Doubly-Efficient zkSNARKs Without Trusted SetupRiad S. Wahby, Ioanna Tzialla, Abhi Shelat, Justin Thaler et al.S&P 2018 · 356 citations
- Marlin: Preprocessing zkSNARKs with Universal and Updatable SRSAlessandro Chiesa, Yuncong Hu, Mary Maller, Pratyush Mishra et al.EUROCRYPT 2020 · 356 citations
- Spartan: Efficient and General-Purpose zkSNARKs Without Trusted SetupSrinath T. V. SettyCRYPTO 2020 · 262 citations
- Transparent SNARKs from DARK CompilersBenedikt Bünz, Ben Fisch, Alan SzepieniecEUROCRYPT 2020 · 240 citations
Related papers
- Less is more: refinement proofs for probabilistic proofsKunming Jiang, Devora Chait-Roth, Zachary DeStefano, Michael Walfish et al.S&P 2023
- CryptOpt: Verified Compilation with Randomized Program Search for Cryptographic PrimitivesJoel Kuepper, Andres Erbsen, Jason Gross, Owen Conoly et al.PLDI 2023 · 12 citations
- Hopping Proofs of Expectation-Based Properties: Applications to Skiplists and Security ProofsMartin Avanzini, Gilles Barthe, Benjamin Grégoire, Georg Moser et al.OOPSLA 2024 · 5 citations
- Formally Verified Samplers from Probabilistic Programs with Loops and ConditioningAlexander Bagnall, Gordon Stewart, Anindya BanerjeePLDI 2023 · 5 citations
- Tabby: A Synthesis-Aided Compiler for High-Performance Zero-Knowledge Proof CircuitsJunrui Liu, Jiaxin Song, Yanning Chen, Hanzhi Liu et al.OOPSLA 2025
