GithubHelp home page GithubHelp logo

barustenberg's People

Contributors

0xjepsen avatar autoparallel avatar colinnielsen avatar dependabot[bot] avatar jdlbeckman avatar laudiacay avatar lonerapier avatar patstiles avatar shuklaayush avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

barustenberg's Issues

1Bug

Summary

Problem

Describe the immediate problem.

Impact

What's the impact of this bug?

Solution

Describe the sort of fix that would solve the issue.

Detail

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

Implement functions in `transcript.rs`

Transcript

Here is a list of functions as tasks to complete here:

  • PedersenBlake3s::hash()
  • PlookupPedersenBlake3s::hash()
  • Transcript::from_serialized()
  • Transcript::apply_fiat_shamir()
  • Transcript::export_transcript()

Then we should add in the accompanying tests from here.

test composer and circuit builder

Get pedersen + transcripts fully working, with tests

This will give you a good look into the transcripts, fiat-shamir, and pedersen commitments. I don't think it'll be too hard, most of this except the pedersen is done.

  • Implement all the todos in the pedersen commitments module: commit_native_with_multiple_indices, commit_native, compress_native_array, compress_native_buffer_to_field, compress_native, compress_native_with_multiple_indices, compress_native_index, merkle_damgard_tree_compress, merkle_damgard_compress_with_multiple_ivs, merkle_damgard_compress
  • Implement all the tests: zero_one, endomorphism_test, hash_single, hash_pair, merkle_damgard_compress, merkle_damgard_compress_multiple_iv, merkle_damgard_tree_compress. Get them passing.
  • Make sure all three hasher types are good to go and fully implemented, producing sane output vs original bberg (is the way the hash functions are being split sane, in your opinion? feel free to workshop it... I think it's okay but not fantastic...)
  • get the univariate_serialization and validate_transcript tests written and passing

After this, the batch_commit test from the commitments bounty should be tackle-about.

fix(pederson): Add correct values to pederson hash and pederson commit tests

NB: Feature requests will only be considered if they solve a pain or present a useful refactoring of the code.

Summary

Problem

The pederson commitment tests are currently failing due to testing agains the hard-coded generator values from barretenburg. Due to limitations in Arkworks we use a slightly different canonical method for creating generators by hashing to a curve.

Solution

To fix these tests trace over the hash-to-curve function and manually compute the resulting pederson hash values for Fq::one() from the generators.

TODOs in `srs/reference_string/mod.rs`

Reference String

Here's the two tasks:

  • Implement ReferenceStringFactory::get_prover_crs()
  • Implement ReferenceStringFactory::get_verifier_crs()

Then we should add in the accompanying tests from here.

Generalized test blitz in proving_key and verification_key

A lot of tests, across a lot of the repo.
Mostly pretty fundamental things... mostly should be easy wins and very GPT-able... not assigned a bounty yet because I'm not done adding stuff here.

  • for proving_key, proving_key_from_serialized_key
  • for verification_key, buffer_serialization, basic_compression_equality, compression_inequality_circuit_type, compression_inequality_different_circuit_size, compression_inequality_different_num_public_inputs, compression_inequality_different_commitments, compression_inequality_different_num_commitments, compression_equality_different_contains_recursive_proof, compression_equality_different_recursive_proof_public_input_indices

TODOs in `srs/reference_string/pippenger_reference_string.rs`

Pippenger Reference String

Here's a list of the TODOs as tasks:

  • implement Pippenger::get_num_points()
  • Implement PippengerReferenceString::get_monomial_size()
  • Implement PippengerReferenceString::get_monomial_points()

Then we should add in the accompanying tests from here.

Get commitments fully working.

your todo list for success:

  • implement the kate_batch_open and test_kate_open tests in src/plonk/proof_system/commitment_scheme.rs
  • come up with a proposal (and implement it) to fix the locks on line 370 of the same file (I suggest locking everything once across all parallel threads then doing something unsafe)
  • get the tests passing :)

the kate_batch_open test will require getting transcripts working (and, therefore, pedersen)- as of sept 30, pedersen is unimplemented, and transcripts are untested. so this may get half-done before transcripts and half-done after.

now's a fine time to start, though- this should not be difficult at all if transcripts + pedersen are working.

TODOs in `plonk/proof_system/prover.rs`

Prover

We need to implement:

  • copy_placeholder()
  • add_polynomial_evaluations_to_transcript() (not defined in barettenberg)
  • compute_batch_opening_polynomial() (not defined in barettenberg)
  • init_quotient_polynomial()
  • compute_opening_elements()
  • get_circuit_size()

May need more help and comments here for the functions not implemented in barettenberg.

TODOs in `ecc/bn254_scalar_multiplication.rs`

BN254 Scalar Multiplication

The following tasks need to get done:

  • Implement PippengerRuntimeState::new()
  • Implement PippengerRuntimeState::pippenger_unsafe()
  • Implement PippengerRuntimeState::pippenger()

Implement `divide_by_pseudo_vanishing_polynomial`

Problem

The function is in polynomials/polynomial_arithmetic.rs and takes the form:

    pub(crate) fn divide_by_pseudo_vanishing_polynomial(
        &self,
        _coeffs: &[&mut [&mut Fr]],
        _target: &EvaluationDomain<'a, Fr>,
        _num_roots_cut_out_of_vanishing_poly: usize,
    ) {
        unimplemented!()
    }

I am not sure exactly what this function should be doing mathematically.

TODOs in `ecc/mod.rs`

ECC

We need to get the following done to be able to implement other issues (e.g., #34)

  • Implement reduced_ate_pairing_batch_precomputed()
  • Implement conditionally_subtract_from_double_modulus()
  • Implement tag_coset_generator()
  • Implement coset_generator()
  • Implement external_coset_generator()

1REQ

NB: Feature requests will only be considered if they solve a pain or present a useful refactoring of the code.

Summary

Problem

Describe the pain that this feature will solve.

Impact

Describe the impact of not having this feature.

Solution

Describe the solution.

Detail

Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like

A clear and concise description of what you want to happen.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

implement following functions in polynomial arithmetic

pub(crate) fn divide_by_pseudo_vanishing_polynomial(&self, _coeffs: &[&mut [&mut Fr]], _target: &EvaluationDomain<'a, Fr>, _num_roots_cut_out_of_vanishing_poly: usize);

pub(crate) fn compute_kate_opening_coefficients<Fr: Field>(src: Fr, dest: Fr, z: usize, n: usize) -> Fr;

pub(crate) fn get_lagrange_evaluation<Fr: Field>(zeta: &Fr, _domain: &EvaluationDomain<'a, Fr>, _num_roots_cut_out_of_vanishing_polynomial: usize);

pub(crate) fn compute_barycentric_evaluation<Fr: Field>(_coeffs: &[Fr], _num_coeffs: usize, z: &Fr, domain: &EvaluationDomain<'a, Fr>) -> Fr;

TODOs in `plonk/composer/composer_base.rs`

Composer Base

Here are some tasks, my friends!

  • Implement ComposerType::create_manifest()
  • Implement ComposerBase::compute_wire_copy_cycles()
  • Implement ComposerBase::compute_sigma_permutations()

Then we should add in the accompanying tests from here.

small pairing optimization/`precompute_miller_lines`

zac added precompute_miller_lines as a VERY small optimization to the pairing code.

We have about 99% of the code needed to make this work implemented in the srs branch! However, last second we chose to use arkworks for this, because the last 1% of the work would have been annoying.

There's a missing constant in arkworks that's necessary here to implement our own pairing from scratch. It's twist_coeff_b from the Fq2 params in the original code. What is it? We (including zac) think it's the (Fq2) b of the Weierstrass form of the Fq12 twist's automorphism curve, represented as a pair of x and y Fqs.

It's constructed in a weird representation (some kind of limb form?) in Barettenberg. We don't know what this representation is yet. So far we've been unable to figure out how to get to the arkworks representation of the constants (just a decimal string representing x of the point) to turn into the barettenberg constants that we do have. It doesn't seem to be an endianness issue. It might be a WNAF or montgomery representation situation. We don't know. Zac recommended we get the c++ compiling and print things out...

tl;dr holding off on this! it should be a VERY small performance gain. We'll get back to it FAR in the future.

CC after discussion with @Autoparallel

TODOs in `plonk/proof_system/types/prover_settings.rs`

Prover Settings

Here are some things we gotta do!

  • Implement StandardSettings::compute_quotient_evaluation_contribution()
  • Implement StandardSettings::append_scalar_multiplication_inputs()

I don't believe we need to get to TurboSettings, UltraSettings, etc.

TODOs in `plonk/proof_system/utils/permutation.rs`

Permutation

Inside of compute_permutation_lagrange_base_single_helper() we have a few TODOs

// ~ snip
        if permutation[i].is_public_input {
            // TODO: Replace with correct external_coset_generator function
            output.coefficients[i] *= external_coset_generator::<Fr>();
        } else if permutation[i].is_tag {
            // TODO: Replace with correct tag_coset_generator function
            output.coefficients[i] *= tag_coset_generator::<Fr>();
        } else {
            let column_index = permutation[i].column_index;
            if column_index > 0 {
                // TODO: Replace with correct coset_generator function
                output.coefficients[i] *= coset_generator::<Fr>(column_index - 1);
            }
        }
// ~ snip

Further help is needed here to clarify how this should change.

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.