Skip to content

Commit 02bdf89

Browse files
committed
Merge branch 'feature/node-11.0'
2 parents bdb1bad + 0746d12 commit 02bdf89

577 files changed

Lines changed: 4343 additions & 2245 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/continuous-integration.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ jobs:
227227
os: [ linux ]
228228
arch: [ x86_64 ]
229229
network: [ preview ]
230-
cardano-node: [ 10.5.1 ]
230+
cardano-node: [ 11.0.1 ]
231231

232232
runs-on: ${{ matrix.os == 'linux' && 'ubuntu-22.04' }}
233233
steps:
@@ -404,8 +404,8 @@ jobs:
404404
os: [ linux ]
405405
target: [ cardano-node-ogmios ]
406406
network: [ mainnet, preprod, preview ]
407-
cardano-node: [ 10.5.1 ]
408-
cardano-node-latest: [ 10.5.1 ]
407+
cardano-node: [ 11.0.1 ]
408+
cardano-node-latest: [ 11.0.1 ]
409409
arch: [ x86_64 ]
410410
steps:
411411
- name: 📥 Checkout repository

CHANGELOG.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ pre: "<b>6. </b>"
77
math: true
88
---
99

10+
### [7.0.0] - UNRELEASED
11+
12+
#### Added
13+
14+
- Preliminary support for the DijkstraEra and PlutusV4
15+
16+
#### Changed
17+
18+
- Upgraded dependencies and compatibility to `cardano-node==11.0.1`.
19+
20+
- Fixed Ogmios not returning a success error code when interrupted by the user (e.g. CTRL+C / SIGINT).
21+
22+
- **⚠️ BREAKING-CHANGE ⚠️**: on `ProtocolParameters` and `ProposedProtocolParameters`, the field `maxReferenceScriptsSize` has been renamed to `maxReferenceScriptsSizePerTransaction` to disambiguate it from `maxReferenceScriptsSizePerBlock`.
23+
24+
---
25+
---
26+
1027
### [6.14.0] - 2025-10-16
1128

1229
#### Added
@@ -28,6 +45,9 @@ math: true
2845

2946
- `queryLedgerState/proposedProtocolParameters` is no longer available in the underlying node and was already returning dummy data for a few versions. It's been removed.
3047

48+
---
49+
---
50+
3151
### [6.13.0] - 2025-06-13
3252

3353
#### Added
@@ -46,6 +66,9 @@ math: true
4666

4767
N/A
4868

69+
---
70+
---
71+
4972
### [6.12.0] - 2025-05-22
5073

5174
#### Added
@@ -60,18 +83,27 @@ N/A
6083

6184
- The `queryLedgerState/delegateRepresentatives` no longer discards registered DReps that have unregistered but whose stake is still available. This may happen when a DRep is already unregistered, but his stake distribution is still available because still needed to ratify votes on the next epoch boundary. As a consequence, some of the fields for the registered drep summaries are now optional instead of required."
6285

86+
---
87+
---
88+
6389
### [6.11.2] - 2025-02-01
6490

6591
#### Changed
6692

6793
- Fix (sometimes) missing governance proposals returned from the `queryLedgerState/governanceProposals` (likely) due to unfinished incremental calculations on the ledger state. The proposals are now pulled from a different location in the ledger state which ensures they are complete.
6894

95+
---
96+
---
97+
6998
### [6.11.1] - 2025-01-31
7099

71100
#### Changed
72101

73102
- Fix missing DReps with no stake not showing up through `queryLedgerState/delegateRepresentatives`.
74103

104+
---
105+
---
106+
75107
### [6.11.0] - 2025-01-12
76108

77109
#### Added
@@ -88,6 +120,9 @@ N/A
88120

89121
- N/A
90122

123+
---
124+
---
125+
91126
### [6.10.0] - 2024-12-14
92127

93128
#### Added
@@ -104,6 +139,9 @@ N/A
104139

105140
- N/A
106141

142+
---
143+
---
144+
107145
### [6.9.0] - 2024-11-08
108146

109147
#### Added
@@ -121,6 +159,9 @@ N/A
121159

122160
- N/A
123161

162+
---
163+
---
164+
124165
### [6.8.0] - 2024-09-21
125166

126167
#### Added
@@ -138,6 +179,9 @@ N/A
138179

139180
- N/A
140181

182+
---
183+
---
184+
141185
### [6.7.0] - 2024-09-13
142186

143187
#### Added
@@ -152,6 +196,9 @@ N/A
152196

153197
- N/A
154198

199+
---
200+
---
201+
155202
### [6.6.2] - 2024-09-10
156203

157204
#### Added
@@ -166,6 +213,9 @@ N/A
166213

167214
- N/A
168215

216+
---
217+
---
218+
169219
### [6.6.1] - 2024-09-01
170220

171221
#### Added
@@ -180,6 +230,9 @@ N/A
180230

181231
- N/A
182232

233+
---
234+
---
235+
183236
### [6.6.0] - 2024-08-15
184237

185238
#### Added
@@ -218,7 +271,7 @@ N/A
218271
- New ledger-state query: `queryLedgerState/treasuryAndReserves` to retrieve the current Ada values of the treasury and reserves.
219272

220273
- New protocol parameters in Conway:
221-
- `maximumReferenceScriptsSize` which indicates the maximum total number of bytes of scripts referenced by a transaction.
274+
- `maxReferenceScriptsSize` which indicates the maximum total number of bytes of scripts referenced by a transaction.
222275
- `minFeeReferenceScripts` with three sub fields: `range`, `base` and `multiplier` that now intervenes in the minimum fee calculation. Note that, starting in the Conway era, the min fee calculation is given by the following formula:
223276

224277
$$

CONTRIBUTING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,27 @@ Do not hesitate to upvote discussions or comments to show your interest!
1818

1919
Pull requests are welcome, but we do recommend to open an issue to bring any idea to discussion first!
2020

21+
##### Adding Support For A New Era
22+
23+
Ogmios generally supports the current Cardano era and the next era when one is available, so era transitions usually require a coordinated bump across the server, tests, generated schemas, and clients. After updating the Cardano dependencies and the hard-fork block type, audit these areas:
24+
25+
- Type-level era plumbing: update `Ogmios.Prelude`, `Ogmios.Data.EraTranslation`, era indexes, `MostRecentEra` assumptions, and helper constraints such as `ShelleyBasedEra` and `AlonzoBasedEra`.
26+
- Node-to-client protocol support: check `server/modules/ouroboros-network-ogmios/src/Cardano/Network/Protocol/NodeToClient.hs` for supported versions, codec configuration, raw transaction id conversion, and any version gates that decide when the new era may flow over the wire.
27+
- Runtime protocols: inspect `server/src/Ogmios/App/Protocol/ChainSync.hs`, `StateQuery.hs`, `TxSubmission.hs`, and `TxMonitor.hs` for era-specific branches, `QueryIfCurrent*` constructors, transaction evaluation paths, and mempool lookup order.
28+
- JSON and ledger adapters: add or update the era-specific JSON module, `Ogmios.Data.Json`, `Ogmios.Data.Json.Query`, predicate failure encoders, script failure encoders, `Ogmios.Data.Ledger`, and `Ogmios.Data.Protocol.TxSubmission`.
29+
- Configuration, health, and genesis behavior: update era names in health reporting and configuration parsing. Do not add genesis-query support by reflex; some eras intentionally reuse the previous era's genesis configuration or have no genesis configuration at all.
30+
- Tests and generators: extend `server/test/unit/Test/Generators.hs`, `Test/Generators/Orphans.hs`, protocol specs, JSON specs, and golden vectors so the new era is generated and round-tripped. Include a direct node-to-client roundtrip for a block in the new era, because this catches consensus codec gaps before Ogmios JSON is involved.
31+
- Schemas and clients: regenerate and review JSON schemas and TypeScript clients, especially public era unions, block shapes, query result types, and error variants.
32+
33+
Useful searches when reviewing an era bump:
34+
35+
```sh
36+
rg -n "Conway|MostRecentEra|EraIndex|NodeToClientV_|ShelleyBasedEra|AlonzoBasedEra|QueryIfCurrent|GenTx|Block[A-Z]" server/src server/test/unit server/modules/ouroboros-network-ogmios/src clients
37+
rg -n "conway|ConwayEra|ShelleyBasedEraConway|AlonzoBasedEraConway|QueryIfCurrentConway" server/src server/test/unit server/modules/ouroboros-network-ogmios/src clients
38+
```
39+
40+
Not every reference to the previous era is wrong. Older-era codecs, backwards-compatible parsers, historical block encoders, and genesis-query support often need to remain as-is. Treat each remaining previous-era reference as either a deliberate historical branch or a missing new-era branch, and document the decision in the pull request when it is not obvious.
41+
2142
#### 3. Donation
2243

2344
Want to give some financial support? Have a look at the [sponsors page](https://github.com/sponsors/KtorZ/) for more details.

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5-
ARG CARDANO_NODE_IMAGE=ghcr.io/intersectmbo/cardano-node:10.1.4
5+
ARG CARDANO_NODE_IMAGE=ghcr.io/intersectmbo/cardano-node:11.0.1
66

77
# #
88
# --------------------------- BUILD (ogmios) --------------------------------- #
99
# #
1010

11-
FROM --platform=${TARGETPLATFORM:-linux/amd64} busybox:1.35 as ogmios
11+
FROM busybox:1.35 AS ogmios
1212

1313
LABEL name=ogmios
1414
LABEL description="A JSON WebSocket bridge for cardano-node."
@@ -28,10 +28,10 @@ ENTRYPOINT ["/bin/ogmios"]
2828
# --------------------- RUN (cardano-node & ogmios) -------------------------- #
2929
# #
3030

31-
FROM ${CARDANO_NODE_IMAGE} as cardano-node-ogmios
31+
FROM ${CARDANO_NODE_IMAGE} AS cardano-node-ogmios
3232

3333
ARG NETWORK=mainnet
34-
ENV TINI_VERSION v0.19.0
34+
ENV TINI_VERSION=v0.19.0
3535

3636
LABEL name=cardano-node-ogmios
3737
LABEL description="A Cardano node, side-by-side with its JSON WebSocket bridge."

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
| Ogmios | Cardano-node (mainnet, preview, preprod) |
1717
| --- | --- |
18-
| **`v6.14.*`** | **`10.5.1`** |
18+
| **`v6.15.*`** | **`11.0.1`** |
19+
| `v6.14.*` | `10.5.1` |
1920
| `v6.13.*` | `10.1.2`, `10.1.3`, `10.1.4` |
2021
| `v6.12.*` | `10.1.2`, `10.1.3`, `10.1.4` |
2122
| `v6.11.*` | `10.1.2`, `10.1.3`, `10.1.4` |

clients/TypeScript/README.md

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -12,66 +12,9 @@ yarn install && \
1212
yarn build
1313
```
1414
#### Run Tests
15-
```console
16-
yarn testnet:up
17-
```
18-
In another terminal
19-
```console
20-
yarn test
21-
```
22-
23-
### Start Cardano Node and Ogmios Server
24-
#### mainnet
25-
```console
26-
yarn mainnet:up
27-
```
28-
#### testnet
29-
```console
30-
yarn testnet:up
31-
```
32-
### Stop Cardano Node and Ogmios Server
33-
#### mainnet
34-
```console
35-
yarn mainnet:down
36-
```
37-
#### testnet
38-
```console
39-
yarn testnet:down
40-
```
41-
42-
### Start the REPL
43-
#### mainnet
44-
```console
45-
yarn repl:start
46-
```
47-
#### testnet
48-
```console
49-
yarn repl:start --port 1337
50-
```
51-
### Lint
52-
```console
53-
yarn lint
54-
```
55-
### Cleanup
56-
```
57-
yarn cleanup
58-
```
59-
60-
## Distribute
6115

62-
### Pack
63-
```console
64-
./scripts/pack.sh
65-
```
66-
### Publish to npm.org
67-
```console
68-
./scripts/publish.sh
69-
```
16+
Have a cardano node running on PreProd, and then:
7017

71-
### Pkg REPL
7218
```console
73-
yarn repl:pkg
19+
yarn test
7420
```
75-
76-
77-

clients/TypeScript/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@
2020
"cleanup": "yarn workspaces run cleanup && shx rm -rf docs/theme && shx rm -rf node_modules",
2121
"generate-schema-types": "yarn workspace @cardano-ogmios/schema run generate-schema-types",
2222
"lint": "yarn workspaces run lint",
23-
"mainnet:up": "DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -p ogmios-mainnet up --build",
24-
"mainnet:down": "docker-compose -p ogmios-mainnet down",
2523
"repl:pkg": "yarn workspace @cardano-ogmios/repl run pkg",
2624
"repl:start": "yarn workspace @cardano-ogmios/repl run start",
2725
"test": "yarn workspaces run test",
28-
"testnet:up": "DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 OGMIOS_PORT=1337 NETWORK=testnet docker-compose -p ogmios-testnet up",
29-
"testnet:down": "docker-compose -p ogmios-testnet down",
3026
"tags": "ctags $(find packages -type f -name '*.ts' ! -path 'dist/*' ! -name '*.test.ts' ! -name '*.d.ts' ! -path 'node_modules/*')",
3127
"docs": "tar -C docs -xf docs/ogmios-typedoc-theme.tar.gz && typedoc --packages ."
3228
},

clients/TypeScript/packages/client/src/LedgerStateQuery/Client.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {
2626
GenesisAlonzo,
2727
GenesisByron,
2828
GenesisConway,
29+
GenesisDijkstra,
2930
GenesisShelley,
3031
GovernanceProposalReference,
3132
Origin,
@@ -56,6 +57,7 @@ export interface LedgerStateQueryClient {
5657
genesisConfiguration(era: 'shelley'): Promise<GenesisShelley>
5758
genesisConfiguration(era: 'alonzo'): Promise<GenesisAlonzo>
5859
genesisConfiguration(era: 'conway'): Promise<GenesisConway>
60+
genesisConfiguration(era: 'dijkstra'): Promise<GenesisDijkstra>
5961
ledgerTip(): ReturnType<typeof ledgerTip>
6062
liveStakeDistribution(): ReturnType<typeof liveStakeDistribution>
6163
networkBlockHeight(): ReturnType<typeof networkBlockHeight>
@@ -147,6 +149,8 @@ export async function createLedgerStateQueryClient (
147149
return genesisConfiguration(context, era)
148150
case 'conway':
149151
return genesisConfiguration(context, era)
152+
case 'dijkstra':
153+
return genesisConfiguration(context, era)
150154
default: {
151155
// NOTE: This raises "Type 'string' is not assignable to type 'never'."
152156
// whenever a branch of 'EraWithGenesis' isn't covered in the above

clients/TypeScript/packages/client/src/LedgerStateQuery/query/genesisConfiguration.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
GenesisAlonzo,
66
GenesisByron,
77
GenesisConway,
8+
GenesisDijkstra,
89
GenesisShelley,
910
EraWithGenesis
1011
} from '@cardano-ogmios/schema'
@@ -21,11 +22,12 @@ export function genesisConfiguration(context: InteractionContext, era: 'byron'):
2122
export function genesisConfiguration(context: InteractionContext, era: 'shelley'): Promise<GenesisShelley>
2223
export function genesisConfiguration(context: InteractionContext, era: 'alonzo'): Promise<GenesisAlonzo>
2324
export function genesisConfiguration(context: InteractionContext, era: 'conway'): Promise<GenesisConway>
25+
export function genesisConfiguration(context: InteractionContext, era: 'dijkstra'): Promise<GenesisDijkstra>
2426
export function genesisConfiguration (
2527
context: InteractionContext,
2628
era: EraWithGenesis
27-
): Promise<GenesisByron | GenesisShelley | GenesisAlonzo | GenesisConway> {
28-
return Method<Request, Response, GenesisByron | GenesisShelley | GenesisAlonzo | GenesisConway>(
29+
): Promise<GenesisByron | GenesisShelley | GenesisAlonzo | GenesisConway | GenesisDijkstra> {
30+
return Method<Request, Response, GenesisByron | GenesisShelley | GenesisAlonzo | GenesisConway | GenesisDijkstra>(
2931
{
3032
method: 'queryNetwork/genesisConfiguration',
3133
params: { era }
@@ -40,6 +42,8 @@ export function genesisConfiguration (
4042
resolve(response.result as GenesisAlonzo)
4143
} else if (era === 'conway' && isQueryNetworkGenesisConfigurationConway(response)) {
4244
resolve(response.result as GenesisConway)
45+
} else if (era === 'dijkstra' && isQueryNetworkGenesisConfigurationDijkstra(response)) {
46+
resolve(response.result as GenesisDijkstra)
4347
} else {
4448
reject(response)
4549
}
@@ -75,3 +79,10 @@ export function isQueryNetworkGenesisConfigurationAlonzo (response: any): respon
7579
export function isQueryNetworkGenesisConfigurationConway (response: any): response is GenesisConway {
7680
return ((response as Response)?.result as GenesisConway)?.era === 'conway'
7781
}
82+
83+
/**
84+
* @internal
85+
*/
86+
export function isQueryNetworkGenesisConfigurationDijkstra (response: any): response is GenesisDijkstra {
87+
return ((response as Response)?.result as GenesisDijkstra)?.era === 'dijkstra'
88+
}

0 commit comments

Comments
 (0)