Skip to content

Commit

Permalink
update arith pil comments (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
zkronos73 authored Oct 14, 2024
1 parent 3c07970 commit d9934f6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions pil/arith.pil
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ namespace Arith(%N);
// ┌── max_value │ ┌───── chunkLtPrime
// │ ┌─ example │ │ ┌── valueLtPrime
// │ │ │ │ │
// CLK0 0xFFFF 0xFFFF 16 0 0
// CLK1 0xFFFF 0xFF00 19 1 0 // RANGE [0, 0xFFFE]
// CLK0 0xFFFF 0xFFFF 16 0 0 (16 = clock(0) + Secp256k1(16))
// CLK1 0xFFFF 0xFF00 33 1 0 RANGE [0, 0xFFFE] (33 = clock(1) + Secp256k1(16) + chunkLtPrime(16))
// CLK2 0xFFFF 0x0000 0 0 1
// CLK3 0xFFFF 0x0000 0 0 1
// CLK4 0xFFFF 0xFFFF 0 0 1
Expand All @@ -237,14 +237,14 @@ namespace Arith(%N);
// ┌── max_value │ ┌───── chunkLtPrime
// │ ┌─ example │ │ ┌── valueLtPrime
// │ │ │ │ │
// CLK0 0xFFFF 0xFFFF 16 0 0
// CLK1 0xFFFF 0xFFFF 18 0 0
// CLK2 0xFFFF 0xFFFF 20 0 0
// CLK0 0xFFFF 0xFFFF 16 0 0 (16 = clock(0) + Secp256k1(16))
// CLK1 0xFFFF 0xFFFF 17 0 0 (17 = clock(1) + Secp256k1(16))
// CLK2 0xFFFF 0xFFFF 18 0 0 (18 = clock(2) + Secp256k1(16))
// :
// CLK12 0xFFFF 0xFFFF 40 0 0
// CLK13 0xFFFE 0xFFFF 42 0 0 // CLK13 == 1 RANGE [0, 0xFFFE]
// CLK14 0xFFFF 0xFFFF 44 0 0
// CLK15 0xFC2F 0xFC00 47 1 0 // CLK15 == 1 RANGE [0, 0xFC2F] 47 = 46+1
// CLK12 0xFFFF 0xFFFF 28 0 0 (28 = clock(12) + Secp256k1(16))
// CLK13 0xFFFE 0xFFFF 29 0 0 CLK13 == 1 RANGE [0, 0xFFFE] (29 = clock(13) + Secp256k1(16))
// CLK14 0xFFFF 0xFFFF 30 0 0 (30 = clock(14) + Secp256k1(16))
// CLK15 0xFC2F 0xFC00 47 1 0 CLK15 == 1 RANGE [0, 0xFC2F] 47 = 46+1 (47 = clock(15) + Secp256k1(16) + chunkLtPrime(16))
// CLK16 0xFFFF 0xFFFF 0 0 1

// valueLtPrime indicates whether, at this point, we know that the value is smaller than the prime.
Expand Down
18 changes: 9 additions & 9 deletions tools/arith/arith.ejs.pil
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ namespace Arith(%N);
// ┌── max_value │ ┌───── chunkLtPrime
// │ ┌─ example │ │ ┌── valueLtPrime
// │ │ │ │ │
// CLK0 0xFFFF 0xFFFF 16 0 0
// CLK1 0xFFFF 0xFF00 19 1 0 // RANGE [0, 0xFFFE]
// CLK0 0xFFFF 0xFFFF 16 0 0 (16 = clock(0) + Secp256k1(16))
// CLK1 0xFFFF 0xFF00 33 1 0 RANGE [0, 0xFFFE] (33 = clock(1) + Secp256k1(16) + chunkLtPrime(16))
// CLK2 0xFFFF 0x0000 0 0 1
// CLK3 0xFFFF 0x0000 0 0 1
// CLK4 0xFFFF 0xFFFF 0 0 1
Expand All @@ -235,14 +235,14 @@ namespace Arith(%N);
// ┌── max_value │ ┌───── chunkLtPrime
// │ ┌─ example │ │ ┌── valueLtPrime
// │ │ │ │ │
// CLK0 0xFFFF 0xFFFF 16 0 0
// CLK1 0xFFFF 0xFFFF 18 0 0
// CLK2 0xFFFF 0xFFFF 20 0 0
// CLK0 0xFFFF 0xFFFF 16 0 0 (16 = clock(0) + Secp256k1(16))
// CLK1 0xFFFF 0xFFFF 17 0 0 (17 = clock(1) + Secp256k1(16))
// CLK2 0xFFFF 0xFFFF 18 0 0 (18 = clock(2) + Secp256k1(16))
// :
// CLK12 0xFFFF 0xFFFF 40 0 0
// CLK13 0xFFFE 0xFFFF 42 0 0 // CLK13 == 1 RANGE [0, 0xFFFE]
// CLK14 0xFFFF 0xFFFF 44 0 0
// CLK15 0xFC2F 0xFC00 47 1 0 // CLK15 == 1 RANGE [0, 0xFC2F] 47 = 46+1
// CLK12 0xFFFF 0xFFFF 28 0 0 (28 = clock(12) + Secp256k1(16))
// CLK13 0xFFFE 0xFFFF 29 0 0 CLK13 == 1 RANGE [0, 0xFFFE] (29 = clock(13) + Secp256k1(16))
// CLK14 0xFFFF 0xFFFF 30 0 0 (30 = clock(14) + Secp256k1(16))
// CLK15 0xFC2F 0xFC00 47 1 0 CLK15 == 1 RANGE [0, 0xFC2F] 47 = 46+1 (47 = clock(15) + Secp256k1(16) + chunkLtPrime(16))
// CLK16 0xFFFF 0xFFFF 0 0 1

// valueLtPrime indicates whether, at this point, we know that the value is smaller than the prime.
Expand Down

0 comments on commit d9934f6

Please sign in to comment.