Skip to main content
For the complete documentation index, see llms.txt

Proof server

Midnight uses zero-knowledge (ZK) cryptography to enable shielded transactions and data protection. An essential element of this architecture is ZK functionality provided by a Midnight proof server, which generates proofs locally that are verified on-chain.

The information that a DApp or wallet sends to the proof server includes private data, such as the secret keys for your shielded tokens and your DUST, and a DApp's private state. Run the proof server on your own machine. The Midnight Foundation doesn't recommend a proof server on any other machine, even one you operate, outside a trusted execution environment (TEE). See Why remote proving is not recommended.

This guide shows you how to run the proof server on your machine with Docker Desktop, so that your wallet can process transactions on the Midnight Network. The wallet sends requests to the proof server to generate ZK proofs for your transactions.

This guide is for wallet users. If you build DApps, scripts, or tests, follow Connecting a DApp to a local proof server instead.

Install Docker Desktop​

If you don't have Docker, then download and install Docker for your operating system (macOS, Windows, or Linux): https://www.docker.com/products/docker-desktop/

New users might need to set up an account.

Install the proof server​

Docker hosts completed code in Images. The Midnight proof server is available as a Docker Image.

  1. Inside Docker Desktop, use the search bar to locate midnightntwrk/proof-server.
  2. Pull the tag listed for the proof server in the compatibility matrix. Do not rely on latest; that tag is republished less often than the versioned tags and can lag the matrix.

After pulling the image, the code for the proof server is hosted in a Container in Docker Desktop.

Start the proof server​

Start the proof server by clicking the Run button in the same search result, or by navigating to your Containers and clicking the Run button there. In the Run dialog, open Optional settings and set the host port to 6300.

The proof server has no authentication and no TLS, so don't make it reachable from other machines. To publish its port on your own machine only, start it from a terminal instead, with the tag from the compatibility matrix:

docker run -d --name proof-server -p 127.0.0.1:6300:6300 midnightntwrk/proof-server:<tag>

To inspect the proof server, navigate to Containers and View Details -- there is no action required here, but you should see some output indicating that the server has started.

The proof server listens on port 6300 by default. Leave it there unless you also update every wallet and DApp configuration that points at it; see Local proving for how to change the port.

Stop the proof server​

To stop the proof server, stop the container.

For processing transactions on the Midnight network, the proof server must be running, so if you have stopped it, start it again now.

Your privacy​

The proof server exists to protect your privacy, so keep it on your own machine. It contacts one outside host, https://srs.midnight.network/, to download public proving parameters and the keys for the built-in shielded and DUST circuits. It downloads a standard set at startup. The first time it proves a circuit of another size, it downloads the parameters for that size too. These files are public and the same for every user. Your proof requests aren't part of that traffic.

To skip these downloads on later starts, keep the downloaded files in a volume. To download from your own mirror instead, set MIDNIGHT_PARAM_SOURCE. See Proof server settings for details.