-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - NodeToClientV_16
protocol changed unexpectedly
#1130
Comments
This is indeed the case; experimental versions currently have no backwards-compatibility guarantees between different node versions. For example, various Conway queries changed all the time (added/removed/different payload) between different node releases, but they were gated behind an experimental The rationale here is that not changing experimental versions across node releases would come with a huge maintenance overhead: For example, the exact data or format for certain queries might change in any version, and it would introduce a large amount of "instant legacy" code in order to keep every version backwards-compatible with every intermediate iteration of experimental features that are developed over the course of multiple node releases. Most crucially, after the experimental version has been released, nobody will ever use these intermediate versions. In contrast, we do strive to not break backwards-compatibility for non-experimental versions; in fact, #1015 has extra code to ensure just that. If I understand you correctly, you would like to guarantee that experimental features work even when using an older cardano-wallet release in combination with newer cardano-node releases, right? Currently, the assumption is that when downstream consumers want to use experimental features, they need to use a version corresponding to the exact cardano-node release they are using. Would this be feasible for cardano-wallet? |
I'm not entirely sure. Our original motivation was that we want to test
Yes, but that is ok. In our case,
Yes, that is alright — what I'm asking for is to make that fact visible in the version of the feature, as opposed to some other version of the software that includes the feature. 🤔 |
Thanks, that makes a lot of sense, I think I now understand your use case better: You are interested in making the experimental version more expressive, by updating them when anything changes, but not keeping the previous behavior around 👍
One thing that comes to mind here is to test stable features with one (mainnet-ready) version of the node, and the experimental features with another (potentially not mainnet-ready) version of the node. In some sense, this is even necessary if you want to continue testing experimental features: Suppose we bumped the
That (or something in that line) sounds doable; maybe after a bit of elbow grease as it is currently a bit annoying/laborious to add new |
The Consensus team just talked about this, we agreed that bumping the experimental version when there are breaking changes sounds feasible and useful for downstream consumers. A sketch of how to do this would be to add a special constructor While this seems relatively straightforward, we do not yet know when we will be able to allocate some time to work on this. FTR: Some variations in the idea above that were mentioned:
|
Thanks! 😊 🙏
In both cases, with or without accurate versioning of the experimental protocols, downstream projects will have to test against two different node versions as long as the experimental node version is not mainnet-ready, and doing so will also alleviate the problem. I think it's ok to assign a lesser priority to this. |
Internal/External
External
Summary
The
NodeToClientV_16
protocol has changed unexpectedly between two released versions of the cardano-node: version8.9.2
accepts queries that8.11.0-sancho
rejects, and vice versa.Steps to reproduce
(Discovered while testing
cardano-wallet
against Sanchonet. Screenshot of an example query failure below.)Expected behavior
Changes in protocol semantics should come with a new version, here
NodeToClientV_17
.Downstream projects such as
cardano-wallet
are mainnet-ready and therefore need to be tested againstcardano-node
versions that are also mainnet-ready, in this case8.9.2
. However, in order to make Sanchonet more useful, it is also desirable to havecardano-wallet
work on Sanchonet. However, having a node that is ready for mainnet and a different node that is compatible with Sanchonet now requires us to test against two different node versions — especially if their interface changes.One can argue that
NodeToClientV_16
is experimental and subject to change (that's why it can be disabled in the node configuration file). However, the point of version numbers is that any particular version is not subject to change, e.g.cardano-node-8.9.2
is not subject to change anymore, it only becomes obsolete. Still, there is the matter of granularity: In the case of theNodeToClientVersion
type, it was probably felt that addingNodeToClientV_17
would spam the version number space for no good reason. Well, now there is a good reason.To solve this, I have the feeling that it would be best if
NodeToClientVersion
simply tracks the version of theouroboros-consensus
library. When negotiating the protocol, a higher version ofouroboros-consensus
can choose to explicitly support a lower version, e.g.ouroboros-consensus-0.18
can include code that works withouroboros-consensus-0.15
as well. I believe that this would semi-automated the version tracking. However, this solution is also too good to be true: The block type may differ between versions of a dependency, which is not tracked in the version ofouroboros-consensus
. 🤔 The version number ofcardano-node
would provide a good tracking reference (and in practice, it is used as such), but that is a downstream package, which imports theNodeToClientVersion
type rather than exporting it.System info
x86_64-linux
.ouroboros-consensus-0.14.0.0
vsouroboros-consensus-0.18.0.0
.Screenshots and attachments
Additional context
This defect was introduced in #1015 .
The change to the semantics of the
NodeToClientV_16
protocol happened here:3fc6d28#diff-28148a724bec997ce56e6643032266b891d3e841987ec42462d88e29245f18ae
A better solution would have been to define
CardanoNodeToClientVersion13
and to add a lineThe text was updated successfully, but these errors were encountered: