ZkProver is a zero-knowledge proof client developed by CortexLabs for generating proofs in the Layer2 ZkRollup solution. The client currently supports three modes: local mode, server mode, and client mode.
Proof generation consumes a lot of computer computing resources. It takes about 30 seconds to generate a 64-size block proof using CPU. Furthermore, it is difficult to achieve parallel acceleration on the machine. Therefore, CortexLabs has developed a GPU version, which can effectively use multiple graphics cards for parallel computing and improve performance up to 2 times. The main difficulty lies in optimizing ZKP calculations in parallel. The underlying library calculations are complex, making it extremely difficult to implement the GPU version.
Configuration requirements
Cortex runs a full ZkProver on the following machines, the configuration is for reference only:
CPU - Intel(R) Xeon(R) CPU E5-2678 v3 @ 2.50GHz
Memory - 16G
CUDA version
11.5, 11.6
10.0
GPU (corresponding to GPU version Prover), theoretically supported graphics cards (checked if tested):
Disk - 10G hard disk (including 4.9G proof private key)
OS (System) - Ubuntu 18.04.6 LTS
Pre-download: A total of 5G for the certificate private key and running program, the directory structure is as follows:
Local mode is generally used for debugging, verifying local input files, and generating corresponding proofs. Use --local to access. Common commands:
# generate proof for one witness file../zion_node_cpu--local--local-fpathyour/witness/file/path# find all *.json in the directory./zion_node_cpu--local--local-fdiryour/witness/dir
Server mode
This mode is deprecated. Use --server to access.
Client Mode
Client mode is used to link with the ZkMatrix backend to generate proofs for Layer 2. Common commands:
# cpu prover command./zion_node_cpu--client-b64--uri18.177.141.87:8837--nameYOUR_NAME--cycle-wait3000# GPU use 2 graphic cards and save all witness files into logs directory.CUDA_VISIBLE_DEVICES=1,2./zion_node_gpu--client--save-dirlogs-b64-n2--uri18.177.141.87:8837
CortexLabs' ZkMatrix server address: 18.177.141.87:8837, block size is 64. ETHF' ZkMatrix server address: 18.176.57.238:8837, block size is 64.
The client mode can automatically store the witness file obtained from the server. If you find that the program crashes or the proof is wrongly generated, please report the witness file to the official mailbox of CortexLabs.