Skip to content

Release

Park Juhyung edited this page Nov 7, 2019 · 15 revisions

CodeChain would be published irregularly using the semver syntax. You can see all future releases and changelogs in here.

The public APIs of CodeChain are JSON RPC and Network Protocol. A major version would be released when one of them is changed without backward compatibility.

Release Candidates Branches

The master branch of this repository is the development branch. In other words, the branch includes features under development that may be unstable. You should use the released binary instead of the master branch if you want to use a stable binary.

Apart from the master branch, the maintainers manage three release candidate branches. The maintainers would cherry-pick the commits on the master branch to the appropriate release candidate branch.

rc-{M}.{m}.x

The first branch is the bug-fix branch. This branch includes non-breaking bug-fixes and non-behavior changes(e.g. document updates or enhancing test cases). You can include some trivial refactoring that doesn’t change the behavior, but it’s not recommended unless it precedes bug fixes.

If it was a severe bug, the maintainer should deploy the new release immediately. Otherwise, the maintainer can postpone the deployment by up to one week.

rc-{M}.{m+1}.0

The second is the minor-update branch. This branch includes backward-compatible changes and must include all fixes in the bug-fix branch.

The minor version deployment cycle is up to the maintainer’s discretion. The maintainers should remove the current bug-fix branch and create a new one based on the released minor version up branch.

The Corgi net would run with this branch.

rc-{M+1}.0.0

The last one is the major-update branch. This branch includes stable changes that break the current APIs. Features under development must not be included.

When the maintainers release a new major version, they would also release the minor version update to give users time to migrate. However, the previous version will no longer be maintained, and therefore, there would be no bug fix.

Release to the Networks

Beagle

Beagle is a test network to check the CodeChain binary's stability. The binary for Beagle should be built from Release Candidate Branches. We don't need a new version of CodeChain when updating the Beagle network.

Corgi

Corgi is a test network that has the same environment as the Main network. When updating Corgi, a new CodeChain version must be released as well. A release binary that is used in Corgi but not in the Main network has the "pre-release" tag.

The Main network

If the release binary used in Corgi has no problems, the same binary will be used in the Main network. Please remove the "pre-release" tag after using the binary in the Main network.

How to release binary

Before building the binary

  1. Change version in the Cargo.toml
  2. Run cargo build to update Cargo.lock
  3. Add Cargo.toml and Cargo.lock to the commit

Run release build

touch codechain/main.rs # It guarantees to update the commit hash.
cargo build --release

Calculate a checksum

Use sha256 for checksum

shasum -a 256 codechain

Compress the binary file

CODECHAIN_VERSION="$(./codechain --version | cut -d ' ' -f 2)"
tar cvfz codechain-${CODECHAIN_VERSION}-$(uname -m)-$(echo $(uname) | tr '[:upper:]' '[:lower:]').tar.gz codechain

Upload the binary file with checksum

  • template
| OS    | Binary                    | SHA256     |
|-------|---------------------------|------------|
| Linux | [{filename}]({file path}) | {checksum} |
| OS X  | [{filename}]({file path}) | {checksum} |