Reviewed Aug 2026
DE
BA-01 · LESSON 04

Data structures and state machines

KEY DEFINITIONS

Terms used in this lesson

UTXO
Unspent transaction output: one discrete chunk of bitcoin that can be used as a transaction input.

Bitcoin tracks spendable transaction outputs instead of account balances. Every valid transaction consumes existing outputs and creates new ones.

65 min Difficulty 1/5 Not started

Loading lesson visuals...

01

Learn the idea

A data structure organizes information so rules can find and update it. State is the information a system currently treats as true. Bitcoin tracks unspent transaction outputs, shortened to UTXOs: individually identified outputs that have been created but not yet spent. Their values are commonly counted in satoshis, shortened to sats; one satoshi is one hundred-millionth of a bitcoin. A state machine defines valid states and deterministic transitions, meaning every correct participant given the same starting state and input computes the same next state.

GUIDED EXPLANATION1/5 ideas inspected
1

Represent the current state

For a simple bearer ledger, the state can be a set of uniquely identified unspent outputs with values and spending conditions.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionState is whatever the latest application database row says.

In a replicated protocol, authoritative state is the result of applying agreed valid transitions. Databases may index or cache that result, but a mutable row is not the rule itself.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.