a command line tool for accessing a Corda node running cordite cordapps or braid
Homepage Repository npm Download
npm install cordite-cli@0.5.4
Cordite provides decentralised economic and governance services including:
Cordite is open source, regulatory friendly, enterprise ready and finance grade.
Cordite is built on Corda, a finance grade distributed ledger technology, meeting the highest standards of the banking industry, yet it is applicable to any commercial scenario. The outcome of over two years of intense research and development by over 80 of the world’s largest financial institutions.
We encourage you to raise any issues/bugs you find in Cordite. Please follow the below steps before raising issues:
We welcome contributions both technical and non-technical with open arms! There's a lot of work to do here. The Contributing Guide provides more information on how to contribute.
Cordite is being developed by a group of financial services companies, software vendors and open source contributors. The project is hosted on here on GitLab.
All software in this repository is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
We have created a few test nodes:
These are available as public nodes hosted in East US, SE Asia and W Europe locations respectively. You can use the REST endpoint /api
or use the following clients:
We use Docker to deploy Cordite nodes. For instructions on starting up a Cordite node using Docker, please visit our Docker Hub Repo for more information on configuration including environment variables:
docker run -it \
--memory=2048m \
--cpus=2 \
-e MY_LEGAL_NAME="O=Cordite-example,L=Berlin,C=DE" \
-e MY_PUBLIC_ADDRESS="cordite.example.com" \
-e MY_EMAIL_ADDRESS="noreply@cordite.foundation" \
-e NETWORK_MAP_URL="https://nms-test.cordite.foundation" \
-v $(pwd):/opt/corda/certificates \
-v $(pwd):/opt/corda/persistence \
-p 10200:10200 \
-p 8080:8080 \
cordite/cordite:latest
Once the node is running, you will be able to see the REST API for accessing Cordite at https://localhost:8080/api. This will bring up a new node on Cordite TEST, certificates will be created and stored in certificates.
You can also use Cordite to join the Corda.Network. Process to join the Corda Network. Below is an example for joining Corda UAT network
docker run -it \
--memory=2048m \
--cpus=2 \
-e MY_LEGAL_NAME="O=Cordite-example,L=Berlin,C=DE" \
-e MY_PUBLIC_ADDRESS="cordite.example.com" \
-e MY_EMAIL_ADDRESS="noreply@cordite.foundation" \
-e NETWORK_MAP_URL="https://netmap.uat.corda.network/3FCF6CEB-20BD-4B4F-9C72-1EFE7689D85B" \
-v $(pwd):/opt/corda/certificates \
-v $(pwd):/opt/corda/persistence \
-p 10200:10200 \
-p 8080:8080 \
cordite/cordite:latest
If you do not wish to use Docker then alternatively you can download the Cordite node and run without docker by running ./run-corda.sh
. You will need Oracle JRE 8 JVM - minimum supported version 8u131.
Cordite uses environment variables to configure Cordite and create amoungst other things the Corda node.conf file at runtime. We have moved to use the Official Corda Docker Image.
Env Name | Description | Default |
---|---|---|
REQUIRED | ||
MY_LEGAL_NAME | The Corda Network X500 name to use for this node | O=Cordite-XXX, OU=Cordite, L=London, C=GB |
MY_PUBLIC_ADDRESS | The public FQDN to advertise the node on | localhost |
MY_EMAIL_ADDRESS | The email address the network operator can reach you | noreply@cordite.foundation |
OPTIONAL | ||
NETWORK_MAP_URL | The address of the network map service. | https://nms-test.cordite.foundation |
DOORMAN_URL | The address of the doorman service | https://nms-test.cordite.foundation |
TRUST_STORE_NAME | The filename of the Trust Root | network-root-truststore.jks |
NETWORK_TRUST_PASSWORD | The password to the Trust Root | trustpass |
MY_P2P_PORT | The port to advertise the node on | 10200 |
TLS_CERT_CERL_ISSUER | CRL distribution point (i.e. URL) for the TLS certificate | NULL |
TLS_CERT_CRL_DIST_POINT | CRL issuer (given in the X500 name format) for the TLS certificate | NULL |
CORDITE_KEY_STORE_PASSWORD | Keystore password | cordacadevpass |
CORDITE_TRUST_STORE_PASSWORD | Truststore password | trustpass |
CORDITE_DB_USER | Username for db | sa |
CORDITE_DB_PASS | Password for db | dnpass |
CORDITE_DB_DIR | Path to db directory - only used for H2 | /opt/corda/persistence/ |
CORDITE_DB_URL | database JDBC URI | <default corda url> |
CORDITE_DB_DRIVER | driver class name for database access - postgres 42.2.5 driver is embedded - you can use org.postgresql.ds.PGSimpleDataSource to enable it |
org.h2.jdbcx.JdbcDataSource |
CORDITE_DB_MAX_POOL_SIZE | DB Max pool size | 10 |
CORDITE_H2_PORT | H2 DB port | 9090 |
CORDITE_BRAID_PORT | Braid port | 8080 |
CORDITE_DEV_MODE | Start up node in dev mode | true |
CORDITE_DETECT_IP | Allow node to auto detect external visible IP | false |
CORDITE_CACHE_NODEINFO | Persist NodeInfo-* file | false |
CORDITE_LOG_MODE | Log in normal or JSON | normal |
CORDITE_JVM_MX | JVM -Xmx value | 1536m |
CORDITE_JVM_MS | JVM -Xms value | 512m |
CORDITE_EXPORT_JMX | exportJMXTo: value in node.conf | |
CORDITE_TLS_ENABLED | True iff TLS enabled | true |
CORDITE_TLS_CERT_PATH | Path to TLS certificate | null |
CORDITE_TLS_KEY_PATH | Path to TLS Key | null |
CORDITE_WEBSOCKET_FRAME_SIZE | TLS max framesize | min(networkMaxTransationSize, 10MB) |
CORDITE_WEBSOCKET_MESSAGE_SIZE | TLS max message size | min(networkMaxTransationSize, 10MB) |
CORDITE_NOTARY | Set to true to be a validating notary, false for non-validating or do not set to be a notary | null |
CORDITE_METERING_CONFIG | JSON to set metering notary configuration | null |
CORDITE_FEE_DISPERSAL_CONFIG | JSON to set metering fee dispersal config | null |
JVM_ARGS | Override JVM args | See Dockerfile |
CORDA_ARGS | Override CORDA args | See Dockerfile |
RPC_PASSWORD | Not used | |
MY_RPC_PORT | Not used | |
MY_RPC_ADMIN_PORT | Not used | |
CORDAPPS_FOLDER | Override location of cordapps | /opt/corda/cordapps |
PERSISTENCE_FOLDER | Override location of persistence | /opt/corda/persistence |
CERTIFICATES_FOLDER | Override location of certificates | /opt/corda/certificates |
DRIVERS_FOLDER | Override location of drivers | /opt/corda/drivers |
CONFIG_FOLDER | Override location of config | /etc/corda |
DEPRECATED | Use Official Corda variables instead | |
CORDITE_COMPATIBILITY_ZONE_URL | The address of the Network Map Service. | https://nms-test.cordite.foundation |
CORDITE_LEGAL_NAME | The name of the node | O=Cordite-XXX, OU=Cordite, L=London, C=GB |
CORDITE_P2P_ADDRESS | The address other nodes will use to speak to your node | localhost:10002 |
backward compatible | If deprecated variables are passed they override the MY_* variables |
File/Folder | Description |
---|---|
REQUIRED | |
/opt/corda/certificates |
certificates must be mounted at location |
/opt/corda/persistence |
persistent volume must be mounted for H2 and nodeInfo cache |
OPTIONAL | |
/etc/corda/node.config |
mounted node.conf will be used rather than generated |
/opt/corda/logs |
logs can be externally mounted |
/opt/corda/cordapps |
override Cordite corDapps |
DEPRECATED | Use Official Corda mounts instead |
/opt/cordite/node.conf |
Configuration file detailing specifics of your node - will be created using env variables if a node.conf is not mounted |
/opt/cordite/db |
Location of the database for that node - for persistence, use volume mount |
/opt/cordite/certificates |
Location of the nodes' corda certificates - will be created if no certificates are mounted to node and devmode=true |
/opt/cordite/tls-certificates |
Location of TLS certificates - will use self-signed certificates if none are mounted to node |
/opt/cordite |
There is a soft link from /opt/cordite to /opt/corda providing backward compatability |
When building from source we recommend the following setup:
For those wishing to build Cordite from source run ./build.sh
. (NOTE: this script is not to designed to be run on Windows.)
Cordite node is laid out in ./node
and gradle builds in ./cordapps
.
To start node after the build run (cd node && run-corda.sh)
.
The core of Cordite is a collection of CorDapps which are java libraries. These are releasd to Maven Central and can be used in your project
Yes you can. You need to be aware of the ports you are using for each node on the same host to ensure none clash. For all new ports assigned to each node, you will need to update the firewall accordingly.
The core of Cordite is a collection of CorDapps which are java libraries. These are releasd to Maven Central and can be used in your project
You can turn JSON, or structured, logging on by setting CORDITE_LOG_MODE=json
in the docker environment variables. If you do this, beware of a few things:
[key=value]
bits in your log message and each one will be stripped out of the message and will show up in the JSON objectYou might well be asking why on earth we want to do this. A number of reasons: