Skip to content

Commit

Permalink
Add schema for new possible errors
Browse files Browse the repository at this point in the history
  • Loading branch information
abailly-iohk committed May 30, 2023
1 parent 39aa1e2 commit 74488b3
Showing 1 changed file with 95 additions and 1 deletion.
96 changes: 95 additions & 1 deletion hydra-node/json-schemas/logs.yaml
Expand Up @@ -651,6 +651,13 @@ definitions:
contents:
$ref: "#/definitions/ValidationError"
- title: RequireFailed
description: >-
A precondition for some state transition within the Hydra
Head state-machine failed, providing more details in the
'contents' field. Please note each possible precondition
failure is tied to some specific 'require p' expression in
the specification (check
https://hydra.family/head-protocol/core-concepts/specification).
additionalProperties: false
required:
- tag
Expand All @@ -660,7 +667,7 @@ definitions:
type: string
enum: ["RequireFailed"]
contents:
type: string
$ref: "#/definitions/RequirementFailure"

ValidationError:
type: object
Expand All @@ -671,6 +678,93 @@ definitions:
reason:
type: string

RequirementFailure:
oneOf:
- title: "ReqSnNumberInvalid"
description: >-
Received ReqSn containing an invalid snapshot number
additionalProperties: false
required:
- tag
- requestedSn
- lastSeenSn
properties:
tag:
type: string
enum: ["ReqSnNumberInvalid"]
requestedSn:
$ref: "api.yaml#/components/schemas/SnapshotNumber"
lastSeenSn:
$ref: "api.yaml#/components/schemas/SnapshotNumber"
- title: "ReqSnNotLeader"
description: >-
Received a ReqSn message from some party which is not the leader.
additionalProperties: false
required:
- tag
- requestedSn
- leader
properties:
tag:
type: string
enum: ["ReqSnNotLeader"]
requestedSn:
$ref: "api.yaml#/components/schemas/SnapshotNumber"
leader:
$ref: "api.yaml#/components/schemas/Party"
- title: "InvalidMultisignature"
description: >-
Multisignature computed for a snapshot from individual parties signature is invalid.
additionalProperties: false
required:
- tag
- multisig
- vkeys
properties:
tag:
type: string
enum: ["InvalidMultisignature"]
multisig:
type: string
vkeys:
type: array
items:
type: string
- title: "SnapshotAlreadySigned"
description: >-
Received an AckSn from a party that already signed this particular snapshot.
additionalProperties: false
required:
- tag
- knownSignatures
- receivedSignature
properties:
tag:
type: string
enum: ["SnapshotAlreadySigned"]
knownSignatures:
type: array
items:
$ref: "api.yaml#/components/schemas/Party"
receivedSignature:
$ref: "api.yaml#/components/schemas/Party"
- title: "AckSnNumberInvalid"
description: >-
Received an AckSn for an invalid snapshot number.
additionalProperties: false
required:
- tag
- requestedSn
- lastSeenSn
properties:
tag:
type: string
enum: ["AckSnNumberInvalid"]
requestedSn:
$ref: "api.yaml#/components/schemas/SnapshotNumber"
lastSeenSn:
$ref: "api.yaml#/components/schemas/SnapshotNumber"

HeadState:
oneOf:
- title: "Idle"
Expand Down

0 comments on commit 74488b3

Please sign in to comment.