States

  • States represent facts on the ledger.
  • Facts evolve on the ledger when participants create new states and mark outdated states as historic.
  • Each node 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 nodes 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.

This state represents an IOU—an agreement that Alice owes Bob £10:

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’t 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 historic.

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

state sequence

Each node on the network maintains a vault. This is the node’s database used to store current and historic states where the node is a participant. For example:

vault simple

From each node’s point of view, the ledger is the current (non-historic) states where that node is a participant.

Not all states need to be updated by the parties which use them. In the case of reference data, one party 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.

Corda uses a state reissuance mechanism that allows you to break transaction backchains. Read about reissuing states with a guaranteed state replacement.

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.