From 08551b74c08bec580e5edbb12e52e80a93f6618e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20W=C3=B3jtowicz?= Date: Sat, 18 Jan 2025 14:22:25 +0100 Subject: [PATCH 1/3] Improve P2P topology error message Give more context for incompatibility between bootstrap peers and new Genesis syncing mechanism. --- cardano-node/src/Cardano/Node/Configuration/TopologyP2P.hs | 7 ++++++- .../src/Cardano/Tracing/OrphanInstances/Network.hs | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cardano-node/src/Cardano/Node/Configuration/TopologyP2P.hs b/cardano-node/src/Cardano/Node/Configuration/TopologyP2P.hs index 2e7517bf31e..8d75351255b 100644 --- a/cardano-node/src/Cardano/Node/Configuration/TopologyP2P.hs +++ b/cardano-node/src/Cardano/Node/Configuration/TopologyP2P.hs @@ -250,7 +250,12 @@ readTopologyFile nc tr = do ] genesisIncompatible = Text.pack $ "Cardano.Node.Configuration.Topology.readTopologyFile: " - <> "Bootstrap peers are not used in Genesis consensus mode." + <> "Bootstrap peers (field 'bootstrapPeers') are not compatible " + <> "with Genesis syncing mode, reverting to 'DontUseBootstrapPeers'. " + <> "Big ledger peers will be leveraged for decentralized syncing - it " + <> "is recommened to provide an up-to-date big ledger peer snapshot file " + <> "(field 'peerSnapshotFile' in topology configuration) to facilitate " + <> "this process." handlerBootstrap :: Text handlerBootstrap = mconcat [ "You seem to have not configured any trustable peers. " diff --git a/cardano-node/src/Cardano/Tracing/OrphanInstances/Network.hs b/cardano-node/src/Cardano/Tracing/OrphanInstances/Network.hs index c36aa985814..a69a89f7494 100644 --- a/cardano-node/src/Cardano/Tracing/OrphanInstances/Network.hs +++ b/cardano-node/src/Cardano/Tracing/OrphanInstances/Network.hs @@ -465,7 +465,6 @@ instance HasSeverityAnnotation (TracePeerSelection addr) where TraceGovernorWakeup {} -> Info TraceChurnWait {} -> Info TraceChurnMode {} -> Info - -- TraceVerifyPeerSnapshot {} -> Info TraceForgetBigLedgerPeers {} -> Info From 8797a161c712a408053d015b8765b20e8543574b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20W=C3=B3jtowicz?= Date: Mon, 16 Dec 2024 10:13:15 +0100 Subject: [PATCH 2/3] Delete unsuppported legacy p2p topology configuration file --- configuration/cardano/mainnet-p2p-toplogy.json | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 configuration/cardano/mainnet-p2p-toplogy.json diff --git a/configuration/cardano/mainnet-p2p-toplogy.json b/configuration/cardano/mainnet-p2p-toplogy.json deleted file mode 100644 index 2c2d22807aa..00000000000 --- a/configuration/cardano/mainnet-p2p-toplogy.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "LocalRoots": { - "groups": [] - }, - "PublicRoots": [ - { - "publicRoots": { - "accessPoints": [ - { - "address": "relays-new.cardano-mainnet.iohk.io", - "port": 3001 - } - ], - "advertise": false - } - } - ] -} From 4720860d2c3d5a92f4bcec06c331250cb90b52f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20W=C3=B3jtowicz?= Date: Thu, 23 Jan 2025 13:14:15 +0100 Subject: [PATCH 3/3] Fix sync targets for Genesis --- cardano-node/src/Cardano/Node/Run.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cardano-node/src/Cardano/Node/Run.hs b/cardano-node/src/Cardano/Node/Run.hs index e627b75934d..e1e5bdb3633 100644 --- a/cardano-node/src/Cardano/Node/Run.hs +++ b/cardano-node/src/Cardano/Node/Run.hs @@ -930,7 +930,7 @@ mkP2PArguments NodeConfiguration { , P2P.daMinBigLedgerPeersForTrustedState = ncMinBigLedgerPeersForTrustedState } where - deadlineTargets = Configuration.defaultDeadlineTargets { + deadlineTargets = PeerSelectionTargets { targetNumberOfRootPeers = ncDeadlineTargetOfRootPeers, targetNumberOfKnownPeers = ncDeadlineTargetOfKnownPeers, targetNumberOfEstablishedPeers = ncDeadlineTargetOfEstablishedPeers, @@ -939,7 +939,10 @@ mkP2PArguments NodeConfiguration { targetNumberOfEstablishedBigLedgerPeers = ncDeadlineTargetOfEstablishedBigLedgerPeers, targetNumberOfActiveBigLedgerPeers = ncDeadlineTargetOfActiveBigLedgerPeers } - syncTargets = Configuration.defaultSyncTargets { + syncTargets = PeerSelectionTargets { + targetNumberOfRootPeers = 0, + targetNumberOfKnownPeers = 0, + targetNumberOfEstablishedPeers = 0, targetNumberOfActivePeers = ncSyncTargetOfActivePeers, targetNumberOfKnownBigLedgerPeers = ncSyncTargetOfKnownBigLedgerPeers, targetNumberOfEstablishedBigLedgerPeers = ncSyncTargetOfEstablishedBigLedgerPeers,