|
1 | 1 |
|
2 | 2 | <div align="center">
|
3 | 3 |
|
4 |
| -# Sandstorm |
| 4 | + |
5 | 5 |
|
6 |
| -**Cairo prover on steroids** |
| 6 | +# sandstorm |
| 7 | + |
| 8 | +**SHARP compatible Cairo prover** |
7 | 9 |
|
8 |
| -[](https://github.com/andrewmilson/mini-stark/blob/main/LICENSE) |
9 | 10 | [](https://github.com/mkenney/software-guides/blob/master/STABILITY-BADGES.md#experimental)
|
10 | 11 |
|
11 |
| -</div> |
| 12 | +</div> |
| 13 | + |
| 14 | +# Decoding constraints |
| 15 | + |
| 16 | +``` |
| 17 | +memory layout for constraint poly |
| 18 | +
|
| 19 | +column0: @ 0x1600 |
| 20 | +
|
| 21 | + // bit0 |
| 22 | + - row0 @ 0x1600 - 0th |
| 23 | + - row1 @ 0x1620 - 1st |
| 24 | +
|
| 25 | + // bit2 |
| 26 | + - row2 @ 0x1640 - 2nd |
| 27 | + - row3 @ 0x1660 - 3rd |
| 28 | +
|
| 29 | + // bit4 |
| 30 | + - row4 @ 0x1680 - 4th |
| 31 | + - row5 @ 0x16a0 - 5th |
| 32 | +
|
| 33 | + // bit3 |
| 34 | + - row3 @ 0x1660 - 3rd |
| 35 | + - row4 @ 0x1680 - 4th |
| 36 | +
|
| 37 | +
|
| 38 | + // NOTE: op1_src? flag_op1_base_op0_0? |
| 39 | + // ============================== |
| 40 | + // cpu/decode/flag_op1_base_op0_0 |
| 41 | + // // intermediate_value/cpu/decode/opcode_rc/bit_2 |
| 42 | + // cpu__decode__opcode_rc__bit_2 @ 0x2be0 - 175th |
| 43 | + // // intermediate_value/cpu/decode/opcode_rc/bit_4 |
| 44 | + // cpu__decode__opcode_rc__bit_4 @ 0x2c00 - 176th |
| 45 | + // // intermediate_value/cpu/decode/opcode_rc/bit_3 |
| 46 | + // cpu__decode__opcode_rc__bit_3 @ 0x2c20 - 177th |
| 47 | + // ============================== |
| 48 | + // TODO: why this positioned in here? |
| 49 | + // NOTE: may be because uses bits 2, 3, 4 (above)? |
| 50 | +
|
| 51 | +
|
| 52 | + // bit5 |
| 53 | + - row3 @ 0x16a0 - 5th |
| 54 | + - row4 @ 0x16c0 - 6th |
| 55 | +
|
| 56 | + // bit6 |
| 57 | + - row3 @ 0x16c0 - 6th |
| 58 | + - row4 @ 0x16e0 - 7th |
| 59 | +
|
| 60 | + // bit9 |
| 61 | + - row9 @ 0x1720 - 9th |
| 62 | + - row10 @ 0x1740 - 10th |
| 63 | +
|
| 64 | +
|
| 65 | + // NOTE: op1_src? flag_res_op1_0? |
| 66 | + // TODO: WTF is bit9 used? |
| 67 | + // NOTE: looking at state transition pseudo code |
| 68 | + // res is unused (0?) if pc_update == 4 aka bit 9 |
| 69 | + // ============================== |
| 70 | + // // intermediate_value/cpu/decode/opcode_rc/bit_5 |
| 71 | + // cpu__decode__opcode_rc__bit_5 @ 0x2c60 - 179th |
| 72 | + // // intermediate_value/cpu/decode/opcode_rc/bit_6 |
| 73 | + // cpu__decode__opcode_rc__bit_6 @ 0x2c80 - 180th |
| 74 | + // // intermediate_value/cpu/decode/opcode_rc/bit_9 |
| 75 | + // cpu__decode__opcode_rc__bit_9 @ 0x2ca0 - 181st |
| 76 | + // ============================== |
| 77 | +
|
| 78 | +
|
| 79 | + // bit7 |
| 80 | + - row7 @ 0x16e0 - 7th |
| 81 | + - row8 @ 0x1700 - 8th |
| 82 | +
|
| 83 | + // bit8 |
| 84 | + - row8 @ 0x1700 - 8th |
| 85 | + - row9 @ 0x1720 - 9th |
| 86 | +
|
| 87 | + // flag_pc_update_regular_0 |
| 88 | + // TODO: forcing pc update flag to be 1, 2, 4 not 0? |
| 89 | + // ============================== |
| 90 | + // // intermediate_value/cpu/decode/opcode_rc/bit_7 |
| 91 | + // cpu__decode__opcode_rc__bit_7 @ 0x2ce0 - 183rd |
| 92 | + // // intermediate_value/cpu/decode/opcode_rc/bit_8 |
| 93 | + // cpu__decode__opcode_rc__bit_8 @ 0x2d00 - 184th |
| 94 | + // // intermediate_value/cpu/decode/opcode_rc/bit_9 |
| 95 | + // cpu__decode__opcode_rc__bit_9 @ 0x2ca0 - 181st |
| 96 | + // ============================== |
| 97 | +
|
| 98 | +
|
| 99 | + // bit12 |
| 100 | + - row12 @ 0x1780 - 12th |
| 101 | + - row13 @ 0x17a0 - 13th |
| 102 | +
|
| 103 | + // bit13 |
| 104 | + - row13 @ 0x17a0 - 13th |
| 105 | + - row14 @ 0x17c0 - 14th |
| 106 | +
|
| 107 | +
|
| 108 | + // fp_update_regular_0 - |
| 109 | + // TODO: WTF is update regular? |
| 110 | + // TODO: uses flags from opcode group? Only first two? |
| 111 | + // ============================== |
| 112 | + // // intermediate_value/cpu/decode/opcode_rc/bit_12 |
| 113 | + // cpu__decode__opcode_rc__bit_12 - 0x2d40 - 186th |
| 114 | + // // intermediate_value/cpu/decode/opcode_rc/bit_13 |
| 115 | + // cpu__decode__opcode_rc__bit_13 - 0x2d60 - 187th |
| 116 | + // ============================== |
| 117 | +
|
| 118 | +
|
| 119 | +
|
| 120 | +``` |
0 commit comments