- Cargo package versions follow the Semver semantic model.
- A Cargo package is either library or contract package. The former are located under
packages
directory, the latter are undercontracts
directory. - An update of a package results recursively in updates of all packages up the dependency tree, e.g. the ones that dependent on the package directly or indirectly.
- Library packages may depend on other library packages and never on contract packages.
- Contract packages may depend on library packages and on stub-featured other contract packages. The latter means that the former contract calls, by sending query or execute messages, the latter contract.
- There are dependencies to services or features provided by the layer 1. They cannot be expressed explicitly as Cargo dependencies.
- Each Cargo contract package defines one and only one CosmWasm contract.
- The format of the persistent data of a contract is tagged with a storage version. It is denoted with a monotonically increased unsigned integer beginning with zero.
- A contract version is a pair of its storage and Cargo package versions. Let's denote with
V
contract versions, withS
storage versions and withP
package versions. - An update of the storage version must be accompanied by an update of the Cargo package version.
V1 = <S1,P1>
is-beforeV2 = <S2,P2>
only whenS1 < S2
orS1 == S2 && V1 < V2
- A new release is always associated with a Git Tag. The opposite is not mandatory although highly recommended.
- Releases are immutable. Any modifications to the code of a released package must be released as a new version and included in the next release.
- A new release encompasses the latest versions of each Cargo package either new ones or the same as they have appeared in the previous release. This uniquely defines the versions of contracts included in a release.
- The only supported release updates are from the previous to the next release. An update to a newer release should be performed sequentially, one by one.
- Each Nolus Network runs a specific release. A direct corollary is that a network runs the contract versions as they appear in the release.
- Ideally, an update to а new release should happen atomically to guarantee high availability of the services.
In an attempt to facilitate collecting all significant changes, code commits should follow thisconvention for their messages. The type must be any of the ones listed here.
On ....TBD
Use this to list the updated Cargo packages since the last or specified Git tag or reference
cargo workspaces changed -l [--since <ref>]
Use this to see the dependency tree of a Cargo package:
cargo tree -p <package>
Use this to see the dependee tree of a Cargo package:
cargo tree --workspace -i <package> -e no-dev
git tag -a vX.Y.Z -m "vX.Y.Z"
git push origin --tags
First delete the local and remote tags
git tag -d vX.Y.Z
git push --delete origin vX.Y.Z
and then create new ones as shown above.