Outgoing connections on core node

Hi all,

So I just updated to the newest cardano-node version 8.9.0 but now I am noticing that I have 14 outgoing connections on my core node. The only incoming are from my own relays of course but it seems that this outgoing part is new. Also, I am thinking of blocking these outgoing connections but I want to read up a little first.

Has anyone else noticed this too or am I missing something obvious here?

Kind regards,

Did you also download a new config file?

Thanks for your swift reply.
I did. Not much of a difference between the current one and my backup option, though.

<   "TraceHandshake": true,
>   "TraceHandshake": false,
<   "TraceLocalConnectionManager": true,
<   "TraceLocalHandshake": true,
>   "TraceLocalHandshake": false,

These are the core differences between the current and backup config.json

I think p2p is set as true on default now. Did you run your BP with a p2p setup before?

What about your topology file? Did you change anything there?

1 Like

It was p2p before too.
The topology remained the same, except for the fact that my relays group has “trustable: true” now.

Hm strange. Maybe @werkof has an idea.

The settings below are for a backup block producer which I want to only connect with 2 other specific relays.

In the config file, ensure the target number of peers is at least as high as the number you want. In this case I left it much higher at 10 for established and active peers.

  "EnableP2P": true,
  "PeerSharingDisabled": true,
  "TargetNumberOfRootPeers": 30,
  "TargetNumberOfKnownPeers": 30,
  "TargetNumberOfEstablishedPeers": 10,
  "TargetNumberOfActivePeers": 10,

Then in your topology file provide only the accessPoints you want and set the hotValency to the specific number. If you want to set warmValency then this should be the same or higher.

  "localRoots": [
    { "accessPoints": [
        { "address": "", "port": 3001 }
      , { "address": "", "port": 3001 }
      , "advertise": false
      , "trustable": true
      , "hotValency": 2
, "publicRoots" : []
, "useLedgerAfterSlot": -1

Nb. There is no bootstrapPeers section, useLedgerAfterSlot is -1, and I have marked those 2 particular localRoots as “trustable”. This is because I want this node to run as a backup block producer, so if it gets too out of sync (eg. if I leave it disconnected for a while which I sometimes do), I only want it to bootstrap from those trusted local relays.

See: cardano-node-wiki/docs/getting-started/understanding-config-files.md at main · input-output-hk/cardano-node-wiki · GitHub

This is what the connections look like for this backup BP:

curl -s -H 'Accept: application/json' http://localhost:12788 | jq -jr '.cardano.node.metrics.connectionManager'

  "duplexConns": {
    "type": "g",
    "val": 2
  "incomingConns": {
    "type": "g",
    "val": 0
  "outgoingConns": {
    "type": "g",
    "val": 2
  "prunableConns": {
    "type": "g",
    "val": 0
  "unidirectionalConns": {
    "type": "g",
    "val": 0

Note outgoingConns is only 2 and duplexConns is only 2. There are no incomingConns because neither of the configured relays in my topology file know about this backup block producer. IE: They are not configured to specifically connect to it as a localRoot.

Note: Normally you would configure your relays to connect to your block producer as a localRoot in their topology files. Thus, in that normal case, you would see incomingConns as 2 also.


Yes, this is a very similar configuration to mine. Still, mine shows 14 outgoing connections, even when I set everything the same as you (except for the relay addresses of course). Mind you, I do not have 14 relays :joy:

Any ideas to why this happens?

Your topology file may look like that, but it’s probably missing the option:

"useLedgerAfterSlot": -1

The -1 is very important here, it disables connecting to the ledger peers.