Setting up Corda Network through Bootstrapper

How Corda Network ensures interoperability with global trade initiatives and other networks including supply chain, cash, insurance and identity?

Corda distributed ledger architecture, can it potentially transform the financial services industry to the benefit of its clients and participant firms alike thus revolutionizing international trade? How to create private networks in Corda, a permissioned blockchain based on transparency and trust? How can we scale up blockchain networks through Corda?

A distributed ledger is made up of mutually distrusting network of nodes, that allows for a single global database that records the state of deals and obligations between institutions and people across the globe. Corda is a distributed ledger platform for recording and processing financial agreements, it is heavily inspired by blockchain systems, but without the design choices that make traditional blockchains inappropriate for many financial scenarios.

The world is continually changing, driven by technological innovations that affect the way we live and do business. Security concerns and the difficulty of coordinating data flows across borders and between the multiple parties involved in an international trade transaction have hampered efforts to digitalize trade. How to build trust among peers to transact seamlessly? How can we built a decentralized, distributed and transparent architecture of trust? There are many examples of companies and consortiums predating blockchain or DLT (Distributed Ledger) technology that have brought people together to transact value. The blockchain vision enabled by Corda is different because it was designed to eliminate many of the problems inherent in earlier approaches.

Building and managing distributed applications is, however, more involved than just creating software: In a Corda network, information and/or assets are exchanged, or transacted, between participants because they represent something meaningful to each of them. But how is the meaningfulness of the exchanged information determined, on what basis, and by whom?

A Corda network consists of a number of machines running nodes in a distributed environment. These nodes communicate using persistent protocols in order to create and validate transactions between the participants. It consists of a P2P network of Java Virtual Machine (JVM) run-time nodes that supports services and applications known as CorDapps. The CorDapps are what the Dapps are to the Ethereum network.

Let us explore and setup our own Corda network.

Types of Node Services

A node is a device on a blockchain network, that is in essence the foundation of the technology, allowing it to function and survive. Nodes are distributed across a widespread network and carry out a variety of tasks. There are three broader categories of functionality one such node may have. These pieces of functionality are provided as services, and one node may run several of them.

Notary, which have the final say in whether a transaction is a double-spend or not. Any network can have one or more pluggable notary services. Each notary service may be run on a single node, or across a cluster of nodes.

Oracle, that link the ledger to the outside world by providing facts that affect the validity of transactions. There can be zero or more oracle services. It signs transactions if they state a fact and that fact is considered to be true.

Regular nodes, all nodes have a vault and may start protocols communicating with other nodes, notaries and oracles and evolve their private ledger.

Let us start creating our own Corda Network.

The nodes can be configured to communicate as a network even when distributed across several machines. Please refer to my previous article on Corda about How to Install Cordapp on Ubuntu, where we have downloaded & installed cordapp sample on Ubuntu. We will now distribute nodes on different machine across the network.

Each node in the network has a single well-known identity. Each network has a network map service that publishes the IP addresses through which every node on the network can be reached, along with the identity certificates of those nodes and the services they provide. (The network map is a collection of signed NodeInfo objects). In continuation with our last article, we will follow the steps below to distribute nodes on different machines on the network.

  • Deploy the nodes as usual:
    ./gradlew deployNodes

  • Navigate to the build folder (kotlin/build/nodes)
    For each node, open its node.conf file and change localhost in its p2pAddress to the IP address of the machine where the node will be run (e.g. p2pAddress=”″) 

Node.conf file for PartyA on IP

  • These changes require new node-info files to be distributed amongst the nodes. Use the network bootstrapper tool to update the files and have them distributed locally:
    java -jar corda-network-bootstrapper-3.2-corda-executable.jar kotlin-source/build/nodes

  • Move the node folders to their individual machines (e.g. using a USB key). It is important that none of the nodes – including the notary – end up on more than one machine. Each computer should also have a copy of runnodes and runnodes.bat.
    For example, you may end up with the following layout:
    – Machine 1: Notary, PartyA, runnodes, runnodes.bat                                                                                   – Machine 2: PartyB, PartyC, runnodes, runnodes.bat

Machine 1 : Notary and PartyA nodes on IP

Machine 2 : PartyB and PartyC nodes on IP

  • After starting each node, the nodes will be able to see one another and agree IOUs among themselves
    Note : The bootstrapper must be run after the node.conf files have been modified, but before the nodes are distributed across machines. Otherwise, the nodes will not be able to communicate.
  • You can also add new nodes on the network. To join a network, a node must obtain a certificate from the network operator. This certificate maps a well-known node identity to: a real-world legal identity and a public key. Each network has a built-in doorman service which enforces rules regarding the information that nodes must provide and the know-your-customer processes they must undergo before being granted this certificate.
  • Key tools available thru Corda to setup your network include: “Doorman,” a network permissioning service in which nodes must provide detailed Know Your Customer (KYC) data to join and use the network; “ Application Firewall” that operates like a reverse proxy DMZ; “Network Simulator” to show traffic flows between nodes and help visualize network set-up via a map service; “Node Explorer” to view transaction information; and “Load Tester” to stress-test nodes and assess performance under extreme real-world conditions.

Network Bootstrapper

The Corda Network Bootstrapper is a tool that scans all the node configurations from a common directory to generate the network parameters file, which is then copied to all the nodes’ directories. It also copies each node’s node-info file to every other node so that they can all be visible to each other.

For test deployments where the nodes (at least initially) reside on the same filesystem, these node-info files can be placed directly in the node’s additional-node-infos directory from where the node will pick them up and store them in its local network map cache. The node generates its own node-info file on startup.

additional-node-info folder for node PartyB (Image below)

The network bootstrapper cannot dynamically update the network if an existing node has changed something in their node-info, e.g. their P2P address. For this the new node-info file will need to be placed in the other nodes’ additional-node-infos directory. If the nodes are located on different machines, then a utility such as rsync can be used so that the nodes can share node-infos.

Starting the nodes  You will first need to create the local network by bootstrapping it with the bootstrapper. You may now start the nodes in any order. Once a node has started up successfully you may connect to it as a client to initiate protocols/query state etc. A client is always associated with a single node with single identity, which only sees their part of the ledger.

Leave a Comment

Your email address will not be published. Required fields are marked *