Skip to content

Commit e93afbf

Browse files
authored
Merge pull request #1237 from o1-labs/dw/add-instruction-to-bump-up-to-new-ocaml-release
Docs: add instructions to update the OCaml node dependencies
2 parents cf3f7e4 + 5143066 commit e93afbf

File tree

3 files changed

+99
-0
lines changed

3 files changed

+99
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### Added
1717

18+
- **Documentation**: Add instructions to update the OCaml node dependencies.
19+
([#1237](https://github.com/o1-labs/openmina/pull/1237))
1820
- **Documentation**: Complete Docusaurus-based documentation website with
1921
comprehensive guides for node runners, developers, and researchers
2022
([#1234](https://github.com/o1-labs/openmina/pull/1234)). It migrates all the
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
sidebar_position: 4
3+
---
4+
5+
# Updating the OCaml Node
6+
7+
When a new Mina Protocol release becomes available, you need to update the OCaml
8+
node references in OpenMina. The OCaml node releases are used to verify that the
9+
current OpenMina version maintains compatibility with the official Mina Protocol
10+
implementation through end-to-end and scenario testing. This guide walks through
11+
the process based on the workflow used in
12+
[PR #1236](https://github.com/o1-labs/openmina/pull/1236).
13+
14+
## 1. Check for New Releases
15+
16+
Visit the
17+
[Mina Protocol releases page](https://github.com/MinaProtocol/mina/releases/) to
18+
find the latest release version and associated container image tags.
19+
20+
For example, release `3.2.0-alpha1` provides updated container images and
21+
configuration files.
22+
23+
## 2. Update GCR Links in Code
24+
25+
Use `git grep` to find all Google Container Registry (GCR) references that need
26+
updating:
27+
28+
```bash
29+
# Search for GCR image references
30+
git grep "gcr.io/o1labs-192920/mina-daemon"
31+
32+
# Search for any mina-daemon references
33+
git grep "mina-daemon"
34+
```
35+
36+
Update the image tags in the found files to match the new release version.
37+
Typically this involves changing version strings in Docker Compose files,
38+
testing configurations, and CI workflows.
39+
40+
## 3. Update Configuration Files
41+
42+
Update the configuration file hash to match the new release. The config files
43+
with the pattern `config_[8-character-hash]` come from the OCaml node release
44+
and need to be referenced in the OpenMina codebase.
45+
46+
The configuration hash corresponds to the genesis state and network parameters
47+
for the specific release. You may need to:
48+
49+
- Update references to the config filename in code to match the new hash
50+
- Download or reference the new config files from the OCaml node release
51+
- Verify the new configuration is compatible with OpenMina
52+
53+
## 4. Example Workflow
54+
55+
Based on PR #1236, a typical update involves:
56+
57+
```bash
58+
# 1. Find current references
59+
git grep "gcr.io/o1labs-192920/mina-daemon"
60+
git grep "3\.1\.0" # Search for old version numbers
61+
62+
# 2. Update image tags throughout the codebase
63+
# Replace old tags with new release version
64+
65+
# 3. Search for config file references in code
66+
git grep "config_"
67+
68+
# 4. Update any hardcoded version references
69+
git grep -i "mina.*3\.1\.0" # Example for version 3.1.0
70+
```
71+
72+
## 5. Verification Steps
73+
74+
After making updates:
75+
76+
1. **Build and Test**: Run the test suite to ensure compatibility
77+
2. **Check References**: Verify all version references are updated consistently
78+
3. **Configuration Validation**: Ensure new config files are properly referenced
79+
4. **End-to-End Testing**: Run scenario tests to verify OpenMina compatibility
80+
with the updated OCaml node
81+
5. **CI Pipeline**: Verify that automated testing passes with new versions
82+
83+
## 6. Commit Structure
84+
85+
Following the pattern from PR #1236:
86+
87+
1. **Main Update Commit**: "Update OCaml node dependencies to [version]"
88+
2. **Changelog**: Add entry documenting the version bump
89+
3. **Config Updates**: Separate commit for configuration file changes if needed
90+
91+
## Related Resources
92+
93+
- [Mina Protocol Releases](https://github.com/MinaProtocol/mina/releases/)
94+
- [OpenMina Architecture Documentation](./architecture.md)
95+
- [Example PR #1236](https://github.com/o1-labs/openmina/pull/1236)
96+
- [Node Runners Guide](../node-runners/getting-started.md)

website/sidebars.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ const sidebars: SidebarsConfig = {
6565
label: 'Getting Started',
6666
items: [
6767
'developers/getting-started',
68+
'developers/updating-ocaml-node',
6869
],
6970
},
7071
{

0 commit comments

Comments
 (0)