Seetharaman GR
Seetharaman GR

Reputation: 270

How Cordapps are getting deployed with corda.jar while running corda nodes?

We are defining the nodes configuration in build.gradle.

After running the gradle deployNodes task, based on the configuration in build directory/nodes- Folders are getting created in their names.

Each node is having the following files:

  1. Corda.jar
  2. network-parameters
  3. persistence.mv.db
  4. node.conf
  5. certificates
  6. drivers
  7. logs
  8. cordapps

These the following questions I have,

  1. What is the runnodes.jar does - means how corda.jar is started and how cordapps are deployed on top of that?
  2. If I change the node.conf, then runnodes will it affect the node.conf or Do I need to build the corda.jar again ?
  3. Where the p2paddress of other nodes are shared with each node.

Suppose If I want to deploy the nodes in different EC2 instances, Do I need to mention the p2paddress with correct ec2 ipaddress of each nodes on build.gradle or I can do it dynamically?

Upvotes: 1

Views: 408

Answers (1)

Joel
Joel

Reputation: 23140

  1. runnodes goes to each node's folder and starts it by running the Corda JAR (by running something like java -jar corda.jar). When the Corda JAR starts, it scans the cordapps folder for CorDapps and loads them into the node
  2. If you stop a node and modify the node.conf file, the changes will apply when you next run the node. There is no need to redeploy
  3. It depends:

    • If you're running in development mode, the bootstrapper is run when you first deploy the nodes to copy each node's nodeInfo (a file containing its name, public keys, addresses, etc.) to the other nodes. If you modify one of the nodes' addresses in its node.conf file, you need to re-run the bootstrapper. See the instructions here

    • If you're running outside of development mode, you need to provide a network map server (as described here) that will distribute information on the network's nodes to each node

Upvotes: 1

Related Questions