Search code examples
cordahocon

How to add a new node to an existing corda network?


I have a use case where I need to add a new node to an existing Corda network (let's say in existing Corda network 2 nodes are running currently (A, B node) and now need to add node C to this network.

I went through following links as well but no luck:
Adding new node to existing corda network
Couldn't find network parameters file and compatibility zone wasn't configured/isn't reachable
Deploy and run nodes dynamically in CORDA

I tried the following approach:
I Added A and B nodes configurations in deployNodes task inside build.gradle and then run deployNodes tasks so A and B nodes start-up successfully now I create new folder PartyC and inside that added corda.jar and node.conf for node C and then running the command:
java -jar corda.jar
but I am getting the following exception while running this command:

Exception during node startup: Couldn't find network parameters file and compatibility zone wasn't configured/isn't reachable. [errorCode=1917kd6, moreInformationAt=https://errors.corda.net/OS/4.3/1917kd6]

node.conf file for new node (node C) is following:

devMode=true
h2Settings {
  address="localhost:12348"
}
myLegalName="O=PartyC,L=London,C=GB"
p2pAddress="partyc:10011"
rpcSettings {
  address="partyc:10012"
  adminAddress="partyc:10013"
}
security {
  authService {
    dataSource {
      type=INMEMORY
      users=[
        {
          password=test
          permissions=[
            ALL
          ]
          user=user1
        }
      ]
    }
  }
}
sshd {
  port=2227
}

I am not able to get how should I need to add network parameters or compatibility zone inside this node.conf file.


Solution

  • To add a new node to an existing network, there are 2 possible options.

    Use the network bootstrapper (and docs to manually create the required files to allow nodes to interact with each other. This is more for test networks.

    Or use a network map service, an OS implementation can be found here. This is more for real networks. There is also the Corda Enterprise Network Manager if you are using Corda Enterprise.