From 1dd282c73d49fa29bf7e729354cfdd7179ea60de Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:33:08 +0800 Subject: [PATCH 01/14] fix typo in book/src/fundamentals/zkbook_rings.md --- book/src/fundamentals/zkbook_rings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/fundamentals/zkbook_rings.md b/book/src/fundamentals/zkbook_rings.md index b764cb3e46..de574a79ac 100644 --- a/book/src/fundamentals/zkbook_rings.md +++ b/book/src/fundamentals/zkbook_rings.md @@ -8,7 +8,7 @@ A ring is like a field, but where elements may not be invertible. Basically, it' - subtract -but not necessarily divide. If you know what polynomials are already, you can think of it as the minimal necessary structure for polynomials to make sense. That is, if $R$ is a ring, then we can define the set of polynomials $R[x]$ (basically arithmetic expressions in the variable $x$) and think of any polynomial $f \in R[x]$ giving rise to a function $R \to R$ defined by substituing in for $x$ in $f$ and computing using $+$ and $\cdot$ as defined in $R$. +but not necessarily divide. If you know what polynomials are already, you can think of it as the minimal necessary structure for polynomials to make sense. That is, if $R$ is a ring, then we can define the set of polynomials $R[x]$ (basically arithmetic expressions in the variable $x$) and think of any polynomial $f \in R[x]$ giving rise to a function $R \to R$ defined by substituting in for $x$ in $f$ and computing using $+$ and $\cdot$ as defined in $R$. So, in full, a ring $R$ is a set equipped with From 5794e4cbcbf3da348058f1daeac0876ef6cf67ca Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:33:20 +0800 Subject: [PATCH 02/14] fix typo in book/src/kimchi/maller_15.md --- book/src/kimchi/maller_15.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/kimchi/maller_15.md b/book/src/kimchi/maller_15.md index d88fe3a924..89e010de4c 100644 --- a/book/src/kimchi/maller_15.md +++ b/book/src/kimchi/maller_15.md @@ -84,7 +84,7 @@ To compute it, there are two rules to follow: * when two commitment are **added** together, their associated blinding factors get added as well: $$\mathsf{com}(a) + \mathsf{com}(b) \implies r_a + r_b$$ -* when **scaling** a commitment, its blinding factor gets scalled too: +* when **scaling** a commitment, its blinding factor gets scaled too: $$n \cdot \mathsf{com}(a) \implies n \cdot r_a$$ As such, if we know $r_f$ and $r_t$, we can compute: From 5aa72a8f7992380432ac96379c8bd524748b66a1 Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:33:28 +0800 Subject: [PATCH 03/14] fix typo in book/src/pickles/deferred.md --- book/src/pickles/deferred.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/src/pickles/deferred.md b/book/src/pickles/deferred.md index 0144abb54e..f3601ba607 100644 --- a/book/src/pickles/deferred.md +++ b/book/src/pickles/deferred.md @@ -41,7 +41,7 @@ The solution to the first problem is simple: In the $\mathbb{F}_q$-side decompose $v = 2 \cdot h + l$ with $h \in [0, 2^{\lfloor \log p \rfloor})$ (high bits) and $l \in \{ 0, 1 \}$ (low bit). Note $l, h < p$ since $2 p > q$; always the case for any cycle of curves, $p$ is only $\approx \sqrt{q}$ smaller than $q$, by Hasse. Now "$\tilde{v}$" is "represented" by the two values $\tilde{h}, \tilde{l} \in \mathbb{F}_p$. -Note that no decomposition is nessary if the "original value" $v$ was in $\mathbb{F}_p$, since $\mathbb{F}_q$ is big enough to hold the lift of any element in $\mathbb{F}_p$. +Note that no decomposition is necessary if the "original value" $v$ was in $\mathbb{F}_p$, since $\mathbb{F}_q$ is big enough to hold the lift of any element in $\mathbb{F}_p$. #### Problem 2: Compute Commitment to the Public Input of other side @@ -67,7 +67,7 @@ $$ ### We recurse onwards... -At this point the statement of the proof in $\mathbb{F}_q$-side is: the $\mathbb{F}_q$-proof is sound, __condition__ on providing an opening of $P_p$ that satisifies the $\mathbb{F}_p$-relation. +At this point the statement of the proof in $\mathbb{F}_q$-side is: the $\mathbb{F}_q$-proof is sound, __condition__ on providing an opening of $P_p$ that satisfies the $\mathbb{F}_p$-relation. At this point you can stop and verify the proof (in the case of a "step proof" you would), by recomputing $P_p$ outside the circuit while checking the $\mathbb{F}_p$-relation manually "in the clear". From cf274ca92cfc5de5b1ab9c01df52093cc25b1a0b Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:33:38 +0800 Subject: [PATCH 04/14] fix typo in book/src/pickles/diagrams.md --- book/src/pickles/diagrams.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/pickles/diagrams.md b/book/src/pickles/diagrams.md index a2728c7c10..ee34673364 100644 --- a/book/src/pickles/diagrams.md +++ b/book/src/pickles/diagrams.md @@ -6,7 +6,7 @@ The legend of the diagrams is quite straightforward: - The black boxes are data structures that have names and labels following the implementation. - `MFNStep`/`MFNWrap` is an abbreviation from `MessagesForNextStep` and `MessagesForNextWrap` that is used for brevity. Most other datatypes are exactly the same as in the codebase. - The blue boxes are computations. Sometimes, when the computation is trivial or only vaguely indicated, it is denoted as a text sign directly on an arrow. -- Arrows are blue by default and denote moving a piece of data from one place to another with no (or very little) change. Light blue arrows are denoting witness query that is implemented through the `handler` mechanism. The "chicken foot" connector means that this arrow accesses just one field in an array: such an arrow could connect e.g. a input field of type `old_a: A` in a structure `Vec<(A,B)>` to an output `new_a: A`, which just means that we are inside a `for` loop and this computation is done for all the elemnts in the vector/array. +- Arrows are blue by default and denote moving a piece of data from one place to another with no (or very little) change. Light blue arrows are denoting witness query that is implemented through the `handler` mechanism. The "chicken foot" connector means that this arrow accesses just one field in an array: such an arrow could connect e.g. a input field of type `old_a: A` in a structure `Vec<(A,B)>` to an output `new_a: A`, which just means that we are inside a `for` loop and this computation is done for all the elements in the vector/array. - Colour of the field is sometimes introduced and denotes how many steps ago was this piece of data created. The absence of the colour means either that (1) the data structure contains different subfields of different origin, or that (2) it was not coloured but it could be. The colours are assigned according to the following convention: ![](./pickles_structure_legend_1.svg) From fe834b4d0d0fed15e7d27078206ac0d7fe024b0a Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:33:47 +0800 Subject: [PATCH 05/14] fix typo in book/src/plonk/inner_product_api.md --- book/src/plonk/inner_product_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/plonk/inner_product_api.md b/book/src/plonk/inner_product_api.md index 7a19582df9..1ee5d33528 100644 --- a/book/src/plonk/inner_product_api.md +++ b/book/src/plonk/inner_product_api.md @@ -40,7 +40,7 @@ Note that this kind of aggregation forces us to provide all combinations of eval ### Splitting a polynomial -If a polynomial is too large to fit in one SRS, you can split it in chuncks of size at most $n$ +If a polynomial is too large to fit in one SRS, you can split it in chunks of size at most $n$ ### Proof of correct commitment to a polynomial From ea3f4a09c26def36982050ddd3305cbfc754735c Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:33:57 +0800 Subject: [PATCH 06/14] fix typo in book/src/snarky/kimchi-backend.md --- book/src/snarky/kimchi-backend.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/src/snarky/kimchi-backend.md b/book/src/snarky/kimchi-backend.md index 5035dc8dec..79f112e859 100644 --- a/book/src/snarky/kimchi-backend.md +++ b/book/src/snarky/kimchi-backend.md @@ -20,7 +20,7 @@ One can also perform two additional operations once the constraint system has be ## A circuit -A circuit is either being built, or has been contructed during a circuit generation phase: +A circuit is either being built, or has been constructed during a circuit generation phase: ```rust enum Circuit From 124f10a85056b0aa574de504133e350cbaf6f602 Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:34:10 +0800 Subject: [PATCH 07/14] fix typo in folding/src/error_term.rs --- folding/src/error_term.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folding/src/error_term.rs b/folding/src/error_term.rs index be5f163adb..cdbec665f3 100644 --- a/folding/src/error_term.rs +++ b/folding/src/error_term.rs @@ -185,7 +185,7 @@ pub(crate) fn eval_exp_error<'a, C: FoldingConfig>( /// Computes the error terms of a folding/homogeneous expression. /// The extended environment contains all the evaluations of the columns, /// including the ones added by the quadraticization process. -/// `u` is the variables used to homogeneize the expression. +/// `u` is the variables used to homogenize the expression. /// The output is a pair of error terms. To see how it is computed, see the /// [top-level documentation of the expressions module](crate::expressions). pub(crate) fn compute_error( From ae0f503d4206a453a4301dfa132d2a135d4873a3 Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:34:29 +0800 Subject: [PATCH 08/14] fix typo in folding/src/standard_config.rs --- folding/src/standard_config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folding/src/standard_config.rs b/folding/src/standard_config.rs index d8d9f92490..99cb888d59 100644 --- a/folding/src/standard_config.rs +++ b/folding/src/standard_config.rs @@ -35,7 +35,7 @@ impl Index for EmptyStructure { /// use mina_poseidon::FqSponge; /// use folding::{examples::{BaseSponge, Curve, Fp}, FoldingScheme}; /// -/// // instanciating the config with our types and the defaults for selectors and structure +/// // instantiating the config with our types and the defaults for selectors and structure /// type MyConfig = StandardConfig, MyWitness>; /// let constraints = vec![constraint()]; /// let domain = Radix2EvaluationDomain::::new(2).unwrap(); @@ -265,7 +265,7 @@ mod memoization { where I: FnOnce() -> Vec, { - // this will find or asign an id for the column and then + // this will find or assign an id for the column and then // search the segments using the id let mut ids = self.ids.borrow_mut(); let new_id = || self.next.fetch_add(1, Ordering::Relaxed); From bd620dac9a660f94f6447f1e69eef6ca1f02be64 Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:34:37 +0800 Subject: [PATCH 09/14] fix typo in folding/tests/test_vanilla_folding.rs --- folding/tests/test_vanilla_folding.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folding/tests/test_vanilla_folding.rs b/folding/tests/test_vanilla_folding.rs index 5a137bafb1..725230ae4c 100644 --- a/folding/tests/test_vanilla_folding.rs +++ b/folding/tests/test_vanilla_folding.rs @@ -33,7 +33,7 @@ type SpongeParams = PlonkSpongeConstantsKimchi; type BaseSponge = DefaultFqSponge; /// The instance is the commitments to the polynomials and the challenges -/// There are 3 commitments and challanges because there are 3 columns, A, B and +/// There are 3 commitments and challenges because there are 3 columns, A, B and /// C. #[derive(PartialEq, Eq, Debug, Clone)] struct TestInstance { @@ -228,7 +228,7 @@ fn instance_from_witness( .collect_vec(); let commitments: [_; 3] = commitments.try_into().unwrap(); - // here we should absorve the commitments and similar things to later + // here we should absorb the commitments and similar things to later // compute challenges but for this example I just use random values let mut rng = thread_rng(); let mut challenge = || Fp::rand(&mut rng); From e55fdd56d8a7b74d3b3f4d443e1d150644e6df80 Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:35:02 +0800 Subject: [PATCH 10/14] fix typo in o1vm/src/interpreters/keccak/column.rs --- o1vm/src/interpreters/keccak/column.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/o1vm/src/interpreters/keccak/column.rs b/o1vm/src/interpreters/keccak/column.rs index fe2e1cd9b1..708349b2fe 100644 --- a/o1vm/src/interpreters/keccak/column.rs +++ b/o1vm/src/interpreters/keccak/column.rs @@ -380,7 +380,7 @@ impl ColumnIndexer for ColumnAlias { } } -// IMPLEMENTAIONS FOR SELECTOR +// IMPLEMENTATIONS FOR SELECTOR impl Index for KeccakWitness { type Output = T; From 0f596f3e3cbb1022de0286176fa9f53b1add666c Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:35:12 +0800 Subject: [PATCH 11/14] fix typo in o1vm/src/interpreters/keccak/tests.rs --- o1vm/src/interpreters/keccak/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/o1vm/src/interpreters/keccak/tests.rs b/o1vm/src/interpreters/keccak/tests.rs index 6ce716a038..3c8e5d011a 100644 --- a/o1vm/src/interpreters/keccak/tests.rs +++ b/o1vm/src/interpreters/keccak/tests.rs @@ -317,7 +317,7 @@ fn test_keccak_fake_witness_wont_satisfy_constraints() { assert_eq!(witness_env[0].pad_suffix(0), Fp::zero()); assert_eq!(witness_env[0].pad_suffix(1), Fp::zero()); assert_eq!(witness_env[0].pad_suffix(2), Fp::zero()); - // Check that the padding blocks are corrrect + // Check that the padding blocks are correct assert_eq!(witness_env[0].block_in_padding(0), Fp::zero()); assert_eq!(witness_env[0].block_in_padding(1), Fp::zero()); assert_eq!(witness_env[0].block_in_padding(2), Fp::zero()); From 615828a325bb90c3a06fa1fbe3c15e5395c43bd7 Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:35:24 +0800 Subject: [PATCH 12/14] fix typo in o1vm/src/interpreters/mips/column.rs --- o1vm/src/interpreters/mips/column.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/o1vm/src/interpreters/mips/column.rs b/o1vm/src/interpreters/mips/column.rs index cd895198b7..d780171715 100644 --- a/o1vm/src/interpreters/mips/column.rs +++ b/o1vm/src/interpreters/mips/column.rs @@ -110,7 +110,7 @@ impl From for usize { /// - the current instruction pointer /// - the next instruction pointer /// - the heap pointer -/// - the preimage key, splitted in 8 consecutive columns representing 4 bytes +/// - the preimage key, split in 8 consecutive columns representing 4 bytes /// of the 32 bytes long preimage key /// - the preimage offset, i.e. the number of bytes that have been read for the /// currently processing preimage From 6042da1a7ea1b4d4691b8ab76cb1b49b7a930605 Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:35:33 +0800 Subject: [PATCH 13/14] fix typo in o1vm/src/legacy/trace.rs --- o1vm/src/legacy/trace.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/o1vm/src/legacy/trace.rs b/o1vm/src/legacy/trace.rs index 2f5d1be497..f5c34acd10 100644 --- a/o1vm/src/legacy/trace.rs +++ b/o1vm/src/legacy/trace.rs @@ -81,7 +81,7 @@ where } /// Returns a boolean indicating whether the witness for the given selector - /// was ever found in the cirucit or not. + /// was ever found in the circuit or not. pub fn in_circuit(&self, opcode: C::Selector) -> bool { self.number_of_rows(opcode) != 0 } From e27267ad64b6bd4d16abe31c707ebf7ddc0c0f7d Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:35:40 +0800 Subject: [PATCH 14/14] fix typo in o1vm/src/pickles/prover.rs --- o1vm/src/pickles/prover.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/o1vm/src/pickles/prover.rs b/o1vm/src/pickles/prover.rs index 0863227ef5..d9aa9416cf 100644 --- a/o1vm/src/pickles/prover.rs +++ b/o1vm/src/pickles/prover.rs @@ -272,7 +272,7 @@ where let fail_final_q_division = || panic!("Fail division by vanishing poly"); let fail_remainder_not_zero = - || panic!("The constraints are not satisifed since the remainder is not zero"); + || panic!("The constraints are not satisfied since the remainder is not zero"); // We compute the polynomial t(X) by dividing the constraints polynomial // by the vanishing polynomial, i.e. Z_H(X). let (quotient, rem) = expr_evaluation_interpolated