Replies: 16 comments 68 replies
-
Thanks @gsora for taking the time and come up with this proposal, which obviously makes sense to me. We at Tendermint put our clients' needs first, thus we are ready to throw our weight behind this. We need semver more than anything else, and we need it now. Roadmaps are not a valid excuses to delay the adoption of a fully semver-compliant scheme, which as a matter of fact is as costly as running the |
Beta Was this translation helpful? Give feedback.
-
Yes! We are growing up. Excellent context for benefits are in explained in broad detail in this Tendermint’s Proposal for a New Versioning of Cosmos SDK post |
Beta Was this translation helpful? Give feedback.
-
Thank you for the proposal. It makes a lot of sense. If we want to do now the shift to major semver releases, then tagging v44.0.0 makes sense. I have few questions:
|
Beta Was this translation helpful? Give feedback.
-
We addressed the proto breaking changes in pre-0.43 release and fixed it (before releasing 0.43). So 0.44 should be compatible with 0.43 and 0.42. So, if you always use the latest version, then you will be able to deserialize transactions and all objects. Am I missing something? This is just a tip to see if it works in the meantime. |
Beta Was this translation helpful? Give feedback.
-
What about release frequency and LTS? If we adopt semver right now, should we continue our current release cadence: i.e. one new major version every ~6 months, and only maintaining the last 2 majors? There has even been some voice about smaller & more frequent releases, I have a doubt about too much SDK updating for downstream chain devs. One advantage of committing to a v1.0 is that we can decide that 1.0 has a LTS of say ~2y, which offers some stability for chains. |
Beta Was this translation helpful? Give feedback.
-
The Tendermint Core team have been discussing this topic quite a bit as well. We're also working to define what a stable v1 release should mean for the core consensus engine. I don't have strong opinions about how the SDK should be versioned (what numbering scheme, etc.). You know best how to version for your customers, and we'd like to see versioning for the SDK and the core remain as independent as possible. That said, I do think it's important that the SDK and the consensus engine continue to work smoothly together, and on that basis I have a few recommendations I hope may help you make decisions about SDK versioning:
[1] https://medium.com/tendermint/tendermints-proposal-for-a-new-versioning-of-cosmos-sdk-d52a01976852 |
Beta Was this translation helpful? Give feedback.
-
Last couple of weeks the IBC team was also discussing how to do versioning of ibc-go and we came up with this guideline. We hope this helps; and if somebody has any feedback to improve, we'll be happy to discuss it. cc: @colin-axner |
Beta Was this translation helpful? Give feedback.
-
I agree with this proposal, and think it will give a strong sign of stability, and much easier dev experience. Cosmos SDK is not just for the Cosmos Hub and a few experimental chains, but a very large ecosystem, with many chains in the $100s of millions and 3-4 over $1 billion market cap. We definitely need a dev process that supports this. The only point I would disagree with the current discussion is the answer to this question:
I believe this should be a point release. In no other software, do I expect a major version bump if eg. a function that used to panic when I pass in a 0, now returns a 0 result (simple bug fix, but is different for a consensus node). They may do this fix in a patch release and follow server. Semver traditionally just describes the API. Until now we always did the largest bump possible, which was minor. Since there was no way to distinguish which patch version was a non-state breaking change and which was state breaking, this was the only option available to signal it. However, with this proposal we will have 3 choices - major, minor, patch. I will argue that we should define the bumps as:
Looking at the recent development history, we have 0.40, 0.41, 0.42 as state-breaking bug fixes. 0.43 was released as a major API change, and now we want to back port a state-breaking fix (malleability issue) to 0.42, but there is no number available. There is also no communication that 0.42->0.43 is any more significant than 0.40->0.41. With the semver proposal and my guidelines above, this would have been: Stargate: 40.0.x, 40.1.x, 40.2.x (0.40, 0.41, 0.42) The back port of the malleability issue would easily fit in as 40.3.x. This handles the communication issue to differentiate a series of state-breaking bugfixes which are all technically more-or-less the same for app developers, from a major feature release. As a developer, I can more or less automatically update my As a module developer (x/wasm), this would be nicer as well. We can only support one major version of Cosmos SDK, and force everyone downstream to go along with it. Clearly, we cannot support 0.42 and 0.44 in one codebase, but there is no reason why the codebase is not clearly defined to support 0.40, 0.41, 0.42 and 0.42-maleability-patch at the same time. With the new |
Beta Was this translation helpful? Give feedback.
-
I think staying on 0.x would be a mistake. At this point it's like Gmail being beta in 2009, the Cosmos SDK is mission-critical for massive financial systems. At this point the time for making a product decision about what to call v1 has passed. We should accept the reality of where we are, eat the frog, and move on with our work. I also think we should be strongly inclined to follow Go's standards, which also means changing to semver. The toolchain implications seems like features, not bugs, to me. |
Beta Was this translation helpful? Give feedback.
-
So what concrete decision(s) are we talking here and when are we making them? |
Beta Was this translation helpful? Give feedback.
-
I think I am generally in favor of this proposal. Pros I can see are:
The biggest potential con is that we don't get to have a big "v1.0" moment... it just never happens. But maybe that's okay. And maybe we can achieve the spirit of v1.0 with an LTS release where we stay at v46 or v47 for a long time and just incrementally add things through minor releases. We could consider maybe calling Stargate v1.0, v0.44 v2.0, etc. and lose the historical correspondences to v0.39, v0.42, etc... Maybe that's okay. I don't really have too strong of an opinion. I still am in favor of splitting this code base into multiple go modules as it makes sense to improve maintainability, and I think that's still possible with this proposal as long as we follow the caveats outlined here: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. I do not want to version proto files the same as the SDK as a whole nor do I want to move them out of the SDK. Instead, I propose go modules for the proto types themselves (maybe "github.com/cosmos/cosmos-sdk/proto" or something like that) that correspond with the proto package versions. There is a bit of complexity in that the proto types do need to implement some interfaces themselves - but maybe this will force us to do some beneficial refactoring to make the system more modular. |
Beta Was this translation helpful? Give feedback.
-
I think that we have now a clearer view of the problem, thanks @aaronc and @colin-axner The CORE Tech team from Tendermint Engineering will now start focusing on this issue and drop all other threads of work. Solving this issue is now priority 0 for us. |
Beta Was this translation helpful? Give feedback.
-
We had a meeting to discuss v1.0 . TL;DR: we agree that tagging v1.0 now doesn't solve the full problem (we will still have a problem with proto). To solve the proto problem we will need to move proto generated code to a new module, and reorganize the repository structure. This proto work is related to the proto code generator. Followups
|
Beta Was this translation helpful? Give feedback.
-
Intriguing. What exactly is that feature? Is it this? #9912 |
Beta Was this translation helpful? Give feedback.
-
This is becoming a critical issue for clients. Running against the SDK is becoming less and less friendly to clients in go. Working on the relayer I'm quickly going to be in a place where it is impossible to run against multiple chains. This would be a serious regression for the tooling and a usecase that doesn't seem to be discussed in the discussion above. |
Beta Was this translation helpful? Give feedback.
-
Problem definition
The current versioning scheme Cosmos SDK doesn't represent its true reliability status, communicating instability to the wider developer public — furthermore, it poses a technical issue which cannot be ignored.
During the development iteration of
tracelistener
, one of the vital components for Emeris, the team identified a significant road blocker in the Cosmos SDK codebase: versioning.The component being iterated must depend on multiple Cosmos SDK versions in order to meet the expected deadlines and be productive in the context of the Emeris backend.
tracelistener
is written in Go and depends directly on the Cosmos SDK to:The Emeris core functionalities include balance and staking tracking, account and sequence number tracking, IBC metadata parsing, and tracking.
Since the store tracking functionality that currently lives in the Cosmos SDK requires data consumers to unmarshal into the associated concrete type — or interface — depending on a specific version of the proto codec is a necessity.
At the same time, a developer might want to support multiple schema versions to prevent errors when a strange data packet gets detected or simply when a new version of the Cosmos SDK application that is being observed gets released.
The current structure of the Cosmos SDK prevents development that depends on more than one version because of the interactions between Go mod and the current Cosmos SDK versioning scheme.
Go mod primer
When designing mod, Go maintainers decided to implement strict dependency management that made semver an integral part of the codebase.
The Go compiler is versioned using semver and the module system requires that packages follow semver to guarantee a healthy ecosystem.
This dependency management scheme means that each and every Go package must be released under the
semver
versioning scheme to be fully compliant with mod.The easiest way to be compliant is the following workflow:
semver
during the development processmain
branch equals unstable codepackage
definition ingo.mod
gets bumped too, along with all imports in the library itselfAs an example, let's imagine a hypothetical
types
package that has the following module definition in itsgo.mod
:When version
2.0.0
oftypes
gets released, av2.0.0
tag is created and the module definition gets bumped up too:Minor and patch releases don't need to bump up module name version, a git tag is enough.
In Go mod, using the
require
keyword allows you to define a package as a dependency.By using the Go mod version with the
require
keyword, a package can include both versions oftypes
, without having to do weirdreplace
directives or break anything:coolsoftware
can now use both versions oftypes
.Current Cosmos SDK status
Cosmos SDK currently employs a custom versioning scheme that resembles
semver
but doesn't look quite like it if observed closely.With each major version of the SDK — the major version stands for "potentially breaking, non-retro compatible" — but the
minor
version number gets incremented instead ofmajor
.For example, SDK
v0.42.x
has been updated tov0.43.0
.While this versioning method seems obvious to the many development teams working on Cosmos SDK, it doesn't make much sense to the outside world.
Developers who want to write software that works with multiple versions of the SDK will find themselves blocked, because of this custom versioning scheme.
Since Go mod — arguably over-zealously — enforces
semver
on each package, different Cosmos SDK versions cannot be imported at the same time by the same package.This inability to import multiple Cosmos SDK versions at the same time is because the Go compiler sees the different versions as the same version with increments on only the minor version.
This incongruity ends up with a package update, which reduces rapid development and causes increased code maintenance to upgrade to each new Cosmos SDK version.
All of this code maintenance overhead leads to frustration and a number of potential developer experience issues with required code maintenance to support different versions of SDK objects and interfaces being the first and most common.
Versioning proposal
We propose to move Cosmos SDK versioning to a semver-compliant scheme.
Instead of start version numbering from 1.0, the proposed versioning scheme can start from the latest minor release in the current versioning scheme, so that
v0.43.0
becomesv43.0.0
, andv0.42.8
becomesv42.8.0
.This proposed versioning scheme is in complete agreement with Go module versioning — https://golang.org/doc/modules/version-numbers — and will guarantee compatibility with the Go ecosystem and developers.
Clear software release strategies have been key for the success and stability of the Cosmos SDK. We believe it's time we stabilize the Cosmos SDK interface on the versioning side of things, too.
Regarding
.proto
files versioning, there are two alternatives:.proto
files with Cosmos SDK, so that with each major Cosmos SDK release thev{major version number}
proto namespace prefix is also incrementedBoth approaches drop the
beta1
suffix from the proto namespacing.While the second alternative is the most correct and provides the most flexibility, the first alternative is easier and quicker to implement.
The Cosmos SDK already enjoys high status and trusted value as the most advanced framework for building custom application-specific blockchains today. By adopting this proposed versioning scheme, the Cosmos SDK will grow even stronger, enable more rapid development, and allow for more developer adoption.
Appendix 1: Script to move from
v0.X.Y
tovX.Y.0
The following script would be run from a cloned Cosmos SDK repository and is able to implement all changes described in this versioning scheme proposal and also implements the first alternative to .proto file versioning.
Appendix 2: semver-compliant Cosmos SDK versioning
This https://github.com/allinbits/cosmos-sdk-semver link holds a fork of the latest
master
branch of Cosmos SDK and moves branchesv0.42.8
andv0.43.0
to their semver-compliant editions.Appendix 3: Go project targeting multiple Cosmos SDK versions
The https://github.com/allinbits/multisdk/ link holds a Go project that targets the Cosmos SDK fork that is described in Appendix 2 and uses the proposed versions as PoC of how multiple Cosmos SDK versions can co-exist in the same package.
Beta Was this translation helpful? Give feedback.
All reactions