Skip to content

Refactor AIR#937

Merged
MauroToscano merged 8 commits intomainfrom
refactor-air
Nov 13, 2024
Merged

Refactor AIR#937
MauroToscano merged 8 commits intomainfrom
refactor-air

Conversation

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

codecov-commenter commented Oct 31, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ 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).
⚠️ Report is 158 commits behind head on main.

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 ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread provers/stark/src/prover.rs Outdated
Comment on lines +179 to +181
// FieldElement<A::FieldExtension>: AsBytes + Sync + Send,
// E: IsSubFieldOf<A::FieldExtension>,
// A::Field: IsSubFieldOf<E>,
Copy link
Copy Markdown
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 thread provers/stark/src/prover.rs Outdated
Comment on lines +196 to +197
// E: IsSubFieldOf<A::FieldExtension>,
// A::Field: IsSubFieldOf<E>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Comment thread provers/stark/src/prover.rs Outdated
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Comment thread provers/stark/src/prover.rs Outdated
)>
where
FieldElement<A::Field>: AsBytes + Send + Sync,
// FieldElement<E>: AsBytes + Send + Sync,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Comment thread provers/stark/src/prover.rs Outdated
FieldElement<A::Field>: AsBytes + Send + Sync,
// FieldElement<E>: AsBytes + Send + Sync,
FieldElement<A::FieldExtension>: AsBytes + Send + Sync,
// E: IsSubFieldOf<A::FieldExtension> + IsFFTField,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Comment thread provers/stark/src/prover.rs Outdated
FieldElement<A::Field>: Send + Sync,
E: IsSubFieldOf<A::FieldExtension>,
A::Field: IsSubFieldOf<E>,
// F: IsFFTField,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Comment thread provers/stark/src/prover.rs Outdated
Comment on lines +575 to +577
// let trace_poly_coeffients: Vec<_> = deep_composition_coefficients
// .drain(..num_terms_trace)
// .collect();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Comment thread provers/stark/src/table.rs Outdated
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Comment thread provers/stark/src/trace.rs Outdated
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

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