Protocol

Additional implementation-specific documentation for the Hydra Head protocol and extensions like incremental decommits.

Incremental Commits

Deposit L1 first

Node BChainNode AAliceNode BChainNode AAliceparpar[Alice isLeader]par[broadcast]As decrementPOST /commit (blueprintTx)[Head is open]depositTxsign depositTxsubmit depositTxOnDepositTx utxoDepositDetectedReqInc utxoReqInc utxoCommitRequestedReqSn utxoReqSn utxosig = sign snapshot incl. inputs(commitTx)AckSn sigAckSn sigAckSn sigSnapshotConfirmedCommitApprovedIncrementTx snapshot sigOnIncrementTxCommitFinalized

Interactive L2 first

ChainNode BNode AAliceChainNode BNode AAliceAlice shows a tx spending on L1 of what she wants to commit to L2TODO input validation?get approval through a signed snapshotparpar[Alice isLeader]par[broadcast]Alice can spend on L2 what she committed from L1POST /commit (commitTx)ReqInc commitTxReqInc commitTxCommitRequestedReqSn commitTxReqSn commitTxsig = sign snapshot incl. inputs(commitTx)AckSn sigAckSn sigAckSn sigconstruct incrementTx using multi-signed snapshot and commitTx (blueprint)incrementTxsign incrementTxsubmit incrementTxOnIncrementTx utxoOnIncrementTx utxolocalUtxo = localUtxo + utxoCommitFinalized

Incremental Decommits

ChainNode BNode AAliceChainNode BNode AAlicepar[broadcast]par[Alice isLeader]par[broadcast]Decommit (decTx)canApply decTxReqDec decTxReqDec decTxDecommitRequestedReqSn decTxReqSn decTxcanApply decTx, decUTxO =  outputs(decTx)sig = sign snapshot incl. decUTxOAckSn sigAckSn sigAckSn sigSnapshotConfirmedDecommitApprovedDecrementTx snapshot sigOnDecrementTxDecommitFinalized