Skip to content

Commit

Permalink
Merge pull request #1212 from input-output-hk/fix-reason-log-schema
Browse files Browse the repository at this point in the history
Fix logs and api schemas
  • Loading branch information
ffakenz committed Dec 14, 2023
2 parents b1ebfa5 + 34e2571 commit 99bf5cf
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
16 changes: 15 additions & 1 deletion hydra-node/json-schemas/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ components:
A unique seed identifier to create a 'HeadId', represented by a hex-encoded 16 bytes string.
contentEncoding: base16
example:
"820082582089ff4f3ff4a6052ec9d073"
"111206190b110f1417181e0120141e05"

HeadParameters:
type: object
Expand Down Expand Up @@ -1422,6 +1422,20 @@ components:
enum: ["InvalidSeed"]
headSeed:
$ref: "api.yaml#/components/schemas/HeadSeed"
- title: InvalidHeadId
description: |
Raised if the user fails to submit a commit tx using the wrong headId.
type: object
additionalProperties: false
required:
- tag
- headId
properties:
tag:
type: string
enum: ["InvalidHeadId"]
headSeed:
$ref: "api.yaml#/components/schemas/HeadId"
- title: FailedToConstructAbortTx
description: |
Raised if the user fails to submit an abort tx.
Expand Down
34 changes: 16 additions & 18 deletions hydra-node/json-schemas/logs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,7 @@ definitions:
required:
- localUTxO
- localTxs
- allTxs
- confirmedSnapshot
- seenSnapshot
properties:
Expand All @@ -1432,6 +1433,12 @@ definitions:
type: array
items:
$ref: "api.yaml#/components/schemas/Transaction"
allTxs:
type: object
propertyNames:
$ref: "api.yaml#/components/schemas/TxId"
items:
$ref: "api.yaml#/components/schemas/Transaction"
confirmedSnapshot:
$ref: "api.yaml#/components/schemas/ConfirmedSnapshot"
seenSnapshot:
Expand Down Expand Up @@ -1489,9 +1496,12 @@ definitions:
snapshot:
$ref: "api.yaml#/components/schemas/Snapshot"
signatories:
type: array
type: object
propertyNames:
type: string
contentEncoding: base16
items:
$ref: "api.yaml#/components/schemas/Party"
$ref: "api.yaml#/components/schemas/Signature"

Event:
description: >-
Expand Down Expand Up @@ -1558,18 +1568,6 @@ definitions:
enum: ["OnChainEvent"]
chainEvent:
$ref: "logs.yaml#/definitions/OnChainEvent"
- title: ShouldPostFanout
type: object
additionalProperties: false
required:
- tag
description: >-
An placeholder event denoting the Head should post a Fanout transaction
to finalize the head.
properties:
tag:
type: string
enum: ["ShouldPostFanout"]
- title: PostTxError
type: object
additionalProperties: false
Expand Down Expand Up @@ -2063,19 +2061,19 @@ definitions:
tag:
type: string
enum: ["WaitOnContestationDeadline"]
- title: WaitOnSeenTxs
- title: WaitOnTxs
description: >-
Some transactions from a proposed snapshot have not been seen yet
type: object
additionalProperties: false
required:
- tag
- unseenTxIds
- waitingForTxIds
properties:
tag:
type: string
enum: ["WaitOnSeenTxs"]
unseenTxIds:
enum: ["WaitOnTxs"]
waitingForTxIds:
type: array
items:
$ref: "api.yaml#/components/schemas/TxId"
Expand Down

0 comments on commit 99bf5cf

Please sign in to comment.