Skip to content

Commit c4ada02

Browse files
Add warning if peer sharing is enabled and protocol files are present
1 parent e8bbef7 commit c4ada02

File tree

1 file changed

+7
-0
lines changed
  • cardano-node/src/Cardano/Node

1 file changed

+7
-0
lines changed

cardano-node/src/Cardano/Node/Run.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,13 @@ handleSimpleNode blockType runP p2pMode tracers nc onKernel = do
488488
publicRoots
489489
ntUseLedgerPeers
490490
ntPeerSnapshotPath
491+
case ncPeerSharing nc of
492+
PeerSharingEnabled
493+
| hasProtocolFile (ncProtocolFiles nc) ->
494+
traceWith (startupTracer tracers) . NetworkConfigUpdateWarning . Text.pack $
495+
"Mainnet block producers may not meet the Praos performance guarantees "
496+
<> "and host IP address will be leaked since peer sharing is enabled."
497+
_otherwise -> pure ()
491498
localRootsVar <- newTVarIO localRoots
492499
publicRootsVar <- newTVarIO publicRoots
493500
useLedgerVar <- newTVarIO ntUseLedgerPeers

0 commit comments

Comments
 (0)