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?
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 shouldnt.
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 Bitcoins demise.
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).
Inflation bugs allow you to print more money. Its 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.
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 doesnt 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.
The post The bugs that almost killed Bitcoin appeared first on Coin Rivet.
Read the rest here:
The bugs that almost killed Bitcoin - Yahoo Finance
- Google removes malware Android apps used to secretly mine bitcoin - April 26th, 2014 [April 26th, 2014]
- Bitcoin exchange MtGox liquidated - April 26th, 2014 [April 26th, 2014]
- Bitcoin Wannabe Litecoin Emerges as Low-Price Challenger - April 26th, 2014 [April 26th, 2014]
- The Worlds First Bitcoin Debit Card Is Almost Here - April 26th, 2014 [April 26th, 2014]
- How does Bitcoin work? - Bitcoin - Open source P2P money - April 26th, 2014 [April 26th, 2014]
- Bitcoin - Wikipedia, the free encyclopedia - April 26th, 2014 [April 26th, 2014]
- The Bitcoin Group #27 - China Bans Bitcoin Again - Politics - Dark Market - Bitcoin VC - Video - April 26th, 2014 [April 26th, 2014]
- Edan Yago - Free Market Bitcoin regulation and Honduras free trade zones.mp4 - Video - April 26th, 2014 [April 26th, 2014]
- Bitcoin vs. Political Power: The Cryptocurrency Revolution - Stefan Molyneux at TNW Conference - Video - April 26th, 2014 [April 26th, 2014]
- Video: Roundup of This Week's Bitcoin News 25th April 2014 - Video - April 26th, 2014 [April 26th, 2014]
- Bitcoin Fredagsbar med Torben Mark Pedersen - Video - April 26th, 2014 [April 26th, 2014]
- Bitcoin and the Internet of Money - Video - April 26th, 2014 [April 26th, 2014]
- Bitcoin for Dummies - Video - April 26th, 2014 [April 26th, 2014]
- Bitcoin runner-up Litecoin emerges as low-price challenger - April 27th, 2014 [April 27th, 2014]
- Bitcoin or Gold? Squawk Walk Taipei- Squawkonomics - Video - April 27th, 2014 [April 27th, 2014]
- Bitcoin Miner AntMiner S1 180 - 200 GH/s Nu in de Aanbieding! - Video - April 27th, 2014 [April 27th, 2014]
- New Bitcoin Documentary: Boom or Bust - Video - April 27th, 2014 [April 27th, 2014]
- Bitcoin May v0.9.1 GitHub Source Code Development Visualization - Video - April 27th, 2014 [April 27th, 2014]
- Atomic-Trade Bitcoin Exchange. AML, BSA, FinCEN compliant - Video - April 27th, 2014 [April 27th, 2014]
- China Bans Bitcoin Again -- Bitcoin the Movie -- Startup for Startups Raises 2,000 BTC - Video - April 27th, 2014 [April 27th, 2014]
- 4/24/14 - Xapo Debit Card, Russia's 1st Bitcoin Conference, Silk Road 2.0 - Video - April 27th, 2014 [April 27th, 2014]
- What is Bitcoin? - Video - April 27th, 2014 [April 27th, 2014]
- David Andolfatto, How Does Bitcoin Work? - Video - April 27th, 2014 [April 27th, 2014]
- Australian Bitcoin traders hit by crash - April 28th, 2014 [April 28th, 2014]
- Bitcoin traders hit by Mt.Gox crash - April 28th, 2014 [April 28th, 2014]
- Market Extra: Bitcoin venture capital money hasnt kept up with buzz - April 28th, 2014 [April 28th, 2014]
- Bitcoin price slips as China steps up regulation - April 28th, 2014 [April 28th, 2014]
- Bitcoin price slips on China regulation - April 28th, 2014 [April 28th, 2014]
- Win .33 Bitcoin ($150 or so, Depending on BTC value) - Meme game for May 1st - Take My Bitcoins - Video - April 28th, 2014 [April 28th, 2014]
- Ron Paul on Bitcoin - Video - April 28th, 2014 [April 28th, 2014]
- btc.sx Bitcoin derivatives platform George Samman clip - Video - April 28th, 2014 [April 28th, 2014]
- 'The Rise And Rise Of Bitcoin' Filmmaker: 'There Is No Answer Yet' - April 29th, 2014 [April 29th, 2014]
- Bitcoin the movie: It just had to happen - April 29th, 2014 [April 29th, 2014]
- Bitcoin Vies with New Cryptocurrencies as Coin of the Cyber Realm - April 29th, 2014 [April 29th, 2014]
- The Bitcoin Meetup - BitcoinMKE Hosts Jeffrey Tucker - Video - April 29th, 2014 [April 29th, 2014]
- MIT Bitcoin Expo 2014 - Video - April 29th, 2014 [April 29th, 2014]
- Bitcoin Expo 2014: Fireside Chat with Dr Gavin Wood - Video - April 29th, 2014 [April 29th, 2014]
- Rise Bitcoin Singapore - Video - April 29th, 2014 [April 29th, 2014]
- Preview: Bitcoin Authenticator - 2FA for wallets - Video - April 29th, 2014 [April 29th, 2014]
- The Bitcoin Group #27 (Live) - China Bans Bitcoin Again - Politics - Dark Market - Bitcoin VC - Video - April 29th, 2014 [April 29th, 2014]
- 4/25/14 - More China uncertainty, Missourian bitcoin warning, BadLepricon malware - Video - April 29th, 2014 [April 29th, 2014]
- Money & Tech at The Rise And Rise Of Bitcoin Afterparty - Video - April 29th, 2014 [April 29th, 2014]
- New Bitcoin student club at MIT will promote the virtual currency - April 30th, 2014 [April 30th, 2014]
- 4/29/14 - MIT Bitcoin Project, Mt Gox revival plan, Mastercard lobbyists & Team Rubicon - Video - April 30th, 2014 [April 30th, 2014]
- BitCoin Dentist GoCoin Fox News Interview - Video - April 30th, 2014 [April 30th, 2014]
- Bitcoin Foundation Election Hiccups -- Pathetic Ohio Bans Bitcoins -- Dogecon SF 2014 - Video - April 30th, 2014 [April 30th, 2014]
- Bitcoin Slips to $420 as BTC China Halts Transactions - Video - April 30th, 2014 [April 30th, 2014]
- MultiSig Plus BitCoin Multi Coin Wallet looks like HUGE INVESTMENT potential! - Video - April 30th, 2014 [April 30th, 2014]
- Bitcoin: what happens when the miners pack up their gear? - May 1st, 2014 [May 1st, 2014]
- Dark Wallet Is About to Make Bitcoin Money Laundering Easier Than Ever - May 1st, 2014 [May 1st, 2014]
- Bitcoin Talk Show #7 -- Skype BitcoinTalkShow to Call in Live! 🙂 - Video - May 1st, 2014 [May 1st, 2014]
- Basic Bitcoin Bitches - Video - May 1st, 2014 [May 1st, 2014]
- Gold standard vs Fiat vs Bitcoin - Truthloader - Video - May 1st, 2014 [May 1st, 2014]
- How to Defund the System: Bitcoin vs. the Central Banksters - Video - May 1st, 2014 [May 1st, 2014]
- Bitcoin, Anarchy and Freedom with Roger Ver - Video - May 1st, 2014 [May 1st, 2014]
- MIT Goes Bitcoin-Wild - May 1st, 2014 [May 1st, 2014]
- Bitcoin Weekly 2014 April 30: Bloomberg adds Bitcoin to their market index, MIT to produce campus-wide bitcoin ... - May 1st, 2014 [May 1st, 2014]
- 'Dark Wallet' wants to make Bitcoin even harder to trace - May 1st, 2014 [May 1st, 2014]
- Bitcoin made simple (video animation) - Video - May 1st, 2014 [May 1st, 2014]
- Jon Matonis: Bitcoin - The future of commerce? - Video - May 1st, 2014 [May 1st, 2014]
- $100 in Bitcoin Going to Every MIT Undergrad - Video - May 1st, 2014 [May 1st, 2014]
- The Rise of Digital Currency - Video - May 1st, 2014 [May 1st, 2014]
- Money Goes Virtual: The Bitcoin Bourse - Video - May 2nd, 2014 [May 2nd, 2014]
- Bitcoin Lights with LIFX - Video - May 2nd, 2014 [May 2nd, 2014]
- Bitcoin: How We Got Here and Where We Are Going - May 3rd, 2014 [May 3rd, 2014]
- 5/1/14 - Larry Summers warns critics, Paym system & Bitcoin Center NYC roundtable - Video - May 3rd, 2014 [May 3rd, 2014]
- On est Connect S2 #07 1/2 : BitCoin et Musique sur Internet - Video - May 3rd, 2014 [May 3rd, 2014]
- MIT Undergrads To Receive $100 Worth Of Bitcoin This Fall - Video - May 3rd, 2014 [May 3rd, 2014]
- Why it only took ME less than 2 minutes to believe in Bitcoin - Video - May 3rd, 2014 [May 3rd, 2014]
- Bitcoin Basics and Regulation Thoughts from NH Liberty Forum - Bruce Fenton - Video - May 3rd, 2014 [May 3rd, 2014]
- PRIMER CAJERO DE BITCOIN EN BIT CENTER DE TIJUANA - Video - May 3rd, 2014 [May 3rd, 2014]
- Yelp adds Bitcoin acceptance to business listings - Video - May 3rd, 2014 [May 3rd, 2014]
- Bitcoin A Terrorist Threat? Counterterrorism Program Names Virtual Currencies As Area Of Interest - May 4th, 2014 [May 4th, 2014]
- How Does Bitcoin Works - Video - May 4th, 2014 [May 4th, 2014]
- 10 Things You Didn't Know About BitCoin - Video - May 4th, 2014 [May 4th, 2014]
- BITCOIN The Future of Money - Video - May 4th, 2014 [May 4th, 2014]
- Bitcoin Miner Review - Video - May 4th, 2014 [May 4th, 2014]
- The Bitcoin Group #28 (Live) - Yelp Lists Bitcoin - MIT Bitcoin $100 - Dark Wallet - Ohio Bans BTC - Video - May 4th, 2014 [May 4th, 2014]
- Bitcoin: Gary North is Mentally Deranged And Bitcoin Will Change Everything - Video - May 4th, 2014 [May 4th, 2014]
- Who is the Bitcoin Warlord? - Video - May 4th, 2014 [May 4th, 2014]