Skip to content
Skills Library
DevOps & cloud · Learning & explanation

proof-server:proof-server-integration

/proof-server:proof-server-integration

This skill covers how the Midnight proof server is invoked in practice — who calls it, the client-server contract, self-hosted vs wallet-delegated proving, network proof-server endpoints, production deployment behind a reverse proxy, and CORS. Use it for "who calls the proof server", "ProofProvider", "wallet-delegated proving", "proof server endpoint", "production proof server", "proof server behind a proxy", or wiring a DApp/SDK to a proof server.

Licence
Apache-2.0
Last repository change
23.10.2026

Assessment and security

85/ 100Class: good
Format15 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content30 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

This skill covers how the Midnight proof server is invoked in practice — who calls it, the client-server contract, self-hosted vs wallet-delegated proving, network proof-server endpoints, production deployment behind a reverse proxy, and CORS. Use it for "who calls the proof server", "ProofProvider", "wallet-delegated proving", "proof server endpoint", "production proof server", "proof server behind a proxy", or wiring a DApp/SDK to a proof server.

Triggers from the description

who calls the proof serverProofProviderwallet-delegated provingproof server endpointproduction proof serverproof server behind a proxy
Original author description

This skill covers how the Midnight proof server is invoked in practice — who calls it, the client-server contract, self-hosted vs wallet-delegated proving, network proof-server endpoints, production deployment behind a reverse proxy, and CORS. Use it for "who calls the proof server", "ProofProvider", "wallet-delegated proving", "proof server endpoint", "production proof server", "proof server behind a proxy", or wiring a DApp/SDK to a proof server.

How it works

  1. Who Calls the Proof Server
  2. Invocation Modes
  3. Client-Server Contract
  4. Deployment
  5. References
  6. Cross-references
Original SKILL.md headings · 113 lines, 682 words
SKILL.md preview
---
name: proof-server:proof-server-integration
description: This skill covers how the Midnight proof server is invoked in practice — who calls it, the client-server contract, self-hosted vs wallet-delegated proving, network proof-server endpoints, production deployment behind a reverse proxy, and CORS. Use it for "who calls the proof server", "ProofProvider", "wallet-delegated proving", "proof server endpoint", "production proof server", "proof server behind a proxy", or wiring a DApp/SDK to a proof server.
version: 0.1.0
---

# Proof Server Integration

How the Midnight proof server is invoked in practice — who calls it, the protocol it exposes, deployment modes, and where to find deeper detail.

For Docker setup and version-tag selection, see `midnight-tooling:proof-server`. For DApp-side provider assembly (React, Vite), see `midnight-dapp-dev:core`. For the full HTTP API reference, see `proof-server:proof-server-api`.

---

## Who Calls the Proof Server

The proof server is not called directly by application code. The call is made by the `midnight-js` SDK via the `ProofProvider` abstraction:

```text
DApp / CLI script
  └─ midnight-js SDK (callTx / submitCallTx)
       └─ ProofProvider.proveTx()
            └─ POST /prove  →  proof server (port 6300)
```

The `ProofProvider` instance is created by the factory function:

```
httpClientProofProvider(proofServerUri, zkConfigProvider)
```

from `@midnight-ntwrk/midnight-js-http-client-proof-provider`. The DApp supplies the URI; the SDK handles binary serialization of the request body and response parsing.

Do not build the `/prove` request body yourself — the binary format is complex. Cross-reference `proof-server:proof-server-api` for the serialization spec if you need low-level detail.

For provider assembly (where `httpClientProofProvider` fits into the full `MidnightProviders` object), see `midnight-dapp-dev:core` and `midnight-dapp-dev:midnight-sdk`.

---

## Invocation Modes

| Mode | Description | When to use |
|---|---|---|
| **Self-hosted local** | Proof server at `localhost:6300`; DApp or test suite constructs `httpClientProofProvider("http://localhost:6300", zkConfigProvider)` | Local development; devnet; CI pipelines |
| **Wallet-delegated** | The wallet extension (e.g. Lace) supplies proving on the user's behalf via `dappConnectorProofProvider`; DApp does not connect to a proof server directly | Browser DApps where users have a Midnight wallet; see `midnight-wallet:wallet-sdk` |
| **CI / headless** | Self-hosted with `--no-fetch-params` and reduced `--num-workers` to cap resource use | Automated test runs; pre-cached params scenarios |
| **Remote / production** | Proof server behind a reverse proxy; URI passed as a runtime configuration value | Staging/production DApps; multi-user environments |

> Detailed deployment and hardening notes are in `references/network-and-deployment.md` and `proof-server:proof-server-operations`.

---

## Client-Server Contract

### Request and Response

`ProofProvider.proveTx()` POSTs a binary-encoded proof request to `/prove` and receives a binary-encoded proof response. The encoding is handled entirely by the SDK — application code only sees typed TypeScript values.

For the binary serialization format and endpoint details, see `proof-server:proof-server-api`.

### CORS

The proof server uses **`Cors::permissive()`**: all origins are accepted, no credential restrictions. This is appropriate for local/internal use. For public or multi-tenant deployments, place the server behind a reverse proxy that enforces allowed origins.

### Backpressure

| HTTP status | Meaning | What to do |
|---|---|---|
| `503 Service Unavailable` | Worker pool saturated; server is too busy | Back off and retry; check `/ready` for utilisation |
| `429 Too Many Requests` | Proof server job queue full (`--job-capacity > 0`); request rejected at intake | Increase `--job-capacity` or add workers — see `proof-server:proof-server-configuration` |

For status-code details, see `proof-server:proof-server-api` (status-codes reference) and `midnight-status-codes:status-codes`.

### Version Compatibility

The SDK, proof server, and Compact compiler must be kept in sync. Version mismatches are a common source of proof generation failures.

```text
Compact compiler version
  → determines proof version string (GET /proof-versions)
  → must match proof server's supported proof versions
  → must match SDK's expected proof format
```

Check `/proof-versions` on the running server to confirm compatibility. See `proof-server:proof-server-operations` for diagnosing version mismatch errors.

---

## Deployment

For production hardening (reverse proxy, TLS, CORS restrictions, load-balancer health probes), see:

- `references/network-and-deployment.md` — deployment modes and production checklist
- `proof-server:proof-server-operations` — monitoring, scaling, and troubleshooting

For Docker images and configuration flags (`--port`, `--num-workers`, `--no-fetch-params`), see `midnight-tooling:proof-server` and `proof-server:proof-server-configuration`.

---

## References

| Name | Description | When used |
|---|---|---|
| `references/network-and-deployment.md` | Deployment modes, production hardening, reverse proxy, CORS context | Choosing a deployment mode; production checklist |

---

## Cross-references

| Skill | What it covers |
|---|---|
| `midnight-dapp-dev:core` | Full DApp provider assembly including where `httpClientProofProvider` fits |
| `midnight-dapp-dev:midnight-sdk` | `ProofProvider` type, `httpClientProofProvider`, `dappConnectorProofProvider`, SDK packages |
| `midnight-wallet:wallet-sdk` | Wallet-delegated proving via `dappConnectorProofProvider` |
| `midnight-tooling:proof-server` | Docker setup, version-tag selection, running the server |
| `proof-server:proof-server-api` | Full HTTP API: endpoints, binary serialization, status codes, CORS policy |
| `proof-server:proof-server-operations` | Monitoring, health checks, troubleshooting, scaling, version compatibility |
Files in this package (2)
  • SKILL.md 6 KB
  • references/network-and-deployment.md 3 KB

Versions

The database has no other skills named proof-server:proof-server-integration.

Database snapshot: 13.11.2026 · package version 84390046ad21 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90midnight-tooling:proof-server
    This skill should be used when the user asks about the Midnight proof server in any context — local, testnet, or mainnet. Includes "start the proof server", "restart the proof server", "stop the proof server", "proof server not working", "proof server logs", "check if proof…
  • 85proof-server:proof-server-configuration
    This skill covers proof server CLI flags, environment variables, and tuning guidance. Use it when the user asks about proof server configuration, num-workers, job-capacity, job-timeout, no-fetch-params, how many workers should I use, proof server slow, proof server out of…
  • 100proxy-servers-forward-reverse-socks5
    Use this skill when routing, filtering, and caching client-server network requests through forward and reverse proxy servers.
  • 100posthog-deploy-integration
    Deploy a PostHog application integration with correct regional hosts, reverse-proxy coverage, server lifecycle, and rollback checks. Use when shipping PostHog instrumentation to a hosted application. Trigger with "deploy PostHog", "PostHog Vercel", or "PostHog reverse proxy".
  • 90prompt-rewriter:generate-midnight-network-dapp-spec
    Use this skill to generate a Midnight Network DApp spec brief through an adaptive Q&A. The output is a concise brief (not a full spec) intended as input to a downstream spec / planning skill such as /superpowers:brainstorming or /sdd:specify. Triggers on "generate midnight dapp…
  • 100reverse-proxy
    Use when a proxy, ingress, gateway, CDN/WAF or service mesh (Nginx, Traefik, HAProxy, Envoy Gateway, App Gateway/AGIC, Cloudflare, Istio, Linkerd) returns 502/503/504/524, no healthy upstream, RBAC access denied, a CORS error through proxies, a redirect loop or the wrong client…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.