Skip to content

Commit

Permalink
Update docs/adr/2022-03-23_018-single-state.md
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Benkort <[email protected]>
  • Loading branch information
ch1bo and KtorZ authored Apr 13, 2022
1 parent 6d12398 commit 0bf208e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/adr/2022-03-23_018-single-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Draft
* Given by the usage sites above, the `Hydra.Chain.Direct` module requires additional info to do both, construct protocol transactions with `postTx` as well as observe potential `OnChainTx` ([here](https://github.com/input-output-hk/hydra-poc/blob/a98e2907c4e425de2736782793383aad63132c14/hydra-node/src/Hydra/Chain/Direct.hs#L333-L336)). Hence we see that, operation of the `Hydra.Chain.Direct` component (and likely any implementing the interface fully) is **inherently stateful**.
* We are looking at upcoming features to [handle rollbacks](https://github.com/input-output-hk/hydra-poc/issues/185) and dealing with [persisting the head state](https://github.com/input-output-hk/hydra-poc/issues/187).
- Both could benefit from the idea, that the `HeadState` is just a result of pure `Event` processing (a.k.a event sourcing).
- Right now the `HeadState` kept in `Hydra.Node` alone, is not enough to do fully describe the state of the `hydra-node`. Hence it would not be enough to just persist all the `Event`s and replaying them to achieve persistence, nor resetting to some previous `HeadState` in the presence of a rollback.
- Right now the `HeadState` kept in `Hydra.Node` alone, is not enough to fully describe the state of the `hydra-node`. Hence it would not be enough to just persist all the `Event`s and replaying them to achieve persistence, nor resetting to some previous `HeadState` in the presence of a rollback.

## Decision

Expand Down

0 comments on commit 0bf208e

Please sign in to comment.