@@ -1096,6 +1096,29 @@ threeNodesNoErrorsOnOpen tracer tmpDir node@RunningNode{nodeSocket} hydraScripts
1096
1096
Right _headIsOpen ->
1097
1097
pure ()
1098
1098
1099
+ -- | Hydra nodes ABC run and connect to each other.
1100
+ -- Hydra nodes ABC shut down.
1101
+ -- Hydra nodes AB run and connect to each other.
1102
+ -- Hydra nodes AB shut down.
1103
+ -- Hydra nodes ABC run and connect to each other.
1104
+ nodeCanSupportMultipleEtcdClusters :: Tracer IO EndToEndLog -> FilePath -> RunningNode -> [TxId ] -> IO ()
1105
+ nodeCanSupportMultipleEtcdClusters tracer tmpDir RunningNode {nodeSocket} hydraScriptsTxId = do
1106
+ aliceKeys <- generate genKeyPair
1107
+ bobKeys <- generate genKeyPair
1108
+ carolKeys <- generate genKeyPair
1109
+
1110
+ let cardanoKeysABC = [aliceKeys, bobKeys, carolKeys]
1111
+ hydraKeysABC = [aliceSk, bobSk, carolSk]
1112
+ let cardanoKeysAB = [aliceKeys, bobKeys]
1113
+ hydraKeysAB = [aliceSk, bobSk]
1114
+
1115
+ let contestationPeriod = UnsafeContestationPeriod 2
1116
+ let depositDeadline = UnsafeDepositDeadline 50
1117
+ let hydraTracer = contramap FromHydraNode tracer
1118
+ withHydraCluster hydraTracer tmpDir nodeSocket 1 cardanoKeysABC hydraKeysABC hydraScriptsTxId contestationPeriod depositDeadline $ \ clients -> waitForNodesConnected hydraTracer 20 clients
1119
+ withHydraCluster hydraTracer tmpDir nodeSocket 1 cardanoKeysAB hydraKeysAB hydraScriptsTxId contestationPeriod depositDeadline $ \ clients -> waitForNodesConnected hydraTracer 20 clients
1120
+ withHydraCluster hydraTracer tmpDir nodeSocket 1 cardanoKeysABC hydraKeysABC hydraScriptsTxId contestationPeriod depositDeadline $ \ clients -> waitForNodesConnected hydraTracer 20 clients
1121
+
1099
1122
-- | Two hydra node setup where Alice is wrongly configured to use Carol's
1100
1123
-- cardano keys instead of Bob's which will prevent him to be notified the
1101
1124
-- `HeadIsInitializing` but he should still receive some notification.
0 commit comments