devman
devman

Reputation: 504

Corda 4 - How to add a new node to an existing corda network running in dev mode in local environment?

We are building a POC using Corda and Springboot web server.

Following are the versions of Corda platform, Springboot server, and other essential dependencies used for building the POC-

cordaReleaseGroup=net.corda
cordaVersion=4.0
gradlePluginsVersion=4.0.45
kotlinVersion=1.2.71
junitVersion=4.12
quasarVersion=0.7.10
spring_version = '4.3.11.RELEASE'
spring_boot_version = '2.0.2.RELEASE'
spring_boot_gradle_plugin_version = '2.1.1.RELEASE'
jvmTarget = "1.8"
log4jVersion =2.11.2
platformVersion=4
slf4jVersion=1.7.25
nettyVersion=4.1.22.Final

The CorDapp developed for POC has four nodes -

  1. Notary Node
  2. Provider Company Node
  3. Consumer Company 1 Node
  4. Consumer Company 1 Sub Contact Node

How to add more consumer company nodes to the existing network in Corda 4?

We read that the procedure for adding of nodes is different across Corda versions.

Upvotes: 0

Views: 211

Answers (2)

Abhimanyu Singh
Abhimanyu Singh

Reputation: 11

You can add a node object with the desired properties like :

    node {
    name "O=SomeName,L=SomeCity,C=SomeCountry"
    p2pPort portNumber
    rpcSettings {
        address("host")
        adminAddress("host")
    }
    cordapps = [
            a list of cordapps that the node has access to            
    ]
rpcUsers = [user config for the database]

}

This should be added to the the deployNodes task in your build.gradle file. Clean everything and run the deployNodes task again, you will have your additional node up and running.

Upvotes: 1

Dan Newton
Dan Newton

Reputation: 920

The Network Bootstrapper should help you with this.

Do note, that the easiest thing to do when developing locally is to rerun deployNodes and recreate the whole network.

Upvotes: 2

Related Questions