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

feat: Noir v1.0.0, Add Dependencies Documentation #19

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
toolchain: [nightly, 0.37.0]
toolchain: [nightly, 0.37.0, 1.0.0-beta.0]
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "noir_bigcurve"
type = "lib"
authors = [""]
compiler_version = ">=0.37.0"
compiler_version = ">=0.36.0"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
compiler_version = ">=0.36.0"
compiler_version = ">=0.37.0"


[dependencies]
bignum = {tag = "v0.4.2", git = "https://github.com/noir-lang/noir-bignum"}
Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,22 @@ noir_bigcurve uses the [noir-bignum](https://github.com/zac-williamson/noir-bign

This library is a work in progress and likely full of bugs!

# Overview
## Overview

`noir_bigcurve` make use of `noir-bignum` to optimally evaluate group operations using a minimal number of modular reductions. Runtime lookup tables are also used to reduce the number of group operations required when evaluating scalar multiplications

# Usage
## Noir Version Compatibility

We have tested this library with Noir nightly, 0.37.0, and 1.0.0-beta.0
Copy link

@Savio-Sou Savio-Sou Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We have tested this library with Noir nightly, 0.37.0, and 1.0.0-beta.0
This library is tested with all Noir stable releases from v0.37.0.


## Dependencies

- Noir >=0.37.0
- Barretenberg >=v0.56.1

Refer to [Noir's docs](https://noir-lang.org/docs/getting_started/quick_start) and [Barretenberg's docs](https://github.com/AztecProtocol/aztec-packages/blob/master/barretenberg/cpp/src/barretenberg/bb/readme.md) for installation steps.

## Usage

See `bigcurve_test.nr` for some ways in which the library can be used.

Expand All @@ -20,7 +31,7 @@ Complete elliptic curve operations can be evalauted using `BigCurve::add`, `BigC

The most efficient method to evaluate curve operations is `BigCurve::evaluate_linear_expression` (TODO: Brillig bug means this method does not currently work!)

# Future work
## Future work

- When performing MSMs, utilize the Montgomery Ladder to minimize the number of field operations (see `batch_mul` in `barretenberg/src/stdlib/biggroup` for example implementation)
- `ScalarField` is not properly constrained when constructed from a `BigNum` object
Expand All @@ -32,7 +43,7 @@ The most efficient method to evaluate curve operations is `BigCurve::evaluate_li
- Create benchmarks
- Add support for curve endomorphisms where applicable (if base field and scalar field both contain cube roots of unity, we can reduce the number of point doublings required for an MSM in half)

# FAQ
## FAQ

Q: What's up with the Jacobian points and the transcript objects?
A: To minimize witness generation time (currently the bottleneck due to Brillig VM) we evaluate ECC operations over Jacobian coordinates in an unconstrained function, in order to efficiently batch-compute the modular inverses required to constrain ECC operations over Affine coordinates (which is more constraint-efficient)
Loading