Skip to content

Add is_in_subgroup for G2 and make G2 ops generic. #255

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

Open
wants to merge 73 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
578d1c0
Add G2 subgroup check.
feltroidprime Nov 8, 2024
a16bf54
move to trait
feltroidprime Nov 8, 2024
848af0e
fix build
feltroidprime Nov 8, 2024
7b1b916
Fix genericity
feltroidprime Nov 8, 2024
b896b6c
Merge branch 'main' into g2
feltroidprime Dec 2, 2024
4815075
Merge branch 'main' into g2
feltroidprime Dec 6, 2024
52e85ed
Merge branch 'main' into g2
feltroidprime Dec 6, 2024
a205af7
rewrite fmt
feltroidprime Dec 6, 2024
88f5c31
build
feltroidprime Dec 6, 2024
99b482d
Merge branch 'main' into g2
feltroidprime Dec 10, 2024
029a0ba
Merge branch 'main' into g2
feltroidprime Dec 10, 2024
1394cf4
Fix.
feltroidprime Dec 10, 2024
bd33c85
Release v0.15.1 : Bump RiscZero constants to v1.2 (#268)
feltroidprime Dec 11, 2024
82b65ca
fix: Bump typescript package version. (#269)
feltroidprime Dec 11, 2024
a881755
v0.15.2: fix: Noir circuit name too long when log_n >= 10. (#271)
feltroidprime Dec 12, 2024
5da7e56
Migrate to current PyO3 version (#275)
sigmadawg Dec 14, 2024
bfcbaed
v0.15.3: Honk contract bytecode, calldata & resources optimisations. …
feltroidprime Dec 16, 2024
d781024
Risc0 Adjustments and Sample App (#279)
raugfer Dec 27, 2024
f1a3dc2
Perf epns (#280)
shramee Jan 1, 2025
61b9d82
circom/Noir poseidon hash_2 cairo impl (#282)
neotheprogramist Jan 3, 2025
c0ff7b0
Adds support for the UltraStarknetHonk (#287)
raugfer Jan 24, 2025
9d6768d
(py): Adds primitives needed for BLS12-381 hash_to_curve G1 & G2 circ…
petscheit Feb 6, 2025
ab1ea09
bug: Fix generated asdf `tool-versions` file name. (#295)
feltroidprime Feb 7, 2025
af8ac9e
Bump next from 14.2.10 to 14.2.21 in /tools/npm/integration-test-suit…
dependabot[bot] Feb 7, 2025
07948c6
ci: Parallelize devnet e2e test. (#297)
feltroidprime Feb 7, 2025
7d071d8
Noir vk/proof parsing & calldata gen in Rust + Wasm binds (#288)
raugfer Feb 7, 2025
d442707
Update proof/vk files of Noir example following nargo/bb update to 1.…
raugfer Feb 10, 2025
56c118c
chore: change param order to match related circuit output order (#298)
petscheit Feb 10, 2025
b95a934
Cairo 2.9.2 update with manual Serde on relevant structs (#299)
feltroidprime Feb 11, 2025
0c19e6c
Update recommended bb version to 0.67 (#302)
feltroidprime Feb 12, 2025
d10d3dc
ecdsa & schnorr sigs + Rust/Py bindings (#300)
feltroidprime Apr 3, 2025
29d8859
WASM bindings for Schnorr/ECDSA calldata builders (#304)
raugfer Feb 13, 2025
55b759f
Release v0.15.4 (#305)
feltroidprime Feb 13, 2025
7702ecb
Adds poseidon_hash_bn254(x, y) in garaga_rs with Js and Python bindin…
feltroidprime Feb 21, 2025
33ec9eb
Release v0.15.5 (#309)
feltroidprime Feb 28, 2025
cee9253
Update Noir & Barretenberg version support to 1.0.0-beta2 & 0.74.0 (#…
raugfer Mar 3, 2025
b4a91ac
Add support for Ultra ZK flavours (#306)
raugfer Mar 17, 2025
d4c71cc
Pairing check bytecode optimisations. (#316)
feltroidprime Mar 24, 2025
d0075fb
Upgrades support for BB v0.82.2 (#317)
raugfer Mar 25, 2025
6f2641c
Remove remaining ark dependencies in favour of lambdaworks. (#319)
feltroidprime Mar 25, 2025
66b2d46
Honk contracts bytecode optimisations (#321)
feltroidprime Mar 26, 2025
553cf7a
Simplify honk contract generator (#322)
feltroidprime Mar 26, 2025
f958980
Update Cairo version to 2.11.2 (#323)
feltroidprime Mar 26, 2025
8800d42
process `scalar_to_epns` digits 2 by 2 to avoid dealing with alternat…
feltroidprime Mar 26, 2025
048ff9a
Files / Folders re-org (#326)
feltroidprime Mar 26, 2025
f44aee1
Bring back removed final exp witness test (#327)
feltroidprime Mar 27, 2025
457e36b
`make rewrite` takes now 2 sec instead of 18 sec (#328)
feltroidprime Mar 27, 2025
7991e52
Support EdDSA signatures over Ed25519 (#329)
feltroidprime Mar 28, 2025
960359f
Small `ec_safe_add` optimisation + clean EdDSA files. (#331)
feltroidprime Mar 28, 2025
9a420d3
Release v0.16.0 (#332)
feltroidprime Mar 28, 2025
a181876
Optimize SHA-512 (#333)
feltroidprime Mar 28, 2025
a454026
Optimize SHA-512 pt. II. (#334)
feltroidprime Mar 29, 2025
e306cb8
Bump next from 14.2.21 to 14.2.25 in /tools/npm/integration-test-suit…
dependabot[bot] Mar 29, 2025
63f4740
Repo config (#337)
feltroidprime Mar 29, 2025
70aea3b
[WIP] Mutator Set contract with zk verifier (#338)
feltroidprime Mar 31, 2025
a5846a2
Get rid of the `build` folder (#345)
feltroidprime Mar 31, 2025
edbe553
Avoid unecessary hashing of points & scalars in Noir verifier. (#342)
feltroidprime Apr 1, 2025
46786ce
Noir verifier : avoid checking VK pts are on curve + add missing `shp…
feltroidprime Apr 1, 2025
b4ea473
Add and adapt Mutator set rust code from neptune. (#350)
feltroidprime Apr 1, 2025
cf96ac9
Update Risc0 verifier to 2.0.0 (#339)
feltroidprime Apr 2, 2025
0681ce6
Sync & update docs. (#351)
feltroidprime Apr 2, 2025
cb96e15
Fix: CI skipping for docs (#354)
feltroidprime Apr 2, 2025
e7a325c
Assume last Ri is 1 in pairing checks calldata (#353)
feltroidprime Apr 2, 2025
103b9eb
clippy, ci fix (#355)
feltroidprime Apr 2, 2025
21b143a
Adds basic `.nr` program for MMR inclusion proof to `MutatorSet` cont…
feltroidprime Apr 2, 2025
a5363a4
Bump pyo3 & fastecdsa versions (#361)
dependabot[bot] Apr 2, 2025
013595c
RISC0 Fixes towards next release (#362)
raugfer Apr 2, 2025
517da80
Remove `mock` parameter in `extension_field_modulo_circuit.py` (#364)
feltroidprime Apr 2, 2025
665fbfa
Remove `next_u288` function to use `IntoCircuitInputValue` trait (#365)
feltroidprime Apr 2, 2025
5012b8e
Refactor CI skipping (#366)
feltroidprime Apr 2, 2025
2f6d8be
Fill precomputed `(1/SUBGROUP_SIZE)` instead of computing it in circu…
feltroidprime Apr 2, 2025
96daef4
Avoid adding 0 at loop initialization. (#368)
feltroidprime Apr 2, 2025
7ffaf7e
Optimize `accumulate_delta_range_relation` circuit. (#371)
feltroidprime Apr 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
target-dir = ".cargo/garaga_rs/target"
2 changes: 1 addition & 1 deletion .github/scripts/declare_maintained_contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ async def declare_contract_from_path_both_networks(path: Path, fee: Fee):

asyncio.run(
declare_contract_from_path_both_networks(
Path("src/contracts/risc0_verifier_bn254"), Fee.STRK
Path("src/contracts/autogenerated/risc0_verifier_bn254"), Fee.STRK
)
)
38 changes: 32 additions & 6 deletions .github/workflows/cairo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,44 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'same_content_newer'
concurrent_skipping: 'never'
paths: '["src/**"]'


test-cairo:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: software-mansion/setup-scarb@v1
# Checkout the repository
- name: Checkout
uses: actions/checkout@v3

- name: Setup Starknet Foundry
uses: foundry-rs/setup-snfoundry@v4
- name: Setup Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.9.1"
- run: scarb fmt --check
scarb-lock: ./src/Scarb.lock

- name: Run scarb fmt check in src
working-directory: src/
run: scarb fmt --check
- name: Run scarb test in src
working-directory: src/
- run: cd src/ && scarb test
run: scarb test

- name: Run scarb fmt check in mutator_set
working-directory: src/contracts/mutator_set
run: scarb fmt --check
- name: Run snforge test in mutator_set
working-directory: src/contracts/mutator_set
run: snforge test

- name: Run scarb fmt check in risc0_sample_app
working-directory: src/contracts/risc0_sample_app/fibonacci_sequencer
run: scarb fmt --check
# Conflicting with the e2e test : we don't want to dedeploy the verifier at each commit.
# - name: Run snforge test in risc0_sample_app
# working-directory: src/contracts/risc0_sample_app/fibonacci_sequencer
# run: snforge test
9 changes: 5 additions & 4 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'same_content_newer'
concurrent_skipping: 'never'
paths_ignore: '["**/README.md", "**/docs/**"]'

devnet-test:
needs: pre_job
Expand All @@ -32,18 +33,18 @@ jobs:
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.81.0
override: true
profile: minimal
- name: Setup Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.9.1"
scarb-version: "2.11.2"
- name: Install dependencies
run: make setup

- name: Install devnet
run: ./tests/contracts_e2e/install_devnet.sh

- name: Run tests
run: source venv/bin/activate && pytest -s -x tests/contracts_e2e/e2e_test.py
run: source venv/bin/activate && pytest -n auto -s -x tests/contracts_e2e/e2e_test.py
6 changes: 4 additions & 2 deletions .github/workflows/hydra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'same_content_newer'
concurrent_skipping: 'never'
paths_ignore: '["**/README.md", "**/docs/**"]'


test-hydra:
needs: pre_job
Expand Down Expand Up @@ -54,7 +56,7 @@ jobs:
- name: Set up Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.9.1"
scarb-version: "2.11.2"
- name: Run make rewrite and check for unstaged changes
run: |
source venv/bin/activate
Expand Down
29 changes: 24 additions & 5 deletions .github/workflows/maturin.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
name: CI
on:
push:
branches:
- main
- master
tags:
- '*'
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'never'
paths_ignore: '["**/README.md", "**/docs/**"]'

linux:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
Expand Down Expand Up @@ -49,6 +60,8 @@ jobs:
path: dist

musllinux:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
Expand Down Expand Up @@ -80,6 +93,8 @@ jobs:
path: dist

windows:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
Expand Down Expand Up @@ -107,6 +122,8 @@ jobs:
path: dist

macos:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
Expand All @@ -133,6 +150,8 @@ jobs:
path: dist

sdist:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -164,7 +183,7 @@ jobs:

- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.9.1"
scarb-version: "2.11.2"
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,22 @@ on:
workflow_dispatch:

jobs:
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'never'
paths: '["tools/**"]'

npm-test:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
name: NPM Test
runs-on: ubuntu-latest
steps:
Expand Down
38 changes: 28 additions & 10 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,23 @@ on:
workflow_dispatch:

jobs:
test:
name: Test
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'never'
paths: '["tools/**"]'

test-wasm:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
name: test-wasm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -23,10 +38,12 @@ jobs:
- run: cargo install wasm-pack
- name: Run wasm specific tests
working-directory: tools/garaga_rs
run: wasm-pack test --node --release --no-default-features
run: RUSTFLAGS='--cfg getrandom_backend="wasm_js"' wasm-pack test --node --release --no-default-features

build:
name: Build
build-wasm:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
name: build-wasm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -44,9 +61,10 @@ jobs:
if-no-files-found: error

test-integration:
name: Test integration
needs: [pre_job, build-wasm]
if: needs.pre_job.outputs.should_skip != 'true'
name: test-integration
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -56,7 +74,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y \
libnss3 libxss1 libasound2 libatk-bridge2.0-0 libatk1.0-0 \
libnss3 libxss1 libasound2t64 libatk-bridge2.0-0 libatk1.0-0 \
libcups2 libxcomposite1 libxdamage1 libxrandr2 libgbm1 \
libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libgtk-3-0
- name: Download package file as artifact
Expand All @@ -77,7 +95,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')" # Only run on tag pushes
needs: [build, test, test-integration]
needs: [build-wasm, test-wasm, test-integration]
steps:
- uses: actions/checkout@v4
- name: Set up Rust
Expand All @@ -90,7 +108,7 @@ jobs:

- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.9.1"
scarb-version: "2.11.2"
- name: Set up Python 3.10.14
uses: actions/setup-python@v5
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
!*_input.json
!*Proof.json
!frobenius_*.json
!*test_vectors.json
__pycache__
venv
*.env
Expand All @@ -27,5 +28,5 @@ tests/contracts_e2e/devnet/*

!hydra/garaga/starknet/groth16_contract_generator/examples/*.json


*snfoundry_cache
!tools/npm/garaga_rs/*.json
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scarb 2.11.2
Loading