Skip to content

Run the Circle STARK classifier demo

The C1 reference publishes all nine actual proofs, every stage/per-proof time, machine details and raw logs. Its instrumented controller takes 302.96 s; older acceptance observations below retain their original commands and timing boundaries.

make e2e

The default trains the MLP and contextual byte CNN on frozen synthetic data, exports their exact integer graphs, builds the locked STWO prover and proof-only verifier, and proves the rule, MLP and CNN on three fixed requests. Nine real Circle STARK proofs are freshly verified. No GPU, API token, cloud account, pretrained checkpoint or hardware attestation is needed.

This command proves classifiers only. Use make e2e-llm for actual TinyLlama inference, or make e2e-composed to bind its 23 SASH proofs to three new Circle classifier proofs. See the architecture and proof statement.

Prerequisites

Requirement Supported path
Host Native Apple Silicon Mac (Darwin, arm64)
Tools Git, Make, uv 0.9.18, Rust nightly-2025-07-14
Python CPython 3.12.12, selected/acquired by uv
Network Initial locked Python/Rust dependencies; no external data or inference
Storage 12 GiB free plus dependency/build caches; stop below 8 GiB during proofs
Memory Up to 30 GiB sampled worker RSS; this is a stop condition, not an OS quota
Time Several minutes plus the first Rust build; the classifier controller is capped at two hours

With an existing Rust installation:

rustup toolchain install nightly-2025-07-14 --profile minimal
git clone https://github.com/AbdelStark/hallmark.git
cd hallmark
make e2e

The Make target prepares the locked Python training extra. The controller trains and screens the frozen models, checks both quantization hashes, and builds the prover and a verifier with the prover feature disabled. It pins source/binary bytes and independently admitted Circle enrollment before proving.

The full controller is Mac-only. make check-conformance is the smaller software-only path on either platform.

Flow and output

The classifier workflow: train, export, compile and enroll once; then build the witness, prove with STWO, verify in a fresh process and bind the result, nine times.

flowchart TD
    D[Frozen synthetic training data] --> T[Train and export exact integer MLP and CNN]
    T --> N[Native preparation and fixed model-hash checks]
    R[Literal byte rule] --> N
    N --> C[Compile gates and enroll public preprocessing]
    X[Three caller-owned requests] --> W[Build complete witnesses]
    C --> W
    W --> P[Nine STWO Circle STARK proofs]
    P --> V[Fresh proof-only verifier processes]
    X --> V
    V --> A[Check bindings, roster and all-pass verdicts]

Progress prints a fresh runs/e2e-circle-* directory and named log files:

Evidence: .../runs/e2e-circle-<unique-id>
Running mlp-training; log: ...
Running cnn-training; log: ...
Running circle-prove-build; log: ...
Running circle-verify-build; log: ...
Running circle-proofs
allow: generated rule proof
...
PASS: 9 Circle proofs freshly verified. Results: .../result.json

Nine proofs, nine verdicts: the allow request passes all three classifiers; the CNN blocks the contextual case; the rule blocks the BAD-prefixed case. Every proof verifies.

Request Rule / MLP / CNN verdicts All-pass policy
allow [1, 1, 1] Release true
cnn-block [1, 1, 0] Release false
rule-block [0, 1, 1] Release false

1 means pass; 0 means block. A blocking verdict can have a valid proof. The workflow rejects 63 changed public statements, 18 cross-request proof substitutions and three invalid rosters, and checks native/circuit trace parity. The frozen MLP always allows in this domain; the rule and CNN supply block controls. These synthetic models do not establish a useful safety policy.

Retained inputs

Reuse only the exact hash-pinned quantizations from a caller-owned run:

make e2e CLASSIFIER_RUN=runs/e2e-circle-<your-run>

This still creates new requests, enrollment, proofs and fresh verifications. It accepts no saved pass flag or executable from that run.

Evidence, bounds and failures

Artifact in the printed directory Contents
protocol.json Source hashes, environment, time budget
result.json / failure.json Complete success or failed stage and error type
mlp-training/, cnn-training/ Fresh training records, or admitted frozen quantizations
native-preparation.json, native-preparation-pin.json Caller-owned model/request preparation, pinned before proving
requests/ Initial caller-owned synthetic controls
proofs/protocol.json, caller-enrollment.json, caller-pin.json Exact engine/source/binary identities and pre-proof enrollment
proofs/*-request.json, *-bundle.json Exact Circle-bound openings/expectations and serialized bundles
proofs/result.json, worker directories Proof/check counts, invocation logs, resource samples and failures

Training uses one BLAS thread. Proof workers use four Rayon threads, a shared 1,800-second proof-campaign deadline, at most 30 GiB sampled RSS and 4 GiB output. The classifier controller reserves time for that campaign within its two-hour budget. Sampling is not an OS quota; environments and build caches are separate. Run one campaign at a time. New attempts use new directories and retain failures.

Failures return nonzero if a model screen/hash differs, enrollment is unexpected, a proof/check fails, a resource boundary is reached, or tracked pipeline sources change during execution. Inspect the printed training/build log or proofs/failure.json and the failing worker's stderr.txt. Keep the evidence; do not tune on test data or replace expected hashes to force a pass.

Implementation: controller, native preparation, Circle proof/check driver, exact circuits and ownership. Caller enrollment must come from trusted inputs; hashes in an arbitrary prover bundle cannot authenticate it. No hiding, independent security qualification or hardware provenance is claimed.

Recorded acceptance

The actual bare make e2e command passes with fresh training: nine proofs, 63 public-input rejections, 18 substitutions and three invalid rosters. The complete local controller took 320.68 s on the recorded M4 Max with populated dependency caches. A browser-launched run reusing only the model exports took 97.94 s. These are single acceptance observations. Commands, hashes and limitations.