by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Alex Gluchowski
    @gluk64
    Thank you!
    Alex Gluchowski
    @gluk64
    Dear @/all -- the new ZincFramework v0.1.2 release is available: https://github.com/zpreview/public/releases/tag/0.1.2
    Please note that there are minor changes in the file formats and API. See the updated zinc book:
    Alex Gluchowski
    @gluk64
    BTW, we also published a Visual Studio extension for .zn files
    nono2357
    @nono2357
    @gluk64 Great, thanks, it works much better now!
    nono2357
    @nono2357

    I found another bug with this kind of program:

    fn main() -> u8 {
        let mut e:u8 = 250;
        let mut r:u8 = 0;
        for i in 0..10 while e>0 {
            r = r + i;
            e = e / 2;
        }
        r
    }

    the proof works but the verification always fails (when there is a loop break/condition, using a "while" or a inner "if")
    Can you have a look? Thanks.

    Alex Gluchowski
    @gluk64
    Hi @nono2357, thank you -- this is a very interesting bug that seems to be in bellman, not in zinc: the constraints are all satisfied, bellman generates the proof just fine. Maybe some integration issue. Looking into it, will update you.
    nono2357
    @nono2357
    Great
    nono2357
    @nono2357
    No linux version in the 0.1.3. release?
    Alex Z
    @hedgar2017
    @nono2357 I believe it is just a typo. The zinc-0.1.3-windows.gz archive must be for Linux.
    nono2357
    @nono2357
    @hedgar2017 good point! thanks :)
    Alex Z
    @hedgar2017
    @nono2357 no problem :) I've renamed it
    nono2357
    @nono2357
    [Feature request] Can you add Rust's on-the-fly typing in for loops? (e.g: "for i in 0u16..1000")
    Alex Gluchowski
    @gluk64
    Agree, we need to infer the type for loops
    Pretty inconvenient now
    for i in a..b should take the largest size to fit a and b
    And add on-the-fly typing too
    Alex Gluchowski
    @gluk64

    @nono2357 the problem was that bellman inconsistently handles duplicate constraints (which may currently appear because zinc is not yet fully optimized) -- they should be either ignored or lead to panic, but now they lead to invalid proofs.

    Will fix this in the next release.

    nono2357
    @nono2357
    good, thanks for the feedback
    nono2357
    @nono2357
    do you plan to support variable array indexes? at least using loop unrolling?
    Alex Gluchowski
    @gluk64
    @nono2357 yes, and not only with loop indexes, but also with arbitrary vars
    nono2357
    @nono2357
    great, keep up the good work
    Sunny Gonnabathula
    @sunny-g

    Hi everyone! Thanks @gluk64 for pointing me here for help.

    I've followed the book's instructions until this step, and running the command zargo setup (after zargo run, or alternatively running zargo proof-check) with the code:

    use std::crypto::sha256;
    
    fn main(preimage: [bool; 256]) -> [bool; 256] {
        sha256(preimage)
    }

    yields the following error message:

    [ERROR   zvm] runtime error: synthesis error: auxillary variable was unconstrained
    [ERROR zargo] virtual machine: failure: exit code: 1

    Currently running zargo version 0.1.3 on Ubuntu 19.10 (Eoan Ermine).

    Is there reference documentation for the errors produced by these tools? I know it's early and I'm probably asking for a lot - just trying not to impose when I can solve some issues myself, or provide more useful info :)

    Alex Z
    @hedgar2017
    Hi, @sunny-g!
    Thanks for your report. I have reproduced the issue and we'll check this out soon.
    Concerning errors, we are currently working on major error improvements to make them more user-friendly: Rust-like formatting, help messages, hints, error ID index and so on :)
    Sunny Gonnabathula
    @sunny-g

    awesome @hedgar2017 , thanks!

    if you dont mind me reporting another (though this might be purely my fault):
    in my attempt at re-writing the merkletree example...:

    /// Type alias for a Sha256 digest.
    type Digest = [bool; 256];
    /// Merkle node in the tree - `bool` signifies node's position in the path.
    type Node = (Digest, bool);
    /// Merkle path of digests and their left or right position.
    type Path = [Node; 10];
    
    /// Computes the hash of the leaf.
    fn hash_leaf(leaf: field) -> Digest {
        // same as in example
    }
    
    ///
    fn hash_nodes(left: Digest, right: Digest) -> Digest {
        // same as in example
    }
    
    /// Computes the root hash given a `leaf` and a `Path`.
    fn root_hash(leaf: field, path: Path) -> Digest {
        // hash the leaf to get the first merkle tree node
        let mut current = hash_leaf(leaf);  // field -> Digest
    
        // for each level, pair the current merkle tree node with one from the path,
        // then hash the two nodes
        for i in 0..10 {
            let node: Node = path[i];
            let left_and_right = if node.1 {
                [current, node.0]
            } else {
                [node.0, current]
            };
    
            current = hash_nodes(left_and_right[0], left_and_right[1]);
        };
    
        // return the root hash
        current
    }

    ... the if conditional produces the error (which doesn't make sense given that hash_leaf isn't called on line 45):

    [ERROR   zvm] type error: expected u1, got bool
                     at src/merkle.zn:45:30 (at hash_leaf)
    [ERROR   zvm] runtime error: type error: expected u1, got bool
    [ERROR zargo] virtual machine 'run': failure: exit code: 1
    Alex Z
    @hedgar2017
    @sunny-g wow, the error looks weird indeed! Thanks!
    We'll try to reproduce it, but could you please provide the full source code yielding the error? E.g. as .zip or .tar.gz
    Sunny Gonnabathula
    @sunny-g
    sure thing!
    Alex Z
    @hedgar2017
    @sunny-g thanks! It came in handy.
    Sunny Gonnabathula
    @sunny-g
    @hedgar2017 awesome, glad i could help. this project and https://github.com/o1-labs/snarky are extremely exciting!!
    Alex Z
    @hedgar2017
    @/all The version 0.1.4 is out: https://github.com/zpreview/public/releases/tag/0.1.4
    Thanks to everybody who tested the previous version and reported bugs and issues.
    Feel free to explore the improvements and new features!
    Sunny Gonnabathula
    @sunny-g
    epic! both examples I provided proof-check now - thanks for the hard work!
    Alex Z
    @hedgar2017
    @sunny-g You are welcome! Looking forward to your further feedback :)
    nono2357
    @nono2357
    latest release works pretty well :)
    andreysobol
    @andreysobol

    The version 0.1.4 is out: https://github.com/zpreview/public/releases/tag/0.1.4

    It's impressive

    Thank you very much for your job
    Alex Z
    @hedgar2017
    Nice to hear it :)
    Alex Z
    @hedgar2017
    @/all Hello, guys!
    The version 0.1.5 is out: https://github.com/zpreview/public/releases/tag/0.1.5
    Do not hesitate to try the new features :)
    Alex Z
    @hedgar2017
    The releases have been moved here: https://github.com/matter-labs/zinc/releases
    Alex Z
    @hedgar2017
    Also, we opened the source code.
    Sunny Gonnabathula
    @sunny-g
    Iā€™m so glad you did, embedding it into apps is going to be so fun šŸ˜
    Brandon Kite
    @Voxelot
    Congrats on the open source release šŸ‘šŸ»
    At surface level, it seems like it will be much easier to extend than zokrates.
    Ali Atiia
    @aliatiia
    How stable is Zinc at the moment? Any breaking changes coming soon?
    Alex Z
    @hedgar2017
    @aliatiia, hi!
    The syntax and majority of semantics are quite stable. There will be probably some small breaking changes like pub keyword requirement for items able to be exported from modules.
    Concerning std, we haven't come to a decision yet, but the syntax and std module layout will likely stay the same (besides adding new features and functions). Some parts of it may be rewritten in Zinc in the future, but we'll try to keep it compatible.
    Lingraj Mahanand
    @lmahanand
    Hello, has the token transfer option in mainnet launched since I could see in the FAQ that the ETA was April 2020?
    Lingraj Mahanand
    @lmahanand
    Can we also load ETH or ERC20 from smart contract address to zkSync?
    thecryptofruit
    @thecryptofruit
    Hi Zinc team. The book still has 2 references to the old zpreview/public/releases repo (print.html and /02-getting-started/01-first-circuit.html).
    Can't do a PR, so bugging you here :)