~ / initial commit / Bitcoin

Issue #06 — "First commit"

Bitcoin

The first commit of the Bitcoin repository is not by Satoshi. It's dated eight months after launch, and it contains a built-in marketplace and Windows DLLs.

cryptoc++
the commit
repo  bitcoin/bitcoin
sha  4405b78d60
author  sirius-m (Martti Malmi)
date  2009-08-30
message  "First commit"
stats  45 files · +32,239 lines

If you had to name the author of Bitcoin, you would say Satoshi Nakamoto. If you had to name the author of the first commit in the Bitcoin repository, you would also say Satoshi Nakamoto. And you would be wrong.

"sirius-m" is Martti Malmi, a Finnish computer science student who became Satoshi Nakamoto's first real collaborator on Bitcoin. In August 2009, he imported an existing codebase into SourceForge's version control. That import is what git log --reverse shows you as the origin of the Bitcoin repository. Not the invention of Bitcoin, not the mining of the genesis block, not the publication of the whitepaper.

Bitcoin's first commit is not by Bitcoin's creator. It is by its first fan.

1. What the record actually says

Bitcoin has multiple plausible "beginnings," and it is worth laying them out, because the git log is only one of them.

  • October 31, 2008. Satoshi Nakamoto publishes the whitepaper, Bitcoin: A Peer-to-Peer Electronic Cash System, to a cryptography mailing list. No code.
  • January 3, 2009. The genesis block is mined. Embedded in it is the now-famous text The Times 03/Jan/2009 Chancellor on brink of second bailout for banks. The network is live.
  • January 9, 2009. Satoshi releases Bitcoin v0.1 as a downloadable Windows binary and source tarball. The software exists. It is not in version control.
  • August 30, 2009. Martti Malmi (eight months after the network launched) imports the existing source into SourceForge SVN under the username sirius-m. This is the commit you are reading about.
  • 2011. The repository is migrated from SourceForge SVN to git on GitHub. The SVN history is preserved during the migration, so the sirius-m "First commit" remains the oldest entry in the git log.

The first commit of bitcoin/bitcoin is not day zero of Bitcoin. It is day 239. For the first 239 days of its life, the software now running a trillion-dollar economy had no version control. Changes were distributed as tarballs. "Collaboration" meant emailing patches to Satoshi directly.

Eight months is a long time to run a live monetary network with no branching strategy.

2. Who is Martti Malmi?

He was 21. He was studying at Helsinki University of Technology. He had stumbled across a forum post about Bitcoin, been intrigued, and emailed Satoshi asking how he could help. Satoshi wrote back. Over the next two years, Martti would become one of the two humans with significant direct contact with Satoshi (the other being Hal Finney), and he would do a substantial amount of the early practical work: setting up bitcoin.org, maintaining the forum, answering new users, and, critically, importing the codebase into SourceForge so that more than one person could work on it.

For this, he was paid in Bitcoin. He is believed to have held around 55,000 BTC at one point, from a combination of early mining and Satoshi's direct gifts. He sold most of them in the early 2010s to buy an apartment in Helsinki. At 2024 prices, that apartment cost several billion dollars. He has said publicly that he does not regret it, because the apartment is nice and the alternative would have been refreshing a price chart for a decade, which sounds exhausting.

There is an entire novel somewhere in the story of Martti Malmi. This commit is page one of it.

3. What's in the commit

45 files, 32,239 lines, mostly C++. Because this commit is a full import of the existing Bitcoin v0.1 codebase, it contains essentially the entire product as it existed on launch day. Reading the file list is like reading a snapshot of what Bitcoin was originally supposed to be, before most of it was cut.

Some highlights:

  • main.cpp (2,692 lines): the monolithic heart of the node, containing consensus, networking, wallet, and UI logic all interleaved. Modern Bitcoin has spent 15+ years carefully separating these concerns. In this commit they share a file.
  • irc.cpp (314 lines): Bitcoin originally used IRC for peer discovery. The first version of the network bootstrapped by having new nodes join an IRC channel and read the usernames of other nodes off the channel roster. A cryptocurrency that discovered its peers via 1990s chat infrastructure.
  • market.cpp and market.h: a built-in marketplace was part of the original Bitcoin client. You could buy and sell things directly from the node software. This was removed well before Bitcoin became what most people know it as. The file names are still here, in the first commit, like a fossil of a road not taken.
  • rc/addressbook16.bmp, rc/addressbook20.bmp, ...: .bmp image resources for a Windows GUI. Bitcoin was originally a Windows desktop application with an icon, a menu bar, and a literal address book. The CLI-first, daemon-first image of Bitcoin came later.
  • libeay32.dll, mingwm10.dll: Windows DLLs, committed directly into the repository as binary files. Nobody today would check Windows runtime libraries into source control, but in 2009 Bitcoin shipped with its OpenSSL and MinGW dependencies bundled this way.

All of this landed in the git log in a single commit, as if someone had opened a zip file, run svn add *, and hit enter. Which is approximately what happened.

4. What "first commit" even means

The Bitcoin case is an unusually clean demonstration of why git log --reverse is not always a history book. The git log of bitcoin/bitcoin starts on August 30, 2009. The actual beginning of Bitcoin is months earlier than that. If you go looking for the oldest Bitcoin code in the git log, you will find it; but you will find it labeled with the name of the person who imported it, not the name of the person who wrote it.

This happens more than you would think. A lot of projects predate their version control. A lot of projects migrate between VCSes and lose fidelity. A lot of projects get "open-sourced" by a different person than the original author, and the open-sourcing event becomes the historical record simply because it is the thing that has a SHA attached to it.

The lesson I keep drawing from this newsletter is that initial commit is a technical term, not a historical one. It is the first entry in a particular file: the git log of a particular repository. It is not necessarily the beginning of the work. For most famous repositories, it is not. And Bitcoin, where the first commit is dated eight months after the software has been in daily public use, is the purest possible example.

Sometimes the commit log tells you when the project started. Sometimes it tells you when someone else decided the project was worth tracking. Bitcoin is the second kind, and the person who decided was a 21-year-old in Helsinki who had recently become pen pals with a pseudonym.

5. Footnotes from the commit log

  • Satoshi Nakamoto does eventually appear as a committer in the Bitcoin repository, but not in the first commit. His first direct commit comes a few entries later. His last is from 2010, before he disappeared.
  • sirius-m / Martti Malmi still occasionally writes about early Bitcoin on his blog. He is, as far as is publicly known, one of the only people who exchanged private email with Satoshi and whose real identity is confirmed.
  • The original SVN repository is still visible on SourceForge, though it has not been updated in well over a decade.
  • The first commit does not include the Bitcoin whitepaper. The whitepaper has never lived in the repository. It was published to a mailing list and never migrated.