Docs and procedures for p2p (how to run p2p?)

Update:

Have a read of the release notes for 1.35.6. After reading the 1.35.6 release nodes, here is what I have been using for my P2P setup:

mainnet-config.json:

  "EnableP2P":true,

  "MaxConcurrencyBulkSync": 2,
  "MaxConcurrencyDeadline": 2,
  "TargetNumberOfRootPeers": 100,
  "TargetNumberOfKnownPeers": 100,
  "TargetNumberOfEstablishedPeers": 50,
  "TargetNumberOfActivePeers": 20,

  "TraceInboundGovernorCounters": true,
  "TraceConnectionManagerTransitions": true,
  "TraceLedgerPeers": false,
  "TracePeerSelectionCounters": true,
  "TracePeerStateActions": true,
  "TracePublicRootPeers": false,

Those were just the changes I made from the default file. Many of the defaults listed in the release notes document were already set. You don’t need to explicitly set many of the above if they are the defaults, I just set them to be clear.

There is no longer a need for the setting: “TestEnableDevelopmentNetworkProtocols”: true.

relays mainnet-topology.json:

{
  "localRoots": [
    { "accessPoints": [
        { "address": "bp.terminada.io", "port": 3001 }
      ]
      , "advertise": false
      , "valency": 1
    }
  ]
, "publicRoots" : [
    { "accessPoints": [
        { "address": "relays-new.cardano-mainnet.iohk.io", "port": 3001 }
      ]
      , "advertise": true
      , "valency": 1
    }
  ]
, "useLedgerAfterSlot": 0
}

block producer mainnet-topology.json:

{
  "localRoots": [
    { "accessPoints": [
        { "address": "relays.terminada.io", "port": 2700 }
      ]
      , "advertise": false
      , "valency": 4
    }
  ]
, "publicRoots" : []
}

I recall reading a discussion about simplifying the topology file. There is no longer a need to have “localRoots” within “LocalRoots” or publicRoots within “PublicRoots”. You only require “localRoots” and “publicRoots” now. Sorry that I can’t find the link to this discussion easily. The old style topology still works though.

The official resource explaining the topology file uses the new style.

I have been running my block producer and most relays in P2P mode since Jan 2022. Initially I saw some problems with my block producer (running in normal mode) dropping connections to my P2P relays and then not re-establishing them. Once I converted my block producer to P2P as well this problem ceased.

For over a year now all my relays and my block producer have been running P2P except for just 1 relay which has been left running in normal mode.

5 Likes