Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Genysys
    @Genysys
    I am trying to publish zinc contracts , but I get this error. Do you have any idea what I am doing wrong?
     zargo publish --network rinkeby --instance default
       Compiling constant_price v0.1.0
        Finished release [optimized] target
      Setting up key pair `./data/proving_key` and `./data/verifying_key`
    [ERROR zargo] virtual machine spawning: No such file or directory (os error 2)
    Alex Z
    @hedgar2017
    @Genysys perhaps, the Zinc VM (zvm binary) is not available through your PATH
    What is the output of ‘which zvm’?
    Genysys
    @Genysys
    which zvm
    /usr/local/bin/zvm
    @hedgar2017
    Alex Z
    @hedgar2017
    @Genysys that's weird, I cannot reproduce it.
    What is the output of which znc?
    Are zargo, znc, and zvm in the same directory?
    For some reason zargo cannot run zvm. The env variables are probably messed up.
    Genysys
    @Genysys
    which zvm
    /usr/local/bin/zvm
    (base) Samuels-MacBook-Pro:constant_price samueldare$ which zargo
    /usr/local/bin/zargo
    (base) Samuels-MacBook-Pro:constant_price samueldare$ which znc
    /usr/local/bin/znc

    @hedgar2017

    It makes sense it been messed up

    Alex Z
    @hedgar2017
    @Genysys it is already fixed in your last message, right?
    Does it work now?
    Genysys
    @Genysys
    no it doesnt
    Alex Z
    @hedgar2017
    @Genysys still the same error?
    Genysys
    @Genysys
    ah sorry i was posting the wrong error. I fixed that last night.
    (base) Samuels-MacBook-Pro:constant_price samueldare$ zargo publish --network rinkeby --instance default
       Compiling constant_price v0.1.0
        Finished release [optimized] target
       Uploading the instance `default` of `constant_price v0.1.0` to network `rinkeby`
         Address 0x72df5ba86e3a205d3982c62db5161937bac85526
    [ERROR zargo] transaction: signing error: Signing key is not set in account
    @hedgar2017 this was my latest error.
    Alex Z
    @hedgar2017
    @Genysys ah, this one is very common.
    You should unlock your zkSync account by making a deposit and the change-pubkey transaction.
    The Zinc tutorial assumes you already have it. I'll extend the tutorial to cover this case.
    Genysys
    @Genysys
    ah thanks! do you have a code snippet that can do this? Also can i use zinc / zinc with rust and compile it down to wasm?
    Alex Z
    @hedgar2017

    @Genysys afaik, it can be done manually via the zkSync front-end GUI.
    If you need it from JS code, this docs may help you: https://zksync.io/dev/accounts.html#changing-account-public-key
    If any issues arise, the zkSync team can give more precise answers here: https://gitter.im/matter-labs/zksync

    No, Zinc does not support wasm :(

    Genysys
    @Genysys
    are there any plans to support wasm?
    Alex Z
    @hedgar2017
    @Genysys not sure, but there were some discussions.
    Genysys
    @Genysys
    Do you have any tips for using this with a rust standard rust library
    ?
    Alex Z
    @hedgar2017
    @Genysys Zinc cannot use the Rust std. It only looks like Rust, but has almost nothing in common under the hood :)
    Genysys
    @Genysys
    I meant the other way round , can we pull different parts of zinc and use them in rust code as libraries?
    Genysys
    @Genysys
    @hedgar2017
    Alex Z
    @hedgar2017
    @Genysys no :( Btw, what would you need it for?
    Genysys
    @Genysys
    I might be thinking about this wrong , but I was thinking this would be the only way to interact with the zinc vm as part of a application
    Alex Z
    @hedgar2017
    @Genysys indeed, you are able to call the Zinc VM as library with some precompiled bytecode, if it is convenient and useful for you.
    noodles
    @crypto_noodles_twitter
    Hey as I understand this is the only zkRollup that is mainnet ready today - kudos to the team!
    noodles
    @crypto_noodles_twitter
    Im curious what privacy features that could be enabled by zksync + zinc, for instance could an anonymizied uniswap / has anyone experimented with this?
    *could an anonymized uniswap be built
    Alex Z
    @hedgar2017
    @crypto_noodles_twitter hi! This chat is mostly about the Zinc language and tools around it.
    Questions closer to zkSync are better to be addressed to the zkSync team here: https://gitter.im/matter-labs/zksync
    Sergii Bomko
    @aquiladev
    Hi guys, I'm facing an issue while contract deployment. Could you help me?
    -> % zargo publish --network rinkeby --instance default
       Compiling constant_price v0.1.0
        Finished release [optimized] target
      Setting up key pair `./data/proving_key` and `./data/verifying_key`
    Has generated 771 points
       Uploading the instance `default` of `constant_price v0.1.0` to network `rinkeby`
         Address 0x023bea626b3c34a45d5003e1dafa487b15285260
    [ERROR zargo] transaction: signing error: Signing key is not set in account
    Genysys
    @Genysys

    @Genysys afaik, it can be done manually via the zkSync front-end GUI.
    If you need it from JS code, this docs may help you: https://zksync.io/dev/accounts.html#changing-account-public-key
    If any issues arise, the zkSync team can give more precise answers here: https://gitter.im/matter-labs/zksync

    No, Zinc does not support wasm :(

    @aquiladev you need to unlock you account on zksync first . you dont think by calling the change pub function

    Sergii Bomko
    @aquiladev
    why do I need to unlock an account if I provided private key?
    [ERROR zargo] action failed: HTTP error (422 Unprocessable Entity) Initial transfer: Account is locked
    Genysys
    @Genysys
    good question .. I dont think zinc or zargo implements that functionality @aquiladev
    Alex Z
    @hedgar2017

    @aquiladev well, you need to do it only once.
    When you have an unlocked zkSync account, you may use it to publish and use all your contracts.

    zargo wasn't designed for managing ordinar zkSync accounts. Actually, I assumed that everybody who was going to try contracts already had a working zkSync account.
    We'll probably include this functionality into zargo and even make it automatic.

    Sergii Bomko
    @aquiladev
    Hey guys, I deployed contract with zargo to rinkeby, but ethereum rinkeby does not have the contract. Where is the deployed contract?
    Alex Z
    @hedgar2017
    @aquiladev hi!
    What is the address of your contract?
    Sergii Bomko
    @aquiladev
    0x5ce3730b8aa136f5ca9eda6bb5b02a266965fcbf
    Alex Z
    @hedgar2017
    @aquiladev it is on the L2! Use the zkSync scanner to check it out: https://rinkeby.zkscan.io/explorer/accounts/0x5ce3730b8aa136f5ca9eda6bb5b02a266965fcbf
    Sergii Bomko
    @aquiladev
    I see. Ok, I'm trying to understand purpose of L2 contracts. Use case: I have ERC721 on L1, I want to do transfers on L2, to reduce costs. How L2 contract helps? How it can possess token?
    Alex Z
    @hedgar2017
    @aquiladev for now their purpose is demonstrating the Zinc language and letting people to try it :)
    Interaction with L1 is not implemented yet.
    Peter Borah
    @PeterBorah

    Hello! I am enjoying messing around with Zinc to make custom circuits and L2 smart contracts. Thanks for creating it. :)

    I have a question about how zksnarks work: do the proving and verification keys contain information about the circuit used to generate them? That is, if you had just the keys, would you be able to figure out what the circuit was checking for in any way beyond just trying things brute-force?

    I'm asking because I'm curious whether it's possible to have a snark that implements secret rules, or not.

    Thanks!

    Alexander
    @shamatar
    We expect that either code that corresponds to some verification key is known to us, so VM can run it and make a witness and proof (same way as it works in Ethereum now), or that for some verification key we obtain a proof from external source and just check and prove that an obtained proof was valid (kind of private contracts)
    Alex Z
    @hedgar2017
    @PeterBorah
    Peter Borah
    @PeterBorah
    Thanks!
    Lei Zhang
    @lei-april
    Hi, I learned from the v0.2 documentation that Zinc could be used both to write smart contracts and ZKP circuits. I wonder what are the differences between them? If I write a Zinc contract and compile it to bytecode, does the compiler generate any R1CS constraints like with a circuit?
    Théophile Villard
    @teawaterwire
    hiya - how do i pass a parameter to a method call from zargo? zargo call --network rinkeby --address 0x396c0822f090dd4bf7a87f2513a7703e5b28d36b --method exchange (from the simple exchange example of the doc)
    Alex Z
    @hedgar2017
    @lei-april technically, yes, but in 0.2 proof verification is not finished and thus turned off. In the future contracts will behave almost like circuits and there will be a single verification key for each contract.
    @teawaterwire hi! Just specify them in the ‘data/input.json’, in the ‘arguments/<method>’ section.
    Théophile Villard
    @teawaterwire
    ah yeah makes sense - thanks!