Use a disposable environment
Regtest is Bitcoin Core’s private development chain. It lets a developer control block production without using Bitcoin mainnet. Keep a dedicated data directory and only disposable practice wallets. This is a documentation-based recipe, not a claim that Bitcoin Core was executed for this publication.
Record the environment first
Install Bitcoin Core from its official distribution and check that version’s documentation. Record the release, operating system, data directory and exact command. The following commands use the Bitcoin Core command-line tools; paths and startup behavior vary by platform.
bitcoind -regtest -datadir="PATH_TO_EXISTING_EMPTY_LAB_DIRECTORY"
# In a second terminal, using that same directory:
bitcoin-cli -regtest -datadir="PATH_TO_EXISTING_EMPTY_LAB_DIRECTORY" getblockchaininfoCheck before continuing
The returned chain field must identify regtest. If it identifies a different chain, stop: the process or data directory is not the one intended for this exercise. Do not continue by removing -regtest to make an error disappear. Use your installed version’s help for subsequent wallet creation and block-generation steps.
A useful notebook entry
- Question: am I communicating with the intended disposable node?
- Observation: the chain field, software version and command exit status.
- Interpretation: the result identifies the network, not the safety of any later transaction command.
- Next test: choose one operation from the matching RPC documentation and state its expected result before running it.
Keep the boundary clear
This first check intentionally does not import keys, unlock a wallet or send a payment. Never put a valuable seed into a regtest experiment. Close the disposable node normally when finished, keeping the notes you need to reproduce the experiment.