Enabling Peer Sharing
To improve network security, the peer sharing feature available in the Cardano Node software allows you to connect one or more relay nodes to the Cardano network without registering the relay(s) on the blockchain. One or more relay nodes that you register on the blockchain advertise your unregistered relay(s) to other nodes in the network.
To enable peer sharing:
- On a relay node that you registered on the blockchain using a registration certificate, open the
config.jsonfile using a text editor, and then edit the following values:"PeerSharing": true,
"TargetNumberOfKnownPeers": 150,
"TargetNumberOfRootPeers": 60,Note

Setting the value of
TargetNumberOfRootPeersless than the value ofTargetNumberOfKnownPeersallows peer sharing to provide additional peers. For more details on registering a relay node on the blockchain, see the topic Registering a Stake Pool. - Save and close the
config.jsonfile. - On the relay node where you edited the
config.jsonfile in step 1, open thetopology.jsonfile using a text editor. Add anotheraccessPointssubsection to thelocalRootssection as follows where<UnregisteredRelayNodeIPAddress>is the wide area network (WAN) IP address of the unregistered relay node in your stake pool configuration, and<UnregisteredRelayNodeName>is an optional descriptive label for the unregistered relay. Also, set theadvertisekey totruein the newaccessPointssubsection:{
"bootstrapPeers": [
{
"address": "backbone.cardano.iog.io",
"port": 3001
},
{
"address": "backbone.mainnet.emurgornd.com",
"port": 3001
},
{
"address": "backbone.mainnet.cardanofoundation.org",
"port": 3001
}
],
"localRoots": [
{
"accessPoints": [
{
"address": "<BlockProducingNodeIPAddress>",
"port": 6000,
"name": "<BlockProducingNodeName>"
}
],
"advertise": false,
"comment": "Do NOT advertise the block-producing node",
"trustable": true,
"valency": 1
},
{
"accessPoints": [
{
"address": "<UnregisteredRelayNodeIPAddress>",
"port": 6000,
"name": "<UnregisteredRelayNodeName>"
}
],
"advertise": true,
"valency": 1,
"trustable": true,
"comment": "Share connection details for one or more unregistered relay nodes"
}
],
"publicRoots": [
{
"accessPoints": [],
"advertise": false
}
],
"useLedgerAfterSlot": 157852837
}Note

For more details on editing the
topology.jsonfile, see the topic Configuring Topology. - Save and close the
topology.jsonfile. - On the registered relay, to restart the Cardano Node instance type:
sudo systemctl restart cardano-node.service
After the registered relay node restarts, verify that other relay nodes in the Cardano network slowly begin connecting to the unregistered relay(s) in your stake pool configuration.