Stellar Lumens (XLM) Forum with for newcomers and contributor's rewarded Check here

The bugs that almost killed Bitcoin
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

The bugs that almost killed Bitcoin

Today I aim at looking at some of the toughest bugs Bitcoin had to deal with, why did they happen, what went wrong and how they were mitigated

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?

[Image: giphy.gif]

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 ‘false’ – essentially not running the program (the transaction).

Bug 2: Inflation error

Inflation bugs allow you to print more money. It’s almost like you are able to become a central bank within the Bitcoin protocol.

The code that originated the problem was about adding up all the outputs and all the inputs in the transaction. You subtract all the inputs from the outputs, and if you got a negative number then that meant your outputs were greater than your inputs.

Basically an inflation bug is caused by an overflow, as in when the absolute value of the number is too high for the computer to represent it.

So this allowed the user to print money, and this bug was exploited on main net. Billions of BTC were produced.

To solve the issue the code was patched and every miner switched to a new fork, using the last block before the exploit. In essence, there was a hard-fork of the Bitcoin code.

Bug 3: Netsplit

The netsplit bug exploits the fact that you can have two alternative blocks with different transactions in it, that hash to the same value.

This doesn’t mean the hash value is broken. It means that there are two blocks, with different transactions that collide, which have the same hash.

This bug has an easy fix. Miners simply need to eventually reject one of the blocks, making those transactions invalid.
Collisions may happen, and are known to happen, to a certain extent. One of the worst times there were two valid blockchains for around eight blocks. Meaning some miners were mining one chain, while others were mining a different chain.

These splits may happen but eventually get resolved, as one of the chains will get more work done and replace the other.

by Pedro Febrero

Possibly Related Threads...
Thread Author Replies Views Last Post
  Bobby Lee Predicts “Two More Bubbles” Before Bitcoin Reaches $1 Million Value crytocure 0 36 10-11-2019, 02:58 PM
Last Post: crytocure
  Bitcoin’s Upcoming Halving Exposes Long-Term Security Issues crytocure 0 46 10-11-2019, 11:20 AM
Last Post: crytocure
  Three things Bitcoin miners should know crytocure 0 39 09-11-2019, 03:25 PM
Last Post: crytocure
  Microsoft Windows Bug Makes it Possible to Mine Bitcoin on Old Computers crytocure 0 38 09-11-2019, 11:41 AM
Last Post: crytocure
  Will Bitcoin Follow Gold Prices Down as Trade Tensions Ease? crytocure 0 56 08-11-2019, 10:57 AM
Last Post: crytocure
  As Bitcoin dominance doubles, analyst says altcoin charts are like “radioactive decay crytocure 0 25 07-11-2019, 02:04 PM
Last Post: crytocure
  Bitcoin Signal That Preceded 42% Price Jump to $10,500 Flashes Again crytocure 0 39 04-11-2019, 03:36 PM
Last Post: crytocure
  Gold Was Worth 584 Bitcoin an Ounce in 2011, Now Only 0.15 crytocure 0 52 03-11-2019, 02:38 PM
Last Post: crytocure
  Crypto Miners Give Bitcoin (BTC) Predictions Before and After Block Reward Halving crytocure 0 53 03-11-2019, 12:18 PM
Last Post: crytocure
  Tracking Bitcoin Transactions, Explained crytocure 0 63 02-11-2019, 11:54 AM
Last Post: crytocure

Users browsing this thread: 1 Guest(s)