Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Recursive Redshift #20

Open
wants to merge 122 commits into
base: master
Choose a base branch
from
Open

Recursive Redshift #20

wants to merge 122 commits into from

Conversation

Konstantce
Copy link

Do not merge!

Copy link

@hedgar2017 hedgar2017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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| {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.



impl CosetCombiner {
//wrapping factor here is size of coset: 1 << collapsing_factor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, pay attention.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, pay attention.

// self.coeffs.resize(new_size, F::zero());

// Ok(())
// }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, pay attention.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, pay attention.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, pay attention.

// 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, pay attention.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants