Skip to content

Commit

Permalink
Homogenize Shelley versions in Cardano NTC versions
Browse files Browse the repository at this point in the history
  • Loading branch information
amesgen committed Jan 5, 2024
1 parent 5a984ce commit a0632f9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/website/contents/for-developers/QueryVersioning.md
Expand Up @@ -40,6 +40,8 @@ Our code does not use the negotiated [`NodeToClientVersion`][n2c] directly, but
```
This tells us that in Shelley, Allegra, Mary, Alonzo and Babbage, we use `ShelleyNodeToClientVersion6`, and Conway is disabled. This means that no queries that were introduced in `ShelleyNodeToClientVersion7` can be used, and no queries in the Conway era are possible at all.

In order to reduce the number of possible version combinations, we currently follow the convention that all `ShelleyNodeToClientVersion`s in one `CardanoNodeToClientVersionX` are equal. This means that users (like `cardano-api`) can rely on the fact that once a `NodeToClient` version has been negotiated, all enabled Shelley-based eras support exactly the same queries. We might weaken this guarantee in the future, see [#864](https://github.com/IntersectMBO/ouroboros-consensus/issues/864).

The mapping from `NodeToClientVersion`s to `CardanoNodeToClientVersion`s is [`supportedNodeToClientVersions`][supportedNodeToClientVersions]. Additionally, all versions larger than a certain `NodeToClientVersion` (see [`latestReleasedNodeVersion`][latestReleasedNodeVersion]) are considered experimental, which means that queries newly enabled by them can be added and changed at will, without compatibility guarantees. They are only offered in the initial version negotiation when a flag (currently, `ExperimentalProtocolsEnabled`) is set; also see [`limitToLatestReleasedVersion`][limitToLatestReleasedVersion] and its call/usage sites.

#### Shelly node-to-client version
Expand Down
@@ -0,0 +1,6 @@
### Non-Breaking

- `CardanoNodeToClientVersion12` now implies `ShelleyNodeToClientVersion8` in
all Shelley-based eras instead of just in `Conway`. This means that downstream
logic determining query availablity (eg in `cardano-api`) can (continue to)
simply branch on the negotiated `NodeToClientVersion`.
Expand Up @@ -532,11 +532,11 @@ pattern CardanoNodeToClientVersion12 =
HardForkNodeToClientEnabled
HardForkSpecificNodeToClientVersion2
( EraNodeToClientEnabled ByronNodeToClientVersion1
:* EraNodeToClientEnabled ShelleyNodeToClientVersion7
:* EraNodeToClientEnabled ShelleyNodeToClientVersion7
:* EraNodeToClientEnabled ShelleyNodeToClientVersion7
:* EraNodeToClientEnabled ShelleyNodeToClientVersion7
:* EraNodeToClientEnabled ShelleyNodeToClientVersion7
:* EraNodeToClientEnabled ShelleyNodeToClientVersion8
:* EraNodeToClientEnabled ShelleyNodeToClientVersion8
:* EraNodeToClientEnabled ShelleyNodeToClientVersion8
:* EraNodeToClientEnabled ShelleyNodeToClientVersion8
:* EraNodeToClientEnabled ShelleyNodeToClientVersion8
:* EraNodeToClientEnabled ShelleyNodeToClientVersion8
:* Nil
)
Expand Down

0 comments on commit a0632f9

Please sign in to comment.