chore(evm,field,plonky2):fix typos (#1454)

This commit is contained in:
yanziseeker 2024-01-10 18:40:39 +08:00 committed by GitHub
parent aedfe5dfa6
commit c329b3681c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 7 deletions

View File

@ -105,7 +105,7 @@ fn eval_packed_get<P: PackedField>(
}
/// Circuit version of `eval_packed_get`.
/// Evalutes constraints for GET_CONTEXT.
/// Evaluates constraints for GET_CONTEXT.
fn eval_ext_circuit_get<F: RichField + Extendable<D>, const D: usize>(
builder: &mut CircuitBuilder<F, D>,
lv: &CpuColumnsView<ExtensionTarget<D>>,

View File

@ -59,7 +59,7 @@ fn apply_perm<T: Eq + Hash + Clone>(permutation: Vec<Vec<usize>>, mut lst: Vec<T
/// This function does STEP 1.
/// Given 2 lists A, B find a permutation P such that P . A = B.
pub(crate) fn find_permutation<T: Eq + Hash + Clone>(lst_a: &[T], lst_b: &[T]) -> Vec<Vec<usize>> {
// We should check to ensure that A and B are indeed rearrangments of each other.
// We should check to ensure that A and B are indeed rearrangements of each other.
assert!(is_permutation(lst_a, lst_b));
let n = lst_a.len();

View File

@ -75,12 +75,12 @@ pub(crate) fn u256_to_usize(u256: U256) -> Result<usize, ProgramError> {
u256.try_into().map_err(|_| ProgramError::IntegerTooLarge)
}
/// Converts a `U256` to a `u8`, erroring in case of overlow instead of panicking.
/// Converts a `U256` to a `u8`, erroring in case of overflow instead of panicking.
pub(crate) fn u256_to_u8(u256: U256) -> Result<u8, ProgramError> {
u256.try_into().map_err(|_| ProgramError::IntegerTooLarge)
}
/// Converts a `U256` to a `bool`, erroring in case of overlow instead of panicking.
/// Converts a `U256` to a `bool`, erroring in case of overflow instead of panicking.
pub(crate) fn u256_to_bool(u256: U256) -> Result<bool, ProgramError> {
if u256 == U256::zero() {
Ok(false)

View File

@ -15,7 +15,7 @@ pub trait OEF<const D: usize>: FieldExtension<D> {
// Element W of BaseField, such that `X^d - W` is irreducible over BaseField.
const W: Self::BaseField;
// Element of BaseField such that DTH_ROOT^D == 1. Implementors
// Element of BaseField such that DTH_ROOT^D == 1. Implementers
// should set this to W^((p - 1)/D), where W is as above and p is
// the order of the BaseField.
const DTH_ROOT: Self::BaseField;

View File

@ -40,7 +40,7 @@ pub enum LookupSelectors {
}
/// Returns selector polynomials for each LUT. We have two constraint domains (remember that gates are stored upside down):
/// - [last_lut_row, first_lut_row] (Sum and RE transition contraints),
/// - [last_lut_row, first_lut_row] (Sum and RE transition constraints),
/// - [last_lu_row, last_lut_row - 1] (LDC column transition constraints).
/// We also add two more:
/// - {first_lut_row + 1} where we check the initial values of sum and RE (which are 0),

View File

@ -323,7 +323,7 @@ mod poseidon12_mds {
let (u8, u9, u10) = fft4_real([s2, s5, s8, s11]);
// This where the multiplication in frequency domain is done. More precisely, and with
// the appropriate permuations in between, the sequence of
// the appropriate permutations in between, the sequence of
// 3-point FFTs --> multiplication by twiddle factors --> Hadamard multiplication -->
// 3 point iFFTs --> multiplication by (inverse) twiddle factors
// is "squashed" into one step composed of the functions "block1", "block2" and "block3".