Skip to content

Commit a4fef23

Browse files
chore: fix typos and links (#1730)
addressing typos and links to prevent future PRs --------- Co-authored-by: Copilot <[email protected]>
1 parent 152b6b6 commit a4fef23

File tree

11 files changed

+23
-23
lines changed

11 files changed

+23
-23
lines changed

audits/v1-internal/circuit-primitives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ Two cases to consider:
535535

536536
The SubAir doesn't explicitly enforce that only the first differing index has a non-zero `diff_inv_marker` value, or that it contains the exact inverse. It only requires that the weighted sum of differences equals 1 when arrays differ. However, the trace generation sets these values correctly for efficiency.
537537

538-
#### 3.2.6 [is_less_than](https://github.com/openvm-org/openvm/blob/main/crates/circuits/primitives/is_less_than.rs)
538+
#### 3.2.6 [is_less_than](https://github.com/openvm-org/openvm/blob/main/crates/circuits/primitives/src/is_less_than)
539539
Less than comparison for outputting a boolean indicating `x` < `y`
540540

541541
**Assumptions:**

audits/v1-internal/native-compiler.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ Commit: 336f1a475e5aa3513c4c5a266399f4128c119bba
1414
**Severity:** Medium
1515
**Context:** https://github.com/openvm-org/openvm/blob/336f1a475e5aa3513c4c5a266399f4128c119bba/extensions/native/compiler/src/asm/compiler.rs#L598
1616

17-
**Description:** When allocating memory, `HEAP_PTR` and `A0` could overflow as a field element. This could lead
18-
an exploit when the size of memory allocation is based on inputs.
17+
**Description:** When allocating memory, `HEAP_PTR` and `A0` could overflow as a field element. This could lead
18+
an exploit when the size of memory allocation is based on inputs.
1919

20-
The exploit could change `HEAP_PTR` to an arbitrary address, which could point to a loop variable or an
21-
end condition. The the exploit could write an arbitrary value into the address and takes control of the
20+
The exploit could change `HEAP_PTR` to an arbitrary address, which could point to a loop variable or an
21+
end condition. The the exploit could write an arbitrary value into the address and takes control of the
2222
control flow.
2323

2424
**Proof of concept:** N/A
@@ -38,8 +38,8 @@ save columns, `RANGE_CHECK` is put into the existing `JalChip`.
3838
**Severity:** High
3939
**Context:** https://github.com/openvm-org/openvm/blob/336f1a475e5aa3513c4c5a266399f4128c119bba/extensions/native/compiler/src/conversion/mod.rs#L274
4040

41-
**Description:**
42-
ASM compiler compiles `Assert*` DSL instructions into a conditional jump + a ASM instruction `Trap`, which only results a phantom instruction. The expolit can generate a valid execution trace which ignores all assertions in the program.
41+
**Description:**
42+
ASM compiler compiles `Assert*` DSL instructions into a conditional jump + a ASM instruction `Trap`, which only results a phantom instruction. The exploit can generate a valid execution trace which ignores all assertions in the program.
4343

4444
**Proof of concept:** N/A
4545

@@ -54,11 +54,11 @@ assertions anymore.
5454
**Severity:** Medium
5555
**Context:**: https://github.com/openvm-org/openvm/blob/336f1a475e5aa3513c4c5a266399f4128c119bba/extensions/native/compiler/src/constraints/halo2/compiler.rs#L317
5656

57-
**Description:**
58-
The order of `Bn254Fr` is less than `2^254`. A number of 254 bits could overflow. Therefore the bit decomposition
57+
**Description:**
58+
The order of `Bn254Fr` is less than `2^254`. A number of 254 bits could overflow. Therefore the bit decomposition
5959
of a specific `Bn254Fr` doesn't guarantee an unique representation.
6060

61-
**Recommendation:**
61+
**Recommendation:**
6262
Constraints the bit representation is not in `[p, 2^254)` where `p` is the order of `Bn254Fr`.
6363

6464
**Resolution:** https://github.com/openvm-org/openvm/commit/bff6d573ce7e5304fed5a9e40df9a76647be42ea
@@ -67,15 +67,15 @@ Constraints the bit representation is not in `[p, 2^254)` where `p` is the order
6767
**Severity:** Low
6868
**Context:**: https://github.com/openvm-org/openvm/blob/336f1a475e5aa3513c4c5a266399f4128c119bba/extensions/native/compiler/src/asm/compiler.rs#L40
6969

70-
**Description:**
70+
**Description:**
7171
In compiled programs, frame pointers could be negative, which means stackoverflow. Usually compilers support
7272
recursion so they cannot check stackoverflow at compile time. But ASM compiler can determine all frame pointers
7373
at compile time so it has the ability to check.
7474

7575
This exploit can happen only when users create lots of stack variables and never access stack variables in
7676
out of bound addresses(>=`2^29`). So it's very unlikely unless users are malicious.
7777

78-
**Recommendation:**
78+
**Recommendation:**
7979
Assert frame pointers cannot be negative.
8080

8181
**Resolution:** https://github.com/openvm-org/openvm/pull/1416
@@ -98,7 +98,7 @@ Most DSL instructions are trivially converted into the corresponding ASM instruc
9898
Notably, immediate `Ext` DSL instructions result 5 ASM instruction - the compiler needs to write the immediate `Ext` as 4 `Felt`s first.
9999

100100
### 3.2 Analysis of Halo2 Compiler
101-
The Halo2 compiler in `src/asm` converts DSL instructions into Halo2 circuit constraints. The Halo2 compiler
101+
The Halo2 compiler in `src/asm` converts DSL instructions into Halo2 circuit constraints. The Halo2 compiler
102102
doesn't support jump and heap allocation. So it's simpler than the ASM compiler. Almost all DSL instructions
103103
are simply converted into the corresponding Halo2 circuit constraints.
104104

audits/v1-internal/poseidon2-air.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Author: https://github.com/MonkeyKing-1
66

77
Scope: Plonky3 poseidon2 and poseidon2 air
88

9-
Understanding how the Plonky3 posiedon2 air works, make sure it is sound.
9+
Understanding how the Plonky3 poseidon2 air works, make sure it is sound.
1010

1111
## 2. Findings
1212

@@ -40,7 +40,7 @@ The external linear layer takes the current state and does some case work based
4040

4141
- Length 2: compute sum of elements of state and add to each element of state.
4242
- Length 3: compute sum of elements of state and add to each element of state.
43-
- Length is multiple of 4: Multiply every four elements by M, giving a new state. Compute the sum of elements with indices that are 0 mod 4, 1 mod 4, etc, computing four sums. Then add these sums to the elements that contributed to them. In other words, perform this multiplication:
43+
- Length is multiple of 4: Multiply every four elements by M, giving a new state. Compute the sum of elements with indices that are 0 mod 4, 1 mod 4, etc, computing four sums. Then add these sums to the elements that contributed to them. In other words, perform this multiplication:
4444
`[[2M M ... M], [M 2M ... M], ..., [M M ... 2M]]`.
4545

4646
### Internal Linear Layer

crates/sdk/tests/integration_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const LEAF_LOG_BLOWUP: usize = 2;
6464
const INTERNAL_LOG_BLOWUP: usize = 3;
6565
const ROOT_LOG_BLOWUP: usize = 4;
6666

67-
/// `OpenVmHalo2Verifier` wraps the `snark-verifer` contract, meaning that
67+
/// `OpenVmHalo2Verifier` wraps the `snark-verifier` contract, meaning that
6868
/// the default `fallback` interface can still be used. This function uses
6969
/// the fallback interface as opposed to the `verify(..)` interface.
7070
fn verify_evm_halo2_proof_with_fallback(

extensions/ecc/guest/src/weierstrass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub trait WeierstrassPoint: Clone + Sized {
1919
/// coordinates are in little endian.
2020
///
2121
/// **Warning**: The memory layout of `Self` is expected to pack
22-
/// `x` and `y` contigously with no unallocated space in between.
22+
/// `x` and `y` contiguously with no unallocated space in between.
2323
fn as_le_bytes(&self) -> &[u8];
2424

2525
/// Raw constructor without asserting point is on the curve.

extensions/keccak256/circuit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The `keccak-air` from Plonky3 is an AIR that does one `keccak-f[1600]` permutation every `NUM_ROUNDS = 24` rows (henceforth we call this the `keccak-f` AIR to avoid confusion). All rows in the round have the same `preimage`, which is the starting state prior to the permutation, represented as `5 * 5 * 4` `u16` limbs (the state in the spec is `5 * 5` `u64`s, but since the AIR uses a 31-bit field, the `u64` is broken into `u16`s).
66

7-
The `keccak-f` permutation copies `preimage` to `A` and mutates `A` over rounds. The mutations are materialized in the `keccak-f` AIR in `A'` and `A''` arrays. While the bits of `A'` are materialized, the bits of `preimage` and `A` are never materialized (there is an implicit bit compostion in the constraints).
7+
The `keccak-f` permutation copies `preimage` to `A` and mutates `A` over rounds. The mutations are materialized in the `keccak-f` AIR in `A'` and `A''` arrays. While the bits of `A'` are materialized, the bits of `preimage` and `A` are never materialized (there is an implicit bit composition in the constraints).
88

99
## Review of `keccak256` sponge
1010

extensions/native/compiler/src/ir/instructions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};
22

33
use super::{Array, Config, Ext, Felt, MemIndex, Ptr, RVar, TracedVec, Usize, Var};
44

5-
/// An intermeddiate instruction set for implementing programs.
5+
/// An intermediate instruction set for implementing programs.
66
///
77
/// Programs written in the DSL can compile both to the recursive zkVM and the R1CS or Plonk-ish
88
/// circuits.

extensions/native/recursion/src/fri/two_adic_pcs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ pub fn verify_two_adic_pcs<C: Config>(
172172
let index_bits = challenger.sample_bits(builder, log_max_lde_height);
173173

174174
// We reset the reduced opening accumulator at the start of each query.
175-
// We describe what `ro[log_height]` computes per query in pseduo-code, where `log_height`
175+
// We describe what `ro[log_height]` computes per query in pseudo-code, where `log_height`
176176
// is log2 of the size of the LDE domain: ro[log_height] = 0
177177
// alpha_pow[log_height] = 1
178178
// for round in rounds:

extensions/pairing/guest/src/halo2curves_shims/bls12_381/final_exp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl FinalExp for Bls12_381 {
6868

6969
root = f.exp_bytes(true, &exp.to_bytes_be());
7070
let three_be = three.to_bytes_be();
71-
// NOTE[yj]: we can probably remove this first check as an optimization since we initizlize
71+
// NOTE[yj]: we can probably remove this first check as an optimization since we initialize
7272
// order_3rd_power to 0
7373
if root == Fq12::ONE {
7474
order_3rd_power = 0;

extensions/pairing/guest/src/pairing/final_exp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub trait FinalExp {
99
type Fp12: Field + FieldExtension<Self::Fp2>;
1010

1111
/// Assert in circuit that the final exponentiation is equal to one. The actual final
12-
/// exponentiaton is calculated out of circuit via final_exp_hint. Scalar coefficients
12+
/// exponentiation is calculated out of circuit via final_exp_hint. Scalar coefficients
1313
/// to the curve points must equal to zero, which is checked in a debug_assert.
1414
fn assert_final_exp_is_one(
1515
f: &Self::Fp12,

0 commit comments

Comments
 (0)