Skip to content
Snippets Groups Projects
Verified Commit 00a59128 authored by STEVAN Antoine's avatar STEVAN Antoine :crab:
Browse files

make Clippy happy (wip)

parent 8fad1d7a
Branches bump-rust
No related tags found
1 merge request!196bump Rust to 1.85
Pipeline #8585 failed
...@@ -493,9 +493,9 @@ impl<T: Field> std::fmt::Display for Matrix<T> { ...@@ -493,9 +493,9 @@ impl<T: Field> std::fmt::Display for Matrix<T> {
/// - elements that are bigger than the format size will be cropped, i.e. /// - elements that are bigger than the format size will be cropped, i.e.
/// - by default, the format size is undefined an thus elements won't be cropped /// - by default, the format size is undefined an thus elements won't be cropped
/// - if the format looks like `{:5}`, any element whose representation is bigger than 5 /// - if the format looks like `{:5}`, any element whose representation is bigger than 5
/// characters will be cropped /// characters will be cropped
/// - the default cropping is done with `...` but adding `#` to the format string will use `*` /// - the default cropping is done with `...` but adding `#` to the format string will use `*`
/// instead /// instead
/// ///
/// a few examples of a matrix with some random elements that are too big to be shown in 5 /// a few examples of a matrix with some random elements that are too big to be shown in 5
/// characters /// characters
......
...@@ -191,9 +191,9 @@ pub(super) fn prove<E: Pairing>( ...@@ -191,9 +191,9 @@ pub(super) fn prove<E: Pairing>(
/// Arguments: /// Arguments:
/// - k: number of polynomials (must be a power of 2) /// - k: number of polynomials (must be a power of 2)
/// - ck_tau: commitment key of IPA containing *k* values from *G_2* /// - ck_tau: commitment key of IPA containing *k* values from *G_2*
/// when set to `None`, will turn *IPA.Verify* into *IPA.Verify'*, without the /// when set to `None`, will turn *IPA.Verify* into *IPA.Verify'*, without the
/// "scalar product" guard and which is the version of the algorithm used in /// "scalar product" guard and which is the version of the algorithm used in
/// the *Open* algorithm of aPlonK. /// the *Open* algorithm of aPlonK.
/// - c_g: sum of pairing of commit, i.e. *com_f* in *Commit-Polys* page **13** /// - c_g: sum of pairing of commit, i.e. *com_f* in *Commit-Polys* page **13**
/// - r: random scalar /// - r: random scalar
/// - P: random linear combination of the commits /// - P: random linear combination of the commits
......
...@@ -231,10 +231,7 @@ where ...@@ -231,10 +231,7 @@ where
// open.6. // open.6.
let (ipa_proof, u) = let (ipa_proof, u) =
match ipa::prove(polynomials.len(), &params.ipa.ck_tau, com_f, r, mu_hat, &mu) { ipa::prove(polynomials.len(), &params.ipa.ck_tau, com_f, r, mu_hat, &mu)?;
Ok(proof) => proof,
Err(error) => return Err(error),
};
let mut u_inv = Vec::new(); let mut u_inv = Vec::new();
for u_i in &u { for u_i in &u {
if let Some(inverse) = u_i.inverse() { if let Some(inverse) = u_i.inverse() {
......
...@@ -29,14 +29,14 @@ fn to_binary(number: usize, width: usize) -> Vec<u8> { ...@@ -29,14 +29,14 @@ fn to_binary(number: usize, width: usize) -> Vec<u8> {
/// g(X) &= (u_0^{-1} + u_0 X) \\\\ /// g(X) &= (u_0^{-1} + u_0 X) \\\\
/// &=\quad u_0^{-1} + \\\\ /// &=\quad u_0^{-1} + \\\\
/// &\quad+ u_0 X /// &\quad+ u_0 X
/// \end{split} \end{align} /// \end{split} \end{align}
/// - $\kappa = 2$: \begin{align} \begin{split} /// - $\kappa = 2$: \begin{align} \begin{split}
/// g(X) &= (u_0^{-1} + u_0 X)(u_1^{-1} + u_1 X^2) \\\\ /// g(X) &= (u_0^{-1} + u_0 X)(u_1^{-1} + u_1 X^2) \\\\
/// &=\quad u_1^{-1} u_0^{-1} \\\\ /// &=\quad u_1^{-1} u_0^{-1} \\\\
/// &\quad+ u_1^{-1} u_0 X \\\\ /// &\quad+ u_1^{-1} u_0 X \\\\
/// &\quad+ u_1 u_0^{-1} X^2 \\\\ /// &\quad+ u_1 u_0^{-1} X^2 \\\\
/// &\quad+ u_1 u_0 X^3 /// &\quad+ u_1 u_0 X^3
/// \end{split} \end{align} /// \end{split} \end{align}
/// - $\kappa = 3$: \begin{align} \begin{split} /// - $\kappa = 3$: \begin{align} \begin{split}
/// g(X) &= (u_0^{-1} + u_0 X)(u_1^{-1} + u_1 X^2)(u_2^{-1} + u_2 X^2) \\\\ /// g(X) &= (u_0^{-1} + u_0 X)(u_1^{-1} + u_1 X^2)(u_2^{-1} + u_2 X^2) \\\\
/// &=\quad u_2^{-1} u_1^{-1} u_0^{-1} \\\\ /// &=\quad u_2^{-1} u_1^{-1} u_0^{-1} \\\\
...@@ -47,7 +47,7 @@ fn to_binary(number: usize, width: usize) -> Vec<u8> { ...@@ -47,7 +47,7 @@ fn to_binary(number: usize, width: usize) -> Vec<u8> {
/// &\quad+ u_2 u_1^{-1} u_0 X^5 \\\\ /// &\quad+ u_2 u_1^{-1} u_0 X^5 \\\\
/// &\quad+ u_2 u_1 u_0^{-1} X^6 \\\\ /// &\quad+ u_2 u_1 u_0^{-1} X^6 \\\\
/// &\quad+ u_2 u_1 u_0 X^7 /// &\quad+ u_2 u_1 u_0 X^7
/// \end{split} \end{align} /// \end{split} \end{align}
/// ///
/// we can see that the $j$-the coefficient of $g(X)$ for a given $\kappa$ is /// we can see that the $j$-the coefficient of $g(X)$ for a given $\kappa$ is
/// a product of a combination of $(u_i)$ and their inverse elements directly /// a product of a combination of $(u_i)$ and their inverse elements directly
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment