Skip to content

Commit eef0faa

Browse files
authored
Merge pull request #35 from ConsenSys/refactor/monorepo
Refactor: gurvy --> gnark-crypto
2 parents cfe14ae + df67791 commit eef0faa

File tree

333 files changed

+13971
-3013
lines changed

Some content is hidden

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

333 files changed

+13971
-3013
lines changed

.chglog/CHANGELOG.tpl.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{{ if .Versions -}}
2+
<a name="unreleased"></a>
3+
## [Unreleased]
4+
5+
{{ if .Unreleased.CommitGroups -}}
6+
{{ range .Unreleased.CommitGroups -}}
7+
### {{ .Title }}
8+
{{ range .Commits -}}
9+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
10+
{{ end }}
11+
{{ end -}}
12+
{{ end -}}
13+
{{ end -}}
14+
15+
{{ range .Versions }}
16+
<a name="{{ .Tag.Name }}"></a>
17+
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
18+
{{ range .CommitGroups -}}
19+
### {{ .Title }}
20+
{{ range .Commits -}}
21+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
22+
{{ end }}
23+
{{ end -}}
24+
25+
{{- if .MergeCommits -}}
26+
### Pull Requests
27+
{{ range .MergeCommits -}}
28+
- {{ .Header }}
29+
{{ end }}
30+
{{ end -}}
31+
32+
{{- if .NoteGroups -}}
33+
{{ range .NoteGroups -}}
34+
### {{ .Title }}
35+
{{ range .Notes }}
36+
{{ .Body }}
37+
{{ end }}
38+
{{ end -}}
39+
{{ end -}}
40+
{{ end -}}
41+
42+
{{- if .Versions }}
43+
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
44+
{{ range .Versions -}}
45+
{{ if .Tag.Previous -}}
46+
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
47+
{{ end -}}
48+
{{ end -}}
49+
{{ end -}}

.chglog/config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
style: github
2+
template: CHANGELOG.tpl.md
3+
info:
4+
title: CHANGELOG
5+
repository_url: https://github.com/ConsenSys/gnark-crypto
6+
options:
7+
commits:
8+
# filters:
9+
# Type:
10+
# - feat
11+
# - fix
12+
# - perf
13+
# - refactor
14+
commit_groups:
15+
# title_maps:
16+
# feat: Features
17+
# fix: Bug Fixes
18+
# perf: Performance Improvements
19+
# refactor: Code Refactoring
20+
header:
21+
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
22+
pattern_maps:
23+
- Type
24+
- Scope
25+
- Subject
26+
notes:
27+
keywords:
28+
- BREAKING CHANGE

.github/workflows/develop.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
3131
restore-keys: |
3232
${{ runner.os }}-go-
33+
- name: install deps
34+
run: go get golang.org/x/tools/cmd/goimports && go get github.com/klauspost/asmfmt/cmd/asmfmt
3335
- name: gofmt
3436
run: if [[ -n $(gofmt -l .) ]]; then echo "please run gofmt"; exit 1; fi
3537
- name: go vet
@@ -41,9 +43,7 @@ jobs:
4143
- name: gosec
4244
run: |
4345
go get -u github.com/securego/gosec/cmd/gosec
44-
gosec bls377/... bn256/... bls371/... bw761/... utils/...
45-
- name: install deps
46-
run: go get golang.org/x/tools/cmd/goimports && go get github.com/klauspost/asmfmt/cmd/asmfmt
46+
gosec -exclude G204 ./...
4747
- name: generated files should not be modified
4848
run: |
4949
go generate ./...
@@ -76,6 +76,8 @@ jobs:
7676
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
7777
restore-keys: |
7878
${{ runner.os }}-go-
79+
- name: install deps
80+
run: go get golang.org/x/tools/cmd/goimports && go get github.com/klauspost/asmfmt/cmd/asmfmt
7981
- name: Test
8082
run: |
8183
go test -v -short ./...
@@ -84,8 +86,8 @@ jobs:
8486
- name: Test (32bits)
8587
if: matrix.os == 'ubuntu-latest'
8688
run: |
87-
GOARCH=386 go test -v -short ./bn256/...
88-
GOARCH=386 go test -v -short ./bls381/...
89+
GOARCH=386 go test -v -short ./ecc/bn254/...
90+
GOARCH=386 go test -v -short ./ecc/bls12-381/...
8991
9092
slack-workflow-status:
9193
if: always()

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,8 @@ tasks.txt
2828
# generated files during integratrion tests
2929
internal/tests/integration/
3030

31-
# binary
32-
/gurvy/utils/
33-
playground
3431

3532
.vscode
3633

3734
# compiled sage -> python code
3835
*.sage.py
39-
40-
41-
bn256/benchesres/**

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<a name="v0.4.0"></a>
2+
## [v0.4.0] - 2021-03-31
3+
4+
### Refactor
5+
- gurvy -> gnark-crypto
6+
- moved interop tests under github.com/consensys/gnark-tests
7+
- bls381 -> bls12-381
8+
- bls377 -> bls12-377
9+
- bn256 -> bn254
10+
- migrated MiMC and EdDSA from gnark into gnark-crypto
11+
- migrated gnark/backend/fft into gnark-crypto
12+
- migrated goff packages into ./field/...
13+
- cleaning internal/generator pattern
14+
15+
### Ci
16+
- testing with go 1.15, go 1.16 on Windows, MacOS, Linux (+arch=32bits)
17+
18+
### Docs
19+
- added ecc/ecc.md and field/field.md
20+
21+
### Feat
22+
- multiExp in full extended jacobian coordinates
23+
24+
### Fix
25+
- handle case where numCPU < 4 in precomputeExpTable
26+
- incorrect comment and size returned in twistededwards SetBytes fixes [#34](https://github.com/ConsenSys/gnark-crypto/issues/34)
27+
- point.SetBytes can now be called concurently with same byte slice input
28+
29+
30+
31+
<a name="v0.3.8"></a>
32+
## [v0.3.8] - 2021-02-01
33+
34+
### Bls377
35+
- final exp hard part eprint 2020/875
36+
- ML entirely on the twist (ABLR)
37+
38+
### Bls381
39+
- final exp hard part eprint 2020/875
40+
- ML entirely on the twist (ABLR)
41+
- change G1 and G2 generators for interop
42+
43+
### Bn256
44+
- inline lineEval() in MilleLoop
45+
- ML entirely on the twist (ABLR)
46+
- change G1 and G2 generators for interop
47+
48+
### Bw6
49+
- add E6 and pairing tests
50+
- correct comments in FinalExp
51+
- fix bw6 pairing API to take slices of points and mutualize squares
52+
- change G1 and G2 generators for interop
53+
54+
### Pull Requests
55+
- Merge pull request [#29](https://github.com/ConsenSys/gnark-crypto/issues/29) from ConsenSys/youssef/bls12-finalExp
56+
- Merge pull request [#27](https://github.com/ConsenSys/gnark-crypto/issues/27) from ConsenSys/experimental/pairing
57+
- Merge pull request [#26](https://github.com/ConsenSys/gnark-crypto/issues/26) from ConsenSys/youssef/ML-ABLR
58+
- Merge pull request [#25](https://github.com/ConsenSys/gnark-crypto/issues/25) from ConsenSys/csquare
59+
- Merge pull request [#23](https://github.com/ConsenSys/gnark-crypto/issues/23) from ConsenSys/youssef/bw6-API-pairing
60+

CODE_OF_CONDUCT.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributor gnark-crypto Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [zkteam@consensys.net].
59+
All complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Contributing to gnark-crypto
2+
3+
### Table of Contents
4+
5+
[Code of Conduct](#code-of-conduct)
6+
7+
[How to Contribute](#how-to-contribute)
8+
9+
* [Reporting Bugs](#reporting-bugs)
10+
* [Suggesting Enhancements](#suggesting-enhancements)
11+
* [Pull Requests](#pull-requests)
12+
13+
14+
15+
## Code of Conduct
16+
* This project is governed by the [gnark-crypto Code of Conduct](CODE_OF_CONDUCT.md). By participating,
17+
you are agreeing to uphold this code. Please report unacceptable behavior.
18+
## How to Contribute
19+
20+
### Reporting Bugs
21+
#### Before Submitting A Bug
22+
* Ensure the bug is not already reported by searching on GitHub under
23+
[Issues](https://github.com/consensys/gnark-crypto/issues).
24+
#### How Do I Submit a (Good) Bug?
25+
* If you are unable to find an open issue addressing the problem, open a new one. Be sure to include a
26+
**title and clear description**, as much relevant information as possible, and a **code sample** or
27+
an **executable test case** demonstrating the unexpected behavior.
28+
* Describe the **exact steps** to **reproduce the problem** in as many details as possible. When
29+
listing steps, don't just say what you did, but explain how you did it.
30+
* Provide **specific examples** to demonstrate the steps. Include links to files or GitHub projects, or
31+
copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue,
32+
use [Markdown code blocks](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/).
33+
* Describe the **behavior you observed** after following the steps and explain the
34+
problem with that behavior.
35+
* Explain the **behavior you expected** instead and why.
36+
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem
37+
happens and under which conditions it normally happens.
38+
39+
### Suggesting Enhancements
40+
#### Before Submitting An Enhancement Suggestion
41+
* [Search](https://github.com/consensys/gnark-crypto/issues) to see if the enhancement has already been
42+
suggested. If it has, add a comment to the existing issue instead of opening a new one.
43+
44+
#### How Do I Submit A (Good) Enhancement Suggestion?
45+
Enhancement suggestions are tracked as GitHub issues. Create an issue on and provide
46+
the following information:
47+
48+
* Use a **clear and descriptive title** for the issue to identify the suggestion.
49+
* Provide a **step-by-step description** of the suggested enhancement in as much detail as possible.
50+
* Describe the **current behavior** and explain the **behavior you expect** instead and why.
51+
* Explain why this enhancement would be useful to other users.
52+
* Specify the **name and version of the OS** you're using.
53+
* Specify the **name and version of any relevant packages**.
54+
55+
### Pull Requests
56+
There are a number of automated checks:
57+
* `go fmt`
58+
* `go vet`
59+
60+
If these checks pass, pull requests will be reviewed by the project team against criteria including:
61+
* purpose - is this change useful
62+
* test coverage - are there unit/integration/acceptance tests demonstrating the change is effective
63+
* code consistency - naming, comments, design
64+
* changes that are solely formatting are likely to be rejected
65+
66+
Always write a clear log message for your commits. One-line messages are fine for small changes, but
67+
bigger changes should contain more detail.

0 commit comments

Comments
 (0)