Skip to content

Commit

Permalink
Tackle logs and api schema changes, some field renaming
Browse files Browse the repository at this point in the history
Signed-off-by: Sasha Bogicevic <[email protected]>
  • Loading branch information
v0d1ch committed Feb 11, 2025
1 parent c241162 commit df99bee
Show file tree
Hide file tree
Showing 20 changed files with 245 additions and 379 deletions.
6 changes: 3 additions & 3 deletions hydra-node/golden/StateChanged/HeadIsOpen.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,8 @@
}
},
"headId": "acb1a9e7d314614f7fdef54bc958e85f",
"initialUTxO": {
"tag": "HeadIsOpen",
"utxo": {
"0a445887fa21c14ea14cd20a1011c8f40755085e69137fd71acffcabd104c7c6#43": {
"address": "addr1qx3ym32jgwgs207ax2vkwqrf4hd8apehdpwsrlu57su2w9f8zlkxf8mdcdar3uqp85w67uxwfshhm0mr85w9m2hkyx9smcg53p",
"datum": null,
Expand Down Expand Up @@ -782,8 +783,7 @@
"lovelace": 9124154808975915914
}
}
},
"tag": "HeadIsOpen"
}
}
],
"seed": -2113261908
Expand Down
11 changes: 6 additions & 5 deletions hydra-node/golden/StateChanged/TxValid.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions hydra-node/golden/StateEvent (Tx ConwayEra).json

Large diffs are not rendered by default.

178 changes: 176 additions & 2 deletions hydra-node/json-schemas/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ components:
#######

schemas:
ServerOutput:
StateChanged:
oneOf:
- $ref: "api.yaml#/components/schemas/Greetings"
- $ref: "api.yaml#/components/schemas/PeerConnected"
Expand All @@ -728,6 +728,7 @@ components:
- $ref: "api.yaml#/components/schemas/CommandFailed"
- $ref: "api.yaml#/components/schemas/IgnoredHeadInitializing"
- $ref: "api.yaml#/components/schemas/DecommitInvalid"
- $ref: "api.yaml#/components/schemas/DecommitRecorded"
- $ref: "api.yaml#/components/schemas/DecommitRequested"
- $ref: "api.yaml#/components/schemas/DecommitApproved"
- $ref: "api.yaml#/components/schemas/DecommitFinalized"
Expand All @@ -736,6 +737,13 @@ components:
- $ref: "api.yaml#/components/schemas/CommitFinalized"
- $ref: "api.yaml#/components/schemas/CommitRecovered"
- $ref: "api.yaml#/components/schemas/CommitIgnored"
- $ref: "api.yaml#/components/schemas/SnapshotRequested"
- $ref: "api.yaml#/components/schemas/SnapshotRequestDecided"
- $ref: "api.yaml#/components/schemas/TransactionReceived"
- $ref: "api.yaml#/components/schemas/TickObserved"
- $ref: "api.yaml#/components/schemas/PartySignedSnapshot"
- $ref: "api.yaml#/components/schemas/ChainRolledBack"


Greetings:
type: object
Expand Down Expand Up @@ -833,6 +841,8 @@ components:
- tag
- headId
- parties
- parameters
- chainState
- seq
- timestamp
properties:
Expand All @@ -845,6 +855,10 @@ components:
type: array
items:
$ref: "api.yaml#/components/schemas/Party"
parameters:
$ref: "api.yaml#/components/schemas/HeadParameters"
chainState:
type: object
seq:
$ref: "api.yaml#/components/schemas/SequenceNumber"
timestamp:
Expand Down Expand Up @@ -964,6 +978,7 @@ components:
- tag
- headId
- utxo
- chainState
- seq
- timestamp
properties:
Expand All @@ -974,6 +989,8 @@ components:
$ref: "api.yaml#/components/schemas/HeadId"
utxo:
$ref: "api.yaml#/components/schemas/UTxO"
chainState:
type: object
seq:
$ref: "api.yaml#/components/schemas/SequenceNumber"
timestamp:
Expand Down Expand Up @@ -1007,6 +1024,7 @@ components:
- headId
- transactionId
- transaction
- newLocalUTxO
- seq
- timestamp
properties:
Expand All @@ -1019,6 +1037,26 @@ components:
$ref: "api.yaml#/components/schemas/TxId"
transaction:
$ref: "api.yaml#/components/schemas/Transaction"
newLocalUTxO:
$ref: "api.yaml#/components/schemas/UTxO"
seq:
$ref: "api.yaml#/components/schemas/SequenceNumber"
timestamp:
$ref: "api.yaml#/components/schemas/UTCTime"

TransactionReceived:
type: object
required:
- tag
- tx
- seq
- timestamp
properties:
tag:
type: string
enum: ["TransactionReceived"]
tx:
$ref: "api.yaml#/components/schemas/Transaction"
seq:
$ref: "api.yaml#/components/schemas/SequenceNumber"
timestamp:
Expand Down Expand Up @@ -1054,6 +1092,79 @@ components:
timestamp:
$ref: "api.yaml#/components/schemas/UTCTime"

SnapshotRequested:
type: object
required:
- tag
- snapshot
- requestedTxIds
- newLocalUTxO
- newLocalTxs
- seq
- timestamp
properties:
tag:
type: string
enum: ["SnapshotRequested"]
snapshot:
$ref: "api.yaml#/components/schemas/Snapshot"
requestedTxIds:
type: array
items:
$ref: "api.yaml#/components/schemas/TxId"
newLocalUTxO:
$ref: "api.yaml#/components/schemas/UTxO"
newLocalTxs:
type: array
items:
$ref: "api.yaml#/components/schemas/Transaction"
seq:
$ref: "api.yaml#/components/schemas/SequenceNumber"
timestamp:
$ref: "api.yaml#/components/schemas/UTCTime"

SnapshotRequestDecided:
type: object
required:
- tag
- snapshotNumber
- seq
- timestamp
properties:
tag:
type: string
enum: ["SnapshotRequestDecided"]
snapshotNumber:
$ref: "api.yaml#/components/schemas/SnapshotNumber"
seq:
$ref: "api.yaml#/components/schemas/SequenceNumber"
timestamp:
$ref: "api.yaml#/components/schemas/UTCTime"

PartySignedSnapshot:
type: object
required:
- tag
- snapshot
- party
- signature
- seq
- timestamp
properties:
tag:
type: string
enum: ["PartySignedSnapshot"]
snapshot:
$ref: "api.yaml#/components/schemas/Snapshot"
party:
$ref: "api.yaml#/components/schemas/Party"
signature:
$ref: "api.yaml#/components/schemas/Signature"
seq:
$ref: "api.yaml#/components/schemas/SequenceNumber"
timestamp:
$ref: "api.yaml#/components/schemas/UTCTime"

SnapshotConfirmed:
type: object
required:
Expand Down Expand Up @@ -1166,6 +1277,41 @@ components:
timestamp:
$ref: "api.yaml#/components/schemas/UTCTime"

TickObserved:
type: object
required:
- tag
- chainSlot
- seq
- timestamp
properties:
tag:
type: string
enum: ["TickObserved"]
chainSlot:
$ref: "api.yaml#/components/schemas/ChainSlot"
seq:
$ref: "api.yaml#/components/schemas/SequenceNumber"
timestamp:
$ref: "api.yaml#/components/schemas/UTCTime"

ChainRolledBack:
type: object
required:
- tag
- chainState
- seq
- timestamp
properties:
tag:
type: string
enum: ["ChainRolledBack"]
chainState:
type: object
seq:
$ref: "api.yaml#/components/schemas/SequenceNumber"
timestamp:
$ref: "api.yaml#/components/schemas/UTCTime"
IgnoredHeadInitializing:
type: object
required:
Expand Down Expand Up @@ -1279,6 +1425,28 @@ components:
timestamp:
$ref: "api.yaml#/components/schemas/UTCTime"

DecommitRecorded:
type: object
required:
- tag
- decommitTx
- newLocalUTxO
- seq
- timestamp
properties:
tag:
type: string
enum: ["DecommitRecorded"]
decommitTx:
type: object
$ref: "api.yaml#/components/schemas/Transaction"
newLocalUTxO:
$ref: "api.yaml#/components/schemas/UTxO"
seq:
$ref: "api.yaml#/components/schemas/SequenceNumber"
timestamp:
$ref: "api.yaml#/components/schemas/UTCTime"

DecommitApproved:
title: DecommitApproved
description: |
Expand Down Expand Up @@ -1317,6 +1485,7 @@ components:
- tag
- headId
- decommitTxId
- newVersion
- seq
- timestamp
properties:
Expand All @@ -1327,6 +1496,9 @@ components:
$ref: "api.yaml#/components/schemas/HeadId"
decommitTxId:
$ref: "api.yaml#/components/schemas/TxId"
newVersion:
type: integer
minimum: 0
seq:
$ref: "api.yaml#/components/schemas/SequenceNumber"
timestamp:
Expand Down Expand Up @@ -2094,7 +2266,7 @@ components:
type: string
enum: ["InvalidStateToPost"]
chainState:
$ref: "api.yaml#/components/schemas/ChainState"
type: object
txTried:
$ref: "api.yaml#/components/schemas/PostChainTx"
- title: PlutusValidationFailed
Expand Down Expand Up @@ -2306,6 +2478,8 @@ components:
- headId
- number
- utxo
- utxoToCommit
- utxoToDecommit
- confirmed
- version
properties:
Expand Down
Loading

0 comments on commit df99bee

Please sign in to comment.