From 0e777b536aabe6582de9985dace9ef80b4987fee Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Fri, 27 Dec 2024 11:16:26 +0100 Subject: [PATCH] WIP some fixes for tests --- cabal.project | 3 +-- cardano-node/src/Cardano/Node/Run.hs | 2 +- cardano-node/test/Test/Cardano/Node/Gen.hs | 3 ++- configuration/cardano/mainnet-config.json | 2 +- configuration/cardano/mainnet-config.yaml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cabal.project b/cabal.project index f20dc183a8e..6a18bbf7326 100644 --- a/cabal.project +++ b/cabal.project @@ -60,8 +60,7 @@ package plutus-scripts-bench constraints: , wai-extra < 3.1.15 , Cabal < 3.14 - , hedgehog-extras ==0.6.4.0 - , io-sim ==1.5.1.0 + , hedgehog-extras <0.6.5.1 allow-newer: , katip:Win32 diff --git a/cardano-node/src/Cardano/Node/Run.hs b/cardano-node/src/Cardano/Node/Run.hs index 742ed589c02..9e1cc6f6966 100644 --- a/cardano-node/src/Cardano/Node/Run.hs +++ b/cardano-node/src/Cardano/Node/Run.hs @@ -789,7 +789,7 @@ updateTopologyConfiguration :: Tracer IO (StartupTrace blk) updateTopologyConfiguration startupTracer nc localRootsVar publicRootsVar useLedgerVar useBootsrapPeersVar ledgerPeerSnapshotPathVar = do traceWith startupTracer NetworkConfigUpdate - result <- try $ readTopologyFileOrError nc + result <- try $ readTopologyFileOrError nc startupTracer case result of Left (FatalError err) -> traceWith startupTracer diff --git a/cardano-node/test/Test/Cardano/Node/Gen.hs b/cardano-node/test/Test/Cardano/Node/Gen.hs index fa01a2aad1b..b2d6048403d 100644 --- a/cardano-node/test/Test/Cardano/Node/Gen.hs +++ b/cardano-node/test/Test/Cardano/Node/Gen.hs @@ -27,6 +27,7 @@ import Cardano.Node.Configuration.TopologyP2P (LocalRootPeersGroup (.. PeerAdvertise (..), PublicRootPeers (..), RootConfig (..)) import Cardano.Node.Types import Cardano.Slotting.Slot (SlotNo (..)) +import Ouroboros.Network.NodeToNode.Version import Ouroboros.Network.PeerSelection.Bootstrap import Ouroboros.Network.PeerSelection.LedgerPeers.Type (AfterSlot (..), UseLedgerPeers (..)) @@ -182,7 +183,7 @@ genLocalRootPeersGroup = do ra <- genRootConfig hval <- Gen.int (Range.linear 0 (length (rootAccessPoints ra))) wval <- WarmValency <$> Gen.int (Range.linear 0 hval) - LocalRootPeersGroup ra (HotValency hval) wval <$> genPeerTrustable <*> undefined -- TODO @ouroboros-network + LocalRootPeersGroup ra (HotValency hval) wval <$> genPeerTrustable <*> pure InitiatorAndResponderDiffusionMode genLocalRootPeersGroups :: Gen LocalRootPeersGroups genLocalRootPeersGroups = diff --git a/configuration/cardano/mainnet-config.json b/configuration/cardano/mainnet-config.json index 4bf2b5e4e63..7293475ac84 100644 --- a/configuration/cardano/mainnet-config.json +++ b/configuration/cardano/mainnet-config.json @@ -16,7 +16,7 @@ "RequiresNetworkMagic": "RequiresNoMagic", "ShelleyGenesisFile": "mainnet-shelley-genesis.json", "ShelleyGenesisHash": "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81", - "ConsensusMode": "PraosMode" + "ConsensusMode": "PraosMode", "TargetNumberOfActivePeers": 20, "TargetNumberOfEstablishedPeers": 50, "TargetNumberOfKnownPeers": 150, diff --git a/configuration/cardano/mainnet-config.yaml b/configuration/cardano/mainnet-config.yaml index f774a429ec7..1ca4d3139cc 100644 --- a/configuration/cardano/mainnet-config.yaml +++ b/configuration/cardano/mainnet-config.yaml @@ -12,7 +12,7 @@ ConwayGenesisHash: 15a199f895e461ec0ffc6dd4e4028af28a492ab4e806d39cb674c88f7643e ShelleyGenesisFile: mainnet-shelley-genesis.json ShelleyGenesisHash: 1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81 -EnableP2P: true +EnableP2P: True ##### Core protocol parameters #####