zk-STARKs Library
How to Use
First, Install Rust (cargo version >= 1.56.0).
cd packages/r1cs-stark
rustup override set nightly
CIRCUIT_NAME="compute"
RUST_BACKTRACE=1 cargo run ./tests/${CIRCUIT_NAME}.r1cs ./tests/${CIRCUIT_NAME}.wtns ./tests/${CIRCUIT_NAME}_proof.json
CIRCUIT_NAME
allows following values.
compute
bits
pedersen_test
poseidon3_test
sha256_2_test
Test with Docker
If your machine is not Linux, we can use this method to measure memory loads.
build
docker build -t r1cs-stark .
run
docker run -it -v $PWD:/root r1cs-stark \
sh -c 'cd packages/r1cs-stark; CIRCUIT_NAME="compute"; RUST_BACKTRACE=1 cargo run ./tests/${CIRCUIT_NAME}.r1cs ./tests/${CIRCUIT_NAME}.wtns ./tests/${CIRCUIT_NAME}_proof.json > ./tests/log_${CIRCUIT_NAME}.txt'
CIRCUIT_NAME
allows following values.
compute
bits
pedersen_test
poseidon3_test
(Docker process may be killed due to high memory loads)sha256_2_test
Todo
-
Calculate public wires for verifier from input.json .
-
Introduce faster algorithm for inv FFT and FFT.
-
Reduce the number of constraints of zkSTARK.