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

  • Cointime May 3rd News Express

    1. The 133rd Ethereum ACDC meeting: The goal is to complete the devnet within 7-10 days

  • Paribu wallet address transferred more than 4 trillion PEPE, worth about 31 million US dollars

    According to Whale Alert monitoring, the Paribu wallet address transferred 4,049,371,347,309 PEPE tokens worth approximately $31,091,073 via the Ethereum blockchain at around 17:20 today, and all tokens were transferred to an address starting with "0xa23c".

  • Huaxia Virtual Asset ETF's AUM exceeds HK$1 billion, while Bosera and Harvest AUM both exceed HK$500 million

    According to the latest virtual asset ETF asset management scale data from HKEX as of May 3rd:1. Huaxia Ether ETF has an asset management scale of HKD 146.16 million, and Huaxia Bitcoin ETF has reached HKD 880.25 million, with a total amount exceeding HKD 1 billion, reaching HKD 1.02641 billion;2. Bosera HashKey Ether ETF has an asset management scale of HKD 96.59 million, and Bosera HashKey Bitcoin ETF has reached HKD 478.09 million, with a total of HKD 574.58 million;3. Harvest Ether ETF has an asset management scale of HKD 89.97 million, and the encrypted Bitcoin ETF has reached HKD 449.39 million, with a total of HKD 539.36 million.

  • FRIEND fell below $3, and the ecosystem TVL dropped to the $30 million range

    According to DexScreener data, the trading price of friend.tech tokens has fallen below $3 and is currently at $2.31. The current circulating supply is approximately 14.5 million. According to DeFiLlama data, the friend.tech ecosystem's TVL has dropped to the $30 million range, with a 13.6% decline over the past 7 days. Friend.tech was launched on the Ethereum Layer 2 network Base in August of last year. The ecosystem's TVL had once surpassed $50 million and is currently the 9th largest protocol on the Base chain.

  • Animoca Brands: MOCA token distribution is planned to take place around May 24

    Animoca Brands officially announced that the distribution of MOCA tokens is planned to take place around May 24th. The token release information includes:

  • NFT lending platform Blend’s total transaction volume exceeded US$6 billion, with more than 650,000 loans

    The latest data from Dune shows that the total transaction volume of Blend, an NFT lending platform under Blur, has exceeded 6 billion US dollars, reaching 6,048,459,706 US dollars at the time of writing, with a total of 659,353 loans; the total number of independent borrowing users is 10,458, and the total number of independent lending users is 4,447. The current total active loan amount is 3,347, with an active loan amount of approximately 6,013 ETH.

  • Yuga Labs will migrate the Otherside metaverse to Improbable’s Msquared

    Yuga Labs and Improbable announced the migration of Otherside Metaverse to Improbable's Msquared, which is Improbable's interconnected Metaverse network. By rebuilding Otherside, Yuga Labs will provide the community with the ability to build in large-scale environments and interoperability. Improbable and Yuga Labs also announced other news about the development of Otherside, including a large multiplayer game event in July and the launch of Otherside development toolkit World Builder ODK.

  • friend.tech has opened airdrop token applications, FRIEND is currently priced at $3.34

    According to the official website, friend.tech has opened up the airdrop of the token FRIEND for claiming, with FRIEND currently priced at $3.34. Previously reported, friend.tech will release version 2 and conduct an airdrop on May 3rd.

  • The 133rd Ethereum ACDC meeting: The goal is to complete the devnet within 7-10 days

    The Ethereum developers held their 133rd ACDC conference call. First, they outlined the latest research on Ethereum protocol confirmation rules. Then, they discussed Pectra updates related to EIP-7547 and CFI states, and decided to put them on hold temporarily. They also updated the v1.5.0-alpha.1 specification. Regarding the implementation updates for devnet-0, most teams are making progress, but there are also some unexpected complexities. The goal is to complete devnet within 7-10 days.

  • BTC falls below $58,000

    Golden Finance reported that according to OKX market data, BTC briefly touched $57,700 and is now trading at $58,581.53, with a daily decline of 7.15%. The market is volatile, so please be prepared for risk management.