https://github.com/zeta-chain/node
ZetaChain uses a dual-branch workflow inspired by GitFlow but adapted for our unique blockchain context. This workflow supports independent release cycles for ZetaCore (consensus-breaking changes) and ZetaClient (non-consensus-breaking features), enabling frequent ZetaClient updates without requiring network-wide consensus upgrades.
Unlike traditional GitFlow where all features eventually merge to a single integration branch, our workflow uses develop as the primary integration branch for all changes. develop represents the production-ready state for ZetaClient releases, while main represents the production-ready state for consensus-breaking ZetaCore releases.
develop - Primary integration branch
- All changes merge here: both consensus-breaking and non-consensus-breaking
- Base branch for ZetaClient releases
- Consensus-breaking changes can safely be merged here since they only affect the network when a ZetaCore release is deployed
- Exception: If a consensus-breaking change requires synchronized updates between ZetaCore and ZetaClient (e.g., interface changes that break compatibility), it must be merged directly to
mainto ensure ZetaClient releases fromdevelopremain compatible with the current network state
main - Production-ready consensus state
- Only updated when preparing a ZetaCore release
- Represents the current consensus-breaking version running on the network
- Created by merging
develop→mainwhen ready for a consensus upgrade
release/zetacore/vX - Created from main
- Major version releases (consensus-breaking)
- Follows semantic versioning: v36.0.0, v37.0.0, etc.
release/zetaclient/vY - Created from develop or main
- Independent version cycle (starting from v37): v37.0.0, v37.1.0, v38.0.0, etc.
- Source branch depends on release type:
- From
develop: Independent ZetaClient release - From
main: Coordinated release with ZetaCore
- From
- https://github.com/zeta-chain/protocol-contracts-evm
- https://github.com/zeta-chain/protocol-contracts-solana
- https://github.com/zeta-chain/protocol-contracts-ton
- https://github.com/zeta-chain/protocol-contracts-sui
Protocol contracts repositories are related to both ZetaCore and ZetaClient versions, as both components interact with deployed smart contracts across different chains. Each protocol contracts repository maintains its own independent versioning.
Independent Versioning
- Protocol contracts follow their own semantic versioning independent from ZetaCore and ZetaClient
- Each repository (EVM, Solana, TON, Sui) has its own version lifecycle
- Contract changes may correspond with ZetaClient updates to handle new interfaces
ZetaCore
- Major version bumps for consensus-breaking changes
- Requires network-wide coordination and governance
ZetaClient
- Follows independent release cycle
- Can iterate rapidly without network upgrades
Protocol Contracts
- Each protocol contracts repository (EVM, Solana, TON, Sui) follows its own independent semantic versioning
Example versions: ZetaCore v36.0.0, ZetaClient v38.0.0, EVM Gateway v1.2.3
- Create
release/zetaclient/vYfromdevelop - Run ZetaClient release Github action
- No ZetaCore release required
- Coordinate deployment of the release
Note: Currently, pass the version in semver format (e.g.,
v37.0.0). After release creation, manually rename the tag and GitHub release to use thezetaclient_prefix (e.g.,zetaclient_v37.0.0) to differentiate from ZetaCore releases. This will be automated in the future (see #4389).
- Merge
develop→main(bringing all accumulated changes including consensus-breaking ones) - Create
release/zetacore/vXfrommain - Create
release/zetaclient/vYfrommain(coordinated release) - Run ZetaClient release Github action
- Run ZetaCore release Github action
- Submit an upgrade governance proposal
When a new protocol contracts release is required:
- Branch Creation: Create
release/vXin the protocol contracts repository- Uses the protocol contracts' own versioning scheme
- Example:
release/v1for protocol contracts v1.0.0 - Any subsequent patches or minor updates use the same branch (e.g., v1.0.1, v1.1.0)
- Release: Create a new release for the protocol contracts
- Protocol contracts follow their own semantic versioning (e.g., v1.2.3, v1.3.0)
- Version is independent from ZetaCore and ZetaClient versions
The VERSIONS.md file in the node repository maintains the compatibility matrix between:
- ZetaCore versions
- ZetaClient versions
- Protocol contract versions (EVM, Solana, TON, Sui)
This ensures clear visibility of which component versions work together.
- Every ZetaCore release includes a ZetaClient release
- ZetaClient releases can happen independently
- Consensus-breaking changes in
developdon't affect the network until a ZetaCore release is deployed
A consensus-breaking change is any modification that influences the on-chain state transition, potentially leading to inconsistency and consensus failure if nodes run different versions simultaneously. These changes require network-wide coordination through governance proposals, ensuring all validators upgrade to the new version at the same designated upgrade height.
- For security and safety, we treat all changes in the
/x/directory as consensus-breaking - This conservative approach prevents accidental consensus failures
- Note: In practice, some
/x/changes may not affect consensus
/zetaclient/**: Client-side logic that doesn't affect chain state/e2e/**: Testing infrastructure independent of consensus rules
- Requires verification: Changes in
/pkg/may or may not be consensus-breaking - Assessment needed: Determine where the modified package is used
- If used by
/x/modules: Likely consensus-breaking - If used only by ZetaClient: Likely non-consensus-breaking