Context & versions
HeadIsFinalised event reports local utxo (including pending commits and decommits)
The following function in HeadLogic.hs
onClosedChainFanoutTx ::
IsTx tx =>
ClosedState tx ->
-- | New chain state
ChainStateType tx ->
Outcome tx
onClosedChainFanoutTx closedState newChainState =
newState HeadFannedOut{headId, utxo = (utxo <> fromMaybe mempty utxoToCommit) `withoutUTxO` fromMaybe mempty utxoToDecommit, chainState = newChainState}
sets the utxo field to be the utxo, plus and pending commits and decommits. But we don't know if these have actually occured.
Steps to reproduce
- Open a head
- Incrementall commit:
- i.e. post a deposit and get a snapshot approved
- Before it increments, close the head and fanout
- Observe mismatch.
Actual behavior
HeadIsFinalised event reports local utxo (including pending commits and decommits).
Expected behavior
Should report utxo exactly as distributed on L1.
Potential solution
- Update
Hydra.Tx.Fanout to capture the UTxO it sees on the fanout tx.
- Bubble that all the way through
FanoutObservation to the HeadIsFinalized event; so we don't calculate anything, merely report it
Context & versions
HeadIsFinalised event reports local utxo (including pending commits and decommits)
The following function in
HeadLogic.hssets the
utxofield to be the utxo, plus and pending commits and decommits. But we don't know if these have actually occured.Steps to reproduce
Actual behavior
HeadIsFinalised event reports local utxo (including pending commits and decommits).
Expected behavior
Should report utxo exactly as distributed on L1.
Potential solution
Hydra.Tx.Fanoutto capture the UTxO it sees on the fanout tx.FanoutObservationto theHeadIsFinalizedevent; so we don't calculate anything, merely report it