Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e62bc1a
refactor: moved curves into /curve/...
gbotrel Mar 26, 2021
5b30dac
refactor: migrated goff packages into /field/...
gbotrel Mar 26, 2021
eb5b317
build: updated CI and go.mod files
gbotrel Mar 26, 2021
94cc043
refactor: migrated gnark/backend/fft into fft/
gbotrel Mar 26, 2021
9cff76d
refactor: checkpoint
gbotrel Mar 26, 2021
92e8024
refactor: cleaning internal/generator pattern
gbotrel Mar 26, 2021
5deab90
refactor: factorized parallelize function and moved asm/amd64 into to…
gbotrel Mar 27, 2021
fd1702b
refactor: ported mimc and eddsa from gnark
gbotrel Mar 27, 2021
350e4ed
docs: updated package doc
gbotrel Mar 27, 2021
a253b42
refactor: migrated gnark/polynomial under fr/
gbotrel Mar 27, 2021
c66dac6
refactor: moved curves under curve/
gbotrel Mar 29, 2021
be51d03
refactor: renamed BN256 to BN254
gbotrel Mar 29, 2021
0c410ac
fix: incorrect comment and size returned in twistededwards SetBytes f…
gbotrel Mar 29, 2021
66d0534
style: consistent copyright holder and year
gbotrel Mar 29, 2021
82201cf
build: updated go.mod
gbotrel Mar 29, 2021
e6b8b13
refactor: moved gurvy.go into curve/curve.go
gbotrel Mar 29, 2021
52d384e
refactor: e2_bn256 --> e2_bn254
gbotrel Mar 29, 2021
fbeb401
refactor: moved utils/ into curve/
gbotrel Mar 29, 2021
e5d6bb8
refactor: curve -> ecc
gbotrel Mar 30, 2021
0027440
docs: updated README.md
gbotrel Mar 30, 2021
46b38ca
docs: add ecc/ecc.md and field/field.md
gbotrel Mar 30, 2021
5643f25
refactor: bls381 -> bls12-381, bls377 -> bls12-377
gbotrel Mar 30, 2021
2e6d3e5
refactor: gurvy -> gnark-crypto
gbotrel Mar 31, 2021
40908b9
refactor: cosmetics
gbotrel Mar 31, 2021
94e37d2
ci: ignore G204 rule in gosec (process lauched with var)
gbotrel Mar 31, 2021
c66e4b4
ci: move dep install up
gbotrel Mar 31, 2021
ed3b32b
ci: install asmfmt before test step, now that goff field generation t…
gbotrel Mar 31, 2021
5330e32
fix: handle case where numCPU < 4 in precomputeExpTable
gbotrel Mar 31, 2021
906c32b
refactor: moved interop tests under github.com/consensys/gnark-tests
gbotrel Mar 31, 2021
df67791
docs: added changelog for v0.4.0
gbotrel Apr 1, 2021
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
  •  
  •  
  •  
49 changes: 49 additions & 0 deletions .chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{{ if .Versions -}}
<a name="unreleased"></a>
## [Unreleased]

{{ if .Unreleased.CommitGroups -}}
{{ range .Unreleased.CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}

{{- if .MergeCommits -}}
### Pull Requests
{{ range .MergeCommits -}}
- {{ .Header }}
{{ end }}
{{ end -}}

{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{- if .Versions }}
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
{{ range .Versions -}}
{{ if .Tag.Previous -}}
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
{{ end -}}
{{ end -}}
{{ end -}}
28 changes: 28 additions & 0 deletions .chglog/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/ConsenSys/gnark-crypto
options:
commits:
# filters:
# Type:
# - feat
# - fix
# - perf
# - refactor
commit_groups:
# title_maps:
# feat: Features
# fix: Bug Fixes
# perf: Performance Improvements
# refactor: Code Refactoring
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE
12 changes: 7 additions & 5 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: install deps
run: go get golang.org/x/tools/cmd/goimports && go get github.com/klauspost/asmfmt/cmd/asmfmt
- name: gofmt
run: if [[ -n $(gofmt -l .) ]]; then echo "please run gofmt"; exit 1; fi
- name: go vet
Expand All @@ -41,9 +43,7 @@ jobs:
- name: gosec
run: |
go get -u github.com/securego/gosec/cmd/gosec
gosec bls377/... bn256/... bls371/... bw761/... utils/...
- name: install deps
run: go get golang.org/x/tools/cmd/goimports && go get github.com/klauspost/asmfmt/cmd/asmfmt
gosec -exclude G204 ./...
- name: generated files should not be modified
run: |
go generate ./...
Expand Down Expand Up @@ -76,6 +76,8 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: install deps
run: go get golang.org/x/tools/cmd/goimports && go get github.com/klauspost/asmfmt/cmd/asmfmt
- name: Test
run: |
go test -v -short ./...
Expand All @@ -84,8 +86,8 @@ jobs:
- name: Test (32bits)
if: matrix.os == 'ubuntu-latest'
run: |
GOARCH=386 go test -v -short ./bn256/...
GOARCH=386 go test -v -short ./bls381/...
GOARCH=386 go test -v -short ./ecc/bn254/...
GOARCH=386 go test -v -short ./ecc/bls12-381/...

slack-workflow-status:
if: always()
Expand Down
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,8 @@ tasks.txt
# generated files during integratrion tests
internal/tests/integration/

# binary
/gurvy/utils/
playground

.vscode

# compiled sage -> python code
*.sage.py


bn256/benchesres/**
60 changes: 60 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<a name="v0.4.0"></a>
## [v0.4.0] - 2021-03-31

### Refactor
- gurvy -> gnark-crypto
- moved interop tests under github.com/consensys/gnark-tests
- bls381 -> bls12-381
- bls377 -> bls12-377
- bn256 -> bn254
- migrated MiMC and EdDSA from gnark into gnark-crypto
- migrated gnark/backend/fft into gnark-crypto
- migrated goff packages into ./field/...
- cleaning internal/generator pattern

### Ci
- testing with go 1.15, go 1.16 on Windows, MacOS, Linux (+arch=32bits)

### Docs
- added ecc/ecc.md and field/field.md

### Feat
- multiExp in full extended jacobian coordinates

### 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)
- point.SetBytes can now be called concurently with same byte slice input



<a name="v0.3.8"></a>
## [v0.3.8] - 2021-02-01

### Bls377
- final exp hard part eprint 2020/875
- ML entirely on the twist (ABLR)

### Bls381
- final exp hard part eprint 2020/875
- ML entirely on the twist (ABLR)
- change G1 and G2 generators for interop

### Bn256
- inline lineEval() in MilleLoop
- ML entirely on the twist (ABLR)
- change G1 and G2 generators for interop

### Bw6
- add E6 and pairing tests
- correct comments in FinalExp
- fix bw6 pairing API to take slices of points and mutualize squares
- change G1 and G2 generators for interop

### Pull Requests
- Merge pull request [#29](https://github.com/ConsenSys/gnark-crypto/issues/29) from ConsenSys/youssef/bls12-finalExp
- Merge pull request [#27](https://github.com/ConsenSys/gnark-crypto/issues/27) from ConsenSys/experimental/pairing
- Merge pull request [#26](https://github.com/ConsenSys/gnark-crypto/issues/26) from ConsenSys/youssef/ML-ABLR
- Merge pull request [#25](https://github.com/ConsenSys/gnark-crypto/issues/25) from ConsenSys/csquare
- Merge pull request [#23](https://github.com/ConsenSys/gnark-crypto/issues/23) from ConsenSys/youssef/bw6-API-pairing

73 changes: 73 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Contributor gnark-crypto Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [zkteam@consensys.net].
All complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org
67 changes: 67 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Contributing to gnark-crypto

### Table of Contents

[Code of Conduct](#code-of-conduct)

[How to Contribute](#how-to-contribute)

* [Reporting Bugs](#reporting-bugs)
* [Suggesting Enhancements](#suggesting-enhancements)
* [Pull Requests](#pull-requests)



## Code of Conduct
* This project is governed by the [gnark-crypto Code of Conduct](CODE_OF_CONDUCT.md). By participating,
you are agreeing to uphold this code. Please report unacceptable behavior.
## How to Contribute

### Reporting Bugs
#### Before Submitting A Bug
* Ensure the bug is not already reported by searching on GitHub under
[Issues](https://github.com/consensys/gnark-crypto/issues).
#### How Do I Submit a (Good) Bug?
* If you are unable to find an open issue addressing the problem, open a new one. Be sure to include a
**title and clear description**, as much relevant information as possible, and a **code sample** or
an **executable test case** demonstrating the unexpected behavior.
* Describe the **exact steps** to **reproduce the problem** in as many details as possible. When
listing steps, don't just say what you did, but explain how you did it.
* Provide **specific examples** to demonstrate the steps. Include links to files or GitHub projects, or
copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue,
use [Markdown code blocks](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/).
* Describe the **behavior you observed** after following the steps and explain the
problem with that behavior.
* Explain the **behavior you expected** instead and why.
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem
happens and under which conditions it normally happens.

### Suggesting Enhancements
#### Before Submitting An Enhancement Suggestion
* [Search](https://github.com/consensys/gnark-crypto/issues) to see if the enhancement has already been
suggested. If it has, add a comment to the existing issue instead of opening a new one.

#### How Do I Submit A (Good) Enhancement Suggestion?
Enhancement suggestions are tracked as GitHub issues. Create an issue on and provide
the following information:

* Use a **clear and descriptive title** for the issue to identify the suggestion.
* Provide a **step-by-step description** of the suggested enhancement in as much detail as possible.
* Describe the **current behavior** and explain the **behavior you expect** instead and why.
* Explain why this enhancement would be useful to other users.
* Specify the **name and version of the OS** you're using.
* Specify the **name and version of any relevant packages**.

### Pull Requests
There are a number of automated checks:
* `go fmt`
* `go vet`

If these checks pass, pull requests will be reviewed by the project team against criteria including:
* purpose - is this change useful
* test coverage - are there unit/integration/acceptance tests demonstrating the change is effective
* code consistency - naming, comments, design
* changes that are solely formatting are likely to be rejected

Always write a clear log message for your commits. One-line messages are fine for small changes, but
bigger changes should contain more detail.
Loading