forked from cardano-scaling/hydra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogs.yaml
2211 lines (2163 loc) · 61.1 KB
/
logs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
"$id": https://raw.githubusercontent.com/input-output-hk/hydra/master/hydra-node/json-schemas/
"$schema": http://json-schema.org/draft/2020-12/schema
"$comment": A description of the log items produced by a Hydra node
title: Hydra Log API
description: >
This schema documents the structure of the Log items produced by a Hydra node
via its standard output stream. Items are emitted as individual JSON objects,
separated by a newline which makes it easy to ingest by thirdparty tools and
services.
type: object
additionalProperties: false
required:
- namespace
- timestamp
- threadId
- message
properties:
namespace:
type: string
description: >-
An arbitrary string identifying the tracer generating this entry. For a
node, this is always 'HydraNode'.
timestamp:
type: string
format: "date-time"
description: >-
Timestamp denoting the wall-clock time at which this log entry was
recorded.
threadId:
type: integer
description: >-
The id of the thread which produced the log entry.
message:
oneOf:
- title: APIServer
type: object
additionalProperties: false
required:
- tag
- api
description: >-
A log entry produced by the API server.
properties:
tag:
type: string
enum: ["APIServer"]
api:
$ref: "logs.yaml#/definitions/APIServer"
- title: Node
type: object
additionalProperties: false
required:
- tag
- node
description: >-
A log entry produced by the main loop in the node.
properties:
tag:
type: string
enum: ["Node"]
node:
$ref: "logs.yaml#/definitions/Node"
- title: DirectChain
type: object
additionalProperties: false
required:
- tag
- directChain
description: >-
A log entry produced by the chain component watching the chain.
properties:
tag:
type: string
enum: ["DirectChain"]
directChain:
$ref: "logs.yaml#/definitions/DirectChain"
- title: Network
type: object
additionalProperties: false
required:
- tag
- network
description: >-
A log entry from the Hydra network (i.e. the layer-two network between Hydra nodes).
properties:
tag:
type: string
enum: ["Network"]
network:
$ref: "logs.yaml#/definitions/Network"
- title: NodeOptions
description: >-
Hydra node parsed command line arguments
type: object
additionalProperties: false
required:
- tag
- runOptions
properties:
tag:
type: string
enum: ["NodeOptions"]
runOptions:
"$ref": "logs.yaml#/definitions/RunOptions"
description: >-
Configuration needed to run the hydra node
- title: Authentication
description: >-
Hydra node detected a difference between the signer and the sender
of an authenticated message over the network.
type: object
additionalProperties: false
required:
- tag
- authentication
properties:
tag:
type: string
enum: ["Authentication"]
authentication:
type: object
$ref: "logs.yaml#/definitions/AuthLog"
- title: Reliability
type: object
additionalProperties: false
required:
- tag
- reliability
description: >-
A log entry produced by Reliability network layer.
properties:
tag:
type: string
enum: ["Reliability"]
reliability:
$ref: "logs.yaml#/definitions/Reliability"
definitions:
APIServer:
oneOf:
- title: APIServerStarted
description: >-
API Server has started and is ready, listening for incoming client
connections on given port.
type: object
additionalProperties: false
required:
- tag
- listeningPort
properties:
tag:
type: string
enum: ["APIServerStarted"]
listeningPort:
type: integer
minimum: 0
maximum: 65535
- title: NewAPIConnection
description: >-
A new client has connected to the API Server.
additionalProperties: false
required:
- tag
properties:
tag:
type: string
enum: ["NewAPIConnection"]
- title: APIOutputSent
description: >-
Some output has been sent to a client.
additionalProperties: false
required:
- tag
- sentOutput
properties:
tag:
type: string
enum: ["APIOutputSent"]
sentOutput:
type: object
- title: APIInputReceived
description: >-
Some input has been received from a client.
additionalProperties: false
required:
- tag
- receivedInput
properties:
tag:
type: string
enum: ["APIInputReceived"]
receivedInput:
oneOf:
- type: "null"
- type: object
- title: APIInvalidInput
description: >-
Some input sent by a client is invalid.
additionalProperties: false
required:
- tag
- reason
- inputReceived
properties:
tag:
type: string
enum: ["APIInvalidInput"]
reason:
type: string
description: >-
A textual description of the reason why this input is invalid.
inputReceived:
type: string
description: >-
A rendering in text of the input received. This input is invalid
hence it's potentially invalid JSON so we just encode it as a proper
JSON string. Note that if the input contained invalid UTF-8
characters they will be ignored.
- title: APIConnectionError
description: >-
API returned a connection error.
additionalProperties: false
required:
- tag
- reason
properties:
tag:
type: string
enum: ["APIConnectionError"]
reason:
type: string
description: >-
A textual description of the reason why this input is invalid.
- title: APIHTTPRequestReceived
description: >-
An HTTP request has been received.
additionalProperties: false
required:
- tag
- method
- path
properties:
tag:
type: string
enum: ["APIHTTPRequestReceived"]
method:
type: string
path:
type: string
DirectChain:
oneOf:
- title: ToPost
description: >-
Head logic requests submission of a Head protocol transaction.
type: object
additionalProperties: false
required:
- tag
- toPost
properties:
tag:
type: string
enum: ["ToPost"]
toPost:
$ref: "api.yaml#/components/schemas/PostChainTx"
- title: PostingTx
description: >-
A transaction with given id is about to be submitted on-chain.
type: object
additionalProperties: false
required:
- tag
- txId
properties:
tag:
type: string
enum: ["PostingTx"]
txId:
$ref: "api.yaml#/components/schemas/TxId"
- title: PostedTx
description: >-
A transaction with given id has been successfully submitted to the chain.
type: object
additionalProperties: false
required:
- tag
- txId
properties:
tag:
type: string
enum: ["PostedTx"]
txId:
$ref: "api.yaml#/components/schemas/TxId"
- title: PostingFailed
description: >-
Submitting the transaction to the node failed
type: object
additionalProperties: false
required:
- tag
- tx
- postTxError
properties:
tag:
type: string
enum: ["PostingFailed"]
tx:
$ref: "api.yaml#/components/schemas/Transaction"
postTxError:
$ref: "api.yaml#/components/schemas/PostTxError"
- title: RolledForward
description: >-
Chain sync rolled forward by receiving a block with transactions.
type: object
additionalProperties: false
required:
- tag
- point
- receivedTxIds
properties:
tag:
type: string
enum: ["RolledForward"]
point:
$ref: "api.yaml#/components/schemas/ChainPoint"
receivedTxIds:
type: array
items:
$ref: "api.yaml#/components/schemas/TxId"
- title: RolledBackward
description: >-
Chain sync rolled backward to some point.
type: object
additionalProperties: false
required:
- tag
- point
properties:
tag:
type: string
enum: ["RolledBackward"]
point:
$ref: "api.yaml#/components/schemas/ChainPoint"
- title: Wallet
description: >-
Logs coming from the wallet.
type: object
additionalProperties: false
required:
- tag
- contents
properties:
tag:
type: string
enum: ["Wallet"]
contents:
$ref: "logs.yaml#/definitions/Wallet"
- title: SomeHeadObserved
description: >-
Some Head initialisation transactions has been observed
on-chain but this node's configured head does not match it.
type: object
additionalProperties: false
required:
- tag
- headId
- pubKeyHashes
properties:
tag:
type: string
enum: ["SomeHeadObserved"]
headId:
$ref: "logs.yaml#/definitions/HeadId"
pubKeyHashes:
type: array
items:
type: string
contentEncoding: base16
description: >-
Hex-encoded hash of the public Cardano keys of the
Head participants.
Wallet:
oneOf:
- title: BeginInitialize
description: >-
The wallet is asked to (re-)initialize and fetch latest information
from the cardano-node.
type: object
additionalProperties: false
required:
- tag
properties:
tag:
type: string
enum: ["BeginInitialize"]
- title: EndInitialize
description: >-
The wallet has been initialized with these UTxOs and will skip blocks
until reaching the tip.
type: object
additionalProperties: false
required:
- tag
- initialUTxO
- tip
properties:
tag:
type: string
enum: ["EndInitialize"]
initialUTxO:
$ref: "api.yaml#/components/schemas/UTxO"
tip:
$ref: "api.yaml#/components/schemas/ChainPoint"
- title: BeginUpdate
description: >-
The wallet has been given a new block to update it's state.
additionalProperties: false
required:
- tag
- point
properties:
tag:
type: string
enum: ["BeginUpdate"]
point:
$ref: "api.yaml#/components/schemas/ChainPoint"
- title: EndUpdate
description: >-
The wallet updated it's state by applying a block resulting in given
UTxOs.
additionalProperties: false
required:
- tag
- newUTxO
properties:
tag:
type: string
enum: ["EndUpdate"]
newUTxO:
$ref: "api.yaml#/components/schemas/UTxO"
- title: SkipUpdate
description: >-
The wallet has been given a block behind it's last known tip and skips
the internal update of UTxOs.
additionalProperties: false
required:
- tag
- point
properties:
tag:
type: string
enum: ["SkipUpdate"]
point:
$ref: "api.yaml#/components/schemas/ChainPoint"
Reliability:
oneOf:
- title: Resending
description: >-
Resending missed messages. If the party detects that the vector clock for some other party is lagging behind it will try to resend messages.
type: object
additionalProperties: false
required:
- tag
- missing
- acknowledged
- localCounter
- theirIndex
properties:
tag:
type: string
enum: ["Resending"]
missing:
type: array
items:
type: number
acknowledged:
type: array
items:
type: number
localCounter:
type: array
items:
type: number
theirIndex:
type: number
- title: BroadcastCounter
description: >-
Logged when broadcasting messages from the Reliability layer.
type: object
additionalProperties: false
required:
- tag
- ourIndex
- localCounter
properties:
tag:
type: string
enum: ["BroadcastCounter"]
ourIndex:
type: number
localCounter:
type: array
items:
type: number
- title: BroadcastPing
description: >-
Logged when broadcasting a Ping, which does not update the known message Ids
type: object
additionalProperties: false
required:
- tag
- ourIndex
- localCounter
properties:
tag:
type: string
enum: ["BroadcastPing"]
ourIndex:
type: number
localCounter:
type: array
items:
type: number
- title: Received
description: >-
Logged only when the party receives a message and it is valid to to issue a callback.
type: object
additionalProperties: false
required:
- tag
- acknowledged
- localCounter
- theirIndex
- ourIndex
properties:
tag:
type: string
enum: ["Received"]
acknowledged:
type: array
items:
type: number
localCounter:
type: array
items:
type: number
theirIndex:
type: number
ourIndex:
type: number
- title: ClearedMessageQueue
description: >-
Logged when it is safe to delete some of the local messages.
type: object
additionalProperties: false
required:
- tag
- messageQueueLength
- deletedMessage
properties:
tag:
type: string
enum: ["ClearedMessageQueue"]
messageQueueLength:
type: number
deletedMessage:
type: number
- title: Ignored
description: >-
Logged when node ignores the callback in case of Ping messages.
type: object
additionalProperties: false
required:
- tag
- acknowledged
- localCounter
- theirIndex
- ourIndex
properties:
tag:
type: string
enum: ["Ignored"]
acknowledged:
type: array
items:
type: number
localCounter:
type: array
items:
type: number
theirIndex:
type: number
ourIndex:
type: number
- title: ReliabilityFailedToFindMsg
description: >-
Logged when the message we want to resend was not found in the local messages.
type: object
additionalProperties: false
required:
- tag
- missingMsgIndex
- sentMessagesLength
- knownAckForUs
- messageAckForUs
properties:
tag:
type: string
enum: ["ReliabilityFailedToFindMsg"]
missingMsgIndex:
type: number
sentMessagesLength:
type: number
knownAckForUs:
type: number
messageAckForUs:
type: number
- title: ReliabilityMissingPartyIndex
description: >-
Logged when party index could not be found. NOTE: This should never happen.
type: object
additionalProperties: false
required:
- tag
- missingParty
properties:
tag:
type: string
enum: ["ReliabilityMissingPartyIndex"]
missingParty:
$ref: "api.yaml#/components/schemas/Party"
- title: ReceivedMalformedAcks
description: >-
Logged when we receive a message from a party but its vector clock is malformed (not having the same length as the number of parties in a Head)
type: object
additionalProperties: false
required:
- tag
- fromParty
- partyAcks
- numberOfParties
properties:
tag:
type: string
enum: ["ReceivedMalformedAcks"]
fromParty:
$ref: "api.yaml#/components/schemas/Party"
partyAcks:
type: array
items:
type: number
numberOfParties:
type: number
# NOTE: We cannot simply describe 'ServerOutput' and re-use it in api.yaml, so
# we opted to not detail this section here. The outputs documented in api.yaml
# are based on internal type 'TimeServerOutput', so basically just contain an
# adtitional 'timestamp' and 'seq'.
ServerOutput: {}
ParamMismatch:
oneOf:
- title: ContestationPeriodMismatch
description: >-
The configured contestation period does not match with the value from the loaded state.
type: object
additionalProperties: false
required:
- tag
- loadedCp
- configuredCp
properties:
tag:
type: string
enum: ["ContestationPeriodMismatch"]
loadedCp:
"$ref": "api.yaml#/components/schemas/ContestationPeriod"
description: >-
Contestation period present in the node state.
configuredCp:
"$ref": "api.yaml#/components/schemas/ContestationPeriod"
description: >-
Contestation period configured as the node argument.
- title: PartiesMismatch
description: >-
The configured parties do not match with the value from the loaded state.
type: object
additionalProperties: false
required:
- tag
- loadedParties
- configuredParties
properties:
tag:
type: string
enum: ["PartiesMismatch"]
loadedParties:
type: array
items:
"$ref": "api.yaml#/components/schemas/Party"
description: >-
Parties present in the node state.
configuredParties:
type: array
items:
"$ref": "api.yaml#/components/schemas/Party"
description: >-
Parties configured as the node argument.
- title: SavedNetworkPartiesInconsistent
description: >-
The configured peer list does not match with the value from the loaded state.
type: object
additionalProperties: false
required:
- tag
- numberOfParties
properties:
tag:
type: string
enum: ["SavedNetworkPartiesInconsistent"]
numberOfParties:
type: number
description: >-
Number of parties configured as the node argument.
# TODO: Fill the gap!
Network: {}
Node:
oneOf:
- title: BeginInput
description: >-
Head has started processing an input from the chain, network, or client.
type: object
additionalProperties: false
required:
- tag
- by
- inputId
- input
properties:
tag:
type: string
enum: ["BeginInput"]
by:
"$ref": "api.yaml#/components/schemas/Party"
description: >-
The Party emitting the log entry.
inputId:
type: integer
minimum: 0
description: >-
Provides a unique, incremental, number identifying that input
within the stream of inputs. This is useful to correlate with
`EndInput`.
input:
"$ref": "logs.yaml#/definitions/Input"
- title: EndInput
description: >-
Head has finished processing an input.
type: object
additionalProperties: false
required:
- tag
- by
- inputId
properties:
tag:
type: string
enum: ["EndInput"]
by:
"$ref": "api.yaml#/components/schemas/Party"
description: >-
The Party emitting the log entry.
inputId:
type: integer
minimum: 0
- title: BeginEffect
description: >-
Head has started processing an effect produced by some transition in the
protocol.
type: object
additionalProperties: false
required:
- tag
- by
- inputId
- effectId
- effect
properties:
tag:
type: string
enum: ["BeginEffect"]
by:
"$ref": "api.yaml#/components/schemas/Party"
description: >-
The Party emitting the log entry.
inputId:
type: integer
minimum: 0
description: >-
Provides a unique, incremental, number identifying which input
within the stream of inputs from this node this effect is a
consequence of. This number can be used to correlate `EndEffect`
entries.
effectId:
type: integer
minimum: 0
description: >-
Provides a unique, monotonically increasing index for this effect
within the span of a specific `inputId`. This number along with
the `inputId` field is used to correlate the beginning and end of
an effect.
effect:
$ref: "logs.yaml#/definitions/Effect"
- title: EndEffect
description: >-
Head has finished processing an effect produced by some transition in
the protocol.
type: object
additionalProperties: false
required:
- tag
- by
- inputId
- effectId
properties:
tag:
type: string
enum: ["EndEffect"]
by:
"$ref": "api.yaml#/components/schemas/Party"
description: >-
The Party emitting the log entry.
inputId:
type: integer
minimum: 0
effectId:
type: integer
minimum: 0
- title: LogicOutcome
description: >-
An outcome produced is a decision the node took after processing an input.
type: object
additionalProperties: false
required:
- tag
- by
- outcome
properties:
tag:
type: string
enum: ["LogicOutcome"]
by:
"$ref": "api.yaml#/components/schemas/Party"
description: >-
The Party emitting the log entry.
outcome:
$ref: "logs.yaml#/definitions/Outcome"
- title: DroppedFromQueue
description: >-
An input event has been dropped from the input queue as its
time-to-live ran out.
type: object
additionalProperties: false
required:
- tag
- inputId
- input
properties:
tag:
type: string
enum: ["DroppedFromQueue"]
inputId:
type: integer
minimum: 0
input:
"$ref": "logs.yaml#/definitions/Input"
- title: LoadedState
description: >-
Loaded state events from persistence.
type: object
additionalProperties: false
required:
- tag
- numberOfEvents
properties:
tag:
type: string
enum: ["LoadedState"]
numberOfEvents:
type: integer
minimum: 0
- title: Misconfiguration
description: >-
Hydra node detected a difference between loaded state and the node arguments.
type: object
additionalProperties: false
required:
- tag
- misconfigurationErrors
properties:
tag:
type: string
enum: ["Misconfiguration"]
misconfigurationErrors:
type: array
items:
$ref: "logs.yaml#/definitions/ParamMismatch"
LogicError:
oneOf:
- title: UnhandledInput
additionalProperties: false
required:
- tag
- input
- currentHeadState
properties:
tag:
type: string
enum: ["UnhandledInput"]
input:
$ref: "logs.yaml#/definitions/Input"
currentHeadState:
$ref: "logs.yaml#/definitions/HeadState"
- 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
- requirementFailure
properties:
tag:
type: string
enum: ["RequireFailed"]
requirementFailure:
$ref: "logs.yaml#/definitions/RequirementFailure"
- title: NotOurHead
description: >-
We just observed an on-chain event that does not apply to
our head so we will simply ignore it. This could sometime
happen if the hydra-node is started from an old L1 chain
point and observes a previous head that we are not
interested into anymore.
additionalProperties: false
required:
- tag
- ourHeadId
- otherHeadId
properties:
tag:
type: string
enum: ["NotOurHead"]
ourHeadId:
$ref: "api.yaml#/components/schemas/HeadId"
otherHeadId:
$ref: "api.yaml#/components/schemas/HeadId"
ValidationError:
type: object
additionalProperties: false
required:
- reason
properties:
reason:
type: string
RequirementFailure:
oneOf:
- title: "ReqSnNumberInvalid"
description: >-
Received ReqSn containing an invalid snapshot number
additionalProperties: false