Skip to content

Commit 091ee28

Browse files
committed
Keep the comment as it may be useful in the future.
Signed-off-by: Sasha Bogicevic <[email protected]>
1 parent f1f052e commit 091ee28

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

hydra-node/src/Hydra/HeadLogic.hs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,15 @@ onOpenNetworkReqTx env ledger st ttl tx =
323323
| ttl > 0 ->
324324
wait (WaitOnNotApplicableTx err)
325325
| otherwise ->
326+
-- XXX: We are removing invalid txs from allTxs here to
327+
-- prevent them piling up infinitely. However, this is not really
328+
-- covered by the spec and this could be problematic in case of
329+
-- conflicting transactions paired with network latency and/or
330+
-- message resubmission. For example: Assume tx2 depends on tx1, but
331+
-- only tx2 is seen by a participant and eventually times out
332+
-- because of network latency when receiving tx1. The leader,
333+
-- however, saw both as valid and requests a snapshot including
334+
-- both. This is a valid request and it could make the head stuck.
326335
newState TxInvalid{headId, utxo = localUTxO, transaction = tx, validationError = err}
327336

328337
maybeRequestSnapshot nextSn outcome =

0 commit comments

Comments
 (0)