diff --git a/cardano-testnet/src/Testnet/Components/Configuration.hs b/cardano-testnet/src/Testnet/Components/Configuration.hs index 982c45c86fc..7628e17be1a 100644 --- a/cardano-testnet/src/Testnet/Components/Configuration.hs +++ b/cardano-testnet/src/Testnet/Components/Configuration.hs @@ -117,7 +117,7 @@ createSPOGenesisAndFiles testnetOptions startTime (TmpAbsolutePath tempAbsPath') -- TODO: Remove this rewrite. -- 50 second epochs -- Epoch length should be "10 * k / f" where "k = securityParam, f = activeSlotsCoeff" - H.rewriteJsonFile createStakedInitialGenesisFile $ J.rewriteObject + H.rewriteJsonFile genesisShelleyFpAbs $ J.rewriteObject ( KM.insert "securityParam" (toJSON @Int 5) -- TODO: USE config p arameter . adjustKM (J.rewriteObject diff --git a/cardano-testnet/src/Testnet/Runtime.hs b/cardano-testnet/src/Testnet/Runtime.hs index 5163a1b4d08..835e9df0ce6 100644 --- a/cardano-testnet/src/Testnet/Runtime.hs +++ b/cardano-testnet/src/Testnet/Runtime.hs @@ -204,7 +204,8 @@ startNode tp node port testnetMagic nodeCmd = GHC.withFrozenCallStack $ do let nodeStdoutFile = logDir node "stdout.log" nodeStderrFile = logDir node "stderr.log" - sprocket = Sprocket tempBaseAbsPath (socketDir node "sock") + socketRelPath = socketDir node "sock" + sprocket = Sprocket tempBaseAbsPath socketRelPath hNodeStdout <- handleIOExceptT FileRelatedFailure $ IO.openFile nodeStdoutFile IO.WriteMode hNodeStderr <- handleIOExceptT FileRelatedFailure $ IO.openFile nodeStderrFile IO.ReadWriteMode diff --git a/cardano-testnet/src/Testnet/Start/Cardano.hs b/cardano-testnet/src/Testnet/Start/Cardano.hs index 91d94724d04..978b0e15392 100644 --- a/cardano-testnet/src/Testnet/Start/Cardano.hs +++ b/cardano-testnet/src/Testnet/Start/Cardano.hs @@ -261,8 +261,9 @@ cardanoTestnet testnetOptions Conf {tempAbsPath} = do let spoNodesWithPortNos = L.zip poolKeysFps [3001..] nodeConfigFile = tempAbsPath' "configuration.yaml" ePoolNodes <- forM (L.zip spoNodesWithPortNos poolKeys) $ \((node, port),key) -> do - - eRuntime <- lift . lift . runExceptT $ startNode tempAbsPath node port testnetMagic + let nodeName = tail $ snd (break (== '/') node) + H.note_ $ "Node name: " <> nodeName + eRuntime <- lift . lift . runExceptT $ startNode tempAbsPath nodeName port testnetMagic [ "run" , "--config", nodeConfigFile , "--topology", tempAbsPath' node "topology.json" diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs index 76467097da4..39f4bc77e54 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs @@ -97,7 +97,7 @@ hprop_leadershipSchedule = H.integrationRetryWorkspace 2 "babbage-leadership-sch ] utxo1Json <- H.leftFailM . H.readJsonFile $ work "utxo-1.json" - UTxO utxo1 <- H.noteShowM $ H.noteShowM $ decodeEraUTxO sbe utxo1Json + UTxO utxo1 <- H.noteShowM $ decodeEraUTxO sbe utxo1Json txin1 <- H.noteShow =<< H.headM (Map.keys utxo1) (stakePoolIdNewSpo, stakePoolColdSigningKey, stakePoolColdVKey, vrfSkey, _) @@ -166,7 +166,7 @@ hprop_leadershipSchedule = H.integrationRetryWorkspace 2 "babbage-leadership-sch H.cat $ work "utxo-2.json" utxo2Json <- H.leftFailM . H.readJsonFile $ work "utxo-2.json" - UTxO utxo2 <- H.noteShowM $ H.noteShowM $ decodeEraUTxO sbe utxo2Json + UTxO utxo2 <- H.noteShowM $ decodeEraUTxO sbe utxo2Json txin2 <- H.noteShow =<< H.headM (Map.keys utxo2) let eraFlag = convertToEraFlag $ cardanoNodeEra cTestnetOptions diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/Transaction.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/Transaction.hs index a441b83afd6..f28b337dbb1 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/Transaction.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/Transaction.hs @@ -87,7 +87,7 @@ hprop_transaction = H.integrationRetryWorkspace 0 "babbage-transaction" $ \tempA ] utxo1Json <- H.leftFailM . H.readJsonFile $ work "utxo-1.json" - UTxO utxo1 <- H.noteShowM $ H.noteShowM $ decodeEraUTxO sbe utxo1Json + UTxO utxo1 <- H.noteShowM $ decodeEraUTxO sbe utxo1Json txin1 <- H.noteShow =<< H.headM (Map.keys utxo1) void $ execCli' execConfig @@ -123,7 +123,7 @@ hprop_transaction = H.integrationRetryWorkspace 0 "babbage-transaction" $ \tempA ] utxo2Json <- H.leftFailM . H.readJsonFile $ work "utxo-2.json" - UTxO utxo2 <- H.noteShowM $ H.noteShowM $ decodeEraUTxO sbe utxo2Json + UTxO utxo2 <- H.noteShowM $ decodeEraUTxO sbe utxo2Json txouts2 <- H.noteShow $ L.unCoin . txOutValueLovelace . txOutValue . snd <$> Map.toList utxo2 H.assert $ 5_000_001 `List.elem` txouts2 diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs index 72231ca03af..e7ed06af456 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs @@ -84,7 +84,7 @@ hprop_kes_period_info = H.integrationRetryWorkspace 2 "kes-period-info" $ \tempA ] utxo1Json <- H.leftFailM . H.readJsonFile $ work "utxo-1.json" - UTxO utxo1 <- H.noteShowM $ H.noteShowM $ decodeEraUTxO sbe utxo1Json + UTxO utxo1 <- H.noteShowM $ decodeEraUTxO sbe utxo1Json txin1 <- H.noteShow =<< H.headM (Map.keys utxo1) (stakePoolId, stakePoolColdSigningKey, stakePoolColdVKey, _, _) @@ -153,7 +153,7 @@ hprop_kes_period_info = H.integrationRetryWorkspace 2 "kes-period-info" $ \tempA H.cat $ work "utxo-2.json" utxo2Json <- H.leftFailM . H.readJsonFile $ work "utxo-2.json" - UTxO utxo2 <- H.noteShowM $ H.noteShowM $ decodeEraUTxO sbe utxo2Json + UTxO utxo2 <- H.noteShowM $ decodeEraUTxO sbe utxo2Json txin2 <- H.noteShow =<< H.headM (Map.keys utxo2) let eraFlag = convertToEraFlag $ cardanoNodeEra cTestnetOptions diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/LedgerEvents/Gov/ProposeNewConstitution.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/LedgerEvents/Gov/ProposeNewConstitution.hs index 192661ea73c..d0aaf216acd 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/LedgerEvents/Gov/ProposeNewConstitution.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/LedgerEvents/Gov/ProposeNewConstitution.hs @@ -147,7 +147,7 @@ hprop_ledger_events_propose_new_constitution = H.integrationWorkspace "propose-n ] utxo1Json <- H.leftFailM . H.readJsonFile $ work "utxo-1.json" - UTxO utxo1 <- H.noteShowM $ H.noteShowM $ decodeEraUTxO sbe utxo1Json + UTxO utxo1 <- H.noteShowM $ decodeEraUTxO sbe utxo1Json txin1 <- H.noteShow =<< H.headM (Map.keys utxo1) drepRegTxbodyFp <- H.note $ work "drep.registration.txbody" @@ -182,7 +182,7 @@ hprop_ledger_events_propose_new_constitution = H.integrationWorkspace "propose-n , "--testnet-magic", show @Int testnetMagic , "--tx-file", drepRegTxSignedFp ] - + void $ H.failMessage callStack "force" -- Create constitution proposal void $ H.execCli' execConfig @@ -209,7 +209,7 @@ hprop_ledger_events_propose_new_constitution = H.integrationWorkspace "propose-n ] utxo2Json <- H.leftFailM . H.readJsonFile $ work "utxo-2.json" - UTxO utxo2 <- H.noteShowM $ H.noteShowM $ decodeEraUTxO sbe utxo2Json + UTxO utxo2 <- H.noteShowM $ decodeEraUTxO sbe utxo2Json txin2 <- H.noteShow =<< H.headM (Map.keys utxo2) void $ H.execCli' execConfig @@ -285,7 +285,7 @@ hprop_ledger_events_propose_new_constitution = H.integrationWorkspace "propose-n ] utxo3Json <- H.leftFailM . H.readJsonFile $ work "utxo-3.json" - UTxO utxo3 <- H.noteShowM $ H.noteShowM $ decodeEraUTxO sbe utxo3Json + UTxO utxo3 <- H.noteShowM $ decodeEraUTxO sbe utxo3Json txin3 <- H.noteShow =<< H.headM (Map.keys utxo3) voteTxFp <- H.note $ work gov "vote.tx" diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/SubmitApi/Babbage/Transaction.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/SubmitApi/Babbage/Transaction.hs index 5ba974db8b0..e2aba78d114 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/SubmitApi/Babbage/Transaction.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/SubmitApi/Babbage/Transaction.hs @@ -103,7 +103,7 @@ hprop_transaction = H.integrationRetryWorkspace 0 "submit-api-babbage-transactio ] utxo1Json <- H.leftFailM . H.readJsonFile $ work "utxo-1.json" - UTxO utxo1 <- H.noteShowM $ H.noteShowM $ decodeEraUTxO sbe utxo1Json + UTxO utxo1 <- H.noteShowM $ decodeEraUTxO sbe utxo1Json txin1 <- H.noteShow =<< H.headM (Map.keys utxo1) void $ execCli' execConfig @@ -162,7 +162,7 @@ hprop_transaction = H.integrationRetryWorkspace 0 "submit-api-babbage-transactio ] utxo2Json <- H.leftFailM . H.readJsonFile $ work "utxo-2.json" - UTxO utxo2 <- H.noteShowM $ H.noteShowM $ decodeEraUTxO sbe utxo2Json + UTxO utxo2 <- H.noteShowM $ decodeEraUTxO sbe utxo2Json txouts2 <- H.noteShow $ L.unCoin . txOutValueLovelace . txOutValue . snd <$> Map.toList utxo2 H.assert $ 5_000_001 `List.elem` txouts2