This repository was archived by the owner on Aug 15, 2024. It is now read-only.
Open
Conversation
hedgar2017
suggested changes
Apr 9, 2020
There was a problem hiding this comment.
A lot of:
- TODOs
- unannotated asserts
- asserts themselves (probably panics should be replaced with
Results somewhere); at least, annotations explaining why a panic is safe would be helpful - commented out code
- wrong comment types:
//instead of///and///instead of//!- can be easily fixed with auto-replace to simplify docs generating in the future
Also, do not forget to run cargo fmt and cargo clippy before commiting.
| let geninv = self.geninv; | ||
| self.distribute_powers(worker, geninv); | ||
|
|
||
| // worker.scope(self.coeffs.len(), |scope, chunk| { |
There was a problem hiding this comment.
Please, annotate why it is commented out.
| /// however the values stored in FRI oracles are permuted, so that elements of the same coset are adjacent | ||
| /// So, we need to somehow get all elements of rhe same coset using natural index [i], i.e. | ||
| /// make a conversion from "natural" element index to "tree" coset index | ||
| /// note, that this depends only on the number of elements in each coset i.e. "collapsing factor" |
There was a problem hiding this comment.
Please, change to //! module docs.
https://doc.rust-lang.org/1.9.0/book/documentation.html#documenting-modules
|
|
||
|
|
||
| impl CosetCombiner { | ||
| //wrapping factor here is size of coset: 1 << collapsing_factor |
There was a problem hiding this comment.
Please, change to doc comment.
/// wrapping factor here is size of coset: 1 << collapsing_factor
| pub final_degree_plus_one : usize, | ||
| } | ||
|
|
||
| //TODO: paranetrize FriIop with coset combiner also |
| use crate::redshift::fft::cooley_tukey_ntt::bitreverse; | ||
| use std::ops::Range; | ||
|
|
||
| //TODO: it is also very important to understand how do values are located inside coset |
| // self.coeffs.resize(new_size, F::zero()); | ||
|
|
||
| // Ok(()) | ||
| // } |
There was a problem hiding this comment.
Please, annotate why is it commented out.
| let n = input_gates.len() + aux_gates.len(); | ||
|
|
||
| //check consistency of n and FRI-parameters | ||
| // TODO: I may be mistaken here and should have simply n instead of n+1 - CHECK THIS! |
| let w_r = Polynomial::<E::Fr, Values>::from_values_unpadded(w_r)?; | ||
| let w_o = Polynomial::<E::Fr, Values>::from_values_unpadded(w_o)?; | ||
|
|
||
| // TODO: replace by ifft_using_bitreversed_ntt_with_partial_reduction |
| assert!(z_2.as_ref().last().expect("must exist") == z_1.as_ref().last().expect("must exist")); | ||
|
|
||
| // interpolate on the main domain | ||
| // TODO: replace by ifft_using_bitreversed_ntt_with_partial_reduction |
| // mat = matrix([[z^(i*j) for j in range(0, 2*m)] for i in range(0, m)]) | ||
| // return mat.echelon_form()[:, m:] | ||
| pub(crate) fn generate_mds_matrix<F: PrimeField>(_params: &RescueParams<F>) -> [[F; RESCUE_M]; RESCUE_M] { | ||
| // TODO: Correct MDS generation; this causes horribly-biased output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Do not merge!