proof-server:proof-server-architecture

Generate and manage zero-knowledge proofs for Midnight transactions.

37|9|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/devrelaicom/midnight-expert --skill proof-server-proof-server-architecture
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: proof-server:proof-server-architecture
Source: https://github.com/devrelaicom/midnight-expert/tree/main/plugins/proof-server/skills/proof-server-architecture
Command: npx skills add https://github.com/devrelaicom/midnight-expert --skill proof-server-proof-server-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a focused, practical reference for operating and reasoning about the midnight-proof-server so engineers can reliably generate zero-knowledge proofs, manage concurrency, and handle cryptographic key material without surprises. It reduces time spent debugging capacity, timeout, serialization, and versioning issues by explaining the server's components, job lifecycle, and runtime behaviors.

Core Features & Use Cases

  • Worker pool & job queue: Channel-based async job queue with configurable parallelism and queue capacity to control concurrency and backpressure.
  • Capacity limiting & backpressure: HTTP 429 responses for full queues and TTL-based garbage collection to prevent unbounded memory growth.
  • Key material management: Startup pre-fetching, on-demand proving key fetches, and use of MidnightDataProvider for circuit parameters.
  • ZKIR versioning & dispatch: Versioned IR routing so V2/V3 proofs are dispatched to appropriate handlers and reported via /proof-versions.
  • Binary serialization & deployment: Custom tagged binary format for proofs, musl static builds, and multi-arch Docker images for portable production deployments.
  • Use Case: Tune worker counts, queue capacity, and job timeouts for a production environment; diagnose 429s, long-tail proving times, or missing keys during first requests.

Quick Start

Ask the proof-server skill to explain the worker pool design and recommend --num-workers, --job-capacity, and --job-timeout settings for a production 16-core Linux host.

Frequently Asked Questions about proof-server:proof-server-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure worker pool concurrency and job queue capacity for zero-knowledge proofs?▼

Configure zero-knowledge proof concurrency by tuning --num-workers for parallelism and --job-capacity for queue size. The channel-based async job queue manages backpressure, ensuring controlled concurrent job processing without overwhelming system resources.

Why does the proof server return HTTP 429 responses and how do I handle backpressure?▼

HTTP 429 responses occur when the proof server job queue reaches full capacity, applying backpressure to prevent unbounded memory growth. Handle 429s by increasing --job-capacity or scaling worker pools horizontally across multiple deployment instances.

How does zero-knowledge proof key prefetching work during server startup?▼

Zero-knowledge proof key prefetching occurs at server startup, pre-loading proving keys and circuit parameters via MidnightDataProvider. This on-demand fetch mechanism prevents missing key errors during initial transaction proving requests and reduces first-request latency.

What is the best way to deploy a musl static build proof server using multi-arch Docker images?▼

Deploy proof servers using musl static builds packaged as multi-arch Docker images for portable production environments. This approach ensures consistent binary serialization across architectures, enabling portable deployments without runtime dependency conflicts.

How does ZKIR versioning dispatch V2 and V3 proofs to appropriate handlers?▼

ZKIR versioning routes V2 and V3 zero-knowledge proofs to appropriate handlers using versioned IR dispatch. The /proof-versions endpoint reports supported circuit versions, ensuring correct handler assignment and backward compatibility across proof generations.

When should I use TTL-based garbage collection in a concurrent job queue?▼

Use TTL-based garbage collection when managing concurrent job queues to prevent unbounded memory growth from abandoned or timed-out jobs. Configure --job-timeout to trigger cleanup of stale zero-knowledge proof jobs, maintaining stable long-running production capacity.