Regtest is a private Bitcoin network you control. Difficulty is trivial, so you can mine blocks instantly without testnet faucets.
Complete Step 1 // Required reading in the study plan above, then continue here. Prefer local bitcoind -regtest or Docker; Polar is optional under further reading.
Step 2 — Key terms
| Term | What it means | Where you use it |
|---|---|---|
| Regtest | Private chain; you mine on demand | Local labs |
| Testnet / signet | Shared public test networks | Occasional interop |
| Mainnet | Real value | Not for learning loops |
bitcoind / bitcoin-cli | Core daemon + RPC client | Run and drive the node |
| Coinbase maturity | Coinbase needs 100 confirmations | Why first mine uses 101 blocks |
| Datadir | Chain state on disk | Wipe between experiments |
Analogy: Regtest is a flight simulator. Crashes are free.
Done when: You can explain maturity in one sentence.
Step 3 — Setup and verification
Option A — Native Core: install from Bitcoin Core releases, then:
bitcoind -regtest -daemon
bitcoin-cli -regtest getblockchaininfoExpected: JSON with "chain": "regtest".
Option B — Docker: fixed RPC ports, disposable volume.
Option C — Polar: UI for a local network — same ideas apply.
Done when: RPC (or Polar) answers on a live regtest node.
Step 4 — Mine, fund, confirm + lab
bitcoin-cli -regtest createwallet "alice"
ADDR=$(bitcoin-cli -regtest getnewaddress)
bitcoin-cli -regtest generatetoaddress 101 "$ADDR" # mature coinbase
bitcoin-cli -regtest sendtoaddress <bob> 10
bitcoin-cli -regtest generatetoaddress 1 "$ADDR"Loading diagram…
Common mistakes
- Not mining 100+ blocks before spending coinbase
- Shared nodes without isolation
- Hard-coding txids from a previous run
Capture Regtest check lab evidence (commands, observation, native/Docker/Polar).
Done when: You have a funded wallet you created yourself and lab evidence is filed.
Next lesson
With a funded regtest wallet working, move on to Git & Open Source Workflow.