Context

Context is the state of the blockchain. The most common implementation of a state machine is a database. The important difference to a simple database is that a set of rules secures the state of a blockchain. The rules are codified in the protocol. Blocks carry the instructions that manipulate the context. A block can be empty or have one or more operations. When a block is confirmed, each node in the network applies the changes to the current context. When doing so, the system moves from an old state to the new state. Remember that in Tezos, context is the same as state.

A simple example is the transfer of the currency ꜩ or tezzies between accounts. This requires a change to the context that tracks the balance of accounts. In the graph below the balance of accounts is shown at two different contexts, at block height number 100 and 102.

graph LR genesis[/"(Genesis) <br> Block #1"/]-.->block100[/"Block #100"/] block100-->block101[/"Block #101"/] block101-->block102[/"Block #102"/] operation["Transfer from Alice to Bob"]-->block101 subgraph contextBox["context at height #"] context100 context102 end context100[(Alice 10ꜩ)]-->block100 context102[(Alice 8ꜩ <br> Bob 2ꜩ)]-->block102 style contextBox fill:#FFD03B