Skip to main content
Version: Canary 🚧

Proof server

Disclaimer

The Midnight Preview network is unstable and might experience downtime. Preview-related guides are intended for experienced developers.

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.

  1. Inside Docker Desktop, use the search bar to locate midnightnetwork/proof-server:latest.
  2. Pull the image.

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 and this should not be changed.

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 does not open any network connections; it simply listens on its assigned port for requests from your wallet.