Skip to content

Commit 3cd65f7

Browse files
committed
documentation on versioning, rebasing, releasing; bump version meta
1 parent a179e1c commit 3cd65f7

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-2
lines changed

params/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const (
2424
VersionMajor = 1 // Major version component of the current release
2525
VersionMinor = 10 // Minor version component of the current release
2626
VersionPatch = 3 // Patch version component of the current release
27-
VersionMeta = "statediff-0.0.21" // Version metadata to append to the version string
27+
VersionMeta = "statediff-0.0.23" // Version metadata to append to the version string
2828
)
2929

3030
// Version holds the textual version string.

statediff/doc.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,52 @@ the number of updated state nodes that are available in the in-memory cache vs m
213213

214214
If memory permits, one means of improving the efficiency of this process is to increase the in-memory trie cache allocation.
215215
This can be done by increasing the overall `--cache` allocation and/or by increasing the % of the cache allocated to trie
216-
usage with `--cache.trie`.
216+
usage with `--cache.trie`.
217+
218+
## Versioning, Branches, Rebasing, and Releasing
219+
Internal tagged releases are maintained for building the latest version of statediffing geth or using it as a go mod dependency.
220+
When a new core go-ethereum version is released, statediffing geth is rebased onto and adjusted to work with the new tag.
221+
222+
We want to maintain a complete record of our git history, but in order to make frequent and timely rebases feasible we also
223+
need to be able to squash our work before performing a rebase. To this end we retain multiple branches with partial incremental history that culminate in
224+
the full incremental history.
225+
226+
### Versioning
227+
Versioning for of statediffing geth follows the below format:
228+
229+
`{Root Version}-statediff-{Statediff Version}`
230+
231+
Where "root version" is the version of the tagged release from the core go-ethereum repository that our release is rebased on top of
232+
and "statediff version" is the version tracking the state of the statediffing service code.
233+
234+
E.g. the version at the time of writing this is v1.10.3-statediff-0.0.23, v0.0.23 of the statediffing code rebased on top of the v1.10.3 core tag.
235+
236+
The statediff version is included in the `VersionMeta` in params/version.go
237+
238+
### Branches
239+
We maintain two official kinds of branches:
240+
241+
Major Branch: `{Root Version}-statediff`
242+
Major branches retain the cumulative state of all changes made before the latest root version rebase and track the full incremental history of changes made between the latest root version rebase and the next.
243+
Aside from creating the branch by performing the rebase described in the section below, these branches are never worked off of or committed to directly.
244+
245+
Feature Branch: `{Root Version}-statediff-{Statediff Version}`
246+
Feature branches are checked out from a major branch in order to work on a new feature or fix for the statediffing code.
247+
The statediff version of a feature branch is the new version it affects on the major branch when merged. Internal tagged releases
248+
are cut against these branches after they are merged back to the major branch.
249+
250+
If a developer is unsure what version their patch should affect, they should remain working on an unofficial branch. From there
251+
they can open a PR against the targeted root branch and be directed to the appropriate feature version and branch.
252+
253+
### Rebasing
254+
When a new root tagged release comes out we rebase our statediffing code on top of the new tag using the following process:
255+
1. Checkout a new major branch for the tag from the current major branch
256+
2. On the new major branch, squash all our commits since the last major rebase
257+
3. On the new major branch, perform the rebase against the new tag
258+
4. Push the new major branch to the remote
259+
5. From the new major branch, checkout a new feature branch based on the new major version and the last statediff version
260+
6. On this new feature branch, add the new major branch to the .github/workflows/on-master.yml list of "on push" branches
261+
7. On this new feature branch, make any fixes/adjustments required for all statediffing geth tests to pass
262+
8. PR this feature branch into the new major branch, this PR will trigger CI tests and builds.
263+
9. After merging PR, rebase feature branch onto major branch
264+
10. Cut a new release targeting the feature branch, this release should have the new root version but the same statediff version as the last release

0 commit comments

Comments
 (0)