Skip to content

Commit

Permalink
refactor!: Remove deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Nov 18, 2024
1 parent 562e2af commit 5a16da9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 36 deletions.
27 changes: 1 addition & 26 deletions triton-vm/src/fri.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use itertools::Itertools;
use num_traits::Zero;
use rayon::prelude::*;
use std::ops::Mul;
use twenty_first::math::polynomial::barycentric_evaluate;
use twenty_first::math::traits::FiniteField;
use twenty_first::prelude::*;

Expand Down Expand Up @@ -471,9 +471,6 @@ impl<'stream> FriVerifier<'stream> {
fn assert_last_round_codeword_corresponds_to_low_degree_polynomial(
&mut self,
) -> VerifierResult<()> {
// todo: remove once deprecated local function `barycentric_evaluate` is removed
use twenty_first::math::polynomial::barycentric_evaluate;

if self.last_round_polynomial.degree() > self.last_round_max_degree.try_into().unwrap() {
return Err(FriValidationError::LastRoundPolynomialHasTooHighDegree);
}
Expand Down Expand Up @@ -618,28 +615,6 @@ fn codeword_as_digests(codeword: &[XFieldElement]) -> Vec<Digest> {
codeword.par_iter().map(|&xfe| xfe.into()).collect()
}

/// Use the barycentric Lagrange evaluation formula to extrapolate the codeword
/// to an out-of-domain location.
///
/// [Credit] for (re)discovering this formula and especially its application to
/// FRI goes to Al-Kindi.
///
/// # Panics
///
/// Panics if the codeword is some length that is not a power of 2 or greater than (1 << 32).
///
/// [Credit]: https://github.com/0xPolygonMiden/miden-vm/issues/568
#[deprecated(
since = "0.42.2",
note = "use `twenty_first::math::polynomial::barycentric_evaluate` instead"
)]
pub fn barycentric_evaluate<FF: FiniteField + Mul<XFieldElement, Output = XFieldElement>>(
codeword: &[FF],
indeterminate: XFieldElement,
) -> XFieldElement {
twenty_first::math::polynomial::barycentric_evaluate(codeword, indeterminate)
}

#[cfg(test)]
mod tests {
use std::cmp::max;
Expand Down
10 changes: 0 additions & 10 deletions triton-vm/src/stark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1431,11 +1431,6 @@ impl Stark {
Verifier::new(*self).verify(claim, proof)
}

#[deprecated(since = "0.43.0", note = "use `stark.max_degree` instead")]
pub fn derive_max_degree(&self, padded_height: usize) -> isize {
self.max_degree(padded_height)
}

/// The upper bound to use for the maximum degree the quotients given the length
/// of the trace and the number of trace randomizers. The degree of the
/// quotients depends on the [AIR](air) constraints.
Expand All @@ -1452,11 +1447,6 @@ impl Stark {
max_degree_supported_by_that_smallest_arithmetic_domain as isize
}

#[deprecated(since = "0.43.0", note = "use `stark.fri` instead")]
pub fn derive_fri(&self, padded_height: usize) -> fri::SetupResult<Fri> {
self.fri(padded_height)
}

/// The parameters for [FRI](Fri). The length of the
/// [FRI domain](ArithmeticDomain) has a major influence on
/// [proving](Prover::prove) time. It is influenced by the length of the
Expand Down

0 comments on commit 5a16da9

Please sign in to comment.