Skip to content

HeadIsFinalised event not reporting the UTxOS as observed on L1 #1913

Description

@noonio

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

  1. Open a head
  2. Incrementall commit:
  3. i.e. post a deposit and get a snapshot approved
  4. Before it increments, close the head and fanout
  5. 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

  1. Update Hydra.Tx.Fanout to capture the UTxO it sees on the fanout tx.
  2. Bubble that all the way through FanoutObservation to the HeadIsFinalized event; so we don't calculate anything, merely report it

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status
Done ✔
Status
2025 Q2

Relationships

None yet

Development

No branches or pull requests

Issue actions