States heading-link-icon

 States An immutable object representing a fact known by one or more participants at a specific point in time. You can use states to represent any type of data, and any kind of fact. represent facts on the ledger. Facts evolve on the ledger when participants create new states and mark outdated states as consumed. Each participant has a vault where it stores the states it shares with other nodes.

A state is an immutable object representing a fact known by one or more participants at a specific point in time. You can use states to represent any type of data, and any kind of fact. For example, a financial instrument, Know Your Customer (KYC) data, or identity information.

For example, this state represents an IOU; an agreement that Alice owes Bob £10:

IOU State

In addition to information about the fact, the state contains a reference to the contract. Contracts govern the evolution of states.

States are immutable: you can not change them. Corda uses state sequences to track the evolution of facts. When a fact changes, one of the state’s participants creates a new state and marks the outdated state as consumed. To make a clear distinction, the latest, relevant state is called unconsumed.

For example, if Alice pays Bob £5, the state sequence would be:

IOU State Sequence

Each participant’s vault stores the current and consumed states in which it is invovled. For example:

Consumed and Unconsumed States in the Vault

Not all states need to be updated by the participants that use them. One participant can create a state containing reference data. This state can be used, but not updated, by other parties. For this use case, the states containing reference data are referred to as reference states. Reference states are no different to regular states. However, they are handled differently in Corda transactions. For more information, see the Transactions section.

Previous
Ledger

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.