Skip to content

Commit

Permalink
chore: fix clippy warning about long paragraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwalker committed Sep 6, 2024
1 parent f72a7b4 commit 1b1f782
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
8 changes: 5 additions & 3 deletions air/src/proof/ood_frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,11 @@ impl Deserializable for OodFrame {
// ================================================================================================

/// Stores the trace evaluations at `z` and `gz`, where `z` is a random Field element in
/// `current_row` and `next_row`, respectively. If the Air contains a Lagrange kernel auxiliary
/// column, then that column interpolated polynomial will be evaluated at `z`, `gz`, `g^2 z`, ...
/// `g^(2^(v-1)) z`, where `v == log(trace_len)`, and stored in `lagrange_kernel_frame`.
/// `current_row` and `next_row`, respectively.
///
/// If the Air contains a Lagrange kernel auxiliary column, then that column interpolated polynomial
/// will be evaluated at `z`, `gz`, `g^2 z`, ... `g^(2^(v-1)) z`, where `v == log(trace_len)`, and
/// stored in `lagrange_kernel_frame`.
pub struct TraceOodFrame<E: FieldElement> {
current_row: Vec<E>,
next_row: Vec<E>,
Expand Down
8 changes: 5 additions & 3 deletions crypto/src/merkle/concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ pub const MIN_CONCURRENT_LEAVES: usize = 1024;
// PUBLIC FUNCTIONS
// ================================================================================================

/// Builds all internal nodes of the Merkle using all available threads and stores the
/// results in a single vector such that root of the tree is at position 1, nodes immediately
/// under the root is at positions 2 and 3 etc.
/// Builds all internal nodes of the Merkle.
///
/// All available threads are used, and the results are stored in a single vector, such that
/// the root of the tree is at position 1, and nodes immediately under the root are at positions
/// 2 and 3, and so on.
pub fn build_merkle_nodes<H: Hasher>(leaves: &[H::Digest]) -> Vec<H::Digest> {
let n = leaves.len() / 2;

Expand Down
9 changes: 5 additions & 4 deletions examples/src/utils/rescue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ pub const RATE_WIDTH: usize = 4;
/// Two elements (32-bytes) are returned as digest.
const DIGEST_SIZE: usize = 2;

/// The number of rounds is set to 7 to provide 128-bit security level with 40% security margin;
/// computed using algorithm 7 from <https://eprint.iacr.org/2020/1143.pdf>
/// security margin here differs from Rescue Prime specification which suggests 50% security
/// margin (and would require 8 rounds) primarily to make AIR a bit simpler.
/// The number of rounds is set to 7 to provide 128-bit security level with 40% security margin.
///
/// Computed using algorithm 7 from <https://eprint.iacr.org/2020/1143.pdf>, the security margin
/// here differs from Rescue Prime specification which suggests 50% security margin (and would
/// require 8 rounds) primarily to make AIR a bit simpler.
pub const NUM_ROUNDS: usize = 7;

/// Minimum cycle length required to describe Rescue permutation.
Expand Down
2 changes: 2 additions & 0 deletions math/src/field/f64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@

//! An implementation of a 64-bit STARK-friendly prime field with modulus $2^{64} - 2^{32} + 1$
//! using Montgomery representation.
//!
//! Our implementation follows <https://eprint.iacr.org/2022/274.pdf> and is constant-time.
//!
//! This field supports very fast modular arithmetic and has a number of other attractive
//! properties, including:
//!
//! * Multiplication of two 32-bit values does not overflow field modulus.
//! * Field arithmetic in this field can be implemented using a few 32-bit addition, subtractions,
//! and shifts.
Expand Down

0 comments on commit 1b1f782

Please sign in to comment.