The P2SH Wars
This article on the history of P2SH implementation on Bitcoin has two valuable lessons and illustrates the benefits of bitcoind
decentralization:
- The benefits of multiple codebases: Russell O’Connor found the bug in
OP_EVAL
while working on it in his alternative Bitcoin software implementation. - The dangers of a single master repository with a restricted set of owners: Gavin Andresen committed code for a broken
OP_EVAL
first, then pushed an evil miner activation signaling mechanism that defaulted to his personal preferred P2SH version (to signal the opposite miners would have to edit the code and recompile) and won the battle against a much better and saner approach (Luke Jr’sOP_CHECKHASHVERIFY
) by the sole power of inertia: things were already merged and working so no one bothered to fight for what seemed to be a minor and maybe irrelevant improvement but that later was proven to be substantially better.
The second lesson can actually be split in 4 different lessons:
a. Maintainer committing a bug and no one noticing it; b. Maintainer committing evil signaling mechanism; c. Everybody going along with everything because it’s hard to take a public stand about a central thing everybody loves and the status quo bias exists and is strong; d. Things that look good now may look bad later and vice-versa, no amount of expert “eyes on code” can fix that.