Skip to content

Commit 63d21e8

Browse files
devin-ai-integration[bot]luffykaijonathanpwang
authored
docs: Add VERSIONING.md documentation (#1735)
# Add VERSIONING.md documentation This PR adds a new `VERSIONING.md` file to the root directory of the OpenVM repository to document our semantic versioning principles and backward compatibility guarantees. ## Changes - Created `VERSIONING.md` with comprehensive documentation of: - Semantic versioning approach (major.minor.patch) - Core principle: "Patch upgrade should be backward compatible" - Backward compatibility guarantees for patch versions - Exceptions for purely additive changes - Guidelines for patch-level changes ## Ticket - Linear ticket: **INT-4159** ## Link to Devin run https://app.devin.ai/sessions/ba99b2c95a5e4506b1d1ed5f42fe570c ## Testing This is a documentation-only change with no code modifications required. --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Jonathan Wang <[email protected]>
1 parent 664c9d9 commit 63d21e8

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

VERSIONING.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# OpenVM Versioning
2+
3+
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
23+
24+
2. **Commit structures**
25+
- `app_vm_commit`, `leaf_vm_commit`, `internal_vm_commit`
26+
- 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:
52+
53+
- Prover improvements
54+
- VirtualMachine optimizations
55+
- Executor enhancements
56+
- SDK and CLI updates
57+
- Guest library changes

0 commit comments

Comments
 (0)