Giter VIP home page Giter VIP logo

docs's People

Contributors

aliatiia avatar brunny-eth avatar burke-md avatar critesjosh avatar ethan-000 avatar fabianschu avatar jonybur avatar lichuacu avatar phated avatar qedk avatar savio-sou avatar signorecello avatar skaunov avatar sleepingshell avatar spalladino avatar tomafrench avatar ujjwalguptaofficial avatar zakrad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

Add "Standard Library" Page

  • Under the "Modules, Packages, Crates" Section
  • Document Added Support of impl on Primitive Types
  • Describe automatically imported by default + how to use (i.e. use dep::std;, std::___)
  • Describe each library

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

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.

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.

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.

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

Add "Examples" Section

  • After "Coming Features" section
  • Move "Merkle Proof" into this
  • Add a "ZK Battleships" page

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

  1. Install latest Noir
  2. Try to print a value
  3. Run nargo check or nargo prove
  4. 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.

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.