A Corda node database contains tables corresponding to the various services that the node provides.
It also contains custom tables defined by the CorDapps that are installed on the node.
Currently all these tables share the same database schema, but in a future release they will be isolated from each other.
Unless specified otherwise the node tables are for internal use and can change between versions.
Some tables, especially the ones where the Ledger is maintained are append-only and the data will never change.
Manually adding, removing or updating any data should only be done with great care. Corda is a distributed ledger and modifying
data could lead to unexpected behaviour and inconsistent views of the ledger.
These are tables that store the NodeInfo of other network participants.
They are just a local cache that is kept in sync with the network map server.
By calling rpc.clearNetworkMapCache() all these tables will be cleared and recreated from the network map server.
The following four tables are used by the IdentityService and are created from the NodeInfos.
They are append only tables used for persistent caching.
They will also be cleared on rpc.clearNetworkMapCache().
Read more in API: Identity and Node services
NODE_IDENTITIES
Maps a public key hash to an identity.
PK_HASH
The public key hash.
IDENTITY_VALUE
The certificate chain.
NODE_NAMED_IDENTITIES
Maps the X500 name of a participant to a public key hash.
NAME
The x500 name.
PK_HASH
The public key hash.
NODE_IDENTITIES_NO_CERT
Maps a public key hash to the X500 name of a participant.
Read more here: The network map.
Each downloaded network parameters file will create an entry in this table.
The historical network parameters are used when validating transactions, which makes this table logically part of the Ledger.
It is an append only table and the size will be fairly small.
NODE_NETWORK_PARAMETERS
Stores the downloaded network parameters.
HASH
The hash of the downloaded file. Used as a primary key.
EPOCH
The version of the parameters
PARAMETERS_BYTES
The serialized bytes
SIGNATURE_BYTES
The signature
CERT
First signer certificate in the certificate chain.
These are all the transactions that the node has created or has ever downloaded as part of transaction resolution. This table can grow very large.
It is an append-only table, and the data will never change.
Read more in Node services - DBTransactionStorage
This is the key ledger table used as a source of truth. In the future the content will be encrypted to preserve confidentiality.
Whether the checkpoint is compatible with the current CorDapps/Corda version
PROGRESS_STEP
The progress step that the flow reached
FLOW_IO_REQUEST
The request type the flow suspended on
TIMESTAMP
The timestamp
NODE_CHECKPOINT_BLOBS
Stores serialized flow checkpoint blobs
FLOW_ID
Primary key
CHECKPOINT_VALUE
Serialized information about the flow
FLOW_STATE
Serialized application stack
TIMESTAMP
The timestamp
NODE_FLOW_RESULTS
Stores results of flows
FLOW_ID
Primary key
RESULT_VALUE
Serialized result of the flow
TIMESTAMP
The timestamp
NODE_FLOW_EXCEPTIONS
Stores exceptions thrown by flows
FLOW_ID
Primary key
TYPE
The class name of the exception
EXCEPTION_MESSAGE
The message of the exception
STACK_TRACE
The stack trace of the exception
EXCEPTION_VALUE
Serialized exception thrown by the flow
TIMESTAMP
The timestamp
NODE_FLOW_METADATA
Stores exceptions thrown by flows
FLOW_ID
Primary key
INVOCATION_ID
The invocation id of the flow
FLOW_NAME
The class name of the flow
FLOW_IDENTIFIER
The identifier of the flow
STARTED_TYPE
How the flow was started
FLOW_PARAMETERS
The parameters the flow was started with
CORDAPP_NAME
The name of the CorDapp that contains the flow
PLATFORM_VERSION
The platform version at the start time of the flow
STARTED_BY
The RPC user that started the flow
INVOCATION_TIME
The time the flow was originally invoked by RPC
START_TIME
The time the flow started inside the state machine
FINISH_TIME
The finish time of the flow
These tables will see the most intense read-write activity, especially NODE_CHECKPOINTS and NODE_CHECKPOINT_BLOBS. Depending on the installed flows and the traffic on the node the I/O operations on this
table will be the main bottleneck of the node performance.
There will be an entry for every running flow.
Draining the node means waiting for this table to become emtpy. Read more in: Upgrading CorDapps on a node.
NODE_MESSAGE_IDS
Used for de-duplication of messages received by peers.
Note that the vault tables are guaranteed to remain backwards compatible and are safe to be used directly by third party applications.
VAULT_STATES
Principal vault table.
OUTPUT_INDEX
Reference to a state - index in transaction
TRANSACTION_ID
Reference to a state - transaction id
CONSUMED_TIMESTAMP
When the state was consumed.
CONTRACT_STATE_CLASS_NAME
Contract class
LOCK_ID
The soft lock id
LOCK_TIMESTAMP
The soft lock timestamp
NOTARY_NAME
The notary
RECORDED_TIMESTAMP
Recorded timestamp
STATE_STATUS
CONSUMED or UNCONSUMED
RELEVANCY_STATUS
RELEVANT or NOT_RELEVANT
CONSTRAINT_TYPE
The contract constraint.
CONSTRAINT_DATA
The hash or the composite key depending on the CONSTRAINT_TYPE
CONSUMING_TX_ID
When a state is consumed by a transaction, the ID of the consuming transaction is added to this column.
The VAULT_STATES table contains an entry for every relevant state.
This table records the status of states and allows CorDapps to soft lock states it intends to consume.
Depending on the installed CorDapps this table can grow. For example when fungible states are used.
In case this table grows too large, the DBA can choose to archive old consumed states.
The actual content of the states can be retrieved from the NODE_TRANSACTIONS table by deserializing the binary representation.
VAULT_TRANSACTION_NOTES
Allows additional notes per transaction
SEQ_NO
Primary key
TRANSACTION_ID
The transaction
NOTE
The note
STATE_PARTY
Maps participants to states
OUTPUT_INDEX
Reference to a state - index in transaction
TRANSACTION_ID
Reference to a state - transaction id
PUBLIC_KEY_HASH
The pk of the participant
X500_NAME
The name of the participant or null if unknown.
V_PKEY_HASH_EX_ID_MAP
This is a database view used to map states to external ids.
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.