Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smartcontract, examples: add API for Groth16 Verifier contract building and examples #3043

Merged
merged 12 commits into from
Oct 5, 2023

Commits on Oct 5, 2023

  1. examples: add compatibility example for Groth16 veification

    Port the C# contract provided in the
    neo-project/neo#2647 (comment) and
    add an integration test for it. Part of the #3002.
    
    Signed-off-by: Anna Shaleva <[email protected]>
    AnnaShaleva committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    0a3260c View commit details
    Browse the repository at this point in the history
  2. zkp: add end-to-end Groth-16 proof generation/verification example

    The example shows that the proover knows the solution of the cubic
    equation: y = x^3 + x + 5. The example is constructed for BLS12-381
    curve points using Groth-16 prooving algorithm. The example includes
    everything that developer needs to start using ZKP on the NEO platform
    with Go SDK:
    1. The described cubic circuit implementation.
    2. The off-chain proof generation with the help of gnark-crypto library.
    3. Go verification contract generation and deployment with the help of
       NeoGo libraries.
    4. The on-chain proof verification for various sets of input data.
    
    Signed-off-by: Anna Shaleva <[email protected]>
    AnnaShaleva committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    9e74fc5 View commit details
    Browse the repository at this point in the history
  3. examples: add production CRS generation instructions for ZKP examples

    Add an example and instructions for production CRS generation to ZKP examples
    with gnark >= v0.9.0.
    
    Signed-off-by: Anna Shaleva <[email protected]>
    AnnaShaleva committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    03951c9 View commit details
    Browse the repository at this point in the history
  4. zkpbinding: allow to handle serialisation format of gnark >= v0.9.0

    An upgrade from gnark v0.8.X to v0.9.0 changes serialization format of verifying/proving keys
    and proofs. In neo-go zkpbinding package we have to support both at least for now, because
    [email protected] requires minimum go 1.19.
    
    Signed-off-by: Anna Shaleva <[email protected]>
    AnnaShaleva committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    ff260a6 View commit details
    Browse the repository at this point in the history
  5. zkpbinding: use proper field size for BLS12-381

    It's not differ from BN254, but we'd better use the proper package.
    
    Signed-off-by: Anna Shaleva <[email protected]>
    AnnaShaleva committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    8c46517 View commit details
    Browse the repository at this point in the history
  6. native: ensure proper endianness is used for CryptoLib's field elemen…

    …t multiplier
    
    Field element multiplier must be provided in the LE form, confirmed by
    cross-node invocation: #3043 (comment).
    
    Signed-off-by: Anna Shaleva <[email protected]>
    AnnaShaleva committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    b7e019e View commit details
    Browse the repository at this point in the history
  7. zkpbinding: format formulae in Verifier template

    Signed-off-by: Anna Shaleva <[email protected]>
    AnnaShaleva committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    ca71bd5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e2abb5c View commit details
    Browse the repository at this point in the history
  9. *: upgrade gnark-crypto up to v0.12.0

    Signed-off-by: Anna Shaleva <[email protected]>
    AnnaShaleva committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    1745b21 View commit details
    Browse the repository at this point in the history
  10. scripts: add zkp examples to dependencies updator

    And ignore on dependency checks, we update all the examples at once
    anyway, so may safely skip the check for zkp folder.
    
    Signed-off-by: Anna Shaleva <[email protected]>
    AnnaShaleva committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    b5a75b1 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a2d2827 View commit details
    Browse the repository at this point in the history
  12. *: update interop deps

    Signed-off-by: Anna Shaleva <[email protected]>
    AnnaShaleva committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    fc6e87a View commit details
    Browse the repository at this point in the history