Skip to content

Commit 66f36b7

Browse files
committed
Fix new/updated state change golden files and server output schemas
1 parent d514f50 commit 66f36b7

File tree

5 files changed

+98
-51
lines changed

5 files changed

+98
-51
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"samples": [
3+
{
4+
"chainTime": "1864-05-08T07:46:20.573875444155Z",
5+
"deadline": "1864-05-09T22:42:36.56466289141Z",
6+
"depositTxId": "0100010100000000010001000000010001000101000100000101010100010000",
7+
"headId": "01010000000101000101010000010001",
8+
"tag": "DepositActivated"
9+
}
10+
],
11+
"seed": 1382456543
12+
}
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
{
22
"samples": [
33
{
4+
"chainTime": "1864-05-09T08:33:42.663668007375Z",
45
"deposit": {
5-
"deadline": "1864-05-10T09:22:24.320479389854Z",
6+
"created": "1864-05-10T21:31:45.899988059114Z",
7+
"deadline": "1864-05-09T11:26:18.208133007952Z",
68
"deposited": {
7-
"0000010101010001000001000100010101010101000101000001000000010100#54": {
8-
"address": "addr_test1qp7w0xf37aa3x5h3hkejx3ap44zx2fm0k2s04pssmtr559dcafm2403kzg0kju3dupp7vh40fj3ksskr2ayjumk8swws7n02jt",
9+
"0001010100010000000100000101010000010000000000000000000101000101#8": {
10+
"address": "addr_test1yq45nqcv0f26ekp7rw78ymjk832563ktvtre7a2wjjp8glfjs8zqtpvr6trqdjtvjszv4nyst98sdk5jnwx7m7ucf8rstswh46",
911
"datum": null,
10-
"inlineDatum": {
11-
"bytes": ""
12-
},
13-
"inlineDatumRaw": "40",
14-
"inlineDatumhash": "39df024ac52722fe8ae4c1a8740e4c5624a38c3820e504a059aae8728421f8bd",
12+
"datumhash": "2a053135ff62646602551f51d064bf17ceecfe597db80643bde2e5ae51a62343",
13+
"inlineDatum": null,
14+
"inlineDatumRaw": null,
1515
"referenceScript": null,
1616
"value": {
17-
"4a1c412d8e2b3015a7fb7d382808fb7cb721bf93a56e8bb6661cdebe": {
18-
"35": 2
17+
"2d725128406dc832eb74c4709aca0512499b3c7b17e00d7cb2e6d1b1": {
18+
"82266dc6736b75a70557": 2
1919
},
20-
"lovelace": 1163700
20+
"lovelace": 1310240
2121
}
2222
}
2323
},
24-
"headId": "00010100000001000001010101010000",
25-
"status": "Expired"
24+
"headId": "00000001010000000100010000000101",
25+
"status": "Active"
2626
},
27-
"depositTxId": "0100010000000001010000010000010101010000000100010100000001010001",
27+
"depositTxId": "0001010101000100010101000000010001000001010001010000010000010100",
2828
"tag": "DepositActivated"
2929
}
3030
],
31-
"seed": -1391527362
31+
"seed": -2122474449
3232
}
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
11
{
22
"samples": [
33
{
4-
"chainTime": "1864-05-10T21:21:56.611513943571Z",
4+
"chainTime": "1864-05-10T23:28:59.26886109689Z",
55
"deposit": {
6-
"deadline": "1864-05-08T09:45:25.651968997837Z",
6+
"created": "1864-05-08T08:54:33.444937466527Z",
7+
"deadline": "1864-05-10T07:30:47.523942425941Z",
78
"deposited": {
8-
"0001000100010000010101010100010001000000000100010100000100010100#67": {
9-
"address": "addr_test1zqluu48rs993y8h0jcucy2g3u5p69twkdm60a4v4d7zvgm07esg49wznyk4y9u2s09zyg6rpdrkjsssd359534mh3g9swcejsu",
9+
"0100000000010001000100010000000101000001000100000100000001000001#7": {
10+
"address": "addr_test1wzwnp2l2e5u9re3lp49xuklfhynn4wydv4lgshc3zy24mugmncrfq",
1011
"datum": null,
11-
"datumhash": "494ad32104e02f8398fdf8b25b5ba5f4bcfb171748dc09c0338c2ce6b765cc0d",
12+
"datumhash": "f8f8b265be88cd9dc06292cc205d800feca0bea44bdd5b93f30571eb58820f6b",
1213
"inlineDatum": null,
1314
"inlineDatumRaw": null,
1415
"referenceScript": null,
1516
"value": {
17+
"467f58932b54910584a0e8ea25a225e06a14530b2e96e938c53a3f22": {
18+
"0d64460feeeb975e5a28ea40c9": 1
19+
},
1620
"lovelace": 45000000000000000
1721
}
1822
}
1923
},
20-
"headId": "00010001000100000000010100000101",
24+
"headId": "00000000010001010000000100000101",
2125
"status": "Active"
2226
},
23-
"depositTxId": "0000000001010000010001000101010001010000000000010000000100010100",
27+
"depositTxId": "0000000001010000010100000100010101000000010000000001010101000101",
2428
"tag": "DepositExpired"
2529
}
2630
],
27-
"seed": 807268974
31+
"seed": 801701391
2832
}

hydra-node/golden/StateChanged/DepositRecorded.json

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,51 @@
33
{
44
"chainState": {
55
"recordedAt": {
6-
"blockHash": "0001010001010000000000000001000100010100010001000000000100010101",
7-
"slot": 0,
6+
"blockHash": "0100000001000001000001000000010000010001000001000001010100000100",
7+
"slot": 1,
88
"tag": "ChainPoint"
99
},
1010
"spendableUTxO": {
11-
"0101010100010101010001000000000001000000000000010101010001010101#62": {
12-
"address": "addr_test1xzj50zk3xkvg39q5ezt27s54u2sc6anw2yavceew6ks4n8kmurkd575mvajvyuce9gf04mns4zhpxvupav0xrldxhtrswyj6g9",
11+
"0101010000010100000100000101010100010001010101010100000000010001#82": {
12+
"address": "addr_test1vqk360q6fgl0ayfgxy2hnklpt4smv4554zt05lam7gf93hc64ehvc",
1313
"datum": null,
14-
"inlineDatum": {
15-
"constructor": 5,
16-
"fields": [
17-
{
18-
"int": 4
19-
}
20-
]
21-
},
22-
"inlineDatumRaw": "d87e9f04ff",
23-
"inlineDatumhash": "27b6f8a0cc598b4aaafe06a37ac38302cda75c6b85469ceedd461c7328cd154f",
14+
"datumhash": "3d75d5965ad461870a41ac359b409b18c9101ab760d616870f192968427d0e8b",
15+
"inlineDatum": null,
16+
"inlineDatumRaw": null,
2417
"referenceScript": null,
2518
"value": {
26-
"95f0c8a06989b498d7d135560485e737fa19ddea53347bf83e24e271": {
27-
"33": 8411343966592762129
19+
"c4b404b8d3ccf28bce7245036eadb8b361c1274fbef00d5710a7728b": {
20+
"31": 1
2821
},
29-
"lovelace": 1215420
22+
"lovelace": 1150770
3023
}
3124
}
3225
}
3326
},
34-
"deadline": "1864-05-09T17:23:15.728959732186Z",
35-
"depositTxId": "0000000100000101000100000001000100010100000001000001000001000101",
27+
"created": "1864-05-09T10:28:26.984543370977Z",
28+
"deadline": "1864-05-09T23:10:27.017687221465Z",
29+
"depositTxId": "0100000000000000010100000000010100010100000000000101000100000100",
3630
"deposited": {
37-
"0001000000000101010000010000000101010000010101010001000101010101#26": {
38-
"address": "addr_test1yz2k8w6seq6jmhwfgq0vdae4pt7ng66emgetrcax4dtgjq0cuag96vd9htu7tuetspw7f45krd9rh0upj7e9jk5w0dzsp0rd68",
31+
"0000000100000100010100000101000000010101010000000000000000000100#12": {
32+
"address": "addr_test1wprlrj5qndjmxv7vxj504659wjc80v84d70zg6s5cmwd3dqylmlc3",
3933
"datum": null,
40-
"datumhash": null,
41-
"inlineDatum": null,
42-
"inlineDatumRaw": null,
34+
"inlineDatum": {
35+
"list": []
36+
},
37+
"inlineDatumRaw": "80",
38+
"inlineDatumhash": "45b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0",
4339
"referenceScript": null,
4440
"value": {
45-
"058796b286d6d56d29e25dd69dd01c511ef1e4c0f19e0696b0dd453c": {
46-
"39": 1
41+
"cc1a207fef26923f3097858b4726ad0f17bbd25fbc84f065247c121c": {
42+
"30": 1
4743
},
4844
"lovelace": 45000000000000000
4945
}
5046
}
5147
},
52-
"headId": "01000000010100010101000100010001",
48+
"headId": "01000000010000010000000001010101",
5349
"tag": "DepositRecorded"
5450
}
5551
],
56-
"seed": 2079458434
52+
"seed": -998259638
5753
}

hydra-node/json-schemas/api.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,7 @@ components:
752752
- $ref: "api.yaml#/components/schemas/DecommitApproved"
753753
- $ref: "api.yaml#/components/schemas/DecommitFinalized"
754754
- $ref: "api.yaml#/components/schemas/CommitRecorded"
755+
- $ref: "api.yaml#/components/schemas/DepositActivated"
755756
- $ref: "api.yaml#/components/schemas/DepositExpired"
756757
- $ref: "api.yaml#/components/schemas/CommitApproved"
757758
- $ref: "api.yaml#/components/schemas/CommitFinalized"
@@ -1502,6 +1503,37 @@ components:
15021503
timestamp:
15031504
$ref: "api.yaml#/components/schemas/UTCTime"
15041505

1506+
DepositActivated:
1507+
title: DepositActivated
1508+
description: |
1509+
Deposit for an incremental commit got activated and will be proposed in a snapshot now.
1510+
additionalProperties: false
1511+
type: object
1512+
required:
1513+
- tag
1514+
- headId
1515+
- depositTxId
1516+
- deadline
1517+
- chainTime
1518+
- seq
1519+
- timestamp
1520+
properties:
1521+
tag:
1522+
type: string
1523+
enum: ["DepositActivated"]
1524+
headId:
1525+
$ref: "api.yaml#/components/schemas/HeadId"
1526+
depositTxId:
1527+
type: string
1528+
deadline:
1529+
$ref: "api.yaml#/components/schemas/UTCTime"
1530+
chainTime:
1531+
$ref: "api.yaml#/components/schemas/UTCTime"
1532+
seq:
1533+
$ref: "api.yaml#/components/schemas/SequenceNumber"
1534+
timestamp:
1535+
$ref: "api.yaml#/components/schemas/UTCTime"
1536+
15051537
DepositExpired:
15061538
title: DepositExpired
15071539
description: |
@@ -2454,10 +2486,13 @@ components:
24542486
additionalProperties: false
24552487
required:
24562488
- tag
2489+
- failureReason
24572490
properties:
24582491
tag:
24592492
type: string
24602493
enum: ["FailedToConstructDepositTx"]
2494+
failureReason:
2495+
type: string
24612496
- title: FailedToConstructRecoverTx
24622497
description: |
24632498
Raised if the user fails to draft a recover tx.

0 commit comments

Comments
 (0)