# Outgoing connections on core node

**URL:** <https://forum.cardano.org/t/outgoing-connections-on-core-node/129121>\
**Category:** Operate a Stake Pool\
**Created:** [16 March 2024 14:23 UTC](https://forum.cardano.org/t/outgoing-connections-on-core-node/129121 "2024-03-16T14:23:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Evochrome](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/evochrome/32/48115_2.png) [@Evochrome](https://forum.cardano.org/u/Evochrome)\
**Post date:** [16 March 2024 14:23 UTC](https://forum.cardano.org/t/outgoing-connections-on-core-node/129121/1 "2024-03-16T14:23:13Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![Zyroxa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/zyroxa/32/17790_2.png) [@Zyroxa](https://forum.cardano.org/u/Zyroxa)\
**Post date:** [16 March 2024 14:24 UTC](https://forum.cardano.org/t/outgoing-connections-on-core-node/129121/2 "2024-03-16T14:24:17Z")

</div>

Did you also download a new config file?

---

<div class="post-metadata">

**Author:** ![Evochrome](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/evochrome/32/48115_2.png) [@Evochrome](https://forum.cardano.org/u/Evochrome)\
**Post date:** [16 March 2024 14:27 UTC](https://forum.cardano.org/t/outgoing-connections-on-core-node/129121/3 "2024-03-16T14:27:40Z")

</div>

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

```auto
38c35
< "TraceHandshake": true,
---
> "TraceHandshake": false,
43d39
< "TraceLocalConnectionManager": true,
45c41
< "TraceLocalHandshake": true,
---
> "TraceLocalHandshake": false,
60a57,61

```

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

---

<div class="post-metadata">

**Author:** ![Zyroxa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/zyroxa/32/17790_2.png) [@Zyroxa](https://forum.cardano.org/u/Zyroxa)\
**Post date:** [16 March 2024 14:31 UTC](https://forum.cardano.org/t/outgoing-connections-on-core-node/129121/4 "2024-03-16T14:31:03Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Evochrome](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/evochrome/32/48115_2.png) [@Evochrome](https://forum.cardano.org/u/Evochrome)\
**Post date:** [16 March 2024 14:32 UTC](https://forum.cardano.org/t/outgoing-connections-on-core-node/129121/5 "2024-03-16T14:32:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Zyroxa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/zyroxa/32/17790_2.png) [@Zyroxa](https://forum.cardano.org/u/Zyroxa)\
**Post date:** [16 March 2024 14:34 UTC](https://forum.cardano.org/t/outgoing-connections-on-core-node/129121/6 "2024-03-16T14:34:45Z")

</div>

Hm strange. Maybe @werkof has an idea.

---

<div class="post-metadata">

**Author:** ![Terminada](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/terminada/32/80229_2.png) [@Terminada](https://forum.cardano.org/u/Terminada)\
**Post date:** [16 March 2024 22:20 UTC](https://forum.cardano.org/t/outgoing-connections-on-core-node/129121/7 "2024-03-16T22:20:23Z")

</div>

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.

```auto
  "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.

```auto
{
  "localRoots": [
    { "accessPoints": [
        { "address": "10.0.0.28", "port": 3001 }
      , { "address": "10.0.0.29", "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](https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/getting-started/understanding-config-files.md)

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![Evochrome](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/evochrome/32/48115_2.png) [@Evochrome](https://forum.cardano.org/u/Evochrome)\
**Post date:** [17 March 2024 21:14 UTC](https://forum.cardano.org/t/outgoing-connections-on-core-node/129121/8 "2024-03-17T21:14:58Z")

</div>

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 😂

Any ideas to why this happens?

---

<div class="post-metadata">

**Author:** ![georgem1976](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/georgem1976/32/38471_2.png) [@georgem1976](https://forum.cardano.org/u/georgem1976)\
**Post date:** [18 March 2024 06:34 UTC](https://forum.cardano.org/t/outgoing-connections-on-core-node/129121/9 "2024-03-18T06:34:32Z")

</div>

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

```auto
"useLedgerAfterSlot": -1

```

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