The P2SH Wars
This article on the history of P2SH implementation on Bitcoin has two valuable lessons and illustrates the benefits of :
- The benefits of multiple codebases: Russell O’Connor found the bug in
OP_EVALwhile 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_EVALfirst, 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’s
OP_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:
- Maintainer committing a bug and no one noticing it;
- Maintainer committing evil signaling mechanism;
- 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;
- Things that look good now may look bad later and vice-versa, no amount of expert “eyes on code” can fix that.