Cointime

Download App
iOS & Android

The Untold Story of ditto-b

From Jameson Lopp

The fourth Bitcoin halving just triggered a few hours ago, ushering in the 5th mining epoch. As such, this seems like a good time to tell the tale of a little-known Bitcoin contributor who had a massive effect upon the halving algorithm.

The story takes place 10 years ago when an anonymous developer with no reputation managed to make a significant change to the Bitcoin consensus rules.

The Timeline

A user by the handle "ditto-b" joined GitHub on April 8, 2011.

In 2013 they forked OpenTransactions but didn't seem to do anything with it.

Ditto-b was a fan of Runescape as we can see from this table of Experience Point Levels. https://gist.github.com/ditto-b/933800

Ditto-b also built a basic funds sending script for interacting witih Bitcoin compatible RPC nodes. https://gist.github.com/ditto-b/9360868

On March 10, 2014 they created a pull request to change 4 lines of code in the Bitcoin repository.

These four lines of code are consensus critical and are not to be trifled with!

Long story short: ditto-b discovered a common type of software flaw known as a value overflow bug. No one in Bitcoin's first 5 years of existence had thought through how this function would operate when the blockchain was at a height of 13,440,000 after 64 halvings.

A few weeks later, Pieter Wuille used the timing of the pull request to publish BIP-42 as an April Fool's Day joke that was simultaneously satirical and dead serious.

Ditto Who?

Does "ditto-b" mean anything? The first hit I could come up with is a particular Windows virus dating back to 2007 called Ditto.B.

Then I discovered that "Ditto" is a Pokemon character, and Ditto's attributes are... interesting.

Ditto - Pokedex Guide - IGNDitto is the most flexible Pokémon in the entire universe. It's mainly used for breeding, seeing as how it can mate with almost any Pokémon.

IGNJSnakeC, das6486, Jim McQ, +787 moreupdatedFeb 13, 2013

To use Ditto you have to know a weakness when you see a Pokémon, so you can choose the best possible move at all times. Ditto can only run one set usefully.

It's just interesting, and perhaps coincidental, that this character is related to knowing / exploiting weaknesses. Who knows if the username was chosen with the intention of conveying any meaning; it seems unlikely since the account was created 3 years before the pull request was made.

My Speculative Take

The history on ditto-b's account is suspiciously sparse. It's uncharacteristic, to say the least, for a developer with practically no real contribution activity to simply appear and propose a patch for such a niche edge case in an extremely complex software project.

It's incredibly unlikely that ditto-b was just a random person with no history of contributing to Bitcoin who happened to run across these crazy edge case. Ditto-b is most like a well-known "Bitcoin wizard" who, upon noticing this edge case, decided that it was too sensitive an issue to want to have their reputation linked to the proposed change. As such, they chose to report the issue via an alternate pseudonymous account.

We only ever got 2 sentences out of ditto-b, so there's no point attempting any sort of stylometric analysis, but this snarky comment certainly lends credence to my claim that it was a seasoned Bitcoin developer who was very familiar with the wider ecosystem.

Lessons Learned

In one respect, it's interesting that there were no activation parameters suggested for this consensus change. A soft fork will be executed at block height 13,440,000 without any signaling whatsoever. This leads me to conclude that:

  • Consensus changes that are considered "bug fixes" are assumed to have such strong consensus that the effort to write and test signaling activation logic is considered wasteful.
  • Uncontroversial consensus changes that don't activate for an extremely long period of time are similarly considered not worth the effort for activation logic, as it's assumed that everyone will have updated their code long before the soft fork activates.

Pieter phrased it a bit more humorously in BIP-42:

Given the moderate time frame over which this change is to be implemented, we expect all miners to choose to screw themselves and deploy this change before 2214.If they don't, and a minority remains on the old code base, a fork may occur. Essentially, they'll be mining fool's gold after that time.

This has some tie-ins to my previous analysis of non-backwards compatible changes to Bitcoin client code:

Comments

All Comments

Recommended for you

  • Former Coinbase CTO: Visa and Mastercard and other tech giants have received threats of "censorship" due to their relationship with Libra

    the impact of Operation Chokepoint 2.0 has expanded from the cryptocurrency industry to technology giants such as Visa and Mastercard. Balaji Srinivasan, former CTO of Coinbase, shared a screenshot of a letter sent by US legislators to Visa, Mastercard, and Stripe urging them to withdraw their support for the Libra project backed by Meta.

  • Coinbase CEO: Anti-money laundering policy is a failure

    Coinbase CEO Brian Armstrong stated on the X platform that anti-money laundering (AML) regulations are a failed policy that costs approximately $213 billion annually and harms the interests of legitimate consumers (as seen in multiple bank de-risking events), and according to United Nations data, only prevents about 0.2% of illegal activities. This sounds like a job that should be handled by the Government Efficiency Department (DOGE).

  • There were more than 30 attacks in the crypto space in November: losses of approximately $85.53 million

    According to Pai Shield statistics, in November 2024, there were more than 30 hacker attacks in the cryptocurrency field, causing about $85.53 million in losses, of which about $25.20 million was recovered. Top 5 hacker attacks are as follows:

  • Vitalik: I don’t agree with the way the US government efficiency department pays too much attention to the government’s handling of small spending mistakes

    Vitalik Buterin, co-founder of Ethereum, responded to the content of the US government's small expenditure mistakes released by the Department of Government Efficiency (DOGE), stating that he does not agree with the department's handling method. The examples cited only account for a small portion of the total expenditure. If the government's optimization goal is to avoid mistakes that look bad on Twitter, it will miss many valuable opportunities, and those large-scale projects that actually waste more will continue to exist because they look decent. For small-scale public funds, a venture capital (VC)-like approach should be taken, accepting a large number of possible mistakes, as its goal is to ensure that opportunities that can bring 1,000 times return can be seized. Prudence should be focused on large-scale transactions.

  • Former US CFTC Chairman Predicts SEC Will Drop Lawsuit Against Ripple

    former chairman of the CFTC boldly predicted that the SEC will drop the lawsuit against Ripple, which suggests that regulatory changes may trigger a significant increase in XRP.

  • Analyst: Bitcoin's recent surge may have given investors a false sense of security

    George Milling-Stanley, Chief Gold Strategist at Dow Jones Global Investment Management, believes that the recent surge in Bitcoin may give investors a false sense of security. Milling-Stanley stated, "Simply put, Bitcoin is an investment seeking returns, which suggests that investors are flocking to Bitcoin for capital gains, not because they see the value or use of Bitcoin." The launch of options based on spot Bitcoin ETFs last week may be related to this, as options allow investors to bet on the price volatility of Bitcoin with less cash instead of buying Bitcoin itself.

  • UK court dismisses Craig Wright's appeal against COPA

    On November 29th, according to BitMEX Research, the UK Court of Appeals has dismissed Craig Steven Wright's (CSW) appeal against the Cryptocurrency Open Patent Alliance (COPA), ruling that he lacked any substantive basis. In the case, CSW also complained that the court had adopted evidence from @lopp (James Lopp), but @lopp did not appear as a witness, which the court found to be unfounded. CSW's attempt to prove his claim as the author of the Bitcoin white paper, Satoshi Nakamoto, has once again been thwarted.

  • Binance will delist Gifto (GFT) spot trading pairs

     Binance has announced that deposits for Gifto (GFT) have been suspended as of November 29, 2024 due to potential security issues with the GFT smart contract. Binance may reopen GFT deposits if they deem it safe to do so, but will not issue any further announcements. Binance has decided to delist and cease trading for all Gifto (GFT) spot trading pairs on December 3, 2024 at 08:00 (UTC).

  • Japan's Financial Services Agency warns 5 unregistered overseas cryptocurrency exchanges

    On November 29th, according to CoinPost, the Japanese Financial Services Agency issued warning letters to five unregistered overseas cryptocurrency exchanges. These exchanges include KuCoin, bitcastle LLC, Bybit Fintech Limited, MEXC Global, and Bitget Limited.