docs's People
Forkers
jtriley-eth spalladino brunny-eth ujjwalguptaofficial edsphinx sleepingshell burke-md aliatiia qedk zakrad micahtdew fabianschu deuchainn lichuacudocs's Issues
Update commands.md to reference name change of `nargo build` to `nargo check`
Documentation is not clear around Prover/Verifier.toml
As @brson correctly noted, the documentation is not clear on the usage of Prover.toml and Verifier.toml.
Furthermore, a recent addition to the language has been setpub
which needs further documentation and examples.
Add --locked to install instructions
Links to noir-lang/noir#37
Add "Standard Library" Page
- Under the "Modules, Packages, Crates" Section
- Document Added Support of
impl
on Primitive Types- noir-lang/noir#847
- E.g. Instead ofย
std::array::len
, now doยarr.len
- Describe automatically imported by default + how to use (i.e.
use dep::std;
,std::___
) - Describe each library
Document `CompiledProgram` JSON
Issue:
PR:
nargo compile
in v0.3.0 / newer Nightlies generates a CompiledProgram
JSON file that contains the ACIR (as circuit) and the ABI (as abi).
Add contributing guide
Problem
There's no contributing guide for external/internal contributors to the docs
Proposed solution
Add a contributing guide
Alternatives considered
No response
Additional context
No response
Document `String` type
- In "Data Types"
- noir-lang/noir#622
- Useful for noir-lang/noir#630
Write a separate section on how return values are computed automatically
Add `print-acir` command
Problem
Document PR: noir-lang/noir#1031
Proposed solution
update commands page
Alternatives considered
No response
Additional context
No response
Update Barretenberg dependency list
@phated I think we have extra BB dependencies now due to your work, correct?
Document usage of Poseidon
Corresponding PRs: noir-lang/noir#768, noir-lang/noir#1176
To be documented under the Noir Standard Library section.
Review "Data Types" Page
- Add a "Boolean Type" section
- Move Constants & Globals sections out to the Mutability page
- Edit Tuple example to demonstrate access via destructuring more straightforwardly
- Improve reading / comprehension flow
- Add a Private & Public Values section
- Swap the orders to introduce Tuples first then Structs
Document Noir PR 1026
Problem
Document this pr: noir-lang/noir#1026
Proposed solution
Add:
- feat(compiler): Allows specify entry_point source
- feat(chore): allows to configure Logger in WASM
Alternatives considered
No response
Additional context
No response
Review of the docs
Here are some remarks regarding the documentation:
Installing Noir from the Compiled Binary
We should update the binaries
Note: At the time of pre-alpha, Nargo supports only one backend which is Aztec-Barretenberg.
I guess we are now in pre-beta instead of pre-alpha, and we do support another backend. However only the Aztec one is compatible with the ethereum contract.
TornadoCash:
Section is empty, may be we want to rename it as well?
This should generally be the default type reached for to solve problems as using a smaller integer type like u64 incurs extra range constraints and so is less efficient rather than more.
it seems convoluted to me. But being not a native english speaker, I may be totally wrong.
Note: The Aztec backend only supports even sized integer types currently, so while using the Aztec backend, only even sized integer types such as u32, u48 will produce proofs.
This should not be true anymore, odd-sized integers should be fine.
f a constant type that is being used in your program in changed,
typo; 'in' should be 'IS'
Note: This behaviour (n.b. pub in main arguments) and type will change in future releases, to catch a linearity bug in user code.
Why this behavior will change?
An array is a data structure which allows you to group together data types
to group together data of the same type
Note that currently Noir only supports arrays with integer or field elements.
we do not support array of struct?
Example: An array of Witness types cannot be grouped together with an array of Integer type
an array of Field (instead of witness)
For loops are expressions, so each iteration of the loop produces a value which is collected into an array.
The following code produces an array of 10 values, each element contains the same values from 0 to 9.
let my_arr = for i in 0..10 {
i
};
I don't think this is working anymore
If Expressions
Currently, these are not supported in the language.
yes they are!
< constrains one value to be less than the other Upper bound must have a known bit size
<= constrains one value to be less than or equal to the other Upper bound must have a known bit size
> constrains one value to be more than the other Upper bound must have a known bit size
>= constrains one value to be more than or equal to the other Upper bound must have a known bit size
== constrains one value to be equal to the other Both types must not be constants
!= constrains one value to not be equal to the other Both types must not be constants
It does not constrains, it returns a bool value.
Types can be constant,
for the known bit size, I am not sure, but it is probably the case (that it must be known)
they compare two values. This differs from the operations such as + where the operands are used in computation.
Not sure it is correct, because you can use comparisons in computations.
you can use the bitwise operators | and & which operate indentically for booleans, just without the short-circuiting
an example would be welcome
Features Coming Soon
If Statement / Ternary Expression
IF statement are done.
Currently only primitives types are available. This does not hinder expressiveness, however for large circuits, readability will be harmed without structs.
Struct are done
Isize
Signed integers such as i32 and i64 allow one to express more circuits.
signed integers are partially supported, they should really be finalised.
Add support for passing function arguments through CLI
Problem
Tracking #946
Proposed solution
Document
Alternatives considered
No response
Additional context
No response
Update Nargo Installation Option 2.1
Add language keywords to documentation
Document usage of elliptic curve primitives
Corresponding PR: noir-lang/noir#964
To be documented under the Noir Standard Library section.
The inlined comments in the PR might be helpful to facilitate understanding, but if it's too technical we can simply document it as "it exists!" for now.
Last doc issue for v0.3.2.
Update Docs to Explain New `@noir-lang/noir_wasm` Release Flow
PR:
@noir-lang/noir_wasm
is now released with version numbering anchored to Nargo stable & nightly releases.
Link Checker Report
Summary
Status | Count |
---|---|
64 | |
63 | |
โณ Timeouts | 0 |
0 | |
๐ป Excluded | 0 |
0 | |
1 |
Errors per input
Errors in src/getting_started/nargo/installation.md
- [404] https://github.com/AztecProtocol/aztec-connect/tree/master/barretenberg | Failed: Network error: Not Found
Document `struct` Input Support
main
can supportstruct
inputsmain
can't supportstruct
outputs- Other
fn
can support bothstruct
in/outputs
Reference:
Review "Dependencies" Page
- Supplement example
- https://github.com/kevaundray/hello-world-noir is outdated
- Specify file to modify (i.e.
Nargo.toml
)
Migrate to Docusaurus
Add a section on the SRS
Since most proving systems use an SRS/CRS, it would be useful to have a section on this.
This definition would also encapsulate the Pedersen generators used in bulletproofs. Both bulletproof and PLONK use a trapdoor.
The differentiation between the CRS used in bulletproof and the SRS used in a system like PLONK would be that the in order to exploit the trapdoor in bulletproofs you would need to break the DLOG or some other hardness assumption, whereas in order to exploit the trapdoor in PLONK/KZG you would need to know some secret scalar, which in practice can be known if the trusted setup is compromised.
We regard the former proving system as using a transparent setup and the latter as using a trusted setup.
Create CONTRIBUTING.md
- Reference: https://github.com/noir-lang/noir/blob/master/CONTRIBUTING.md
- Cover previewing PR locally:
git clone https://github.com/noir-lang/book.git
cd book
git fetch origin pull/<PR_number>/head:pr/<PR_number>
git checkout pr/<PR_number>
mdbook serve --open
Document noir pr 997
Problem
document noir-lang/noir#997
Proposed solution
update generics page. waiting on #31
also update the page documenting the arrays data type
Alternatives considered
No response
Additional context
No response
Typescript page is outdated
Aim
Tried to use the typescript page
Expected behavior
Expected this page to present a working tutorial
Bug
Impossible to follow the tutorial
To reproduce
- Reach to Typescript page
- Follow the process
Versions
No response
Additional context
No response
Document Added Support of Generics in `impl`
Issue: noir-lang/noir#638
PR: noir-lang/noir#798
installation fail if directly download source files from repo
Got an error when trying to install from source files given by
git clone [email protected]:noir-lang/noir.git
I'd suggest directing developers to the nightly source files, which worked for me
Add Versions
Reference: https://docusaurus.io/docs/versioning
Review "Mutability" Page
- Jake's Suggestions 1, 2
const
-->comptime
andglobal
reference: noir-lang/noir#434
Document renaming of `nargo contract` to `nargo codegen-verifier
We're renaming this command to avoid confusion with noir contracts. We'll then have to update any mentions of it in the book.
Change made here: noir-lang/noir#959
Document v0.3.0 Changes
Add "Examples" Section
- After "Coming Features" section
- Move "Merkle Proof" into this
- Add a "ZK Battleships" page
Review "Compilation Overview" Page
- Supplement descriptions
- Extract certain content to a new "Architecture" page?
Add Changelog Blogs
Reference: https://docusaurus.io/docs/blog
Add some form of dead link checking to CI
When renaming sections, etc. it's quite easy to forget to update all of the other references resulting in potential for dead links (this can also happen on links to external sites, which is even harder to spot as it can happen at any time).
Rather than relying on the discord we can automate checking for this with a GH action to run nightly, etc.
One potential option would be:
Discussion of `std::println` doesn't highlight need for `show-output` flag
Aim
I am trying to print a value for debugging
Expected behavior
I used nargo check
as well as nargo prove
, but there is no print on my terminal
My code
use dep::std;
fn main(question : pub [Field;16], answer : [Field;16]) {
std::println(4);
for i in 0..16 {
let mut a = question[i] == answer[i];
let mut b = question[i] == 0;
let c = a | b;
std::println(c);
}
}
Bug
Not able to log values
To reproduce
- Install latest Noir
- Try to print a value
- Run nargo check or nargo prove
- Check terminal
Installation method
Binary
Nargo version
nargo 0.3.2 (git version hash: 29b1f7df4d563849a62e64c533cb62932188135b, is dirty: false)
@noir-lang/noir_wasm version
No response
@noir-lang/barretenberg version
No response
@noir-lang/aztec_backend version
No response
Additional context
No response
Submission Checklist
- Once I hit submit, I will assign this issue to the Project Board with the appropriate tags.
Update Binary Installation Links with Stable Version
The current Nargo binary installation instructions are Nightly based.
Test and update them to install the latest stable version instead.
Document Added Endianness Specified Versions of `to_bytes`, `to_radix` and `to_bits`
Add step to populate Prover.toml in default example
The readme instructions should state that the Prover.toml file needs to be populated
Document the `nargo preprocess` command
This command was added in noir-lang/noir#912 (i.e. post 0.3.0).
Document `nargo execute`
Document Shorthand Assignment Operators
Document `nargo test`
Review "Solidity Verifier" Page
- Describe how to encode inputs
- Relate with the TypeScript page
Update Docs to Reflect Silenced Prove & Verify
Document the `noirup` GitHub Action
- What to use it for (e.g. CI tests)
- How to use it
- Example repo
Reference: https://github.com/noir-lang/noirup#github-action
Review "Nargo/Commands" Page
-
Document
nargo gates
-
Document flags:
--allow-warnings
The flag
--allow-warnings
that lets you build/prove/verify with unused variables.
We assume for complete circuits unused variables are a bug and we don't allow them, but you can develop with that flag to avoid unused variablesnargo prove p --allow-warnings
https://discord.com/channels/563037431604183070/1059966260726734940/1060933127582785618--show-ssa
Show ACIR gates?
Versioning
Problem
People using different versions of Noir could need different instructions
Proposed solution
Implement docusaurus versioning so we can track which version of the docs matches each Noir release
Alternatives considered
No response
Additional context
No response
Submission Checklist
- Once I hit submit, I will assign this issue to the Project Board with the appropriate tags.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.