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

Recursive Redshift#20

Open
Konstantce wants to merge 122 commits intomasterfrom
recursive_plonk
Open

Recursive Redshift#20
Konstantce wants to merge 122 commits intomasterfrom
recursive_plonk

Conversation

@Konstantce
Copy link
Copy Markdown

Do not merge!

Copy link
Copy Markdown

@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| {
Copy link
Copy Markdown

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"
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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(())
// }
Copy link
Copy Markdown

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!
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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