Z-Chain Proof Aggregation Authority
Z-Chain rolls N per-validator ML-DSA signatures into one 192-byte proof for the cert lane, registers every accepted verifying key under one Merkle root that the round descriptor carries, and runs the Poseidon2 commitment-tree privacy lane on the same commitment
Abstract
Z-Chain is the proof aggregation authority. It owns three responsibilities,
all rooted in the same chain commitment zchain_vk_root[32] carried in the
QuasarRoundDescriptor:
- The
MLDSAGroth16cert-lane rollup — the third Quasar cert lane. Z-Chain produces a single Groth16 proof attesting "N valid ML-DSA-65 signatures oversubjectfrom this validator set", replacing per-validator ML-DSA verification on the consensus path. - A general-purpose verifying-key registry — Halo2, Plonky2, Risc0,
STARK, and future proof systems register their verifying keys under
zchain_vk_root. Any C-Chain contract can call a Z-Chain precompile to verify a proof against a registered key. - The UTXO privacy lane — Poseidon2 commitment trees with STARK proofs for shielded transfers.
zchain_vk_root is the single Merkle root committing to every verifying key
Z-Chain accepts in the active epoch — both the cert-lane key and the
registered application keys.
Z-Chain itself is LP-8000; the shielded pool is LP-8010; the strict post-quantum identity rollup is LP-8030.
The MLDSAGroth16 cert-lane rollup
Why a rollup and not a threshold scheme
Threshold ML-DSA has no FIPS standard: research constructions hit a
rejection-sampling circular dependency
(~/work/lux/proofs/quasar-cert-soundness.tex, appendix A). This lane
therefore takes the non-threshold path:
- Each validator individually signs
certificate_subjectwith its ML-DSA-65 identity key (LP-4400). - The proposer ships those N raw ML-DSA signatures off-chain to a Z-Chain prover.
- Z-Chain produces a single 192-byte Groth16 proof over BLS12-381
attesting "N valid ML-DSA-65 signatures over
subjectfrom validator setV", whereVis defined bypchain_validator_root. - The cert ingress carries the proof plus a 32-byte public-inputs hash — not the N raw ML-DSA shares.
- The GPU verifier (LP-5622
drain_cert_lane) runs one Groth16 pairing check per cert.
Wire shape
struct MLDSAGroth16Artifact {
uint8_t proof[192]; // Groth16 proof over BLS12-381
uint8_t public_inputs_hash[32]; // bound to subject + validator set root
};
Public inputs include:
certificate_subject[32]— must equalQuasarRoundDescriptor.certificate_subjectpchain_validator_root[32]— defines the eligible signer setvalidator_bitmap_hash[32]— commitment to which validators contributedn_signers— the N count, which must clear the threshold
The verifier
verify_mldsa_groth16(subject, proof, public_inputs_hash, zchain_vk_root)
selects the active verifying key from zchain_vk_root at the round's epoch.
Costs
| Operation | CPU | GPU (MLX / Metal / CUDA) |
|---|---|---|
| ML-DSA-65 sign (per validator) | 495 µs | — |
| ML-DSA-65 verify (per validator) | 181 µs | — |
| Z-Chain Groth16 prove (n=21 validators) | ~400 ms | ~5–15 ms |
| Groth16 verify (cert side) | 1–3 ms | 200–500 µs (batched) |
| Per-cert amortized verify (n=21) | 2–5 ms | 200–500 µs |
A linear N×ML-DSA verification at n=21 would cost about 3.8 ms per cert. The rollup is comparable on CPU and dominates on GPU — which is the whole reason the lane exists.
Verifying-key rotation
The MLDSAGroth16 proving system has its own verifying key. Rotation
requires:
- an off-chain trusted-setup ceremony — Powers of Tau plus a
circuit-specific phase 2, with existing ceremony artifacts at
~/work/lux/proofs/groth16-setup/; - registration of the new key into Z-Chain via
RegisterVKTx; zchain_vk_rootupdating at the next epoch boundary;- rounds beyond the boundary verifying against the new key, while older
rounds remain verifiable against the prior key, anchored in their epoch's
zchain_vk_root.
The verifying-key registry
Z-Chain accepts any proof system whose verifying key is registered. The
registry is a sparse Merkle tree keyed by vk_id:
zchain_vk_root = MerkleRoot(vk_id → VKEntry)
struct VKEntry {
uint32_t proof_system; ///< 0=Groth16, 1=Halo2, 2=Plonky2,
///< 3=Risc0, 4=STARK, 5+=reserved
uint32_t curve_id; ///< 0=BLS12-381, 1=BN254, 2=Pasta, ...
uint8_t vk_hash[32]; ///< hash of the VK bytes
uint64_t vk_offset; ///< byte offset into vk_arena
uint64_t vk_len; ///< VK byte length
uint64_t epoch_active; ///< first epoch this VK is accepted
uint64_t epoch_retired; ///< 0 = active; otherwise last accepting epoch
uint64_t fee_per_verify; ///< gas cost on the C-Chain verify precompile
};
Registered systems at genesis
| Proof system | Curve | Use case | Verify cost (cert side) |
|---|---|---|---|
| Groth16 | BLS12-381 | MLDSAGroth16 cert lane | 1–3 ms CPU / 200–500 µs GPU |
| Halo2 | Pasta (Pallas / Vesta) | recursive proofs, no trusted setup | 5–10 ms CPU |
| Plonky2 | Goldilocks | fast prover, FRI-based | 3–8 ms CPU |
| Risc0 | BN254 wrapped to Groth16 | RISC-V program proofs | 1–3 ms CPU after wrap |
| STARK | binary fields | the UTXO privacy lane | 5–15 ms CPU |
New systems append; the registry never reorders.
The C-Chain verify precompile
A C-Chain contract verifies a proof by calling Z-Chain's verify precompile
with vk_id, the proof, and the public inputs. The precompile resolves
vk_id against zchain_vk_root in the current QuasarRoundDescriptor,
selects the verifier for proof_system, runs the verification, and returns
1 for valid or 0 for invalid — reverting only on malformed input.
interface ZChainVerify {
function verify(
bytes32 vk_id,
bytes calldata proof,
bytes calldata public_inputs
) external view returns (bool);
}
Gas cost is VKEntry.fee_per_verify, set per key at registration.
Registration transaction
struct RegisterVKTx {
uint32_t proof_system;
uint32_t curve_id;
uint8_t vk_bytes[]; // serialized VK
uint64_t fee_per_verify;
uint64_t epoch_active;
Sig governance_sig; // multi-sig
};
Registration requires a governance signature (LP-0085) and a trusted-setup attestation if the proof system requires one — Groth16 does; Halo2, Plonky2, Risc0, and STARK do not.
The UTXO privacy lane
UTXO model
Each unspent output is a leaf in a Poseidon2 Merkle tree (LP-4350):
commitment = Poseidon2(value || owner_pubkey || blinding_factor)
The root is stored on-chain. Individual commitments reveal nothing about value or owner.
Transaction structure
| Field | Description |
|---|---|
nullifiers[] | Poseidon2 hash of spent input commitments; prevents double spend |
commitments[] | New output commitments |
proof | STARK proof of validity |
root | Merkle root at proof-generation time |
STARK circuit
The prover demonstrates, without revealing inputs, that:
- each nullifier corresponds to a commitment in the Merkle tree;
- the prover knows the preimage — value, owner pubkey, blinding factor — for each input;
- the sum of input values equals the sum of output values plus fee;
- each output commitment is correctly formed.
STARK proofs are used for transparency — no trusted setup — and post-quantum
resistance. The STARK verifying key is registered in zchain_vk_root under
proof_system = 4.
Nullifier tracking
A nullifier set is maintained on-chain. Each nullifier can appear once; submitting a duplicate reverts the transaction.
nullifier = Poseidon2(commitment || spending_key)
Performance
| Metric | Value |
|---|---|
| Proof generation (2-in, 2-out) | 1.2 s |
| Proof verification (on-chain) | 180,000 gas |
| Merkle tree depth | 32 (supports 4B UTXOs) |
| Nullifier set | append-only sparse Merkle tree |
Replay-proof binding
Every Z-Chain artifact — cert-lane proof, application proof, UTXO nullifier
inclusion — inherits the replay-proof property: proofs bind
certificate_subject, which in turn binds
pchain_validator_root || qchain_ceremony_root || zchain_vk_root plus the
parent block, state, and execution roots. A proof for round R is structurally
invalid in round R+1 even if the public inputs would otherwise admit a replay,
because the verifying-key lookup itself fails when zchain_vk_root differs.
Security Considerations
- Trusted-setup discipline. Groth16 verifying keys, including the
cert-lane key, require a trusted setup. Lux uses a Powers of Tau ceremony
archived under
~/work/lux/proofs/groth16-setup/with more than 50 contributors. A key lacking a setup attestation MUST be rejected byRegisterVKTx. - Blinding factors must be cryptographically random. Reuse leaks value correlation in the privacy lane.
- Recent-root requirement. The Merkle root used in a UTXO proof must be within 256 blocks of the round's commitment, which bounds timing attacks.
- STARK proofs provide 128-bit security with post-quantum resistance.
MLDSAGroth16soundness rests on Groth16 over BLS12-381 — classical security around 128 bits — AND on the underlying ML-DSA-65, at NIST PQ level 3. Compromise of either breaks this lane. That is acceptable because Quasar runs three lanes and any one suffices for finality if the others fail. It also means this lane is classically bounded: a deployment running the strict post-quantum profile forbids pairings on the wire and uses the P3Q lane (LP-8030) instead.- Verifying-key rotation is atomic. Rotation lands at epoch boundaries. A
round straddling the boundary uses the prior epoch's key, enforced by
selecting
zchain_vk_rootfrom the round's descriptor rather than from a global pointer. - No trusted setup for application keys. Halo2, Plonky2, Risc0, and STARK need no trusted setup, so their keys are registrable without setup attestations.
Reference
| Resource | Location |
|---|---|
| Z-Chain VM | github.com/luxfi/zvm/ |
| Poseidon2 implementation | github.com/luxfi/crypto/poseidon2/ |
| STARK prover | github.com/luxfi/crypto/stark/ |
| Groth16 cert-lane prover | github.com/luxfi/zchain/groth16/ |
| Halo2 verifier | github.com/luxfi/zchain/halo2/ |
| Plonky2 verifier | github.com/luxfi/zchain/plonky2/ |
| Risc0 verifier | github.com/luxfi/zchain/risc0/ |
| Trusted-setup ceremony | ~/work/lux/proofs/groth16-setup/ |
| Cert-lane verifier wiring | LP-5622 |
| Cert subject and its binding | LP-0122 |
| Chain topology | LP-1340 |
Copyright
Copyright and related rights waived via CC0.