Rahul Panwar
Rahul Panwar

Reputation: 735

Need to create a new node without redeploying nodes in Corda?

I want to create a new node without redeploying my existing nodes in Corda environment . Is it possible to add another node from within the application without deploying it again . If yes then how we will specify its ports for rpc and database . For example : In my application I have a system in which there are different merchants and I want to add a new merchant to the system without redeployment .

Upvotes: 1

Views: 721

Answers (2)

Joel
Joel

Reputation: 23140

Yes. Prior to Corda 2, you would be this as follows:

  • Create a new folder containing the Corda jar and node.conf file, or make a copy of an existing node folder
  • Modify the node.conf file to have its own web, RPC and P2P ports. Make sure you don't change the network map information
  • Start the node by running java -jar corda.jar
    • You can optionally also start a node webserver by placing the corda-webserver jar in the same folder and running java -jar corda-webserver.jar

As long as your nodes are in dev mode, they'll auto-generate certificates if none are provided in their certificates folder. They'll connect to the same network map and be able to speak to the other nodes.

In Corda 3, you need to stop all the nodes and re-run the bootstrapper after adding a node or modifying a node's node.conf file. See the instructions here

Upvotes: 1

Richard Green
Richard Green

Reputation: 2062

Yes it is possible (Imagine a configuration where nodes / actors couldn't join or leave the distributed ledger on demand ? That would be madness right?). All the active nodes communicate with the network map service so all your new node needs to do is announce itself to this and voila - the existing nodes are now informed.

I'm simplifying the process a little bit as we have gone through a revision of how this is done recently (and I don't want to give you the wrong answer), but depending on what milestone release you are running I can elucidate further.

Upvotes: 1

Related Questions