Skip to content

Commit

Permalink
chore: Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Dec 20, 2024
1 parent 5f17e2d commit 595889f
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion specification/src/evaluation-argument.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

---

Expand Down
2 changes: 1 addition & 1 deletion specification/src/index-sampling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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$.
Expand Down
4 changes: 2 additions & 2 deletions specification/src/lookup-argument.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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).

---

Expand Down
2 changes: 1 addition & 1 deletion specification/src/operational-stack-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 🪞.
Expand Down
2 changes: 1 addition & 1 deletion specification/src/permutation-argument.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

---

Expand Down
6 changes: 3 additions & 3 deletions tips/tip-0005/tip-0005.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion triton-air/src/table/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
6 changes: 3 additions & 3 deletions triton-constraint-circuit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion triton-vm/src/stark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
14 changes: 7 additions & 7 deletions triton-vm/src/table/master_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
]
}

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 595889f

Please sign in to comment.