Bitcoin v0.1.0: the first public release of Bitcoin, announced by Satoshi Nakamoto on the Cryptography Mailing List on January 8th 2009 as a Windows-only alpha (the announcement). Satoshi wrote almost all of it himself. The exceptions are sha.cpp and sha.h (Wei Dai's SHA routines from Crypto++, re-indented) and uibase.cpp and uibase.h (window layouts generated by wxFormBuilder). Admittedly, it's a strange thing to read in 2026: there's a marketplace in it, an IRC client, a 32 MiB size limit and an OP_RETURN that doesn't do what you'd expect, and yet the bones of today's Bitcoin are all there.
How it was built
The readme lists two supported compilers, MinGW GCC 3.4.5 and Microsoft Visual C++ 6.0 SP6, and four libraries you had to get separately: wxWidgets (the windows and buttons), OpenSSL (signatures and hashes; "Bitcoin does not use any encryption"), Berkeley DB (the wallet, block index and address files) and Boost. Satoshi told Hal Finney that GCC was the release build (January 24th 2009), and the bitcoin.exe in the archive is indeed a MinGW build (binaries chapter). Both makefiles shipped: makefile for g++ and makefile.vc for Microsoft's compiler.
The rules that were already there
- Units: COIN = 100000000 and CENT = 1000000, so one coin is 100 million of the smallest unit from day one.
- Block reward: 50 coins, halved every 210,000 blocks ("Subsidy is cut in half every 4 years"), which adds up to the 21 million Satoshi announced.
- Coinbase maturity: COINBASE_MATURITY = 100, but the client counts down 120 blocks, which is why the announcement says generated coins wait 120 blocks.
- Difficulty: retarget every two weeks of 10-minute blocks, limited to a factor of 4 either way. Interestingly, the loop that walks back to the start of the period runs nInterval-1 times, so it measures 2,015 block intervals rather than 2,016, a quirk that's still in Bitcoin's consensus rules today.
- Easiest difficulty: bnProofOfWorkLimit, 32 leading zero bits.
- Genesis block: the coinbase text "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks".
- No 1 MB limit: a block just had to serialize under MAX_SIZE = 0x02000000 (32 MiB, checked in CheckBlock), and the miner filled up to half of that. The 1 MB constant arrived in July 2010 (see the v0.3.1 entry on the code analysis page).
Things that will probably surprise you
- Nodes met on IRC. irc.cpp connects to chat.freenode.net on port 6667, joins #bitcoin, encodes its own address as its nickname and adds the addresses it decodes from other nicknames. Seed nodes as a fallback only came in v0.2.12.
- Pay to IP address. If the recipient was online you could type their IP: the receiving node answers a checkorder message with a fresh public key, and the payer sends a submitorder.
- A marketplace, switched off. market.h defines users, reviews and products, and the network even has a review message type, but the escrow, orders and products panels are all created hidden, in a sizer called bSizer_TabsForFutureUse.
- OP_RETURN didn't fail. It jumped to the end of the script, and scripts ran as one combined program. Fixed in v0.3.6 (the full story).
- Every opcode was on. OP_CAT, OP_SUBSTR, OP_MUL and OP_LSHIFT all work in v0.1. They were disabled in the v0.3.10 code of August 15th 2010.
- Only negative outputs were checked. CheckTransaction rejects negative amounts and nothing else about them. That's the hole the overflow block went through on August 15th 2010 (the full story).
- 15 connections. nMaxConnections = 15; Satoshi cut outbound connections to 8 during the v0.3 release candidates (SVN r96).
How Satoshi wrote it
Four-space indents, every brace on its own line (Allman style, for the non-coders), // comments, the pointer glued to the type (CNode* pnode), PascalCase functions, C-prefixed classes, and his own Hungarian-style type prefixes (nHeight, fDebug, vchPubKey; booleans start with f, never b). He even rolled his own foreach, loop and CRITICAL_BLOCK macros. The full breakdown is on the coding style page, and how little it changed over the next two years is in Satoshi Against Himself.
