We are looking for a way of expressing the Hydra Head protocol logic in a Hydra node.
The Hydra Head protocol is defined as a State machine in the paper, whose transitions are inputs that come from different sources which can emit outputs to other instances of the state machine or the mainchain. See the FC2021 paper for details
It should also be easy to review / feed-back to researchers.
We have experienced benefits with Event Sourcing in the domain of persistence in the past
Implements the Hydra Head core logic as a loop that:
- Consumes input events from an event queue,
- Applies each event to the current state yielding potentially an updated state and a sequence of effects,
- Execute all effects.
The internal state is only ever changed through Events.
The core state machine transition function is pure and reviewing it requires minimal Haskell knowledge.
Side-effects are all handled at the level of the