Skip to main content

Wrap Proof

Re-encodes an existing STARK (VADCOP) proof into a smaller STARK proof or a PLONK proof for on-chain verification. Covers the input, proving-key, output, and performance flags and the resulting proof formats.

Generate a PLONK or minimal-STARK proof from an existing STARK (VADCOP) proof. wrap takes a previously generated full STARK proof file and re-encodes it into a smaller or differently-shaped proof.

cargo-zisk wrap --proof <PROOF> [OPTIONS]

Inputs

FlagShortDefaultDescription
--proof <PROOF>-prequiredPath to the STARK (VADCOP) proof file to wrap.

Proving Keys

Reuse a precomputed key instead of pulling the one at the default location. Pick the right flag for the proof type you intend to generate.

FlagShortDefaultDescription
--proving-key <PROVING_KEY>-kcached keyPath to a precomputed STARK proving key.
--proving-key-plonk <PROVING_KEY_PLONK>-wcached keyPath to a precomputed PLONK proving key. Only consulted when --plonk is set.

Proof Output

Where the wrapped proof is written and what shape it takes.

FlagShortDefaultDescription
--output <OUTPUT>-oFile path the wrapped proof is written to.
--minimal-cfalseWrap into a smaller STARK proof. Mutually exclusive with --plonk.
--plonkfalseWrap into a PLONK proof, required for on-chain verification via the EVM verifier. Mutually exclusive with --minimal.

Performance

FlagShortDefaultDescription
--gpu-gfalseUse GPU acceleration during the wrapping step. Requires a supported CUDA GPU.

Diagnostics

FlagShortDefaultDescription
--verbose-voffIncrease output verbosity. Pass -v for info, -vv for debug-level detail.

Examples

Wrap a STARK proof into a PLONK proof for on-chain verification:

cargo-zisk wrap --proof ./proofs/proof.bin --plonk --output ./proofs/proof.plonk

Wrap into a smaller STARK proof (slower to produce, smaller artifact):

cargo-zisk wrap --proof ./proofs/proof.bin --minimal --output ./proofs/proof.min

Wrap on a GPU using non-default proving keys:

cargo-zisk wrap \
--proof ./proofs/proof.bin \
--plonk \
--proving-key-plonk ./keys/my-plonk-pk \
--gpu \
--output ./proofs/proof.plonk

Outputs

Writes the wrapped proof to the path specified by --output. The exact format depends on the type flag:

  • --minimal — a compact STARK proof with the same verification semantics as the original VADCOP proof.
  • --plonk — a PLONK proof verifiable by an EVM verifier contract.