Skip to content

Commit

Permalink
remove python configure script
Browse files Browse the repository at this point in the history
  • Loading branch information
Okm165 committed Mar 28, 2024
1 parent 876025b commit d66a48d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 195 deletions.
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,42 @@ For local proof verification, follow these steps:

1. Run the verifier locally on example proof using the following command:

By `default`, the verifier is configured for `layout_type`=`recursive` and `hash_type`=`keccak` for verifier unfriendly commitment layers.
```bash
scarb build &&
cargo run --release --bin runner -- target/dev/cairo_verifier.sierra.json < examples/proofs/recursive/example_proof.json
```

You can easily change configuration by specifying features in scarb build command

```bash
scarb build --no-default-features --features=<layout_type>,<hash_type>
```

`layout_type`: [`dex`, `recursive`, `recursive_with_poseidon`, `small`, `starknet`, `starknet_with_keccak`]
`hash_type`: [`keccak`, `blake2s`]

All the example_proof's are using `hash_type`=`keccak`

### Starknet Proof Verification

To verify proofs on Starknet, proceed with the following steps:

1. Prepare calldata of example proof for sncast:

```bash
cargo run --release --bin snfoundry_proof_serializer < examples/proofs/recursive/example_proof.json > examples/starknet/calldata
cargo run --release --bin snfoundry_proof_serializer < examples/proofs/<layout_type>/example_proof.json > examples/starknet/calldata
```

2. Call the function with calldata on the Starknet contract:

```bash
cd examples/starknet
./1-verify-proof.sh 0x487810706cc0dfdba0c82403d98e9d32dc36793ed2b731231e5ea19f00c5861 calldata
./1-verify-proof.sh <contract_address> calldata
```

[List of deployed Verifier Contracts](deployed_contracts.md)

## Configure Verifier

By default, the verifier is configured for recursive layout and keccak hash for verifier unfriendly commitment layers. You can easily change that by using the configure python script (this script is in Experimental stage):

```bash
python configure.py -l recursive -s keccak
```

layout types: [dex, recursive, recursive_with_poseidon, small, starknet, starknet_with_keccak]
hash types: [keccak, blake2s]

## Creating a Proof

To create a proof, perform the following steps:
Expand Down
50 changes: 0 additions & 50 deletions configure.py

This file was deleted.

68 changes: 0 additions & 68 deletions test_layouts.py

This file was deleted.

64 changes: 0 additions & 64 deletions utils.py

This file was deleted.

0 comments on commit d66a48d

Please sign in to comment.