This is a read note of Mastering Bitcoin Chapter 03: Bitcoin Core.

1 Overivew

When bitcoin was created by Satoshi Nakamoto, the software was actually completed before the Bitcoin whitepaper. That implementation is known as “Bitcoin” or “Satoshi client” and has evolved into Bitcoin Core, the reference imiplementation of the Bitcoin system. Bitcoin Core implments a wallet, a transaction and block validation engine, and a full network node in the peer-to-peer Bitcoin network. The Bitcoin Core wallet is not intended to be used as a production wallet for users or for applicaitons. Developers are advised to build wallets using modern standards such as BIP-39 and BIP-32.

2 Running a Bitcoin Core Node

Bitcoin Core keeps a full copy of the blockchain by default, with every transaction that has ever occurred on the Bitcoin network since its inception in 2009. Reasons to run a node:

  • Access Bitcoin API
  • validate transactions by yourself
  • Support Bitcoin

Bitcoin Core’s API is a JSON-RPC interface. The bitcoin-cli helper or curl is very useful for exploring the Bitcoin Core API and testing functions. Bitcoin Core will create a random password on each start and place it in the data directory under the name .cookie. curl will ask for credentials to be sent along with its requests.