Offline mode
ch1bo opened this issue · comments
Sebastian Nagel commented
Why
- SundaeLabs has submitted a Catalyst Proposal to be able to use a hydra-node and a Hydra head as a wrapper over a (possibly customised) Cardano ledger
- Enabling this feature makes it easier to implement various applications that need to compute or validate transactions operating on a well-known universe, eg. as opposed to arbitrary transactions over Cardano network, in a fast and safe way while staying Cardano compatible and using the same tools as in the rest of the ecosystem
What
- Users should be able to run a hydra-node without needing a cardano-node or even a network connection, initialise the Hydra ledger with some UTxO, send and process transactions using the ledger rules, and retrieve the result as part of the Closing and Fanout logic
- Out-of-scope: While it could be interesting to keep the off-chain part of the protocol and allow to form an "offline" Hydra Head connecting hydra-nodes without the mediation of a layer 1, this is left for future work and contributions.
How
- Materialise the decision in an ADR
- Provide a
--offline
command-line flag to enable this special mode of operation - Implement a "mock"
Chain
interface that automatically drives the Head state machine and responds to state changed andEffect
s emitted by theHeadLogic
- Implement a "mock"
Network
interface that does not connect to anything and ignores messages. There won't be any callback anyway because network messages emitted by theHeadLogic
as anEffect
are reinjected immediately asEvent
s within the core reaction loop - Provide end-to-end testing for offline mode
See