Skip to content

Commit

Permalink
fix since having two binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
nulltea committed Feb 8, 2024
1 parent e02fc74 commit f2e9bf1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ just download-spec-tests
#### Step circuit

```shell
cargo run -r -- circuit sync-step-compressed -k 20 -p ./build/sync_step_20.pkey -K 23 -P ./build/sync_step_verifier_23.pkey -L 19 setup
cargo run -r -p spectre-prover -- circuit sync-step-compressed -k 20 -p ./build/sync_step_20.pkey -K 23 -P ./build/sync_step_verifier_23.pkey -L 19 setup
```
Flags `-k` and `-K` are circuit degrees for first and aggregation (compression) stage respectively. `-L` is the number lookup bits used in aggregation stage.

#### Committee update circuit

```shell
cargo run -r -- circuit committee-update -k 20 -p ./build/committee_update_20.pkey -K 24 -P ./build/committee_update_verifier_20.pkey setup
cargo run -r -p spectre-prover -- circuit committee-update -k 20 -p ./build/committee_update_20.pkey -K 24 -P ./build/committee_update_verifier_20.pkey setup
```

Alternatively, you can use `just` recipes as shown below.
Expand All @@ -56,13 +56,13 @@ just setup-committee-update testnet
#### Step proof

```shell
cargo run -r -- circuit sync-step-compressed -p ./build/sync_step_20.pkey -P ./build/sync_step_verifier_23.pkey gen-verifier -o ./contracts/snark-verifiers/sync_step_verifier.sol
cargo run -r -p spectre-prover -- circuit sync-step-compressed -p ./build/sync_step_20.pkey -P ./build/sync_step_verifier_23.pkey gen-verifier -o ./contracts/snark-verifiers/sync_step_verifier.sol
```

#### Committee update proof

```shell
cargo run -r -- circuit committee-update -p ./build/committee_update_20.pkey -P ./build/committee_update_verifier_24.pkey gen-verifier -o ./contracts/snark-verifiers/committee_update_verifier.sol
cargo run -r -p spectre-prover -- circuit committee-update -p ./build/committee_update_20.pkey -P ./build/committee_update_verifier_24.pkey gen-verifier -o ./contracts/snark-verifiers/committee_update_verifier.sol
```

Or use `just` recipes as shown below.
Expand All @@ -81,7 +81,7 @@ For either make a copy of the `.env.example` file called `.env`. Set the `INITIA
To get the `INITIAL_COMMITTEE_POSEIDON` value, run:

```shell
cargo run -r -- utils committee-poseidon --beacon-api https://lodestar-sepolia.chainsafe.io
cargo run -r -p spectre-prover -- utils committee-poseidon --beacon-api https://lodestar-sepolia.chainsafe.io
```

`--beacon-api` is a URL of the RPC of the targeted Beacon chain.
Expand Down Expand Up @@ -117,6 +117,6 @@ where `<NETWORK>` is one of `["GOERLI", "SEPOLIA", "MAINNET"]`.
Prover is accessible via JSON RPC interface. To start it, run:

```shell
cargo run -r -- rpc --port 3000 --spec testnet
cargo run -r -p spectre-prover -- rpc --port 3000 --spec testnet
```
where `--spec` is one of `["testnet", "mainnet"]`.
12 changes: 6 additions & 6 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ lint: fmt
cargo clippy --all-targets --all-features --workspace

setup-step network *k='22':
cargo run -r -- circuit sync-step -p ./build/sync_step_$1.pkey -k $2 setup
cargo run -r -p spectre-prover -- circuit sync-step -p ./build/sync_step_$1.pkey -k $2 setup

setup-step-compressed network *k='23':
cargo run -r -- circuit sync-step-compressed -k 20 -p ./build/sync_step_$1.pkey \
cargo run -r -p spectre-prover -- circuit sync-step-compressed -k 20 -p ./build/sync_step_$1.pkey \
-K $2 -P ./build/sync_step_verifier_$1.pkey -L 19 setup

setup-committee-update network *k='24':
cargo run -r -- circuit committee-update -k 20 -p ./build/committee_update_$1.pkey \
cargo run -r -p spectre-prover -- circuit committee-update -k 20 -p ./build/committee_update_$1.pkey \
-K $2 -P ./build/committee_update_verifier_$1.pkey setup

gen-verifier-step network:
cargo run -r -- circuit sync-step -p ./build/sync_step_$1.pkey gen-verifier -o ./contracts/snark-verifiers/sync_step.sol
cargo run -r -p spectre-prover -- circuit sync-step -p ./build/sync_step_$1.pkey gen-verifier -o ./contracts/snark-verifiers/sync_step.sol

gen-verifier-step-compressed network:
cargo run -r -- circuit sync-step-compressed -p ./build/sync_step_$1.pkey -P ./build/sync_step_verifier_$1.pkey \
cargo run -r -p spectre-prover -- circuit sync-step-compressed -p ./build/sync_step_$1.pkey -P ./build/sync_step_verifier_$1.pkey \
gen-verifier -o ./contracts/snark-verifiers/sync_step_verifier.sol

gen-verifier-committee-update network:
cargo run -r -- circuit committee-update -p ./build/committee_update_$1.pkey -P ./build/committee_update_verifier_$1.pkey \
cargo run -r -p spectre-prover -- circuit committee-update -p ./build/committee_update_$1.pkey -P ./build/committee_update_verifier_$1.pkey \
gen-verifier -o ./contracts/snark-verifiers/committee_update_verifier.sol

build-contracts:
Expand Down

0 comments on commit f2e9bf1

Please sign in to comment.