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 sends to the proof server includes private data, such as details of token ownership or a DApp's private state. To protect your data, you should access only a local proof server, or perhaps one on a remote machine that you control, over an encrypted channel.
This guide shows you how to run the proof server locally in order to process transactions on the Midnight Network. The wallet communicates with the proof server to invoke ZK functionality and generate ZK proofs for your transactions.
This guide is aimed at Midnight Network users, rather than DApp Builders.
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.
- Inside Docker Desktop, use the search bar to locate
midnightntwrk/proof-server. - 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 Run button in the same search result, or by navigating to your Containers and clicking the Run button there.
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 the --port flag and MIDNIGHT_PROOF_SERVER_PORT.
Stop the proof server
To stop the proof server, simply 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. It makes one outbound
request, at startup, to download the public proving parameters from
https://srs.midnight.network/. That data is public and identical for every
user; your witness data is never part of it. After that it only listens on
its assigned port for requests from your wallet. To skip the startup download
(for example on an air-gapped machine that already has the parameters cached),
start it with --no-fetch-params, or point MIDNIGHT_PARAM_SOURCE at your
own mirror. See Local proving for details.