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

Use optimized template #1

Draft
wants to merge 786 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
786 commits
Select commit Hold shift + click to select a range
1049da4
fix: two indep commitments work for bn254
Tabaie May 30, 2023
319daca
fix: attempt at commitment hint input filtering
Tabaie May 30, 2023
d5912b2
refactor: use c.CommitmentWireIndexes in Plonk backend
Tabaie May 30, 2023
c438c44
build: generify plonk refactor
Tabaie May 30, 2023
cb241c3
fix: single commitments work again
Tabaie May 30, 2023
6aece8f
fix: commitment to commitment works
Tabaie May 31, 2023
348b0f6
build: some generification and remove commented code
Tabaie May 31, 2023
a39ea6b
build generify bn254 fixes
Tabaie May 31, 2023
4d71f19
chore: clean up tests
Tabaie May 31, 2023
4a72cab
chore remove prints
Tabaie May 31, 2023
57a1dd2
perf(bls12-381/pairing): mul lines 2-by-2
yelhousni May 31, 2023
d0895dc
perf(bls12-381/fixed-pairing): isolate last iteration
yelhousni May 31, 2023
4de2ce1
fix: test double fixed pairing
yelhousni May 31, 2023
72bc177
fix(bls12-381/fixed-pairing): fix last iteration computation
yelhousni May 31, 2023
9b24466
perf(bn254/fixed-pair): mul precomputed lines 2-by-2
yelhousni May 31, 2023
d2f8f2d
refactor: remove profiler code
yelhousni May 31, 2023
c6de6f8
docs(fixed-emulated-pairing): add some comments
yelhousni May 31, 2023
56be842
fix: remove unnecessary import
Tabaie May 31, 2023
09e9a1e
fix: groth16 works. plonk fuzzer fails
Tabaie May 31, 2023
fe24944
Merge pull request #707 from ConsenSys/perf/scalarMul-2chain
yelhousni Jun 1, 2023
dd6c7f1
feat(native/bls12-377): fixed-argument pairing
yelhousni Jun 1, 2023
215f19b
feat(native/bls24-315): fixed-argument pairing
yelhousni Jun 1, 2023
270dc19
docs: comment fixed pairing
yelhousni Jun 1, 2023
8b0aba7
feat: define precomputed lines only if initalising
ivokub Jun 1, 2023
f2a8748
feat: lazy line initialising
ivokub Jun 1, 2023
ea3e180
refactor: make native precomputed lines private
ivokub Jun 1, 2023
2457d31
refactor failing test
gbotrel Jun 1, 2023
bb53099
fix: randomize fake commitments
Tabaie Jun 1, 2023
bcb3764
feat: commitment placeholder -> randomness
Tabaie Jun 1, 2023
331a180
style: unused input -> _
Tabaie Jun 1, 2023
bd68896
Merge pull request #712 from ConsenSys/fix/plonk-commit0
Tabaie Jun 1, 2023
71e9bf0
Merge branch 'develop' into feat/g16-multicommits
Tabaie Jun 1, 2023
9f689a9
test all curves
Tabaie Jun 1, 2023
c8664c2
refactor(native/pairing): no need to isolate last iteration in fixed 1ML
yelhousni Jun 2, 2023
e24c520
perf(bn254-pairing): some missed small optims
yelhousni Jun 2, 2023
07a87ed
refactor(native/pairing): no need to switch -1/1 when lines precomputed
yelhousni Jun 2, 2023
6304532
perf(bn254/multi-pairing): mul lines 2-by-2 when bit=0
yelhousni Jun 2, 2023
5711c4a
feat: commitment info in groth16.vk[bn254] serialization
Tabaie Jun 2, 2023
b2d64b0
build: generify
Tabaie Jun 2, 2023
7526a99
fix: make linter happy
gbotrel Jun 2, 2023
9469995
fix: bellman test vk
Tabaie Jun 2, 2023
5eea030
Merge branch 'feat/g16-multicommits' of https://github.com/ConsenSys/…
Tabaie Jun 2, 2023
88eae36
chore: document hollow, remove in-house search
Tabaie Jun 2, 2023
b51a676
refactor(evm/ecpair): reduce the number of fixed circuits
yelhousni Jun 5, 2023
6ec0af7
feat: add sha2 primitive (#689)
ivokub Jun 5, 2023
d077df7
refactor: FindInSlice use
Tabaie Jun 5, 2023
4efbecf
feat: in-place-ish DivideByThresholdOrList
Tabaie Jun 6, 2023
f48a7a2
chore: rm deadcd, improve verifier mem, some docs
Tabaie Jun 6, 2023
d80bc98
build generify
Tabaie Jun 6, 2023
2246e3e
refactor: remove duplicate test utils
Tabaie Jun 7, 2023
6358aab
refactor: separate groth16 commitmentInfo experiments
Tabaie Jun 8, 2023
700bdcd
feat: groth16 commitmetInfo experiments
Tabaie Jun 8, 2023
13b08da
refactor: bn254 groth16 commitmentinfo
Tabaie Jun 8, 2023
c45876d
build: generify bn254 changes
Tabaie Jun 8, 2023
0948be5
refactor: reflect changes in plonk prover
Tabaie Jun 8, 2023
9945618
refactor: reflect commitmentInfo changes in plonk
Tabaie Jun 8, 2023
a0727e8
fix: groth16 tests pass
Tabaie Jun 8, 2023
7bee2c1
fix: committed commitment folding bug
Tabaie Jun 8, 2023
7c958f1
build: generify the changes
Tabaie Jun 8, 2023
2db7cf0
remove: some unused code
Tabaie Jun 8, 2023
28a2923
remove: unused func
Tabaie Jun 8, 2023
a737040
dep: gnark-crypto
Tabaie Jun 8, 2023
62e1747
revert: forced conversion
Tabaie Jun 8, 2023
50cdf3c
test: add failing test for round trip pk serialization
gbotrel Jun 8, 2023
3651930
test: added missing integration test for round trip serialization
gbotrel Jun 8, 2023
300f493
test: added failing test for groth16 pk serialization round trip
gbotrel Jun 8, 2023
e06b50b
fix: commitmentInfo serialization
Tabaie Jun 9, 2023
61663da
chore: more accurate field name, remove some dead code
Tabaie Jun 9, 2023
aa46799
Merge pull request #702 from ConsenSys/feat/g16-multicommits
Tabaie Jun 9, 2023
9ba8306
Merge branch 'develop' into fix/serialization
Tabaie Jun 9, 2023
512b096
fix: bn254 multicommit proving keys
Tabaie Jun 9, 2023
3195b63
fix: the previous fix
Tabaie Jun 9, 2023
3de391c
build generify changes
Tabaie Jun 9, 2023
05ea526
fix: nil -> empty slice
Tabaie Jun 9, 2023
fddaf71
build: go gen
Tabaie Jun 9, 2023
92ec8a8
fix: K -> Z
Tabaie Jun 9, 2023
679d38d
dep: newer gnark-crypto
Tabaie Jun 9, 2023
ede869d
revert: special case for empty slice
Tabaie Jun 9, 2023
172cc24
Merge pull request #723 from ConsenSys/fix/serialization
Tabaie Jun 9, 2023
e0c3eca
test: JointScalarMulBase
yelhousni Jun 15, 2023
be7959e
feat: implement add-only Joye scalarMul
yelhousni Jun 16, 2023
4915d5d
fix(add-only scalarMul): handle 0-scalar and (0,0) edge-cases
yelhousni Jun 16, 2023
7eb03a8
perf: use ScalarMulAddOnly is ecrecover and ecmul precompiles
yelhousni Jun 16, 2023
74e5727
perf: use ScalarMulAddOnly is ecrecover and ecmul precompiles
yelhousni Jun 16, 2023
a932c06
refactor: remove api from ScalarMulAddOnly arguments
yelhousni Jun 20, 2023
d5a7678
refactor: compactify commitment tests (#728)
Tabaie Jun 20, 2023
ffc3d12
feat: added dummy setup part for g16 multi commit (#725)
gbotrel Jun 21, 2023
0fdc46e
fix: emulated ToBits (#731)
ivokub Jun 22, 2023
9fe3b8c
perf: add a generalized version of binary selection (#636)
aybehrouz Jun 22, 2023
a75adf0
feat: update plonk solidity template (#729)
gbotrel Jun 23, 2023
e1332fa
feat/ci: make CI run solidity verification with integartion test. Add…
gbotrel Jun 23, 2023
6248c67
Merge branch 'develop' into feat/gkr-api
Tabaie Jun 27, 2023
3fad3c8
chore: merge changes
Tabaie Jun 27, 2023
1243f3c
chore: make staticcheck happy
Tabaie Jun 27, 2023
96b4154
build go generate
Tabaie Jun 27, 2023
bbe066b
docs: GKR API
Tabaie Jun 27, 2023
9c2f87f
fix: replace hints bn254
Tabaie Jun 27, 2023
82949fd
build replace hints generify
Tabaie Jun 27, 2023
4bc9e04
feat: gkr-api for plonk
Tabaie Jun 27, 2023
92cdb5d
refactor: gkrAPI is no longer a frontend.API
Tabaie Jun 27, 2023
c842b87
Merge pull request #733 from Consensys/refactor/gkr-notfrontend-api
Tabaie Jun 28, 2023
abaed57
Merge pull request #443 from Consensys/feat/gkr-api
Tabaie Jun 28, 2023
8e07638
feat: [PLONK_AUDIT_4-11] fixes #735
ThomasPiellard Jun 29, 2023
edb126c
fix: fixed visibilities, changed library to contract
ThomasPiellard Jun 29, 2023
71deee4
refactor: use gnark-crypto gate registries
Tabaie Jun 29, 2023
6b69496
feat: "named gate"
Tabaie Jun 29, 2023
e6838ea
fix: Verify is public
ThomasPiellard Jun 29, 2023
bfb33f8
feat: [PLONK_AUDIT_4-9] fixes 738
ThomasPiellard Jun 29, 2023
fc046ab
refactor: inputs check are in a proper function
ThomasPiellard Jun 29, 2023
ded48e2
Merge pull request #737 from Consensys/feat/gkr-custom-gates
Tabaie Jun 29, 2023
768c450
fix: compute_pi takes the proof only when commit is called
ThomasPiellard Jun 30, 2023
0b1dd3d
feat: restored comments
ThomasPiellard Jun 30, 2023
3afdc11
Merge pull request #736 from Consensys/fix/plonk_audit_4-11
ThomasPiellard Jun 30, 2023
23920cd
Merge branch 'develop' into fix/plonk_audit_4-9
ThomasPiellard Jun 30, 2023
21aed01
Merge pull request #739 from Consensys/fix/plonk_audit_4-9
ThomasPiellard Jun 30, 2023
05f10c9
feat: [PLONK_AUDIT_4-4] fixes #741
ThomasPiellard Jun 30, 2023
ef61960
feat: [PLONK_AUDIT_4-8] fixes #743
ThomasPiellard Jun 30, 2023
7a5e546
feat: added plonk.ProvingKey WriteRawTo and UnsafeReadFrom (#746)
gbotrel Jul 1, 2023
13bf504
fix: plonk scs serialization issues (#747)
gbotrel Jul 2, 2023
b85d0e0
perf: async parallel plonk pr read (#748)
gbotrel Jul 2, 2023
9d78c6a
fix: range checks for quotient + linearised polynomials openigns
ThomasPiellard Jul 4, 2023
f1346f6
refactor: rename ScalarMulAddOnly to ScalarMul and ditch old
yelhousni Jul 4, 2023
8ce12ed
Merge pull request #708 from Consensys/feat/fixed-pairing
yelhousni Jul 4, 2023
5f2979f
Merge pull request #726 from Consensys/emulated/scalarMul
yelhousni Jul 4, 2023
b18e0f7
Merge branch 'develop' into evm/ecpair
yelhousni Jul 4, 2023
8bdadb1
refactor: apply suggested edits
yelhousni Jul 4, 2023
b267eb4
Merge pull request #698 from Consensys/evm/ecpair
yelhousni Jul 4, 2023
bb5a773
Merge pull request #714 from Consensys/perf/emulated-pairing
yelhousni Jul 4, 2023
d016813
Merge pull request #744 from Consensys/fix/plonk_audit_4-8
ThomasPiellard Jul 4, 2023
9b3c977
feat: status of staticcalls are checked, fixes #753
ThomasPiellard Jul 4, 2023
cf4d5ef
fix: fixed pairing check (wait for 4-5 to check staticcall using dedi…
ThomasPiellard Jul 4, 2023
c0ff257
fix: loop counter corrected fixes #755
ThomasPiellard Jul 4, 2023
6710ba5
feat: [PLONK_AUDIT_4-15] fixes 757
ThomasPiellard Jul 4, 2023
81eb568
Merge pull request #742 from Consensys/fix/plonk_audit_4-4
ThomasPiellard Jul 5, 2023
b2b9574
perf: ELM03+Joye07 for emulated scalarMul
yelhousni Jul 5, 2023
c44845c
Merge pull request #756 from Consensys/fix/plonk_audit_4-13
ThomasPiellard Jul 5, 2023
65ee3e0
fix: fixed #761
ThomasPiellard Jul 5, 2023
a7d2731
fix: create full-length slice for gkr value (#751)
ivokub Jul 5, 2023
2d971fa
Merge pull request #754 from Consensys/fix/plonk_audit_4-5
ThomasPiellard Jul 5, 2023
a33d799
Merge branch 'develop' into fix/plonk_audit_4-15
ThomasPiellard Jul 5, 2023
4512c5e
Merge pull request #758 from Consensys/fix/plonk_audit_4-15
ThomasPiellard Jul 5, 2023
e39c196
Merge pull request #762 from Consensys/fix/i_761
ThomasPiellard Jul 5, 2023
5e61fbf
fix: fixes #768
ThomasPiellard Jul 6, 2023
aac51aa
Merge pull request #769 from Consensys/fix/plonk_contract_i_768
ThomasPiellard Jul 6, 2023
bcd6b6b
fix: do not accumulate terms with zero coefficient for addition (#763)
ivokub Jul 11, 2023
932e5f9
perf: special E12 squaring in the second ML iteration
yelhousni Jul 11, 2023
7f80932
feat: zeta_power_n_minus_one save and reused in compute_pi
ThomasPiellard Jul 12, 2023
b9f5d0c
perf: special E24 squaring in the second ML iteration
yelhousni Jul 12, 2023
dd44f60
perf(emulated/bn254): special E12 squaring in the second ML iteration
yelhousni Jul 12, 2023
68009df
perf(emulated/bn254): account for line coeff is 1
yelhousni Jul 12, 2023
e9a01fd
fix: update circuits stats
yelhousni Jul 12, 2023
c5682ca
Merge branch 'develop' into perf/pairing-add0
yelhousni Jul 12, 2023
87e043f
feat: described zpnmo parameter + reuse zpnmo in compute_alpha_square…
ThomasPiellard Jul 14, 2023
501e57d
fix: update develop version (#776)
ivokub Jul 17, 2023
f2d37a5
Merge pull request #760 from Consensys/perf/emulated-scalarMul
yelhousni Jul 17, 2023
86f8e87
Merge branch 'develop' into perf/pairing-add0
yelhousni Jul 17, 2023
6c150c9
Merge pull request #772 from Consensys/perf/pairing-add0
yelhousni Jul 17, 2023
55b9478
Merge pull request #775 from Consensys/fix/plonk_audit_4-23
ThomasPiellard Jul 20, 2023
e1cb5a7
perf: save 1 Select at each iteration in the emulated scalar mul
yelhousni Jul 24, 2023
ceed757
Merge pull request #783 from Consensys/perf/emulated-scalarMul
yelhousni Jul 25, 2023
860db7c
solidity optimizations (#781)
ThomasPiellard Jul 26, 2023
b39b13f
Perf: Improve MultiLin.Eval number of constraints (#788)
Tabaie Jul 26, 2023
fecdc4f
chore: update gnark-crypto dependency (#790)
ivokub Jul 26, 2023
af65150
Feat: Export multicommit (#789)
AlexandreBelling Jul 26, 2023
2b0cb40
cache array index - 200 gas
thedarkjester Jul 26, 2023
dbe0974
Merge pull request #792 from Consensys/perf/solidity-cached-array-index
ThomasPiellard Jul 26, 2023
cbce49c
feat: hash_fr in assembly + removed Utils
ThomasPiellard Jul 26, 2023
6a143a1
feat: compute_pi assembly ok
ThomasPiellard Jul 27, 2023
f78c84a
clean: removed dead code
ThomasPiellard Jul 27, 2023
7cc87a7
clean: removed more dead code
ThomasPiellard Jul 27, 2023
1bf6d08
clean: even more deadcode
ThomasPiellard Jul 27, 2023
39a57a9
feat: compute_pi in main assembly block ok
ThomasPiellard Jul 27, 2023
69102f3
clean: removed dead code
ThomasPiellard Jul 27, 2023
d361e2d
Merge pull request #794 from Consensys/feat/clean_hash_fr
ThomasPiellard Jul 27, 2023
6018cce
feat: challenges derivation in the main block
ThomasPiellard Jul 27, 2023
1b89624
feat: check_input_size in main block
ThomasPiellard Jul 27, 2023
aceb2d8
feat: one single assembly block ok
ThomasPiellard Jul 27, 2023
f0e12e7
feat: zeta to the n minus 1 extracted from compute_pi
ThomasPiellard Jul 27, 2023
cbb7d55
feat: verifier in one assembly block
ThomasPiellard Jul 27, 2023
7aebeeb
feat: put function calls at the beginning of Verify
ThomasPiellard Jul 27, 2023
630de9c
feat: sanity checks in calldata Ok
ThomasPiellard Jul 28, 2023
7429a26
feat: derive challenges calldata ok
ThomasPiellard Jul 28, 2023
60e8908
feat: sum_pi_wo_commit calldata ok
ThomasPiellard Jul 28, 2023
a8e20a8
feat: pi contribution in calldata ok
ThomasPiellard Jul 28, 2023
a428950
feat: verify_quotient_poly_eval_at_zeta calldata ok
ThomasPiellard Jul 28, 2023
fb97ae4
feat: fold_h calldata ok
ThomasPiellard Jul 28, 2023
a6acfde
feat: compute_commitment_linearised_polynomial calldata ok
ThomasPiellard Jul 28, 2023
99094ec
feat: calldata ok
ThomasPiellard Jul 28, 2023
4275e7e
feat: calldatacopy in compute_gamma_kzg
ThomasPiellard Jul 28, 2023
2f734de
feat: use state instead of mload(0x40)
ThomasPiellard Jul 28, 2023
716f7df
Merge pull request #795 from Consensys/feat/clean_compute_pi
ThomasPiellard Jul 28, 2023
b4cce69
fix: compute_kzg fixed calldata
ThomasPiellard Jul 28, 2023
3948b7c
fix: fixed kzg G1 srs in template :/
ThomasPiellard Jul 28, 2023
cb28b58
check_proof_size doesn't need the proof
ThomasPiellard Jul 31, 2023
3d99ad9
fix: fixed double comments
ThomasPiellard Jul 31, 2023
9d5351c
fix: removed deadcode
ThomasPiellard Jul 31, 2023
7ca4af9
Merge pull request #796 from Consensys/feat/calldata_pi_proof
ThomasPiellard Jul 31, 2023
38c5b90
feat: staticcall fails -> revert immediately instead of updated state…
ThomasPiellard Aug 3, 2023
3501b6a
clean: removed dead code + double comments
ThomasPiellard Aug 3, 2023
bd4a397
Merge pull request #804 from Consensys/feat/revert_staticcall
ThomasPiellard Aug 3, 2023
c9c27a0
Use optimized template
recmo Aug 11, 2023
e89e677
make the templates work
kustosz Aug 11, 2023
78e64b0
negate verifier constants
kustosz Aug 11, 2023
12b020e
improve const naming
kustosz Aug 11, 2023
7752868
Intro addmul, document, make internal
recmo Aug 14, 2023
3a7f8fd
Cleanup
recmo Aug 14, 2023
9b1b701
asm is memory-safe
recmo Aug 14, 2023
d10bd42
Refactor
recmo Aug 14, 2023
10d3658
Use calldatacopy
recmo Aug 14, 2023
fc91282
Optimize public input msm
recmo Aug 14, 2023
f8723af
Sub gas does not make much sense
recmo Aug 14, 2023
2266447
Documentation
recmo Aug 14, 2023
808734a
Cleanup
recmo Aug 14, 2023
3014135
update template
kustosz Aug 14, 2023
1eb4668
fix: plonk must commit to Qcp
Tabaie Aug 15, 2023
6bea4ab
fix: fs bsb22 commitment fs right before needed
Tabaie Aug 15, 2023
a77b708
build: generify bsb22 comm fs move
Tabaie Aug 15, 2023
54f0082
fix: move bsb22 comm fs in plonk prover
Tabaie Aug 15, 2023
b79e8b0
fix: don't bind bsb22 comm to gamma
Tabaie Aug 15, 2023
372f7f3
Update issue templates
gbotrel Aug 17, 2023
e162c98
Create pull_request_template.md
gbotrel Aug 17, 2023
b672f78
perf(bn254/pairing): pre-compute negations -x/y
yelhousni Aug 18, 2023
4c9ac44
perf(bls12-381/pairing): pre-compute negations -x/y
yelhousni Aug 18, 2023
de5a775
perf(bls12-377/pairing): pre-compute negations -x/y
yelhousni Aug 18, 2023
a9836ca
perf(bls24-315/pairing): pre-compute negations -x/y
yelhousni Aug 18, 2023
4e132d0
Merge branch 'master' into develop
gbotrel Aug 18, 2023
00ed063
docs: update pr template
gbotrel Aug 18, 2023
18c8f3a
build: update direct dependencies
gbotrel Aug 18, 2023
8824986
docs: update version in README.md
gbotrel Aug 18, 2023
f9dfb87
Merge pull request #814 from Consensys/develop
gbotrel Aug 18, 2023
4abbcea
fix: remove panic when iterating constraints
gbotrel Aug 18, 2023
ad5e209
Merge pull request #812 from Consensys/fix/plonk-bsb-challenge
Tabaie Aug 21, 2023
b8aebea
Merge branch 'develop'
gbotrel Aug 22, 2023
8099397
build: update PR template and CI actions
gbotrel Aug 22, 2023
e3cb200
build: fix linter warning
gbotrel Aug 22, 2023
7e81e4b
build, ci: test solidity on ubuntu target only
gbotrel Aug 22, 2023
768fafe
perf: improve plonk prover memory footprint (#815)
gbotrel Aug 22, 2023
7aebee6
ci: avoid running std/ test on macOS CI
gbotrel Aug 22, 2023
4946bad
Merge branch 'master' of github.com:ConsenSys/gnark
gbotrel Aug 22, 2023
c1ea37c
Add revert reason objects
recmo Aug 24, 2023
9d9e47b
Compress points and proof
recmo Aug 24, 2023
7667ac5
Add natspec docs
recmo Aug 24, 2023
ae615e7
More natspec documentation
recmo Aug 24, 2023
77a45c6
Raw literal does not support backticks
recmo Aug 24, 2023
708d191
Fixes
recmo Aug 24, 2023
c14ec33
Fixes
recmo Aug 24, 2023
32dd6f1
refactor(pairing): remove bls24 bench + remove bn254 duplicate line
yelhousni Aug 25, 2023
0896fe1
Merge pull request #816 from Consensys/perf/pairing-neg
yelhousni Aug 25, 2023
2a6e749
feat: add sha3 primitive (#817)
NikitaMasych Aug 29, 2023
4ff0a15
Merge branch 'master' into evm-verifier
kustosz Aug 30, 2023
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
  •  
  •  
  •  
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Bug report
about: Create a report to help us improve
title: 'bug: ...'
labels: ''
assignees: ''

---

<!--- Provide a general summary of the issue in the Title above -->

## Description
<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->

## Expected Behavior
<!--- Tell us what should happen -->

## Actual Behavior
<!--- Tell us what happens instead -->

## Possible Fix
<!--- Not obligatory, but suggest a fix or reason for the bug -->

## Steps to Reproduce
<!--- Provide an unambiguous set of steps to reproduce this bug. -->
<!--- Include code to reproduce, if relevant -->
<!--- or include https://play.gnark.io snippet, if relevant -->
1.
2.
3.
4.

## Context
<!--- How has this bug affected you? What were you trying to accomplish? -->

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* gnark version used (e.g. v0.8.1, `HEAD@develop`):
* gnark-crypto version used:
* go version (e.g. 1.20.6):
* Operating System and version:
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
40 changes: 40 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Description

<!-- Please include a summary of the changes and the related issue. Please also include relevant motivation and context. -->

Fixes # (issue)

## Type of change

<!-- Please delete options that are not relevant. -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How has this been tested?

<!-- Please describe the tests that you ran or implemented to verify your changes. Provide instructions so we can reproduce. -->

- [ ] Test A
- [ ] Test B

# How has this been benchmarked?

<!-- Please describe the benchmarks that you ran to verify your changes. -->

- [ ] Benchmark A, on Macbook pro M1, 32GB RAM
- [ ] Benchmark B, on x86 Intel xxx, 16GB RAM

# Checklist:

- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I did not modify files generated from templates
- [ ] `golangci-lint` does not output errors locally
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

53 changes: 35 additions & 18 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.21.x
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
Expand All @@ -22,10 +22,6 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=5m
- name: install deps
run: go install golang.org/x/tools/cmd/goimports@latest && go install github.com/klauspost/asmfmt/cmd/asmfmt@latest
- name: gofmt
Expand All @@ -35,24 +31,35 @@ jobs:
go generate ./...
git update-index --assume-unchanged go.mod
git update-index --assume-unchanged go.sum
if [[ -n $(git status --porcelain) ]]; then echo "git repo is dirty after runing go generate -- please don't modify generated files"; echo $(git diff);echo $(git status --porcelain); exit 1; fi
if [[ -n $(git status --porcelain) ]]; then echo "git repo is dirty after running go generate -- please don't modify generated files"; echo $(git diff);echo $(git status --porcelain); exit 1; fi

# hack to ensure golanglint process generated files
- name: remove "generated by" comments from generated files
run: |
find . -type f -name '*.go' -exec sed -i 's/Code generated by .* DO NOT EDIT/FOO/g' {} \;
# on macos: find . -type f -name '*.go' -exec sed -i '' -E 's/Code generated by .* DO NOT EDIT/FOO/g' {} \;

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=5m

test:
strategy:
matrix:
go-version: [1.19.x]
go-version: [1.21.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
needs:
- staticcheck
steps:
- name: install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
Expand All @@ -63,10 +70,19 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: install deps
run: go install golang.org/x/tools/cmd/goimports@latest && go install github.com/klauspost/asmfmt/cmd/asmfmt@latest
run: |
go install golang.org/x/tools/cmd/goimports@latest && go install github.com/klauspost/asmfmt/cmd/asmfmt@latest
go install github.com/ethereum/go-ethereum/cmd/[email protected]
go install github.com/consensys/gnark-solidity-checker@latest
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
- name: Test
run: |
go test -v -short -timeout=30m ./...
go test -v -short -tags=solccheck -timeout=30m ./...
- name: Test race
run: |
go test -v -short -race -timeout=50m

slack-workflow-status-failed:
if: failure()
Expand All @@ -78,15 +94,16 @@ jobs:
steps:
- name: Notify slack -- workflow failed
id: slack
uses: slackapi/slack-github-action@v1.19.0
uses: slackapi/slack-github-action@v1.23.0
with:
payload: |
{
"actor": "${{ github.actor }}",
"repo": "${{ github.repository }}",
"status": "FAIL",
"title": "${{ github.event.pull_request.title }}",
"pr": "${{ github.event.pull_request.head.ref }}"
"pr": "${{ github.event.pull_request.head.ref }}",
"failed_step_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
Expand All @@ -101,7 +118,7 @@ jobs:
steps:
- name: Notify slack -- workflow succeeded
id: slack
uses: slackapi/slack-github-action@v1.19.0
uses: slackapi/slack-github-action@v1.23.0
with:
payload: |
{
Expand Down
68 changes: 47 additions & 21 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.21.x
- name: checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
Expand All @@ -26,10 +26,8 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=5m


- name: install deps
run: go install golang.org/x/tools/cmd/goimports@latest && go install github.com/klauspost/asmfmt/cmd/asmfmt@latest
- name: gofmt
Expand All @@ -39,24 +37,36 @@ jobs:
go generate ./...
git update-index --assume-unchanged go.mod
git update-index --assume-unchanged go.sum
if [[ -n $(git status --porcelain) ]]; then echo "git repo is dirty after runing go generate -- please don't modify generated files"; echo $(git diff);echo $(git status --porcelain); exit 1; fi
if [[ -n $(git status --porcelain) ]]; then echo "git repo is dirty after running go generate -- please don't modify generated files"; echo $(git diff);echo $(git status --porcelain); exit 1; fi

# hack to ensure golanglint process generated files
- name: remove "generated by" comments from generated files
run: |
find . -type f -name '*.go' -exec sed -i 's/Code generated by .* DO NOT EDIT/FOO/g' {} \;
# on macos: find . -type f -name '*.go' -exec sed -i '' -E 's/Code generated by .* DO NOT EDIT/FOO/g' {} \;

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=5m


test:
strategy:
matrix:
go-version: [1.19.x]
go-version: [1.21.x]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
needs:
- staticcheck
steps:
- name: install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
Expand All @@ -66,15 +76,30 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: install deps
run: go install golang.org/x/tools/cmd/goimports@latest && go install github.com/klauspost/asmfmt/cmd/asmfmt@latest
- name: Test
run: |
go test -v -timeout=30m ./...
- name: Test (race)
go install golang.org/x/tools/cmd/goimports@latest && go install github.com/klauspost/asmfmt/cmd/asmfmt@latest
go install github.com/ethereum/go-ethereum/cmd/[email protected]
- name: install solc deps
if: matrix.os == 'ubuntu-latest'
run: |
go test -v -timeout=50m -race -short ./...
go install github.com/consensys/gnark-solidity-checker@latest
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
- name: Test (windows / mac)
# on macOS CI / Windows CI we avoid running the std/ tests (they are run on ubuntu CI)
if: matrix.os != 'ubuntu-latest'
run: |
go test -v -timeout=60m .
go test -v -timeout=60m ./frontend/...
go test -v -timeout=60m ./backend/...
- name: Test (race and solc)
if: matrix.os == 'ubuntu-latest'
run: |
go test -v -tags=solccheck ./...
go test -v -timeout=60m -race -short ./...

slack-workflow-status-failed:
if: failure()
Expand All @@ -86,15 +111,16 @@ jobs:
steps:
- name: Notify slack -- workflow failed
id: slack
uses: slackapi/slack-github-action@v1.19.0
uses: slackapi/slack-github-action@v1.23.0
with:
payload: |
{
"actor": "${{ github.actor }}",
"repo": "${{ github.repository }}",
"status": "FAIL",
"title": "push to ${{ github.event.push.base_ref }}",
"pr": ""
"pr": "",
"failed_step_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
Expand All @@ -109,7 +135,7 @@ jobs:
steps:
- name: Notify slack -- workflow succeeded
id: slack
uses: slackapi/slack-github-action@v1.19.0
uses: slackapi/slack-github-action@v1.23.0
with:
payload: |
{
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@ gnarkd/circuits/**

# Jetbrains stuff
.idea/

# go workspace
go.work
go.work.sum

examples/gbotrel/**
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,17 @@ If you use `gnark` in your research a citation would be appreciated.
Please use the following BibTeX to cite the most recent release.

```bib
@software{gnark-v0.8.0,
@software{gnark-v0.9.0,
author = {Gautam Botrel and
Thomas Piellard and
Youssef El Housni and
Ivo Kubjas and
Arya Tabaie},
title = {ConsenSys/gnark: v0.8.0},
title = {ConsenSys/gnark: v0.9.0},
month = feb,
year = 2023,
publisher = {Zenodo},
version = {v0.8.0},
version = {v0.9.0},
doi = {10.5281/zenodo.5819104},
url = {https://doi.org/10.5281/zenodo.5819104}
}
Expand Down
Loading