You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenVM follows the naming convention of [semantic versioning](https://semver.org/) (semver) but with different principles:
4
+
5
+
*`major`: Only changes upon significant proof system or ISA updates
6
+
*`minor`: Breaking changes where the vkey (`MultiStarkVerifyingKey`) changes
7
+
*`patch`: Backward-compatible changes that preserve vkey compatibility
8
+
9
+
Due to the security critical nature of the OpenVM codebase, we do _not_ follow semver precisely in the sense that breaking code-level API changes will not always result in a major version upgrade. However we follow the principles of semver where we treat the true API of the codebase to be the verification of the proofs generated by the OpenVM framework.
10
+
11
+
## Versioning Principles
12
+
13
+
The core principle of OpenVM versioning is: **"Patch upgrade should be backward compatible"**.
14
+
15
+
This means if we upgrade from v1.0.0 to v1.0.1, the old verifier of v1.0.0 should be able to verify the new proof generated by v1.0.1. **Crucially, this means the vkey (`MultiStarkVerifyingKey`) does not change across patch versions.**
16
+
17
+
## Backward Compatibility Guarantees
18
+
19
+
The following properties must remain fixed across patch versions (changing these requires a minor version upgrade):
20
+
21
+
1.**vkey (`MultiStarkVerifyingKey` struct)**
22
+
- This ensures that a patch-upgraded prover (v1.x.y) can generate proofs that the original verifier (v1.x.0) can verify
- This includes both the VM itself and the serialization (how the commit is computed)
27
+
28
+
3.**`VmConfig` format**
29
+
30
+
4.**Build toolchain**
31
+
- RISC-V custom instructions
32
+
- Transpiler
33
+
- ISA
34
+
- And thus the resulting `VmExe`
35
+
36
+
5.**Output of the `prove` command (CLI+SDK)**
37
+
- The proof format (struct itself and the content)
38
+
39
+
## Exceptions
40
+
41
+
Changes that are purely additive without modifying existing objects are exceptions to the above rules and can be included in patch versions. Examples include:
42
+
43
+
- Adding a new instruction
44
+
- Adding a new prove type (STARK)
45
+
- Adding a new extension (new `StarkVerifyingKey` for a new circuit)
46
+
47
+
While rare and ideally avoided, we reserve the option to change formatting of certain outputs or structs (e.g., `VmConfig` or `VmExe`) in a patch version if the change is purely cosmetic and a migration tool is provided to easily convert from the old format to the new format.
48
+
49
+
## Patch-level Changes
50
+
51
+
Other changes that aren't security critical and don't modify any of the above components can be included in patch upgrades:
Copy file name to clipboardExpand all lines: audits/v1-internal/circuit-primitives.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -535,7 +535,7 @@ Two cases to consider:
535
535
536
536
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.
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.
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.
10
10
11
11
## 2. Findings
12
12
@@ -40,7 +40,7 @@ The external linear layer takes the current state and does some case work based
40
40
41
41
- Length 2: compute sum of elements of state and add to each element of state.
42
42
- 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:
44
44
`[[2M M ... M], [M 2M ... M], ..., [M M ... 2M]]`.
0 commit comments