Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: install script #2

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading