April 17, 2021
This week, we wanted to share some of our top tips for one of your most-asked-about topics: Corda node configuration options.
I’ll summarize the key concepts of Corda node configuration and show you how they’re used by the node explorer. While there are a plethora of ways to integrate with Corda, we’re going to focus on the basics.
If you’ve worked on CorDapps before, you’ve probably seen a node configuration like this:
When standing up web services, you’ll need to set up a small number of ports and make sure they behave as expected. Let’s learn a bit more about each one.
This port is specifically for point-to-point communication between the Corda nodes. You don’t have to worry a lot about this port from the application level, but the host machine or container needs to accept traffic on it.
You can find the docs page on this param here.
Corda nodes host an RPC server internally for clients to connect with. This object defines settings for that server. You’ll also find settings for limiting RPC users here.
There’s plenty of options, and so the parameters are described in our docs here.
Because we’re using an RPC server for this node,the address is simply the address and port that the RPC server will run on.
RPC is a client-server protocol intended to allow computers to perform collaborative computation. It’s not the same thing as HTTP or the Corda node shell (That’s the node sshd option!).
These types of articles tend to have a diagram about this point, and this one is no exception. If this still seems confusing, take a look at this Corda node diagram:
Notice that most input to the node happens through RPC or API calls. The p2p address is only used as the port when the node communicates with other nodes.
Yes. A Corda node can host other things like web servers, but be aware that those web servers are just triggering Corda flows over RPC and treating the web server as a client. If you’re interested in hosting a Tomcat web server from the same machine as a Corda node, take a look at the Snakes and Ladders CorDapp or the Secret Santa CorDapp. You’ll see that they have a ‘clients’ module that defines the HTTP binding.
This is the address for local RPC administrative functions that the Corda node process will use to connect to its own local RPC server.
You will rarely need to worry about the admin address.
Taking this whole picture into account, it should make a lot more sense what needs to happen to use something like the Corda Node Explorer.
If you want to connect to your Corda node as an RPC user and use Corda as a client, you have to define the user and specify the host and port you want to connect to on that node – so that’s precisely what the node explorer asks you for.
In our example node configuration, this is all you need to supply before you’re off to the races making great Corda integrations.
Looking for some additional resources? Take a look at these:
If you’d like to see more blog posts like these or have ideas on what we should add, feel free to send a note to firstname.lastname@example.org.
Share this post
Stay up to date on the latest news and articles related to Corda.