Skip to content

Commit 4b4c5c4

Browse files
authored
Merge branch 'master' into vrom911/1911-handle-clientInput-failures-http-api
2 parents 6ed2efd + 0bb00f3 commit 4b4c5c4

File tree

29 files changed

+877
-516
lines changed

29 files changed

+877
-516
lines changed

CHANGELOG.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
As a minor extension, we also keep a semantic version for the `UNRELEASED`
99
changes.
1010

11-
## [0.23.0] - UNRELEASED
11+
## [0.22.4] - 2025-08-05
1212

1313
- Accept additional field `amount` when depositing to specify the amount of Lovelace that should be depositted to a Head returning any leftover to the user.
1414

15+
- Fix API not correctly handling event log rotation. This was evident in not
16+
being able to use `/commit` although the head is initializing or outdated
17+
information in the `Greetings` message.
18+
19+
- Ignore snapshot signatures of already confirmed snapshots. This was previously
20+
resulting in the node waiting for the accompanying snapshot request and
21+
occurred when running heads with mirror nodes.
22+
23+
- Fix an internal persistent queue blocking after restart when it reached
24+
capacity.
25+
26+
- Timeout and retry broadcast of network messages after 3 seconds in case the
27+
`etcd` grpc server is not responsive. This should avoid build-up on the
28+
outbound persistent queue.
29+
30+
- Handle failing lease keep alive in network component and avoid bursts in
31+
heartbeating.
32+
33+
- Fix for blocking bug when broadcasting messages via etcd. See:
34+
https://github.com/cardano-scaling/hydra/issues/2167. This is not a full fix
35+
but is enough to resolve the problem until we can identify the central cause
36+
of the issue.
37+
38+
## [0.22.3] - 2025-07-21
39+
40+
* Change behavior of `Hydra.Network.Etcd` to fallback to earliest possible
41+
revision if `last-known-revision` is missing or too old. This can happen if a
42+
node is down for a long time and the `etcd` cluster compacted the last known
43+
revision in the meantime
44+
[#2136](https://github.com/cardano-scaling/hydra/issues/2136).
45+
1546
- Don't keep around invalid transactions as they could lead to stuck Head.
1647

1748
- Hydra API server responds with the correct `Content-Type` header `application-json`.
@@ -39,15 +70,15 @@ when the number of persisted `StateChanged` events exceeds the configured `--per
3970
preserving sequential order and making it easier to identify which rotated log file was used to compute it.
4071

4172

42-
## [0.22.2] - 2025.06.30
73+
## [0.22.2] - 2025-06-30
4374

4475
* Fix wrong hydra-script-tx-ids in networks.json
4576

46-
## [0.22.1] - 2025.06.27
77+
## [0.22.1] - 2025-06-27
4778

4879
* Fix for bug where node got stalled at `ReplayingState` [#2089](https://github.com/cardano-scaling/hydra/issues/2089)
4980

50-
## [0.22.0] - 2025.06.17
81+
## [0.22.0] - 2025-06-17
5182

5283
- Tested with `cardano-node 10.1.4` and `cardano-cli 10.1.1.0`.
5384

demo/docker-compose.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121

2222
hydra-node-1:
2323
# NOTE: Make sure to use the same image in ./seed-devnet.sh
24-
image: ghcr.io/cardano-scaling/hydra-node:0.22.2
24+
image: ghcr.io/cardano-scaling/hydra-node:0.22.4
2525
build:
2626
context: ../
2727
target: hydra-node
@@ -58,7 +58,7 @@ services:
5858

5959
hydra-node-2:
6060
# NOTE: Make sure to use the same image in ./seed-devnet.sh
61-
image: ghcr.io/cardano-scaling/hydra-node:0.22.2
61+
image: ghcr.io/cardano-scaling/hydra-node:0.22.4
6262
build:
6363
context: ../
6464
target: hydra-node
@@ -95,7 +95,7 @@ services:
9595

9696
hydra-node-3:
9797
# NOTE: Make sure to use the same image in ./seed-devnet.sh
98-
image: ghcr.io/cardano-scaling/hydra-node:0.22.2
98+
image: ghcr.io/cardano-scaling/hydra-node:0.22.4
9999
build:
100100
context: ../
101101
target: hydra-node
@@ -131,7 +131,7 @@ services:
131131
restart: always
132132

133133
hydra-tui-1:
134-
image: ghcr.io/cardano-scaling/hydra-tui:0.22.2
134+
image: ghcr.io/cardano-scaling/hydra-tui:0.22.4
135135
build:
136136
context: ../
137137
target: hydra-tui
@@ -148,7 +148,7 @@ services:
148148
ipv4_address: 172.16.238.11
149149

150150
hydra-tui-2:
151-
image: ghcr.io/cardano-scaling/hydra-tui:0.22.2
151+
image: ghcr.io/cardano-scaling/hydra-tui:0.22.4
152152
build:
153153
context: ../
154154
target: hydra-tui
@@ -165,7 +165,7 @@ services:
165165
ipv4_address: 172.16.238.21
166166

167167
hydra-tui-3:
168-
image: ghcr.io/cardano-scaling/hydra-tui:0.22.2
168+
image: ghcr.io/cardano-scaling/hydra-tui:0.22.4
169169
build:
170170
context: ../
171171
target: hydra-tui

demo/seed-devnet.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function hnode() {
5555
docker run --rm -it \
5656
--pull always \
5757
-v ${SCRIPT_DIR}/devnet:/devnet \
58-
ghcr.io/cardano-scaling/hydra-node:0.22.2 -- ${@}
58+
ghcr.io/cardano-scaling/hydra-node:0.22.4 -- ${@}
5959
fi
6060
}
6161

docs/docs/tutorial/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ that you have a good version of jq with this command:
4545
```shell
4646
mkdir -p bin
4747

48-
hydra_version=0.22.2
48+
hydra_version=0.22.4
4949
curl -L -O https://github.com/cardano-scaling/hydra/releases/download/${hydra_version}/hydra-x86_64-linux-${hydra_version}.zip
5050
unzip -d bin hydra-x86_64-linux-${hydra_version}.zip
5151

@@ -71,7 +71,7 @@ Finally, verify your node installation by running `./bin/hydra-node --help`
7171
```shell
7272
mkdir -p bin
7373

74-
hydra_version=0.22.2
74+
hydra_version=0.22.4
7575
curl -L -O https://github.com/cardano-scaling/hydra/releases/download/${hydra_version}/hydra-aarch64-darwin-${hydra_version}.zip
7676
unzip -d bin hydra-aarch64-darwin-${hydra_version}.zip
7777

@@ -415,7 +415,7 @@ Start the `hydra-node` using these parameters:
415415
<TabItem value="alice" label="Alice">
416416

417417
```shell
418-
hydra_version=0.22.2
418+
hydra_version=0.22.4
419419
hydra-node \
420420
--node-id "alice-node" \
421421
--persistence-dir persistence-alice \
@@ -437,7 +437,7 @@ hydra-node \
437437
<TabItem value="bob" label="Bob">
438438

439439
```shell
440-
hydra_version=0.22.2
440+
hydra_version=0.22.4
441441
hydra-node \
442442
--node-id "bob-node" \
443443
--persistence-dir persistence-bob \

hydra-cardano-api/hydra-cardano-api.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 3.0
22
name: hydra-cardano-api
3-
version: 0.22.2
3+
version: 0.22.4
44
synopsis: A Haskell API for Cardano, tailored to the Hydra project.
55
author: IOG
66
copyright: 2022 IOG

hydra-chain-observer/hydra-chain-observer.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 3.0
22
name: hydra-chain-observer
3-
version: 0.22.2
3+
version: 0.22.4
44
synopsis: Hydra Chain Observer
55
author: IOG
66
copyright: 2023 IOG

hydra-cluster/hydra-cluster.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 3.0
22
name: hydra-cluster
3-
version: 0.22.2
3+
version: 0.22.4
44
synopsis:
55
Integration test suite using a local cluster of cardano and hydra nodes
66

hydra-cluster/src/Hydra/Cluster/Scenarios.hs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -805,8 +805,9 @@ singlePartyCommitsScriptBlueprint tracer workDir backend hydraScriptsTxId =
805805
withHydraNode hydraTracer aliceChainConfig workDir hydraNodeId aliceSk [] [1] $ \n1 -> do
806806
send n1 $ input "Init" []
807807
headId <- waitMatch (10 * blockTime) n1 $ headIsInitializingWith (Set.fromList [alice])
808-
809-
(clientPayload, scriptUTxO) <- prepareScriptPayload 3_000_000
808+
-- NOTE: We don't use amount in _regular_ commits - the ones before the
809+
-- head is not yet opened - since we will remove this process soon.
810+
(clientPayload, scriptUTxO) <- prepareScriptPayload 7_000_000 0
810811

811812
res <-
812813
runReq defaultHttpConfig $
@@ -825,8 +826,12 @@ singlePartyCommitsScriptBlueprint tracer workDir backend hydraScriptsTxId =
825826
guard $ v ^? key "tag" == Just "HeadIsOpen"
826827
pure $ v ^? key "utxo"
827828
lockedUTxO `shouldBe` Just (toJSON scriptUTxO)
829+
828830
-- incrementally commit script to a running Head
829-
(clientPayload', scriptUTxO') <- prepareScriptPayload 2_000_000
831+
let commitAmount = 2_000_000
832+
(clientPayload', scriptUTxO') <- prepareScriptPayload 5_000_000 commitAmount
833+
834+
let toCommit = fst $ capUTxO scriptUTxO' (Coin commitAmount)
830835

831836
res' <-
832837
runReq defaultHttpConfig $
@@ -843,13 +848,12 @@ singlePartyCommitsScriptBlueprint tracer workDir backend hydraScriptsTxId =
843848
Backend.submitTransaction backend tx
844849

845850
waitFor hydraTracer (2 * realToFrac depositPeriod) [n1] $
846-
output "CommitApproved" ["headId" .= headId, "utxoToCommit" .= scriptUTxO']
851+
output "CommitApproved" ["headId" .= headId, "utxoToCommit" .= toCommit]
847852
waitFor hydraTracer (20 * blockTime) [n1] $
848853
output "CommitFinalized" ["headId" .= headId, "depositTxId" .= getTxId (getTxBody tx)]
849-
850-
getSnapshotUTxO n1 `shouldReturn` scriptUTxO <> scriptUTxO'
854+
getSnapshotUTxO n1 `shouldReturn` scriptUTxO <> toCommit
851855
where
852-
prepareScriptPayload lovelaceAmt = do
856+
prepareScriptPayload lovelaceAmt commitAmount = do
853857
networkId <- Backend.queryNetworkId backend
854858
let scriptAddress = mkScriptAddress networkId dummyValidatorScript
855859
let datumHash :: TxOutDatum ctx
@@ -869,6 +873,7 @@ singlePartyCommitsScriptBlueprint tracer workDir backend hydraScriptsTxId =
869873
( Aeson.object
870874
[ "blueprintTx" .= spendingTx
871875
, "utxo" .= scriptUTxO
876+
, "amount" .= Coin commitAmount
872877
]
873878
, scriptUTxO
874879
)

0 commit comments

Comments
 (0)