@@ -64,6 +64,7 @@ import Hydra.Cluster.Util (chainConfigFor, keysFor, modifyConfig, readConfigFile
6464import Hydra.Ledger.Cardano (Tx )
6565import Hydra.Logging (Tracer , nullTracer , showLogsOnFailure )
6666import Hydra.Options (CardanoChainConfig (.. ), ChainBackendOptions (.. ), ChainConfig (.. ), DirectOptions (.. ), toArgNetworkId )
67+ import Hydra.Tx.Accumulator qualified as Accumulator
6768import Hydra.Tx.BlueprintTx (CommitBlueprintTx (.. ))
6869import Hydra.Tx.Crypto (aggregate , sign )
6970import Hydra.Tx.HeadId (HeadId , HeadSeed (.. ))
@@ -312,16 +313,23 @@ spec = around (showLogsOnFailure "DirectChainSpec") $ do
312313 aliceChain `observesInTime` OnCollectComTx {headId}
313314 let v = 0
314315 let snapshotVersion = 0
316+ utxoHash = hashUTxO someUTxO
317+ utxoToCommitHash = hashUTxO someUTxOToCommit
318+ utxoToDecommitHash = hashUTxO @ Tx mempty
319+ accumulator = Accumulator. build [utxoHash, utxoToCommitHash, utxoToDecommitHash]
320+ crs = " "
315321 let snapshot =
316322 Snapshot
317323 { headId
318324 , number = 1
319325 , utxo = someUTxO
320- , utxoHash = hashUTxO someUTxO
326+ , utxoHash
321327 , confirmed = []
322328 , utxoToCommit = Just someUTxOToCommit
323329 , utxoToDecommit = Nothing
324330 , version = snapshotVersion
331+ , accumulator
332+ , crs
325333 }
326334
327335 postTx $ CloseTx headId headParameters snapshotVersion (ConfirmedSnapshot {snapshot, signatures = aggregate [sign aliceSk snapshot]})
@@ -460,16 +468,23 @@ spec = around (showLogsOnFailure "DirectChainSpec") $ do
460468 _ -> Nothing
461469 let (inHead, toDecommit) = splitUTxO someUTxO
462470 -- Alice contests with some snapshot U1 -> successful
471+ let utxoHash = hashUTxO inHead
472+ utxoToCommitHash = hashUTxO @ Tx mempty
473+ utxoToDecommitHash = hashUTxO toDecommit
474+ accumulator = Accumulator. build [utxoHash, utxoToCommitHash, utxoToDecommitHash]
475+ crs = " "
463476 let snapshot1 =
464477 Snapshot
465478 { headId
466479 , number = 1
467480 , utxo = inHead
468- , utxoHash = hashUTxO inHead
481+ , utxoHash
469482 , confirmed = []
470483 , utxoToCommit = Nothing
471484 , utxoToDecommit = Just toDecommit
472485 , version = 0
486+ , accumulator
487+ , crs
473488 }
474489 postTx $
475490 ContestTx
@@ -495,6 +510,8 @@ spec = around (showLogsOnFailure "DirectChainSpec") $ do
495510 , utxoToCommit = Nothing
496511 , utxoToDecommit = Just toDecommit
497512 , version = 1
513+ , accumulator
514+ , crs
498515 }
499516 let contestAgain =
500517 postTx $
0 commit comments