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
<!-- Describe your change here -->
🔑 **Motivation**
> Closes#1812
Pending deposits are currently only tracked in the `Open` state.
This prevents clients from recovering funds through their running node
once the head transitions into later states such as `Closed` or after
`Fanout`.
As a result, users are forced to build and submit recovery transactions
manually, which is error-prone and inconvenient.
To improve usability, deposit recovery should be possible through the
API regardless of the current state of the Hydra head.
🔄 **Breaking Changes**
* `HeadState` no longer tracks pending deposits or the current chain
slot.
These are now part of the newly introduced node-level `NodeState`.
This refactor also opens the door to moving `ChainState` out of
`HeadState`, as noted in [this
TODO](https://github.com/cardano-scaling/hydra/blob/3dffe727ea31d908e4516f37447385fe50051578/hydra-node/src/Hydra/HeadLogic/State.hs#L39).
* The `Checkpoint` event, and consequently the `EventLogRotated` server
output, now carry the full `NodeState` instead of just the `HeadState`.
This enables clients (e.g. the TUI) to fully recover after event-log
rotation.
📝 **Notes**
* Deposits are still only **recorded, activated, and expired** while the
head is `Open`, so recovery is limited to deposits observed in
previously opened heads.
* `HeadLogic` now aggregates events in two phases:
1. Head-level
2. Node-level
> _This introduces a dependency between the two update steps: the
correctness of the node-level state update relies on the head-level
state update. Any bug or inconsistency in the head-level update will
cascade into the node-level view._
---
<!-- 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
0 commit comments