diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 621673b..d945f10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,3 +91,5 @@ jobs: with: files: | target/release/stone-prover-cli + ${{ env.STONE_INSTALL_DIR }}/cpu_air_prover + ${{ env.STONE_INSTALL_DIR }}/cpu_air_verifier diff --git a/Makefile b/Makefile deleted file mode 100644 index cfa859e..0000000 --- a/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -.PHONY: deps all-tests clean distclean unit-tests integration-tests - -PROVER_BIN=dependencies/cpu_air_prover -VERIFIER_BIN=dependencies/cpu_air_verifier - -$(PROVER_BIN): - wget -O dependencies/cpu_air_prover https://github.com/Moonsong-Labs/stone-prover-sdk/releases/download/v0.1.0-rc1/cpu_air_prover - -$(VERIFIER_BIN): - wget -O dependencies/cpu_air_verifier https://github.com/Moonsong-Labs/stone-prover-sdk/releases/download/v0.1.0-rc1/cpu_air_verifier - -all-tests: deps - cargo test - -itests: deps - cargo test --release --test '*' - -deps: $(PROVER_BIN) $(VERIFIER_BIN) -clean: - cargo clean - -distclean: clean - rm -rf dependencies/cpu_air_prover - rm -rf dependencies/cpu_air_verifier diff --git a/README.md b/README.md index acf0ba5..0600dcd 100644 --- a/README.md +++ b/README.md @@ -9,22 +9,37 @@ Features: compatibility with the Starknet L1 verifier * Automatic generation of the prover configuration and parameters. +## Install + +```shell +wget -O - https://raw.githubusercontent.com/Moonsong-Labs/stone-prover-cli/main/scripts/install-stone-cli.sh | bash +``` + +For now, only Linux platforms are supported. + ## Usage ### Run and prove a single program +After compiling a Cairo0 program to `program.json`, run: + ```shell stone-prover-cli prove program.json ``` ### Run and prove one or more programs/PIEs with the Starknet bootloader +If you want to prove one or more programs and PIEs by running them with the Starknet bootloader, +you can use the `--with-bootloader` option. + ```shell stone-prover-cli prove --with-bootloader program1.json program2.json pie1.zip ``` ### Verify a proof +If you want to verify the generated proof file, run: + ```shell stone-prover-cli verify proof.json ``` \ No newline at end of file diff --git a/scripts/install-stone-cli.sh b/scripts/install-stone-cli.sh index d254599..6f1292e 100644 --- a/scripts/install-stone-cli.sh +++ b/scripts/install-stone-cli.sh @@ -2,9 +2,8 @@ set -eo pipefail -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -INSTALL_DIR="${HOME}/.stone" +VERSION="v0.1.0-rc1" +INSTALL_DIR="${HOME}/.stone/${VERSION}" while true; do case "$1" in @@ -15,8 +14,14 @@ done echo "Installing Stone in ${INSTALL_DIR}..." mkdir -p "${INSTALL_DIR}" -wget https://github.com/Moonsong-Labs/stone-prover-sdk/releases/download/v0.2.0/cpu_air_prover -O "${INSTALL_DIR}/cpu_air_prover" -wget https://github.com/Moonsong-Labs/stone-prover-sdk/releases/download/v0.2.0/cpu_air_verifier -O "${INSTALL_DIR}/cpu_air_verifier" +wget https://github.com/Moonsong-Labs/stone-prover-sdk/releases/download/v0.3.0/cpu_air_prover -O "${INSTALL_DIR}/cpu_air_prover" +wget https://github.com/Moonsong-Labs/stone-prover-sdk/releases/download/v0.3.0/cpu_air_verifier -O "${INSTALL_DIR}/cpu_air_verifier" +wget https://github.com/Moonsong-Labs/stone-prover-cli/releases/download/${VERSION}/stone-prover-cli -O "${INSTALL_DIR}/stone-prover-cli" + +echo "Configuring permissions..." +chmod +x "${INSTALL_DIR}/cpu_air_prover" +chmod +x "${INSTALL_DIR}/cpu_air_verifier" +chmod +x "${INSTALL_DIR}/stone-prover-cli" # Add the tool to the PATH echo "Configuring PATH..."