From 5a16da961cd6eea19709ecc48d9460d35cd8fd25 Mon Sep 17 00:00:00 2001 From: Jan Ferdinand Sauer Date: Mon, 18 Nov 2024 15:09:01 +0100 Subject: [PATCH] refactor!: Remove deprecated functions --- triton-vm/src/fri.rs | 27 +-------------------------- triton-vm/src/stark.rs | 10 ---------- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/triton-vm/src/fri.rs b/triton-vm/src/fri.rs index d7f4a6b8..b706d611 100644 --- a/triton-vm/src/fri.rs +++ b/triton-vm/src/fri.rs @@ -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::*; @@ -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); } @@ -618,28 +615,6 @@ fn codeword_as_digests(codeword: &[XFieldElement]) -> Vec { 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>( - codeword: &[FF], - indeterminate: XFieldElement, -) -> XFieldElement { - twenty_first::math::polynomial::barycentric_evaluate(codeword, indeterminate) -} - #[cfg(test)] mod tests { use std::cmp::max; diff --git a/triton-vm/src/stark.rs b/triton-vm/src/stark.rs index c9ae7062..8a320445 100644 --- a/triton-vm/src/stark.rs +++ b/triton-vm/src/stark.rs @@ -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. @@ -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 { - 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