From 595889f0b03fc52b154a24eb30b5237b7c4b9879 Mon Sep 17 00:00:00 2001 From: Jan Ferdinand Sauer Date: Fri, 20 Dec 2024 13:40:54 +0100 Subject: [PATCH] chore: Fix typos --- specification/src/evaluation-argument.md | 2 +- specification/src/index-sampling.md | 2 +- specification/src/lookup-argument.md | 4 ++-- specification/src/operational-stack-table.md | 2 +- specification/src/permutation-argument.md | 2 +- tips/tip-0005/tip-0005.md | 6 +++--- triton-air/src/table/processor.rs | 2 +- triton-constraint-circuit/src/lib.rs | 6 +++--- triton-vm/src/stark.rs | 2 +- triton-vm/src/table/master_table.rs | 14 +++++++------- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/specification/src/evaluation-argument.md b/specification/src/evaluation-argument.md index 70e02f4ae..2a255d69b 100644 --- a/specification/src/evaluation-argument.md +++ b/specification/src/evaluation-argument.md @@ -33,7 +33,7 @@ It is possible to establish a subset relation by skipping over certain elements The running evaluation must incorporate the same elements in both tables. Otherwise, the Evaluation Argument will fail. -Examples for subset Evaluation Arguments can be found between the [Hash Table](hash-table.md#auxiliary-columns) and the [Processor Table](processor-table.md#auxiliary-colums). +Examples for subset Evaluation Arguments can be found between the [Hash Table](hash-table.md#auxiliary-columns) and the [Processor Table](processor-table.md#auxiliary-columns). --- diff --git a/specification/src/index-sampling.md b/specification/src/index-sampling.md index e323d0f64..da980112b 100644 --- a/specification/src/index-sampling.md +++ b/specification/src/index-sampling.md @@ -80,7 +80,7 @@ For a concrete example, set $k=\lambda=160$ and $U=2^{32}$. Then $\mu$ needs to ### Security Degradation -Suppose the user is malicous and hopes to conceal his fraud by selecting a set of indices that do not expose it. Suppose that the proportion of subsets of $[0:U)$ of size $k$ that are suitable for the adversary is $\rho$. Then clearly with the standard old index sampling method the attacker's success probability is bounded by $\rho \approx 2^{-\lambda}$. The question is whether the improved index sampler enables a higher success probability (and if so, how much higher). +Suppose the user is malicious and hopes to conceal his fraud by selecting a set of indices that do not expose it. Suppose that the proportion of subsets of $[0:U)$ of size $k$ that are suitable for the adversary is $\rho$. Then clearly with the standard old index sampling method the attacker's success probability is bounded by $\rho \approx 2^{-\lambda}$. The question is whether the improved index sampler enables a higher success probability (and if so, how much higher). The attacker has access to at most $\binom{k+\mu}{\mu}$ subsets of $[0:U)$ of size $k$. The probability that a given subset is suitable for the attack is $\rho$, and so: - The probability that one subset is unsuitable for attack is $1 - \rho$. diff --git a/specification/src/lookup-argument.md b/specification/src/lookup-argument.md index 16a2f26ae..718ea5868 100644 --- a/specification/src/lookup-argument.md +++ b/specification/src/lookup-argument.md @@ -3,7 +3,7 @@ The [Lookup Argument](https://eprint.iacr.org/2023/107.pdf) establishes that all elements of list $A = (a_0, \dots, a_\ell)$ also occur in list $B = (b_0, \dots, b_n)$. In this context, $A$ contains the values that are being looked up, while $B$ is the lookup table.[^1] Both lists $A$ and $B$ may contain duplicates. -However, it is inefficient if $B$ does, and is therefor assumed not to. +However, it is inefficient if $B$ does, and is therefore assumed not to. The example at the end of this section summarizes the necessary computations for the Lookup Argument. The rest of the section derives those computations. @@ -96,7 +96,7 @@ It is possible to establish a subset relation by skipping over certain elements The logarithmic derivative must incorporate the same elements with the same multiplicity in both tables. Otherwise, the Lookup Argument will fail. -An example for a Lookup Argument can be found between the [Program Table](program-table.md) and the [Processor Table](processor-table.md#auxiliary-colums). +An example for a Lookup Argument can be found between the [Program Table](program-table.md) and the [Processor Table](processor-table.md#auxiliary-columns). --- diff --git a/specification/src/operational-stack-table.md b/specification/src/operational-stack-table.md index 43d0bd08b..b3d08cbe8 100644 --- a/specification/src/operational-stack-table.md +++ b/specification/src/operational-stack-table.md @@ -156,7 +156,7 @@ None. 1. - the `stack_pointer` increases by 1, *or* - the `stack_pointer` does not change AND the `first_underflow_element` does not change, *or* - the `stack_pointer` does not change AND the shrink stack indicator `shrink_stack` in the next row is 0. -1. If thex next row is not a padding row, the running product for the permutation argument with the Processor Table `rppa` absorbs the next row with respect to challenges πŸ‹, 🍊, πŸ‰, and πŸ«’ and indeterminate πŸͺ€. +1. If the next row is not a padding row, the running product for the permutation argument with the Processor Table `rppa` absorbs the next row with respect to challenges πŸ‹, 🍊, πŸ‰, and πŸ«’ and indeterminate πŸͺ€. Otherwise, the running product remains unchanged. 1. If the current row is a padding row, then the next row is a padding row. 1. If the next row is not a padding row and the op stack pointer `stack_pointer` does not change, then the logarithmic derivative for the clock jump difference lookup `ClockJumpDifferenceLookupClientLogDerivative` accumulates a factor `(clk' - clk)` relative to indeterminate πŸͺž. diff --git a/specification/src/permutation-argument.md b/specification/src/permutation-argument.md index 38b93c27c..487fddb9f 100644 --- a/specification/src/permutation-argument.md +++ b/specification/src/permutation-argument.md @@ -42,7 +42,7 @@ It is possible to establish a subset relation by skipping over certain elements The running product must incorporate the same elements in both tables. Otherwise, the Permutation Argument will fail. -An example of a subset Permutation Argument can be found between the [U32 Table](u32-table.md#auxiliary-columns) and the [Processor Table](processor-table.md#auxiliary-colums). +An example of a subset Permutation Argument can be found between the [U32 Table](u32-table.md#auxiliary-columns) and the [Processor Table](processor-table.md#auxiliary-columns). --- diff --git a/tips/tip-0005/tip-0005.md b/tips/tip-0005/tip-0005.md index ff72b559b..ec67381b4 100644 --- a/tips/tip-0005/tip-0005.md +++ b/tips/tip-0005/tip-0005.md @@ -163,13 +163,13 @@ On the side of the server, two columns are needed to probe this identity in the On the client only *one* extension column is needed. Specifically, the running product `rpc` and formal derivative `fdc` are merged into a single column, the logarithmic derivative `ldc`. -To update `ldc`, recall that the standard running product column `rpc` is defined to accumulate one *factor* in every row. Moreover, `ldc` is defined to contain the logarithmic derivative of `rpc` in every row, so we can use the eponymous property to populate it. Speficially, the would-have-been running product update rule `rpc* = rpc β‹… (Ξ± - rlc*)` becomes `ldc* = ldc + 1/(Ξ± - rlc*)`, where the asterisk `*` indicates the respective element from the next row. +To update `ldc`, recall that the standard running product column `rpc` is defined to accumulate one *factor* in every row. Moreover, `ldc` is defined to contain the logarithmic derivative of `rpc` in every row, so we can use the eponymous property to populate it. Specifically, the would-have-been running product update rule `rpc* = rpc β‹… (Ξ± - rlc*)` becomes `ldc* = ldc + 1/(Ξ± - rlc*)`, where the asterisk `*` indicates the respective element from the next row. The update rules `sum* = sum + mul* / (Ξ± - rlc*)` and `ldc* = ldc + 1 / (Ξ± - rlc*)` can be converted to AIR constraints by multiplying left and right hand sides by `(Ξ± - rlc*)`. ### Cascade Construction -The cascade construction arithmetizes a composite lookup gate in terms of multiple lookups into component gates followed by combining the looked-up outputs. For example, supose that a 16-bit wide map can be represented as the concatenation of two 8-bit wide lookups. Then this 16-bit wide map can be arithmetized with a cascade table as follows. The cascade table is the *server* authenticating 16-bit wide input-output pairs to the external client. Internally, every input or output element is represented as two limbs of 8 bits. To authenticate the 8-bit wide input-output pairs, the cascade table is the *client* of an 8-bit wide subset argument with an external server. +The cascade construction arithmetizes a composite lookup gate in terms of multiple lookups into component gates followed by combining the looked-up outputs. For example, suppose that a 16-bit wide map can be represented as the concatenation of two 8-bit wide lookups. Then this 16-bit wide map can be arithmetized with a cascade table as follows. The cascade table is the *server* authenticating 16-bit wide input-output pairs to the external client. Internally, every input or output element is represented as two limbs of 8 bits. To authenticate the 8-bit wide input-output pairs, the cascade table is the *client* of an 8-bit wide subset argument with an external server. A cascade table consists of 5 base columns and 3 extension column. The extension columns are defined relative to challenges `a,b,c,d,Ξ²,Ξ³`. The Latin letters denote weights used to compress columns, and the Greek letters denote indeterminates. @@ -346,7 +346,7 @@ For Tip5 this means we have to add 3 columns per state element that undergoes th For Rescue-Prime and Rescue-Prime Optimized there are 16 columns that need to be expanded in this way.The total number of base columns is 16 + 16β‹…3 = 64. The total number of columns is the same, 64, whether in technical terms of B-field equivalent terms. -Note that for the parameters here, Rescue-Prime has 8 rounds and as a result the trace of one hash function invocation does not fit into 8 rows. To accomodate for this, one must either include columns for counting the round, or expand the trace into 16 rows and use periodic constraints or periodic interpolants. +Note that for the parameters here, Rescue-Prime has 8 rounds and as a result the trace of one hash function invocation does not fit into 8 rows. To accommodate for this, one must either include columns for counting the round, or expand the trace into 16 rows and use periodic constraints or periodic interpolants. ## Performance diff --git a/triton-air/src/table/processor.rs b/triton-air/src/table/processor.rs index 677176f82..4ac76a719 100644 --- a/triton-air/src/table/processor.rs +++ b/triton-air/src/table/processor.rs @@ -267,7 +267,7 @@ impl AIR for ProcessorTable { main_row(MainColumn::IsPadding) * (main_row(MainColumn::IsPadding) - constant(1)); // In padding rows, the clock jump difference lookup multiplicity is 0. The one row - // exempt from this rule is the row wth CLK == 1: since the memory-like tables don't have + // exempt from this rule is the row with CLK == 1: since the memory-like tables don't have // an β€œawareness” of padding rows, they keep looking up clock jump differences of // magnitude 1. let clock_jump_diff_lookup_multiplicity_is_0_in_padding_rows = diff --git a/triton-constraint-circuit/src/lib.rs b/triton-constraint-circuit/src/lib.rs index 4cd6b32c9..ac2b8354a 100644 --- a/triton-constraint-circuit/src/lib.rs +++ b/triton-constraint-circuit/src/lib.rs @@ -1655,16 +1655,16 @@ mod tests { let tree = (x(0) * x(1) * (x(2) - b_con(1))).consume(); assert_eq!(4, count_node(tree)); - let max_occurences = all_nodes + let max_occurrences = all_nodes .iter() .map(|node| all_nodes.iter().filter(|&n| n == node).count()) .max() .unwrap(); - assert_eq!(8, max_occurences); + assert_eq!(8, max_occurrences); let most_frequent_nodes = all_nodes .iter() - .filter(|&node| all_nodes.iter().filter(|&n| n == node).count() == max_occurences) + .filter(|&node| all_nodes.iter().filter(|&n| n == node).count() == max_occurrences) .unique() .collect_vec(); assert_eq!(2, most_frequent_nodes.len()); diff --git a/triton-vm/src/stark.rs b/triton-vm/src/stark.rs index 8a3204457..a1bd3de79 100644 --- a/triton-vm/src/stark.rs +++ b/triton-vm/src/stark.rs @@ -566,7 +566,7 @@ impl Prover { // Must be a power of two and lie in 2..=randomized_trace_domain.length. // // The requirement for the working domain to be at most as long as the trace - // domain, i.e., at most half the size of the randomzied trace domain, is + // domain, i.e., at most half the size of the randomized trace domain, is // explained below. const RANDOMIZED_TRACE_LEN_TO_WORKING_DOMAIN_LEN_RATIO: usize = 2; const NUM_COSETS: usize = diff --git a/triton-vm/src/table/master_table.rs b/triton-vm/src/table/master_table.rs index eab063007..00aa16df6 100644 --- a/triton-vm/src/table/master_table.rs +++ b/triton-vm/src/table/master_table.rs @@ -652,7 +652,7 @@ pub struct MasterMainTable { ram_table_len: usize, hash_coprocessor_execution_len: usize, cascade_table_len: usize, - u32_coprocesor_execution_len: usize, + u32_coprocessor_execution_len: usize, trace_domain: ArithmeticDomain, randomized_trace_domain: ArithmeticDomain, @@ -855,7 +855,7 @@ impl MasterMainTable { ram_table_len: aet.height_of_table(TableId::Ram), hash_coprocessor_execution_len: aet.height_of_table(TableId::Hash), cascade_table_len: aet.height_of_table(TableId::Cascade), - u32_coprocesor_execution_len: aet.height_of_table(TableId::U32), + u32_coprocessor_execution_len: aet.height_of_table(TableId::U32), trace_domain, randomized_trace_domain, quotient_domain, @@ -956,7 +956,7 @@ impl MasterMainTable { self.hash_coprocessor_execution_len, self.cascade_table_len, AlgebraicExecutionTrace::LOOKUP_TABLE_HEIGHT, - self.u32_coprocesor_execution_len, + self.u32_coprocessor_execution_len, ] } @@ -2113,11 +2113,11 @@ mod tests { .unwrap(); let mut snippet = String::new(); for name in InstructionBucket::VARIANTS.iter().rev() { - let cell_titel = format!("| {name:>cell_width$} "); - snippet.push_str(&cell_titel); + let cell_title = format!("| {name:>cell_width$} "); + snippet.push_str(&cell_title); } - let num_opcodes_titel = format!("| {:>cell_width$} |\n", "Num Opcodes"); - snippet.push_str(&num_opcodes_titel); + let num_opcodes_title = format!("| {:>cell_width$} |\n", "Num Opcodes"); + snippet.push_str(&num_opcodes_title); let dash = "-"; for _ in 0..=InstructionBucket::COUNT {