hydra
hydra copied to clipboard
Head in Head
Why
When a Hydra head is opened, a part of the underlying ledger state gets locked up and made available off-chain to a small group of participants. While this is already quite a "small world" to process transactions, we encountered use cases where it would make sense to even open further heads with different/even smaller groups of participants on parts of the L2 state into L3 heads. Hydra doom is one of those use cases where fragmentation of ledger state is not a problem as the Head ledger is merely used to off-chain check transactions of game sessions.
There are still some liveness caveats about opening a Head in another head, but this would not be scope of this feature.
What
This is a follow-up to a previous spike #1590
- The
hydra-nodecan be pointed to anotherhydra-nodeAPI endpoint instead of--node-socketof a directly connectedcardano-node- Observe Hydra protocol transactions from
SnapshotConfirmedserver outputs of the underlying node - Evolve current slot of the L3 ledger state based on a new server output sent by the underlying node
- Create and send Hydra protocol transactions to the underlying node, e.g. to initialize, close or fanout a head
- Observe Hydra protocol transactions from
- The
hydra-tuican commit into such a head by using thehydra-nodeAPI of the underlying node. - A head in a head can be opened in a similar sequence way like this: https://github.com/cardano-scaling/hydra/issues/1590#issuecomment-2334402926
How
- [ ] Map out components/modules and how they should be reused/reorganised across chain backends (see also https://github.com/cardano-scaling/hydra/issues/1305 ).
- [ ] Add a new
Tickserver output to inform clients of time evolution- This could be problematic through an ever growing server output history, see also #1581
- [ ]
SnapshotConfirmedcontains fullconfirmedtransactions, whileTxValidonly contains atxId#1685 - [ ] Create a
hydra-clientpackage that allows for- easy fetching of
/protocol-parameters,/snapshot/utxousing Haskell types - open a websocket and with it: submit
ClientInputmessages, receive and subscribe to someServerOutputmessages
- easy fetching of
- [ ] Make script publishing independent of
Hydra.Chain.Direct(see early commits of #1603) - [ ] Implement a new
Hydra.Chain.Inceptioncomponent that useshydra-client- Make
prepareTxToPostre-usable by generalizing concepts likeChainContext,ScriptRegistryandTimeHandleto work for both,DirectandInception(cardano) chain backends- This could mean that we unify the concept of
IsChainTx(or so) which is instantiated usinghydra-txtx construction for CardanoTx
- This could mean that we unify the concept of
- Re-organize
Hydra.Optionsto be able to re-use--hydra-scripts-tx-id,--cardano-signing-keyetc. betweenDirectandInceptionchain backends
- Make
TBD
- [ ] We had a
Tickserver output at some point - what happened?- [ ] We should add this to the website (leads to more history growth) ; see #1618
- [ ] Is including full txs in
SnapshotConfirmedfine? We moved away from it when we also did #728 - [ ] Instead of submitting through the websocket
NewTx, we could create a synchronous tx submission API.- This was also wished by @Quantumplation in
hydra-doom
- This was also wished by @Quantumplation in
- [ ] What should happen with
/POST/cardano-transactionsendpoint on an inception node? (i.e. if it can't send a tx to L1 at all) - [ ] What happens if the L2 hydra-node disconnects from L3 hydra-node; how should it catch up? Can it catch up? For any L3 Head closures on L2 Idea: Use the API history?