Skip to content

Commit 0103cee

Browse files
Clean repo, remove cairo prover and update readme (#920)
* clean readme * add binary fields * remove cairo prover * remove cairo ffi * fmt * clean things * remove dependencies * fix cli * fix * fix
1 parent a591186 commit 0103cee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+15
-9888
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ jobs:
3030
- name: Run cargo check
3131
run: cargo check
3232

33-
- name: Run cargo check cli and stark instruments
33+
- name: Run cargo check and stark instruments
3434
run: |
35-
cargo check --features cli,instruments
35+
cargo check --features instruments
3636
3737
- name: Run cargo check cli, stark instruments and parallel
3838
run: |
39-
cargo check --features cli,instruments,parallel
39+
cargo check --features instruments,parallel
4040
4141
- name: Run cargo check for math with no-std
4242
run: cargo check --package lambdaworks-math --no-default-features
@@ -104,15 +104,6 @@ jobs:
104104
- name: Set up cargo cache
105105
uses: Swatinem/rust-cache@v2
106106

107-
- name: Python3 build
108-
uses: actions/setup-python@v4
109-
with:
110-
python-version: "3.9"
111-
cache: "pip"
112-
113-
- name: Install cairo-lang toolchain and dependencies
114-
run: pip install -r provers/cairo/requirements.txt
115-
116107
- name: Install testing tools
117108
uses: taiki-e/install-action@v2
118109
with:
@@ -171,12 +162,6 @@ jobs:
171162
- name: Install wasm-pack tools for testing
172163
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
173164

174-
- name: Run wasm-pack tests in firefox
175-
run: cd provers/cairo && wasm-pack test --release --firefox --headless -- --features wasm
176-
177-
- name: Run wasm-pack tests in chrome
178-
run: cd provers/cairo && wasm-pack test --release --chrome --headless -- --features wasm
179-
180165
test_macos:
181166
name: Test (macOS, Apple sillicon)
182167
runs-on: macos-latest
@@ -196,18 +181,6 @@ jobs:
196181
toolchain: stable
197182
components: clippy
198183

199-
- name: Python3 build
200-
uses: actions/setup-python@v4
201-
with:
202-
python-version: "3.9"
203-
cache: "pip"
204-
205-
- name: Install cairo-lang toolchain and dependencies
206-
env:
207-
CFLAGS: "-I/opt/homebrew/opt/gmp/include"
208-
LDFLAGS: "-L/opt/homebrew/opt/gmp/lib"
209-
run: pip install -r provers/cairo/requirements.txt
210-
211184
- name: Run clippy
212185
run: make clippy-metal
213186

.github/workflows/criterion_benchs.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,7 @@ jobs:
5151
run: |
5252
brew install gcc
5353
brew install gmp
54-
- name: Python3 build
55-
uses: actions/setup-python@v4
56-
with:
57-
python-version: "3.9"
58-
cache: "pip"
59-
- name: Install cairo-lang toolchain and dependencies
60-
env:
61-
CFLAGS: "-I/opt/homebrew/opt/gmp/include"
62-
LDFLAGS: "-L/opt/homebrew/opt/gmp/lib"
63-
run: pip install -r provers/cairo/requirements.txt
54+
6455
- name: Run benchmark
6556
run: |
6657
cargo bench -F metal --no-fail-fast --bench "criterion_metal" \

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22

3-
members = ["math", "crypto", "gpu", "benches", "provers/plonk", "provers/stark", "provers/cairo", "provers/groth16", "provers/groth16/arkworks-adapter", "provers/groth16/circom-adapter", "examples/merkle-tree-cli", "examples/prove-miden", "provers/winterfell_adapter", "examples/shamir_secret_sharing","examples/pinocchio", "examples/prove-verify-circom", "provers/cairo/ffi", "examples/baby-snark"]
3+
members = ["math", "crypto", "gpu", "benches", "provers/plonk", "provers/stark", "provers/groth16", "provers/groth16/arkworks-adapter", "provers/groth16/circom-adapter", "examples/merkle-tree-cli", "examples/prove-miden", "provers/winterfell_adapter", "examples/shamir_secret_sharing","examples/pinocchio", "examples/prove-verify-circom", "examples/baby-snark"]
44
exclude = ["ensure-no_std"]
55
resolver = "2"
66

@@ -16,7 +16,6 @@ lambdaworks-crypto = { path = "./crypto", version = "0.10.0", default-features =
1616
lambdaworks-gpu = { path = "./gpu", version = "0.10.0" }
1717
lambdaworks-math = { path = "./math", version = "0.10.0", default-features = false }
1818
stark-platinum-prover = { path = "./provers/stark" }
19-
cairo-platinum-prover = { path = "./provers/cairo" }
2019
lambdaworks-winterfell-adapter = { path = "./provers/winterfell_adapter"}
2120
lambdaworks-groth16 = { path = "./provers/groth16" }
2221
lambdaworks-circom-adapter = { path = "./provers/groth16/circom-adapter" }

Makefile

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,12 @@ FUZZ_DIR = fuzz/no_gpu_fuzz
44

55
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
66

7-
CAIRO0_PROGRAMS_DIR=provers/cairo/cairo_programs/cairo0
8-
CAIRO0_PROGRAMS:=$(wildcard $(CAIRO0_PROGRAMS_DIR)/*.cairo)
9-
COMPILED_CAIRO0_PROGRAMS:=$(patsubst $(CAIRO0_PROGRAMS_DIR)/%.cairo, $(CAIRO0_PROGRAMS_DIR)/%.json, $(CAIRO0_PROGRAMS))
10-
11-
# Rule to compile Cairo programs for testing purposes.
12-
# If the `cairo-lang` toolchain is installed, programs will be compiled with it.
13-
# Otherwise, the cairo_compile docker image will be used
14-
# When using the docker version, be sure to build the image using `make docker_build_cairo_compiler`.
15-
$(CAIRO0_PROGRAMS_DIR)/%.json: $(CAIRO0_PROGRAMS_DIR)/%.cairo
16-
@echo "Compiling Cairo program..."
17-
@cairo-compile --cairo_path="$(CAIRO0_PROGRAMS_DIR)" $< --output $@ 2> /dev/null --proof_mode || \
18-
docker run --rm -v $(ROOT_DIR)/$(CAIRO0_PROGRAMS_DIR):/pwd/$(CAIRO0_PROGRAMS_DIR) cairo --proof_mode /pwd/$< > $@
19-
20-
test: $(COMPILED_CAIRO0_PROGRAMS)
7+
test:
218
cargo test
229

2310
clippy:
2411
cargo clippy --workspace --all-targets -- -D warnings
2512
cargo clippy --workspace --all-targets --features wasm -- -D warnings
26-
cargo clippy --workspace --all-targets --features cli -- -D warnings
2713
cargo clippy --workspace --all-targets --features parallel -- -D warnings
2814
cargo clippy --tests
2915

@@ -47,7 +33,7 @@ benchmark:
4733
flamegraph_stark:
4834
CARGO_PROFILE_BENCH_DEBUG=true cargo flamegraph --root --bench stark_benchmarks -- --bench
4935

50-
coverage: $(COMPILED_CAIRO0_PROGRAMS)
36+
coverage:
5137
cargo llvm-cov nextest --lcov --output-path lcov.info
5238

5339
METAL_DIR = math/src/gpu/metal
@@ -57,7 +43,7 @@ build-metal:
5743
clippy-metal:
5844
cargo clippy --workspace --all-targets -F metal -- -D warnings
5945

60-
test-metal: $(COMPILED_CAIRO0_PROGRAMS)
46+
test-metal:
6147
cargo test -F metal
6248

6349
CUDA_DIR = math/src/gpu/cuda/shaders
@@ -91,9 +77,3 @@ run-metal-fuzzer:
9177
run-cuda-fuzzer:
9278
cd fuzz/cuda_fuzz
9379
cargo hfuzz run $(CUDAFUZZER)
94-
95-
build_wasm:
96-
cd provers/cairo && wasm-pack build --release --target=web -- --features wasm
97-
98-
test_wasm_with_firefox:
99-
cd provers/cairo && wasm-pack test --release --firefox --headless -- --features wasm

README.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ So, we decided to build our library, focusing on performance, with clear documen
2929
- [Crypto primitives](https://github.com/lambdaclass/lambdaworks/tree/main/crypto)
3030
- [STARK Prover](https://github.com/lambdaclass/lambdaworks/tree/main/provers/stark)
3131
- [Plonk Prover](https://github.com/lambdaclass/lambdaworks/tree/main/provers/plonk)
32-
- [Cairo Prover](https://github.com/lambdaclass/lambdaworks/tree/main/provers/cairo)
3332
- [Groth 16](https://github.com/lambdaclass/lambdaworks/tree/main/provers/groth16)
3433

3534
### Crypto
@@ -83,9 +82,10 @@ List of symbols:
8382
| Mersenne 31 | :heavy_check_mark: | :x: | :x: | :x: | :x: |
8483
| Baby Bear | :heavy_check_mark: | :x: | :x: | :x: | :x: |
8584
| MiniGoldilocks | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: | :x: |
85+
| Binary fields | :x: | :x: | :x: | :x: | :x: |
8686
| **ZK friendly Hash function** | **Lambdaworks** | **Arkworks** | **Halo2** | **gnark** | **Constantine** |
87-
| Poseidon | 🏗️ | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
88-
| Pedersen | 🏗️ | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
87+
| Poseidon | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
88+
| Pedersen | 🏗️ | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
8989
| Rescue Prime XLIX | :x: | :x: | :x: | :x: | :x: |
9090
| **Elliptic Curves** | **Lambdaworks** | **Arkworks** | **Halo2** | **gnark** | **Constantine** |
9191
| BLS12-381 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
@@ -99,24 +99,16 @@ List of symbols:
9999
| secq256r1 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
100100
| **STARKs** | **Lambdaworks** | **Arkworks** | **Halo2** | **gnark** | **Constantine** |
101101
| STARK Prover | :heavy_check_mark: | :x: | :x: | :x: | :x: |
102-
| CAIRO Prover | 🏗️ | :x: | :x: | :x: | :x: |
102+
| Circle STARKs | :x: | :x: | :x: | :x: | :x: |
103103
| **SNARKs** | **Lambdaworks** | **Arkworks** | **Halo2** | **gnark** | **Constantine** |
104104
| Groth16 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: |
105105
| Plonk | 🏗️ | :heavy_check_mark: | ✔️ | :heavy_check_mark: | :x: |
106-
| Spartan | :x: | :heavy_check_mark: | :x: | :x: | :x: |
107-
| Marlin | :x: | :heavy_check_mark: | :x: | :x: | :x: |
108106
| GKR | :x: | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: |
109107
| **Polynomial Commitment Schemes** | **Lambdaworks** | **Arkworks** | **Halo2** | **gnark** | **Constantine** |
110108
| KZG10 | :heavy_check_mark: | ✔️ | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
111109
| FRI | 🏗️ | :x: | :x: | :heavy_check_mark: | :x: |
112-
| IPA | 🏗️ | ✔️ | :heavy_check_mark: | :x: | :x: |
113-
| Brakedown | :x: | :x: | :x: | :x: | :x: |
114-
| Basefold | :x: | :x: | :x: | :x: | :x: |
115-
| **Folding Schemes** | **Lambdaworks** | **Arkworks** | **Halo2** | **gnark** | **Constantine** |
116-
| Nova | :x: | :heavy_check_mark: | :x: | :x: | :x: |
117-
| Supernova | :x: | :x: | :x: | :x: | :x: |
118-
| Protostar | :x: | :x: | :x: | :x: | :x: |
119-
| Protogalaxy | :x: | :heavy_check_mark: | :x: | :x: | :x: |
110+
| Binius | :x: | :x: | :x: | :x: | :x: |
111+
| Circle FRI | :x: | :x: | :x: | :x: | :x: |
120112

121113
Additionally, provers are compatible with the following frontends and VMs:
122114

@@ -129,7 +121,6 @@ Additionally, provers are compatible with the following frontends and VMs:
129121
| Plonk | Noir | :x: |
130122
| Stark | Winterfell | :heavy_check_mark: |
131123
| Stark | Miden | :heavy_check_mark: |
132-
| Stark | Cairo | :heavy_check_mark: |
133124

134125
This can be used in a multi prover setting for extra security, or as a standalone to be used with Rust.
135126

provers/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This folder contains the different provers currently supported by lambdaworks:
66
- [Groth 16](https://github.com/lambdaclass/lambdaworks/tree/main/provers/groth16)
77
- [Plonk](https://github.com/lambdaclass/lambdaworks/tree/main/provers/plonk)
88
- [STARKs](https://github.com/lambdaclass/lambdaworks/tree/main/provers/stark)
9-
- [Cairo](https://github.com/lambdaclass/lambdaworks/tree/main/provers/cairo)
9+
- [Cairo](https://github.com/lambdaclass/lambdaworks/tree/a591186e6c4dd53301b03b4ddd69369abe99f960/provers/cairo) - This is only for learning purposes and no longer supported. The [docs](../docs/src/starks/) still contain information that could be useful to understand and learn how Cairo works.
1010

1111
The reference papers for each of the provers is given below:
1212
- [Groth 16](https://eprint.iacr.org/2016/260)
@@ -22,5 +22,4 @@ Using one prover or another depends on usecase and other desired properties. We
2222

2323
## Using provers
2424

25-
- [Cairo prover](https://github.com/lambdaclass/lambdaworks/blob/main/provers/cairo/README.md)
2625
- [Plonk prover](https://github.com/lambdaclass/lambdaworks/blob/main/provers/plonk/README.md)

provers/cairo/Cargo.toml

Lines changed: 0 additions & 121 deletions
This file was deleted.

0 commit comments

Comments
 (0)