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

v0.11.2 #438

Merged
merged 55 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2fc6b96
Fix some typos (#394)
jtraglia May 4, 2023
3f61172
Adding testing for deserialization of G1 and G2 points (#393)
asanso May 4, 2023
8fa7e7c
Fix some implicit memory aliasing in for loops (#395)
jtraglia May 5, 2023
f7b99e3
Do not XOR with zero (#398)
jtraglia May 5, 2023
2fde31d
Disable check shadowing in govet linter (#397)
jtraglia May 5, 2023
d11bbde
Add a bunch of "nosec G404" comments in test code (#399)
jtraglia May 5, 2023
133446a
Enable misspell linter & fix findings (#401)
jtraglia May 5, 2023
d084e89
copy with fresh buffer now also copies all bufM, bufMValues, bufRes (…
AlexandreBelling May 8, 2023
0cd4994
feat: Marshal [][]fr.Element (#400)
Tabaie May 8, 2023
a7b13dd
fix: innef assignment in test
gbotrel May 10, 2023
5df9fb3
fix: more innef assign
gbotrel May 10, 2023
62e5595
Run golangci-lint on generated files (#396)
jtraglia May 10, 2023
0c0b9aa
feat: pedersen folding proofs
Tabaie May 23, 2023
04ad7dc
fix: pedersen folding bug
Tabaie May 23, 2023
6ecf8d8
build: generify bn254 changes
Tabaie May 23, 2023
45da921
style: move aux func down
Tabaie May 23, 2023
882e828
test: check error
Tabaie May 24, 2023
85db474
docs: explain FoldCommitments
Tabaie May 24, 2023
684135c
feat: fold 0 proofs edge case
Tabaie May 25, 2023
4fe667a
docs: ConsenSys -> Consensys (#406)
Tabaie May 25, 2023
0901a24
feat: pedersen(bn254).WriteRawTo
Tabaie Jun 2, 2023
1b0cf80
build: generify
Tabaie Jun 2, 2023
9206904
feat: marshal [][]uint64 for bn254
Tabaie Jun 2, 2023
faadb38
build: generify marshal changes
Tabaie Jun 2, 2023
76fcbb5
feat: write [][]uint64
Tabaie Jun 2, 2023
b930c11
build: generify enc.WriteUint64SliceSlice
Tabaie Jun 2, 2023
36b8b95
feat: pedersen.Vk[Bn254].UnsafeReadFrom
Tabaie Jun 2, 2023
ff9bcec
build: generify unsafeReadFrom
Tabaie Jun 2, 2023
1f40d7c
msm: semaphore to limit CPUs + better split strategy (up to 25% perf …
gbotrel Jun 6, 2023
b5e7bda
Merge pull request #407 from ConsenSys/feat/fold-pedersen
Tabaie Jun 9, 2023
0ee617f
fix: do not read empty slices as nil
Tabaie Jun 9, 2023
4392bab
Merge pull request #410 from ConsenSys/fix/decode-empty-slice
Tabaie Jun 11, 2023
a3b568a
fix: incorrect semaphore initialization (#411)
gbotrel Jun 15, 2023
0af6233
feat: added element.Unmarshal closes #348
gbotrel Jun 22, 2023
f5f856b
edwards: optimize point negation (#413)
jsign Jun 26, 2023
3b8bd38
feat: Gates var for bn254
Tabaie Jun 29, 2023
34cd64d
build: generify gates var
Tabaie Jun 29, 2023
9062c9c
feat: more gkr gates
Tabaie Jun 29, 2023
f1e1691
fix: remove redundant mulGate
Tabaie Jun 29, 2023
006af12
fix: use of MulGate
Tabaie Jun 29, 2023
ce693dc
Merge pull request #419 from Consensys/feat/gkr-custom-gates
Tabaie Jun 29, 2023
cf1c8bd
perf: fast path for SIS with logTwoBound: 8, logTwoDegree: 6 (#416)
gbotrel Jun 30, 2023
4dc5ff1
feat: added WriteRawTo to kzg.ProvingKey (#422)
gbotrel Jul 1, 2023
b65415d
Fix/gkr eq bug (#421)
Tabaie Jul 1, 2023
69ddf67
feat: add AsyncReadFrom to fr.Vector and fft.Domain (#424)
gbotrel Jul 2, 2023
e0bc87e
fix: dont use internal package in vector.go
gbotrel Jul 2, 2023
e78725a
fix: ECDSA HashToInt bytes-bits mismatch (#428)
ivokub Jul 11, 2023
800ddb5
perf: small memory alloc optimization (#435)
AlexandreBelling Jul 24, 2023
16c2315
fix: add explicit operator priority
gbotrel Aug 3, 2023
9e6d043
feat: added polynomial.SetSize
gbotrel Aug 4, 2023
6d1518c
feat: added size accessor on poly
gbotrel Aug 4, 2023
1473fcf
perf: dont waste too much memory in fft domain (#437)
gbotrel Aug 16, 2023
99cfa43
build: update go mod deps
gbotrel Aug 16, 2023
190c5bf
Refactor/gkr test vectors (#425)
Tabaie Aug 18, 2023
e55e0aa
Merge branch 'master' into develop
gbotrel Aug 18, 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
  •  
  •  
  •  
13 changes: 8 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,21 @@ jobs:
${{ runner.os }}-go-
- name: gofmt
run: if [[ -n $(gofmt -l .) ]]; then echo "please run gofmt"; exit 1; fi
- 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: generated files should not be modified
run: |
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
# A hack to get golangci-lint to examine generated files
- name: remove "generated by" comments
run: find . -type f -name "*.go" -exec perl -i -pe 's/Code generated by .* DO NOT EDIT/FOO/g' {} \;
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=5m

test:
strategy:
Expand Down
6 changes: 1 addition & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
linters-settings:
govet:
check-shadowing: true

linters:
disable-all: true
enable:
Expand All @@ -11,7 +7,7 @@ linters:
- gosimple
- govet
- ineffassign
# - errcheck
- misspell

run:
issues-exit-code: 1
105 changes: 24 additions & 81 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@
- remove unecessary inverse in KZG-verify
- faster GLV scalar decompostion


### Refactor
- fft is done in the main loop
- kzg uses DivideByXminusA from polynomial module
Expand All @@ -683,10 +684,13 @@
- remove dead code ([#230](https://github.com/ConsenSys/gnark-crypto/issues/230))
- inneficient -> inefficient
- cosmetic changes ([#197](https://github.com/ConsenSys/gnark-crypto/issues/197))
- use bytes package
- removed dead code
- fixed comment
- cleaned comments, removed dead code
- replace modulus generated by constants, add zero-alloc SetRandom ([#194](https://github.com/ConsenSys/gnark-crypto/issues/194))
- remove unneeded x86 asm and files ([#192](https://github.com/ConsenSys/gnark-crypto/issues/192))
- polish readme.md with updated godoc subpackage links ([#235](https://github.com/ConsenSys/gnark-crypto/issues/235))
- acknowledge that inv(0)==0 in comments as a convention ([#233](https://github.com/ConsenSys/gnark-crypto/issues/233))
- added note in pairing godoc - doesn't check inputs are in correct subgroup ([#231](https://github.com/ConsenSys/gnark-crypto/issues/231))
- add security estimates of implemented curves in comments


### Test
- cleanup
Expand Down Expand Up @@ -987,37 +991,16 @@
- update field IsUIint64 doc

### Feat
- addition of test with a tampered proof
- addition of permutation proof in lookup proof (table version)
- addition of proof of permutation
- added UnmarshalJSON and MarshalJSON on fields
- added field.Text(base) to return field element string in a given base, like big.Int
- field.SetString now supports 0b 0o 0x prefixes (base 2, 8 and 16)
- Autogen P20
- ScalarMul-->mulWindowed, modified blinding of scalar in tests
- Three ways of dealing with signed numbers in montgomery reduction
- Signed mont-reduce
- code gen for integrating permutation proof
- Test for corrective factor consistency
- Naive GCD works
- addition of benchmark
- added field.SetInt64
- added quick and dirty benchmarking script
- added support for intX and uintX fixes [#109](https://github.com/ConsenSys/gnark-crypto/issues/109)
- pre-compute addition chains for Sqrt and Legendre exp functions
- added addchain for all sqrt
- Naive GCD improved
- Full paper implemented, unknown bug
- Full paper implemented, tests passing
- **bls24:** experiment with Fp-Fp2-Fp4-Fp12-Fp24 tower
- **kzg:** test tampered proofs whith quotient set to zero
- **plookup:** challenges are derived using Fiat Shamir
- **plookup:** addition of prover and verifier for tables
- **plookup:** proof generation
- **plookup:** addition of templates
- **plookup:** adding missing files in templates
- **plookup:** generated plookup for all curves
- **plookup:** addition of benchmark

- **plookup:** added plookup lookup proof
- **field:** generate optimized addition chains for Sqrt & Legendre exp functions
- **field:** added field.SetInt64, support for intX and uintX [#109](https://github.com/ConsenSys/gnark-crypto/issues/109)
- **field:** added UnmarshalJSON and MarshalJSON on fields
- **field:** added field.Text(base) to return field element string in a given base, like big.Int
- **field:** field.SetString now supports 0b 0o 0x prefixes (base 2, 8 and 16)
- **kzg:** test tampered proofs with quotient set to zero
- **bls24:** Fp-Fp2-Fp4-Fp12-Fp24 tower


### Fix
- Optimization 3 works, but with many watches
Expand Down Expand Up @@ -1312,38 +1295,10 @@
- save allocation when possible when adding 2 polynomials
- ecc encoder now handles []Element so gnark don't have to
- ecc encoders uses binary.Write and binary.Read to support basic types
- addition of methods GetClaimedValue(s) on opening proofs
- Add,Sub,ScalarMul ops added to Digest
- add new curve bls24-315
- code gen corresponding to previous commit
- added mul_by_13 asm impl in field arithmetic
- Element.SetInterface returns an error instead of panicking if unsupported type
- added Fuzz pairing billinearity
- added kzg Fuzz test
- added Fuzz for fft with cosets
- added Fuzz() for fft pacakge
- addition of method Marshal for Kzg proofs
- addition of BatchVerifyMultiPoints in kzg
- added element_fuzz.go with build tag gofuzz to expose non-asm (generic) impl for fuzz testing
- kzg scheme serialization (bn254)
- code gen for kzg scheme serialization + tests
- helper to build a new kzg scheme for testing purpose
- tests for mock commitment (if claimed values are correct, etc)
- addition of test for claimed values (polynomial commitments)
- added subgroup check for proof and digests in kzg
- fixes [#38](https://github.com/ConsenSys/gnark-crypto/issues/38)
- **all curves:** faster GT memebership
- **bw6:** GT membership
- **bw6-633:** add bw6-633 to hash and fiat-shamir
- **bw6-633:** add twisted edwards companion to bw6-633
- **bw6-633:** optimized frobenius
- **ecc:** multiexp takes nbTasks as parameter instead of semaphore
- **fft:** addition of param to set precomputations in domain struct
- **kzg:** test polynomials of different sizes
- **kzg:** added /kzg with NewSRS(curveID) API for serialization purposes
- **kzg:** kzg objects implement io.ReaderFrom and io.WriterTo
- **kzg:** hash function is passed as parameter
- **kzg:** added optional nbTasks to pass through multiExp api
- added ecc.Implemented() that returns list of curve fully implemented
- added Reference benchmarks for continuous benchmarking. fixes [#54](https://github.com/ConsenSys/gnark-crypto/issues/54)
- added curve level go-fuzz fuzz functions
- **all curves:** faster GT membership
- **twisted Edwards:** tests use gopter, no more hardcoded values

### Fix
Expand Down Expand Up @@ -1408,18 +1363,7 @@
- **bw6:** new optimized final exp (hard part)
- **bw6-633:** divide G1 cofactor formula by 4
- **bw6-633:** optimized hard part in final exp
- **fft:** introduced flatten kernel for n==8 and asm impl for butterfly to minimze memory writes
- **kzg:** use syntetic division to divide by x-a
- **kzg:** dividePolyByXminusA parallelism
- **kzg:** dividePolyByXminusA uses precomputed domain twiddle
- **kzg:** merge both loop in divideXpoly into 1
- **kzg:** Open will split the msm in 2 if numCpus > 16
- **kzg:** perform polynomial evaluations in parallel inside batchOpen
- **kzg:** reuse memory for batchopen poly division
- **kzg:** added batch inversion in dividePolyByXminusA
- **kzg:** parallelize s = 1 / (x-a)
- **kzg:** remove useless fft in dividebyxminusa
- **kzg:** simplified dividePolyByXminusA, no need to shift
- **fft:** introduced flatten kernel for n==8 and asm impl for butterfly to minimize memory writes

### Refactor
- removed deprecated MulAssign, AddAssign and SubAssign apis
Expand Down Expand Up @@ -1521,10 +1465,9 @@
### Fix
- handle case where numCPU < 4 in precomputeExpTable
- incorrect comment and size returned in twistededwards SetBytes fixes [#34](https://github.com/ConsenSys/gnark-crypto/issues/34)
- add/dbl exJac
- add/dbl exJac
- point.SetBytes can now be called concurently with same byte slice input


### Perf
- delay coordinates conversion
- delay coordinates conversion
Expand Down
2 changes: 1 addition & 1 deletion ecc/bls12-377/ecdsa/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ecc/bls12-377/ecdsa/ecdsa.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ecc/bls12-377/ecdsa/ecdsa_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ecc/bls12-377/ecdsa/marshal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ecc/bls12-377/ecdsa/marshal_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions ecc/bls12-377/fp/element.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading