developers.diem.com/docs/basics/basics-txns-states.md
The two fundamental concepts at the heart of the Diem Blockchain are
When a submitted transaction is executed, the state of the Diem Blockchain changes.
When a Diem Blockchain participant submits a transaction, they are requesting the ledger state to be updated with their transaction information.
A signed transaction on the blockchain contains the following information:
The Diem Blockchain's ledger state or global state comprises the state of all accounts in the blockchain. Each validator node in the blockchain must know the global state of the latest version of the blockchain's distributed database (versioned database) to execute any transaction.
All of the data in the Diem Blockchain is persisted in a single-versioned distributed database. A version number is an unsigned 64-bit integer that corresponds to the number of transactions the system has executed.
This versioned database allows validator nodes to:
<small className="figure">FIGURE 1.0 TRANSACTIONS CHANGE STATE</small>
Figure 1.0 represents how executing transaction T<sub>N</sub> changes the state of the Diem Blockchain from S<sub>N-1</sub> to S<sub>N</sub>.
In the figure:
| Name | Description |
|---|---|
| Accounts A and B | Represent Alice's and Bob's accounts on the Diem Blockchain |
| S<sub>N-1</sub> | Represents the (N-1)th state of the blockchain. In this state, Alice's account A has a balance of 110 Diem Coins, and Bob's account B has a balance of 52 Diem Coins. |
| T<sub>N</sub> | This is the n-th transaction executed on the blockchain. In this example, it represents Alice sending 10 Diem Coins to Bob. |
| F | It is a deterministic function. F always returns the same final state for a specific initial state and a specific transaction. If the current state of the blockchain is S<sub>N-1</sub>, and transaction T<sub>N</sub> is executed on state S<sub>N-1</sub>, the new state of the blockchain is always S<sub>N</sub>. The Diem Blockchain uses the Move language to implement the deterministic execution function F. |
| S<sub>N</sub> | This is the n-th state of the blockchain. When the transaction T<sub>N</sub> is applied to the blockchain, it generates the new state S<sub>N</sub> (an outcome of applying F to S<sub>N-1</sub> and T<sub>N</sub>). This causes Alice’s account balance to be reduced by 10 to 100 Diem Coins and Bob’s account balance to be increased by 10 to 62 Diem Coins. The new state S<sub>N</sub> shows these updated balances. |