Onboarding Members to Static Networks

This section describes the onboarding process for static networks.

To run a static network, you must complete the following high-level steps:

  1. Start a Corda cluster.
  2. Define the members in the group in the GroupPolicy.json file.
  3. Package the GroupPolicy.json file into a CPI.
  4. Upload the CPI to your cluster.
  5. Create a virtual node in your cluster for each member defined in the group policy file.
  6. Register each member in the group.

Create the Group Policy File

Use the Corda CLI to generate a GroupPolicy.json file, where group-policy-folder is the path to the folder in which you want to generate the file:

corda-cli.sh mgm groupPolicy --name="C=GB, L=London, O=Alice" --name="C=GB, L=London, O=Bob" --name="C=GB, L=London, O=Charlie" --endpoint-protocol=1 --endpoint="http://localhost:1080" > <group-policy-folder/GroupPolicy.json>

Create a CPI

Build a CPI using the Corda CLI packaging plugin, passing in your generated GroupPolicy.json file. For more information about creating CPIs, see the CorDapp Packaging section.

Upload the CPI

To upload the generated CPI, run the following, replacing <CPI-name>.cpi with the name of your CPI:

export CPI_PATH=./<CPI-name>.cpi
curl --insecure -u admin:admin -F upload=@./$CPI_PATH https://localhost:8888/api/v1/cpi/

This returns the identifier of the CPI. For example, {"id":"f0a0f381-e0d6-49d2-abba-6094992cef02"}.

Alternatively, using jq, you can run the following to set CPI ID to the identifier:

CPI_ID=$(curl --insecure -u admin:admin -F upload=@$CPI_PATH $API_URL/cpi | jq -r '.id')

Use the CPI identifier to obtain the checksum of the CPI:

curl --insecure -u admin:admin https://localhost:8888/api/v1/cpi/status/<CPI-ID>

Create Virtual Nodes for Each Member

To create a virtual node for each member, run the following, replacing <CPI-checksum> with the checksum obtained in the Upload the CPI section:

curl --insecure -u admin:admin -d '{ "request": { "cpiFileChecksum": "<CPI-checksum>", "x500Name": "<member's name>"  } }' https://localhost:8888/api/v1/virtualnode

This returns the holding identity ID short hashes.

Register Members

To register a member, run the following, replacing <ID-short-hash> with the holding identity ID short hash obtained in the Create Virtual Nodes for Each Member section:

curl --insecure -u admin:admin -d '{ "memberRegistrationRequest": { "action": "requestJoin", "context": { "corda.key.scheme": "CORDA.ECDSA.SECP256R1" } } }' https://localhost:8888/api/v1/membership/<ID-short-hash>

Run this command for each member defined in the staticNetwork section of your GroupPolicy.json file.

Perform a lookup to ensure that all members have registered successfully and are visible to each other:

curl --insecure -u admin:admin -X GET https://localhost:8888/api/v1/members/<ID-short-hash>

If you are registering a member as a notary service representative, you must add the following as the context when registering:

"context": { "corda.key.scheme": "CORDA.ECDSA.SECP256R1", "corda.roles.0" : "notary", "corda.notary.service.name" : <notary-service-X500-name>, "corda.notary.service.plugin" : "net.corda.notary.NonValidatingNotary" }

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.