Skip to content

Commit

Permalink
consensys/gnark -> irfanbozkurt/gnark
Browse files Browse the repository at this point in the history
  • Loading branch information
irfanbozkurt committed May 21, 2024
1 parent df19bcc commit d3a09e8
Show file tree
Hide file tree
Showing 539 changed files with 2,315 additions and 2,109 deletions.
682 changes: 430 additions & 252 deletions CHANGELOG.md

Large diffs are not rendered by default.

88 changes: 49 additions & 39 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,63 +6,73 @@

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

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

## Code of Conduct

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

## Code of Conduct
* This project is governed by the [gnark 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/issues).

#### Before Submitting A Bug

- Ensure the bug is not already reported by searching on GitHub under
[Issues](https://github.com/irfanbozkurt/gnark/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. For example, the exact
commands used in the terminal to start `gnark`.
* 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.

- 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. For example, the exact
commands used in the terminal to start `gnark`.
- 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/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.

- [Search](https://github.com/irfanbozkurt/gnark/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 and provide

Enhancement suggestions are tracked as GitHub issues. Create an issue 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**.
- 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`

- `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
- 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.
27 changes: 12 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,20 @@

`gnark` is a fast zk-SNARK library that offers a high-level API to design circuits. The library is open source and developed under the Apache 2.0 license


## Useful Links

* [`gnark` User Documentation]
* [`gnark` Playground]
* [`gnark` Issues]
* [`gnark` Benchmarks](https://docs.gnark.consensys.net/overview#gnark-is-fast) 🏁
* [`gnark-announce`] - Announcement list for new releases and security patches

- [`gnark` User Documentation]
- [`gnark` Playground]
- [`gnark` Issues]
- [`gnark` Benchmarks](https://docs.gnark.consensys.net/overview#gnark-is-fast) 🏁
- [`gnark-announce`] - Announcement list for new releases and security patches

## `gnark` Users

To get started with `gnark` and write your first circuit, follow [these instructions][`gnark` User Documentation].

Checkout the [online playground][`gnark` Playground] to compile circuits and visualize constraint systems.


## Warning

**`gnark` has been [partially audited](https://github.com/ConsenSys/gnark-crypto/blob/master/audit_oct2022.pdf) and is provided as-is, we make no guarantees or warranties to its safety and reliability. In particular, `gnark` makes no security guarantees such as constant time implementation or side-channel attack resistance.**
Expand Down Expand Up @@ -74,9 +71,9 @@ package main

import (
"github.com/consensys/gnark-crypto/ecc"
"github.com/consensys/gnark/backend/groth16"
"github.com/consensys/gnark/frontend"
"github.com/consensys/gnark/frontend/cs/r1cs"
"github.com/irfanbozkurt/gnark/backend/groth16"
"github.com/irfanbozkurt/gnark/frontend"
"github.com/irfanbozkurt/gnark/frontend/cs/r1cs"
)

// CubicCircuit defines a simple circuit
Expand Down Expand Up @@ -135,7 +132,7 @@ You can then toggle on or off icicle acceleration by providing the `WithIcicleAc
```go
// toggle on
proofIci, err := groth16.Prove(ccs, pk, secretWitness, backend.WithIcicleAcceleration())

// toggle off
proof, err := groth16.Prove(ccs, pk, secretWitness)
```
Expand Down Expand Up @@ -170,16 +167,16 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our [code of condu

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/consensys/gnark/tags).
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/irfanbozkurt/gnark/tags).

## License

This project is licensed under the Apache 2 License - see the [LICENSE](LICENSE) file for details

[`gnark` Issues]: https://github.com/consensys/gnark/issues
[`gnark` Issues]: https://github.com/irfanbozkurt/gnark/issues
[`gnark` Playground]: https://play.gnark.io
[`gnark` User Documentation]: https://docs.gnark.consensys.net/
[GitHub discussions]: https://github.com/ConsenSys/gnark/discussions
[GitHub discussions]: https://github.com/irfanbozkurt/gnark/discussions
[Proving schemes and curves]: https://docs.gnark.consensys.net/Concepts/schemes_curves
[`gnark-announce`]: https://groups.google.com/g/gnark-announce
[@gnark_team]: https://twitter.com/gnark_team
2 changes: 1 addition & 1 deletion backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"crypto/sha256"
"hash"

"github.com/consensys/gnark/constraint/solver"
"github.com/irfanbozkurt/gnark/constraint/solver"
)

// ID represent a unique ID for a proving scheme
Expand Down
2 changes: 1 addition & 1 deletion backend/groth16/bellman_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/consensys/gnark-crypto/ecc"
bls12381 "github.com/consensys/gnark-crypto/ecc/bls12-381"
"github.com/consensys/gnark-crypto/ecc/bn254/fr"
"github.com/consensys/gnark/backend/witness"
"github.com/irfanbozkurt/gnark/backend/witness"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
10 changes: 5 additions & 5 deletions backend/groth16/bls12-377/commitment_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 backend/groth16/bls12-377/marshal.go

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

4 changes: 2 additions & 2 deletions backend/groth16/bls12-377/marshal_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 backend/groth16/bls12-377/mpcsetup/lagrange.go

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

8 changes: 4 additions & 4 deletions backend/groth16/bls12-377/mpcsetup/marshal_test.go

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

4 changes: 2 additions & 2 deletions backend/groth16/bls12-377/mpcsetup/phase2.go

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

2 changes: 1 addition & 1 deletion backend/groth16/bls12-377/mpcsetup/setup.go

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

10 changes: 5 additions & 5 deletions backend/groth16/bls12-377/mpcsetup/setup_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 backend/groth16/bls12-377/mpcsetup/utils.go

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

18 changes: 9 additions & 9 deletions backend/groth16/bls12-377/prove.go

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

6 changes: 3 additions & 3 deletions backend/groth16/bls12-377/setup.go

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

6 changes: 3 additions & 3 deletions backend/groth16/bls12-377/verify.go

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

10 changes: 5 additions & 5 deletions backend/groth16/bls12-381/commitment_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 backend/groth16/bls12-381/marshal.go

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

Loading

0 comments on commit d3a09e8

Please sign in to comment.