Skip to content

inject localRoots in P2P topology when booting the node #60

Open
@robinboening

Description

@robinboening

Currently, when enabling P2P mode, the topology-p2p template is copied over and used as is. The template does not include any localRoots and therefore the relay running in P2P mode would not know about the block producer unless the information is added manually.

I suggest we allow to inject node information as we do with NODE_TOPOLOGY for non-P2P mode. Maybe we could use the same env variable for both modes.


Current template looks like this

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

but it when it is parsed by the cardano-node the final topology-p2p.json file should look like this

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions