Commit cc5e1c0
authored
Enhance start up logs (#2486)
<!-- Describe your change here -->
Closes #2483
🔑 Motivation
Improve node observability by introducing structured lifecycle and
sync-status logs.
These logs make startup, hydration, and sync transitions explicit, and
provide better insight into drift before going out of sync.
Overall, this PR makes node startup phases and sync health easier to
trace and reason about, while reducing noise when fully in sync.
> This PR also fixes the smoke tests by allowing enough time (depending
on the actual chain backend used during tests) to observe the node
becoming `InSync` before starting the scenario.
🔄 Changes
**New Logs Introduced**
* `LoadedChainState`
Emitted during hydration with the last known chain point loaded into
`chainStateHistory`.
* `NodeHydrated`
Emitted once node hydration completes.
* `StartingDecision`
Emitted by the chain layer to report the first chain point used as
prefix when selecting an intersection during chain-sync.
* `ChainBackendStarted`
Emitted after successfully establishing the chain layer connection.
* `NetworkStarted`
Emitted after successfully establishing the network layer connection.
* `EnteringMainloop`
Emitted right before starting the `runHydraNode` main loop.
* `SyncedStatusReport`
Emitted:
* On every tick while `CatchingUp`
* On every tick when drift exceeds 80% of the unsynced policy while
`InSync`
---
<!-- Consider each and tick it off one way or the other -->
* [x] CHANGELOG updated or not needed
* [x] Documentation updated or not needed
* [x] Haddocks updated or not needed
* [x] No new TODOs introduced or explained herafterFile tree
17 files changed
+238
-158
lines changed- hydra-cluster
- bench/Bench
- src
- Hydra/Cluster
- test/Test
- Hydra/Cluster
- hydra-node
- json-schemas
- src/Hydra
- API
- Chain
- Direct
- Logging
- Node
- test/Hydra
- hydra-tui/test/Hydra
- visualize-logs/src
17 files changed
+238
-158
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
| 86 | + | |
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
| |||
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
297 | | - | |
| 298 | + | |
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
| |||
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
| 336 | + | |
335 | 337 | | |
336 | 338 | | |
337 | 339 | | |
| |||
438 | 440 | | |
439 | 441 | | |
440 | 442 | | |
| 443 | + | |
441 | 444 | | |
442 | 445 | | |
443 | 446 | | |
444 | 447 | | |
445 | 448 | | |
446 | | - | |
447 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
448 | 452 | | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
453 | 456 | | |
454 | 457 | | |
455 | 458 | | |
| |||
496 | 499 | | |
497 | 500 | | |
498 | 501 | | |
| 502 | + | |
499 | 503 | | |
500 | 504 | | |
501 | 505 | | |
| |||
504 | 508 | | |
505 | 509 | | |
506 | 510 | | |
507 | | - | |
| 511 | + | |
508 | 512 | | |
509 | | - | |
| 513 | + | |
510 | 514 | | |
511 | 515 | | |
512 | 516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
0 commit comments