Nodes

  • Nodes represent individuals and businesses on a Corda network.
  • A node runs within a Java Virtual Machine (JVM) and has a unique network identity.
  • The node interfaces with the outside world through:
    • The network, which lets it interact with other nodes.
    • Remote procedure Call (RPC), which lets the node’s owner interact with it.
  • You can add extra functions to your node by installing CorDapps in the plugin registry. CorDapps are distributed applications that let you accomplish different objectives with Corda.

A Corda node runs within a Java Virtual Machine (JVM) runtime environment with a unique network identity. JVM runtime environments provide a consistent platform on which you can run and deploy Java applications, such as Corda services and CorDapps. Here is a visualization of the node’s internal architecture:

node architecture

The core elements of the architecture are:

  • A persistence layer for storing data.
  • A network interface for communication between nodes.
  • An RPC interface for interacting with the node’s owner.
  • The service hub, which lets the node’s flows call services in the node.
  • A CorDapp interface and provider for extending the node by installing CorDapps.

The persistence layer has two parts:

  • The vault, where the node stores any relevant current and historic states.
  • The storage service, where it stores transactions, attachments, and flow checkpoints.

The node’s owner can query the node’s storage using the RPC interface.

All communication with other nodes on the network is handled by the node itself, as part of running a flow. The node’s owner does not interact with other network nodes directly.

The node’s owner interacts with the node via remote procedure calls (RPC). The key RPC operations the node exposes are documented in API: RPC operations.

Internally, the node has access to a rich set of services that are used during flow execution to coordinate ledger updates. The key services are:

  • Information about other nodes on the network and the services they offer.
  • Access to the contents of the vault and the storage service.
  • Access to the node’s public-private key pairs.
  • Generation of new public-private key pairs.
  • Information about the node itself.
  • The current time, as tracked by the node.

Use the CorDapp provider to install new CorDapps which extend the behavior of the node.

Your node comes with several default CorDapps installed, which handle common tasks such as:

  • Retrieving transactions and attachments from counterparties.
  • Upgrading contracts.
  • Broadcasting agreed ledger updates for recording by counterparties.

You may want to decommission or shut down a node for various activities, such as planned maintenance and upgrades, or investigating performance or latency issues. To shut down a node cleanly, you must drain it so that no node processes (or flows) are active.

Checkpoints ensure durability against crashes and restarts, by freezing a flow and capturing its current status which is automatically saved to the database. When the node is restarted, it replays the flow from the last checkpoint.

Draining mode ensures that before shutting down:

  • Commands requiring any new, RPC-initiated flows are rejected.
  • Initial P2P session messages are not processed, meaning peers are not able to initiate new flows involving the node.
  • All other activities proceed as usual, ensuring that the number of in-progress flows only goes down, not up.

Once the number of active flows reaches zero, it is safe to shut the node down. The draining mode property is durable, meaning that restarting the node does not reset it to its default value and that an RPC command is required.

The node can be safely shut down via a drain using the shell, Corda’s embedded command line.

Was this page helpful?

Thanks for your feedback!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.

We're sorry this page wasn't helpful. Let us know how we can make it better!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Create an issue

Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.