Skip to content

Commit

Permalink
Feature: install script (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
odesenfans authored Feb 21, 2024
1 parent 0d014d4 commit a4828ac
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 0 additions & 24 deletions Makefile

This file was deleted.

15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
15 changes: 10 additions & 5 deletions scripts/install-stone-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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..."
Expand Down

0 comments on commit a4828ac

Please sign in to comment.