Learning objectives
- Understand what it means to run a full Bitcoin node
- Know the difference between bitcoind and bitcoin-cli
- Identify where Bitcoin Core stores data (blocks, wallets, mempool)
- Understand how RPC access works and how to secure it
Lesson outline
What is a full node?
A full node:- Validates every block and transaction
- Stores a full copy of the blockchain
- Participates in network consensus rules
- Enforces transaction policy (fees, size, etc.)
- Connects to the peer-to-peer Bitcoin network
- Downloads and verifies all ~800GB of block data
- Stores this in a dedicated data directory
Full nodes are essential for decentralization, they enforce the rules of Bitcoin without trusting any third party.
bitcoind vs bitcoin-cli
bitcoind: the daemon that runs the full Bitcoin node. bitcoin-cli: the command-line client used to send RPC commands to bitcoind. In regtest or testnet, it simulates this behavior on a smaller scale. Example interaction:- bitcoind -regtest -daemon
- bitcoin-cli -regtest getblockchaininfo
Bitcoin Core data directory structure
By default:- Linux: ~/.bitcoin/
- Regtest: ~/.bitcoin/regtest/
- Testnet: ~/.bitcoin/testnet3/
Understanding the mempool
The mempool is Bitcoin Core’s memory-based pool of unconfirmed transactions. It grows when blocks are full or fee pressure is high. Use getrawmempool to view TXs in the pool:Wallets in Bitcoin Core
Bitcoin Core now supports multi-wallet mode: Each wallet has its own balance, address pool, and UTXOs. Wallets are stored in: ~/.bitcoin/wallets/ You can create or load a wallet like this:Wallets must be loaded to access balances or send transactions.
Permissioning and RPC ports
Default RPC Port:- Mainnet : 8332
- Testnet : 18332
- Regtest : 18443
- Never expose RPC to the public internet
- bitcoind serves RPC over plain HTTP, so use an SSH tunnel or VPN if accessing over a network
- For Docker or remote CLI use: restrict to localhost or use SSH port forwarding
Activity
Inspect your Bitcoin data directory:- Navigate to ~/.bitcoin/regtest/
- List and describe what’s in blocks/, chainstate/, and wallets/
- Run: