STARK verification as a Transparent Zcash Extension (TZE), i.e enabler for a Starknet‑style L2 on Zcash
Hey ZCash fam, greeting from StarkWare. I am Abdel. I personally like the vibes of the ZCash community. Cyperpunk ethos and freedom tech is the way.
And privacy is normal and is a fundamental right. I am glad that the recent surge of interest on ZCash project has sparked a strong interest for privacy in the whole space. This is very relieving. I wanted to share a proposal to the community, as I believe that our tech can actually be complementary to ZCash. I think there are some cool options to explore together.
TL;DR
I’m proposing a Transparent Zcash Extension (TZE) that verifies a bounded‑size STARK proof within Zcash consensus. The intent is to make Zcash a credible base layer for a Starknet‑style L2: account abstraction, a Cairo VM execution environment (i.e., full programmability on L2), and high throughput with very low per‑tx L2 fees, while keeping L1 privacy exactly as it is today.
Concretely, this would define a TZE type “STARK_VERIFY” with two modes:
- Mode 1 — Stone (vanilla FRI STARK): a pinned Stone verifier/format (C++) with explicit parameter bounds.
- Mode 2 — Stwo (Circle STARK): a pinned Stwo verifier/format (Rust) with explicit parameter bounds. (Stwo is newer and faster, but not as battle tested as Stone.)
This is intentionally narrow: verify a proof + public inputs under strict limits; no changes to shielded pools, and no new scripting language. It plugs into the TZE framework (ZIP‑222), which already defines how to add new transparent preconditions and witnesses to transactions.
Dislaimer: I am working at StarkWare, the company building and operating Starknet. This is my own initiative and not instructed by my company. I believe it’s an interesting discussion to raise in the ZCash technical community. Also, before working on this proposal, I was actively working on an OP_STARK_VERIFY proposal for Bitcoin. Still planning to publish it, and the Bitcoin proposal work was prior to the current one.
Why Zcash community should consider this
- Programmability & scale live on L2, privacy stays on L1. Zcash already has strong base‑layer privacy. What it lacks is a general‑purpose execution environment and cheap throughput. A Starknet‑style L2 (Cairo VM) provides programmability and scale, while Zcash L1 keeps doing what it does best: finality and private custody.
- Clean integration surface. Using TZE avoids entangling this work with shielded protocols or Bitcoin‑style Script. ZIP‑222 was created precisely to add well‑specified “transparent preconditions” with consensus verification.
- Hash‑based, transparent assumptions. STARK verification relies mainly on the collision/preimage resistance of transcript/Merkle hashes and the soundness of the polynomial IOP; this is widely regarded as post‑quantum‑plausible (subject to the hash we pin).
- Reasonable verification cost & static pricing. STARK verification is polylogarithmic in trace size and dominated by hashing (Merkle/FRI). Proof sizes are typically few hundred kilobytes, i.e., heavier than pairing SNARKs (but with better scaling properties, quantum resistance, simpler cryptography and other advantages) but workable if bounded and priced by bytes.
What this enables (if adopted)
-
A Starknet‑style L2 on Zcash:
- Account abstraction via Cairo contracts;
- Turing‑complete VM & full expressivity on L2;
- High throughput and cheap L2 transactions;
- L1 enforces L2 state transitions by verifying STARK proofs that the L2 operator posts (or that rollup participants aggregate).
(This mirrors how Starknet posts proofs to L1; here the L1 would be Zcash.)
-
Programmable bridges and assets: Combine with future ZSA work to mint/burn L2‑tracked assets with L1 settlement, or to move value between shielded addresses and an L2 account space via well‑defined preconditions.
Proposal overview (TZE‑style, not an opcode)
This proposal defines a new TZE type
= STARK_VERIFY with two mode
s:
mode = 1
: Stone (vanilla FRI STARK) — pinned format/params.mode = 2
: Stwo (Circle STARK) — pinned format/params.
Per ZIP‑222, each TZE has a (type, mode)
and a precondition
(challenge) plus witness
(evidence). The consensus rule is: for each TZE input, run the extension’s tze_verify(mode, precondition, witness, context)
and it must return true
.
Precondition / witness layout (high‑level)
-
Precondition (prefix‑free encoding within this
(type, mode)
):verifier_id
(u16): selects a pinned parameter set (field(s), transcript/Merkle hash, FRI expansion, max queries, grinding bits cap, exact wire format version, endianness).pub_in
(byte string): public inputs to the statement being proved (e.g., current L2 state root, new state root, and commitments to any data required by the verifier).- Optionally a standard context digest (e.g., the transaction’s non‑malleable digest component per ZIP‑244/245) if we want to reduce authoring foot‑guns
-
Witness (prefix‑free):
proof
(byte string) in the pinned Stone or Stwo wire format, subject to strict size caps.
Determinism and non‑malleability of these encodings are the extension’s responsibility, per ZIP‑222: any malleation of precondition
must cause tze_verify
to reject; the verifier’s output must be deterministic.
Verification
tze_verify
for this (type, mode)
:
- Parses
verifier_id
; loads the exact pinned parameter set (includes hash choice, FRI/query bounds, etc.). - Initializes the proof transcript and absorbs
pub_in
exactly as specified. - Parses
proof
per pinned wire format and runs the Stone or Stwo verifier accordingly. - Returns
true
iff the proof verifies under the pinned params; otherwisefalse
.
Bounds & pricing (DoS safety and fee model)
PROOF_MAX_BYTES
(consensus): a conservative constant permode
and possibly perverifier_id
. Initial discussion ranges could be 64–256 KiB for Stone and ≤256 KiB-1MB for Stwo (subject to benchmarks on realistic traces).PUBIN_MAX_BYTES
(consensus): e.g., ≤ 32MB.- Runtime bound: implied by pinned FRI/query limits + hash choice + byte caps; parser must fail fast on malformed inputs and cap allocations.
- Fee signal: bytes (witness size). This mirrors how Zcash currently prices transaction bytes; we avoid introducing new “op‑count” style budgets unless needed.
- Policy (non‑consensus): start with strict mempool limits (e.g., at most one STARK_VERIFY input per transaction; tighter size limits under policy). These can relax as we gain operational experience.
Starknet‑style L2 sketch (informative, not part of this TZE spec)
- Bridge model: L1 TZE outputs carry a precondition that references the current L2 state root; L2 operator(s) post a STARK proof that a batch of L2 transactions moves state from
root_old
toroot_new
. The witness contains that proof; the precondition carries the public inputs (roots, batch commitments, etc.). - Data availability (DA): out of scope for this TZE. DA can be a) fully on‑chain (expensive), b) via commitment to an external DA layer, or c) hybrid. The precondition must make the DA commitment explicit if required by the verifier.
- Deposits/withdrawals: are protocols on top of this primitive, potentially combined with ZSAs to represent L2 balances on L1.
References / prior art
- ZIP‑222: Transparent Zcash Extensions (TZE)
- STARK paper: Scalable, transparent, and post-quantum secure computational integrity
- Circle STARKs paper: Circle STARKs
- Stone prover/verifier: GitHub - starkware-libs/stone-prover
- Stwo prover/verifier: GitHub - starkware-libs/stwo
- OP_CAT Circle STARK verifier: GitHub - Bitcoin-Wildlife-Sanctuary/bitcoin-circle-stark: Building blocks of a Circle STARK verifier in Bitcoin script
- M31 opcodes proposal: M31 arithmetic opcodes for efficient STARK verification on Bitcoin - HackMD
Next steps
- If there’s interest, I’ll draft a ZIP titled “STARK verification as a Transparent Zcash Extension” (Category: Consensus), cross‑referencing ZIP‑222/244/245.
- The ZIP will include: exact wire formats; pinned parameter sets for Stone and Stwo; consensus bounds; test vectors; and a plan for staged activation.