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

Refactor AIR #937

Merged
merged 8 commits into from
Nov 13, 2024
Merged

Refactor AIR #937

merged 8 commits into from
Nov 13, 2024

Conversation

ColoCarletti
Copy link
Contributor

Refactor AIR

This PR resumes the changes made for AIR in the following PRs: 834 and 697.

Description of the pull request changes and motivation.

Type of change

Please delete options that are not relevant.

  • Refactor

Checklist

  • Linked to Github Issue
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run

@ColoCarletti ColoCarletti marked this pull request as ready for review October 31, 2024 14:15
@ColoCarletti ColoCarletti requested a review from a team as a code owner October 31, 2024 14:15
@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 81.02190% with 52 lines in your changes missing coverage. Please review.

Project coverage is 70.99%. Comparing base (e650e0f) to head (ef74970).

Files with missing lines Patch % Lines
provers/stark/src/trace.rs 59.59% 40 Missing ⚠️
provers/stark/src/table.rs 44.44% 5 Missing ⚠️
provers/stark/src/traits.rs 55.55% 4 Missing ⚠️
provers/stark/src/prover.rs 97.82% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #937      +/-   ##
==========================================
- Coverage   72.37%   70.99%   -1.39%     
==========================================
  Files         153      153              
  Lines       33423    32770     -653     
==========================================
- Hits        24191    23264     -927     
- Misses       9232     9506     +274     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 179 to 181
// FieldElement<A::FieldExtension>: AsBytes + Sync + Send,
// E: IsSubFieldOf<A::FieldExtension>,
// A::Field: IsSubFieldOf<E>,
Copy link
Contributor

Choose a reason for hiding this comment

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

this can be removed

Comment on lines 196 to 197
// E: IsSubFieldOf<A::FieldExtension>,
// A::Field: IsSubFieldOf<E>,
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Comment on lines 247 to 248
// let (lde_trace_merkle_tree, lde_trace_merkle_root) =
// Self::batch_commit_main(&lde_trace_permuted_rows);
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

)>
where
FieldElement<A::Field>: AsBytes + Send + Sync,
// FieldElement<E>: AsBytes + Send + Sync,
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

FieldElement<A::Field>: AsBytes + Send + Sync,
// FieldElement<E>: AsBytes + Send + Sync,
FieldElement<A::FieldExtension>: AsBytes + Send + Sync,
// E: IsSubFieldOf<A::FieldExtension> + IsFFTField,
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

E: IsSubFieldOf<A::FieldExtension>,
A::Field: IsSubFieldOf<E>,
// F: IsFFTField,
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Comment on lines 575 to 577
// let trace_poly_coeffients: Vec<_> = deep_composition_coefficients
// .drain(..num_terms_trace)
// .collect();
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Comment on lines 76 to 81
// /// Given a row index, returns a mutable reference to that row as a slice of field elements.
// pub fn get_row_mut(&mut self, row_idx: usize) -> &mut [FieldElement<F>] {
// let n_cols = self.width;
// let row_offset = row_idx * n_cols;
// &mut self.data[row_offset..row_offset + n_cols]
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Comment on lines 389 to 405
// #[cfg(test)]
// mod test {
// use super::TraceTable;
// use lambdaworks_math::field::{element::FieldElement, fields::u64_prime_field::F17};
// type FE = FieldElement<F17>;

#[test]
fn test_cols() {
let col_1 = vec![FE::from(1), FE::from(2), FE::from(5), FE::from(13)];
let col_2 = vec![FE::from(1), FE::from(3), FE::from(8), FE::from(21)];
// #[test]
// fn test_cols() {
// let col_1 = vec![FE::from(1), FE::from(2), FE::from(5), FE::from(13)];
// let col_2 = vec![FE::from(1), FE::from(3), FE::from(8), FE::from(21)];

let trace_table = TraceTable::from_columns(vec![col_1.clone(), col_2.clone()], 2, 1);
let res_cols = trace_table.columns();
// let trace_table = TraceTable::from_columns(vec![col_1.clone(), col_2.clone()], 2, 1);
// let res_cols = trace_table.columns();

assert_eq!(res_cols, vec![col_1, col_2]);
}
}
// assert_eq!(res_cols, vec![col_1, col_2]);
// }
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor

@entropidelic entropidelic left a comment

Choose a reason for hiding this comment

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

lgtm, just remove the commented unused code :)

@ColoCarletti ColoCarletti disabled auto-merge November 8, 2024 21:00
@ColoCarletti ColoCarletti requested a review from a team November 8, 2024 21:00
@MauroToscano MauroToscano added this pull request to the merge queue Nov 13, 2024
Merged via the queue into main with commit d016a73 Nov 13, 2024
8 checks passed
@MauroToscano MauroToscano deleted the refactor-air branch November 13, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants