You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Report drift on "how out of sync" the node is (#2453)
<!-- Describe your change here -->
Follow-up on #2290
π **Motivation**
> Closes#2393
When the node is catching up with the chain, it may reject client inputs
with a generic βchain out of syncβ message.
While technically correct, this message provides no indication of **how
far** the node is behind, nor how long a client might need to wait
before it becomes usable again.
Hydra nodes previously tracked only the latest observed slot, without
the corresponding chain time.
As a result, it was not possible to compute or expose the drift between
wall-clock time and the chain's current time, limiting observability and
client feedback.
Our goal is to improve the client-facing diagnostics and observability,
so external systems (like TUI) can now make more informed decisions
based on the reported drift.
π **Changes**
* `NodeSynced` and `NodeUnsynced` state-changed events, and their
corresponding server outputs, now carry the observed `chainTime` and the
measured `drift` in seconds.
* The `NodeState` now tracks the **current chain time** (`UTCTime`)
alongside the current slot and its drift.
* Rejected client inputs during catch-up now include the **computed
drift** in the error message, e.g.:
```
chain out of sync, drift: <duration>
```
---
<!-- 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 herafter
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ changes.
16
16
17
17
-**BREAKING** A Hydra node will now start rejecting both network and client inputs once its view of the chain has been out of sync for more than 50% of the configured `--contestation-period`, based on **system wall-clock time**.
18
18
- Added `NodeUnsynced` and `NodeSynced` state events and server outputs.
- The `Checkpoint` event, and consequently the `EventLogRotated` server output, now carry the different `NodeState` variants: `NodeInSync` or `NodeCatchingUp`.
21
21
-`Greetings` message now also contains the hydra-node synced status to the chain backend.
22
22
- See [Issue #2286](https://github.com/cardano-scaling/hydra/issues/2286) and [PR #2290](https://github.com/cardano-scaling/hydra/pull/2290).
@@ -43,6 +43,12 @@ changes.
43
43
-`POST /snapshot` now returns the specific side-load validation failure instead of timing out [#2462](https://github.com/cardano-scaling/hydra/issues/2462).
44
44
- Fixed the internal wallet fee estimation, which was more often than not using maximum plutus execution units. This reduces costs for initializing, open, etc. of a head by a factor of ~4x [#2473](https://github.com/cardano-scaling/hydra/pull/2473).
45
45
- Fixed another race-condition around incremental commits/decommits [#2500](https://github.com/cardano-scaling/hydra/issues/2500)
46
+
-**BREAKING** Improved reporting of chain synchronization status by exposing the node's chain time and drift.
47
+
-`NodeSynced` and `NodeUnsynced` state-changed events, and their corresponding server outputs, now include the observed chain time and drift.
48
+
-`NodeState` now tracks the latest observed chan slot in addition to the chain time (`UTCTime`) and its drift measured in seconds.
49
+
- The `EventLogRotated` and `Checkpoint` state-changed event schemas have been updated accordingly.
50
+
- Client inputs rejected in `HeadLogic` (via `RejectedInputBecauseUnsynced`) during catch-up now report how far the node is out of sync (drift).
51
+
- See [Issue #2393](https://github.com/cardano-scaling/hydra/issues/2393).
0 commit comments