Bitcoin was the first cryptocurrency, being introduced to the world by the anonymous developer or group of developers that go by the name Satoshi Nakamoto.
BTC has had a long history of ups and downs, some of which were quite good for the community as it allowed folk to further accumulate additional Bitcoin. Others, however, almost destroyed the original crypto.
Today I aim at looking at some of the toughest bugs Bitcoin developers had to deal with, why did they happen, what went wrong and how they were mitigated.
I will do my best to keep things simple and not technical.
Ready to hear some of the most disturbing stories surrounding Bitcoin?
How bugs happen
Software is created through scripts. In Bitcoin, the original version was programmed in a low-assembly language called ‘c++’.
Even though developers, especially in the open-source world, make tons of runs at the code, some bugs tend to happen. This may be due to changes that make some functions incompatible with the new code, due to errors in the new code or even due to functions that do stuff they shouldn’t.
Whatever the reason may be, you must realise that Bitcoin, being open-source software, is also prone to some bugs and errors. Even though most issues are easily fixed (BTC is lucky enough to have top-notch devs looking at it), sometimes bugs that arise may cause unforeseeable problems.
Below I will look into the top three bugs and errors that almost led to Bitcoin’s demise.
Bug 1: OP_LSHIFT crash
One of the original instructions that you could run in the scripting language was OP_LSHIFT which would shift a number a certain set of places to the left. It was discovered that when using OP_LSHIFT on some machines, processing the transaction would cause the machine to crash.
The way that this bug works is that you would simply make an evil transaction and send it to a bitcoin node, effectively causing the node to crash.
The way developers fixed the bug was to invalidate certain functions, making the script return…