Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Adria Massanet
    Hi. I'm trying to serialize/deserialize affine/projective ECs (https://github.com/matter-labs/pairing/blob/e93d939ae001f8ff97c862542f6e2e2e4d52e217/src/bn256/ec.rs#L14) but fields are crate-protected and I cannot find any way to do it (Zokrates, prints and parses using the Display trait, but only to serialize). Is there any proposal to make this fields accessible or to create a builder/getters for these structs?
    Alex Gluchowski
    Hey @adria0, feel free to create a pull request
    What are you working on?
    Adria Massanet
    Ok, nice, I'll do it.
    I'm working in https://github.com/iden3/rust-circom-experimental, just another "toy project to learn rust" that becomes bigger.
    Adria Massanet
    @gluk64 I'm been trying to pass the tests (cargo test) in pairing, but bn256::ec::g2::g2_generator fails for me in B256 release tags (0.16.0,0.16.1,0.16.2) in stable and nightly. Any idea?
    ---- bn256::ec::g2::g2_generator stdout ----
    thread 'bn256::ec::g2::g2_generator' panicked at 'assertion failed: `(left == right)`
      left: `G2Affine { x: Fq2 { c0: Fq(0x0000000000000000000000000000000000000000000000000000000000000000), c1: Fq(0x0000000000000000000000000000000000000000000000000000000000000000) }, y: Fq2 { c0: Fq(0x2b3f3cefd5b17961811cfc2249abeed27cc5cf2d4f4489570c45f1ccbc09d5c8), c1: Fq(0x0c7adfb22a86647eb1ccb21f2c1cb4b4b5394eaf87993b22deb5f230309f910b) }, infinity: false }`,
     right: `G2Affine { x: Fq2 { c0: Fq(0x1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed), c1: Fq(0x198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c2) }, y: Fq2 { c0: Fq(0x12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa), c1: Fq(0x090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b) }, infinity: false }`', src/bn256/ec.rs:1413:21
    Adria Massanet
    (also fails for last 0.18.0, btw is not git tagged)
    It may have been failing from the beginning, I did use test as a notebook/calculator and may have forgotten to remove those
    Adria Massanet
    @shamatar ok!
    Jacob Phillips
    Hey Matter Labs, Really cool project you guys are working on! Other than the ZK podcast, is there anywhere else I can look for more info on the Franklin Network?