Bitcoin Chain Fork Double Spend Incident: Difference between revisions
(Created page with "{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/bitcoinchainforkdoublespendincident.php}} {{Unattributed Sources}} thumb|Bitcoin Talk ForumA larger-than-usual block with more transaction inputs was mined and broadcasted, causing a fork in the Bitcoin blockchain. Bitcoin 0.8 nodes managed this well, but pre-0.8 nodes rejected it, resulting in an unexpected split. The 0.8-incompatible chain held about 60% of the mining ha...") |
(Another 30 minutes. Review of the BIP and tracing back the history of the BIP. Updated with information from the bitcoin wiki. Removed a broken source link which couldn't be found in any archive. Structuring information from the about section to other relevant sections.) |
||
| Line 1: | Line 1: | ||
{{ | {{Case Study Under Construction}}{{Unattributed Sources}} | ||
{{Unattributed Sources}} | |||
[[File:Bitcointalk.jpg|thumb|Bitcoin Talk Forum]]A larger-than-usual block with more transaction inputs was mined and broadcasted, causing a fork in the Bitcoin blockchain. Bitcoin 0.8 nodes managed this well, but pre-0.8 nodes rejected it, resulting in an unexpected split. The 0.8-incompatible chain held about 60% of the mining hash power, preventing an automatic resolution. To restore a canonical chain, BTCGuild and Slush downgraded their Bitcoin 0.8 nodes to 0.7, making the majority hashpower favor the chain without the larger block, eventually causing 0.8 nodes to reorganize to the pre-0.8 chain. During this period, there was a notable double spend, but it was an experiment rather than a malicious act. | [[File:Bitcointalk.jpg|thumb|Bitcoin Talk Forum]]A larger-than-usual block with more transaction inputs was mined and broadcasted, causing a fork in the Bitcoin blockchain. Bitcoin 0.8 nodes managed this well, but pre-0.8 nodes rejected it, resulting in an unexpected split. The 0.8-incompatible chain held about 60% of the mining hash power, preventing an automatic resolution. To restore a canonical chain, BTCGuild and Slush downgraded their Bitcoin 0.8 nodes to 0.7, making the majority hashpower favor the chain without the larger block, eventually causing 0.8 nodes to reorganize to the pre-0.8 chain. During this period, there was a notable double spend, but it was an experiment rather than a malicious act. | ||
This is a global/international case not involving a specific country. | This is a global/international case not involving a specific country.<ref name="bips-11433" /><ref name="newsletterarchive-11417" /><ref name="bitcointalk-11434" /> | ||
== About Bitcoin == | == About Bitcoin == | ||
Bitcoin is the largest and first blockchain network, originally launched by an anonymous founder Satoshi Nakamoto. | |||
=== About Gavin Andresen === | |||
Gavin Andresen is one of the lead developers for the bitcoin blockchain. | |||
== About BTC-e == | |||
BTC-e was one of the largest historic exchanges prior to [[BTC-e Assets Seized By US Authorities|it's shutdown by authorities in 2017]]. | |||
" | == The Reality == | ||
Insufficient testing had been performed on bitcoin blocks<ref name="bips-11433" />. No testing had been performed with blocks that were smaller in size but required more locks to be established on the BerkeleyDB<ref name="bips-11433" />. | |||
== What Happened == | |||
A double-spend transaction occurred due to the blockchain split. | |||
"08:08 – Well before I knew what later have happened, I deposited $10000-worth Bitcoins to BTC-e over OKPAY's Bitcoin payment, I paid OKPAY address 12z2n8YCJw1BEsJhhQPLCTuLqwH341nKnE 211.9093 BTC and 0.0005 BTC as transaction fee. | |||
09:30 – The transaction was included in version 0.8's fork, block 225446 | 09:30 – The transaction was included in version 0.8's fork, block 225446 | ||
10:08 – Deposit completed, $9800 credited to my BTC-e account | 10:08 – Deposit completed, $9800 credited to my BTC-e account | ||
12:53 – After some study, I recognized, the transaction, though included in version 0.8's fork, was never confirmed by the pre-0.8 fork, so I decided to make two double spend transactions on two of the vins of the OKPAY transaction, and broadcasted them with the raw transaction API, 0.001 BTC transaction fee included in each transaction. | 12:53 – After some study, I recognized, the transaction, though included in version 0.8's fork, was never confirmed by the pre-0.8 fork, so I decided to make two double spend transactions on two of the vins of the OKPAY transaction, and broadcasted them with the raw transaction API, 0.001 BTC transaction fee included in each transaction. | ||
13:01 – The double spend transaction was included in pre-0.8 fork block 225446" | 13:01 – The double spend transaction was included in pre-0.8 fork block 225446" | ||
{| class="wikitable" | {| class="wikitable" | ||
|+Key Event Timeline - Bitcoin Chain Fork Double Spend Incident | |+Key Event Timeline - Bitcoin Chain Fork Double Spend Incident | ||
| Line 62: | Line 37: | ||
|March 12th, 2013 6:22:02 PM MDT | |March 12th, 2013 6:22:02 PM MDT | ||
|Bitcoin Talk Post | |Bitcoin Talk Post | ||
|The incident and a timeline are posted on the Bitcoin Talk forum. | |The incident and a timeline are posted on the Bitcoin Talk forum<ref name="bitcointalk-11434" />. | ||
|- | |||
|March 20th, 2013 10:34:00 AM MDT | |||
|Post-Mortem Released | |||
|A post-mortem is released by Gavin Andresen with additional details about the incident on the Bitcoin Wiki<ref>[https://en.bitcoin.it/w/index.php?title=BIP_0050&oldid=36239 BIP_0050 Original Version From March 20th, 2013 10:34:00 AM MDT - Bitcoin Wiki] (Accessed Mar 8, 2024)</ref>. | |||
|} | |} | ||
== Technical Details == | == Technical Details == | ||
This | "A block that had a larger number of total transaction inputs than previously seen was mined and broadcasted. Bitcoin 0.8 nodes were able to handle this, but some pre-0.8 Bitcoin nodes rejected it, causing an unexpected fork of the blockchain. The pre-0.8-incompatible chain (from here on, the 0.8 chain) at that point had around 60% of the mining hash power ensuring the split did not automatically resolve (as would have occurred if the pre-0.8 chain outpaced the 0.8 chain in total work, forcing 0.8 nodes to reorganise to the pre-0.8 chain). | ||
In order to restore a canonical chain as soon as possible, BTCGuild and Slush downgraded their Bitcoin 0.8 nodes to 0.7 so their pools would also reject the larger block. This placed majority hashpower on the chain without the larger block, thus eventually causing the 0.8 nodes to reorganise to the pre-0.8 chain." | |||
"During this time there was at least one large double spend. However, it was done by someone experimenting to see if it was possible and was not intended to be malicious." | |||
"Because max-sized blocks had been successfully processed on the testnet, it did not occur to anyone that there could be blocks that were smaller but require more locks than were available. Prior to 0.7 unmodified mining nodes self-imposed a maximum block size of 500,000 bytes, which further prevented this case from being triggered. 0.7 made the target size configurable and miners had been encouraged to increase this target in the week prior to the incident. | |||
Bitcoin 0.8 did not use Berkeley DB. It switched to LevelDB instead, which did not implement the same locking limits as BDB. Therefore it was able to process the forking block successfully. | |||
Note that BDB locks are also required during processing of re-organizations. Versions prior to 0.8 may be unable to process some valid re-orgs." | |||
== Total Amount Lost == | == Total Amount Lost == | ||
The total amount lost has been estimated at $10,000 USD. | The total amount lost has been estimated at $10,000 USD. | ||
== Immediate Reactions == | == Immediate Reactions == | ||
How did the various parties involved (firm, platform, management, and/or affected individual(s)) deal with the events? Were services shut down? Were announcements made? Were groups formed? | How did the various parties involved (firm, platform, management, and/or affected individual(s)) deal with the events? Were services shut down? Were announcements made? Were groups formed? | ||
Large mining pools reverted their bitcoin clients back to the 0.7 version of the chain. | |||
== Ultimate Outcome == | == Ultimate Outcome == | ||
The issue was resolved on August 16th, 2013<ref name="bips-11433" /> which forked unpatched nodes off the network. | |||
== Total Amount Recovered == | == Total Amount Recovered == | ||
The total amount recovered has been estimated at $10,000 USD. | The total amount recovered has been estimated at $10,000 USD. The individual performing the double spend was not malicious in nature. | ||
== Ongoing Developments == | == Ongoing Developments == | ||
This situation meant that older nodes which did not implement that improvement proposal or manually increase their number of supported locks would not be able to validate the bitcoin blockchain. | |||
== Individual Prevention Policies == | == Individual Prevention Policies == | ||
{{Prevention:Individuals:Placeholder}} | {{Prevention:Individuals:Placeholder}} | ||
| Line 102: | Line 89: | ||
== References == | == References == | ||
<references><ref name="newsletter-11414"> | <references> | ||
<ref name="newsletter-11414">https://newsletter.banklesshq.com/p/stoppable-finance-lite (Oct 11, 2022)</ref> | |||
<ref name="bips-11433">[https://bips.xyz/50?utm_source=substack&utm_medium=email | <ref name="bips-11433">[https://bips.xyz/50?utm_source=substack&utm_medium=email March 2013 Chain Fork Post-Mortem - BIPS.xyz] (Accessed Oct 11, 2022)</ref> | ||
<ref name="newsletterarchive-11417">[https://web.archive.org/web/20221010212053/https://newsletter.banklesshq.com/p/stoppable-finance-lite <nowiki>Stoppable Finance [LITE] - by Donovan Choy - Bankless</nowiki>] (Jul 24, 2023)</ref> | <ref name="newsletterarchive-11417">[https://web.archive.org/web/20221010212053/https://newsletter.banklesshq.com/p/stoppable-finance-lite <nowiki>Stoppable Finance [LITE] - by Donovan Choy - Bankless</nowiki>] (Jul 24, 2023)</ref> | ||
<ref name="bitcointalk-11434">[https://bitcointalk.org/index.php?topic=152348.0 A successful DOUBLE SPEND US$10000 against OKPAY this morning. - BitcoinTalk] (Aug 14, 2023)</ref> | |||
<ref name="bitcointalk-11434">[https://bitcointalk.org/index.php?topic=152348.0 A successful DOUBLE SPEND US$10000 against OKPAY this morning.] (Aug 14, 2023)</ref></references> | </references> | ||
Revision as of 11:49, 8 March 2024
Notice: This page is a new case study and some aspects have not been fully researched. Some sections may be incomplete or reflect inaccuracies present in initial sources. Please check the References at the bottom for further information and perform your own additional assessment. Please feel free to contribute by adding any missing information or sources you come across. If you are new here, please read General Tutorial on Wikis or Anatomy of a Case Study for help getting started.
Notice: This page contains sources which are not attributed to any text. The unattributed sources follow the initial description. Please assist by visiting each source, reviewing the content, and placing that reference next to any text it can be used to support. Feel free to add any information that you come across which isn't present already. Sources which don't contain any relevant information can be removed. Broken links can be replaced with versions from the Internet Archive. See General Tutorial on Wikis, Anatomy of a Case Study, and/or Citing Your Sources Guide for additional information. Thanks for your help!
A larger-than-usual block with more transaction inputs was mined and broadcasted, causing a fork in the Bitcoin blockchain. Bitcoin 0.8 nodes managed this well, but pre-0.8 nodes rejected it, resulting in an unexpected split. The 0.8-incompatible chain held about 60% of the mining hash power, preventing an automatic resolution. To restore a canonical chain, BTCGuild and Slush downgraded their Bitcoin 0.8 nodes to 0.7, making the majority hashpower favor the chain without the larger block, eventually causing 0.8 nodes to reorganize to the pre-0.8 chain. During this period, there was a notable double spend, but it was an experiment rather than a malicious act.
This is a global/international case not involving a specific country.[1][2][3]
About Bitcoin
Bitcoin is the largest and first blockchain network, originally launched by an anonymous founder Satoshi Nakamoto.
About Gavin Andresen
Gavin Andresen is one of the lead developers for the bitcoin blockchain.
About BTC-e
BTC-e was one of the largest historic exchanges prior to it's shutdown by authorities in 2017.
The Reality
Insufficient testing had been performed on bitcoin blocks[1]. No testing had been performed with blocks that were smaller in size but required more locks to be established on the BerkeleyDB[1].
What Happened
A double-spend transaction occurred due to the blockchain split.
"08:08 – Well before I knew what later have happened, I deposited $10000-worth Bitcoins to BTC-e over OKPAY's Bitcoin payment, I paid OKPAY address 12z2n8YCJw1BEsJhhQPLCTuLqwH341nKnE 211.9093 BTC and 0.0005 BTC as transaction fee.
09:30 – The transaction was included in version 0.8's fork, block 225446
10:08 – Deposit completed, $9800 credited to my BTC-e account
12:53 – After some study, I recognized, the transaction, though included in version 0.8's fork, was never confirmed by the pre-0.8 fork, so I decided to make two double spend transactions on two of the vins of the OKPAY transaction, and broadcasted them with the raw transaction API, 0.001 BTC transaction fee included in each transaction.
13:01 – The double spend transaction was included in pre-0.8 fork block 225446"
| Date | Event | Description |
|---|---|---|
| March 12th, 2013 6:22:02 PM MDT | Bitcoin Talk Post | The incident and a timeline are posted on the Bitcoin Talk forum[3]. |
| March 20th, 2013 10:34:00 AM MDT | Post-Mortem Released | A post-mortem is released by Gavin Andresen with additional details about the incident on the Bitcoin Wiki[4]. |
Technical Details
"A block that had a larger number of total transaction inputs than previously seen was mined and broadcasted. Bitcoin 0.8 nodes were able to handle this, but some pre-0.8 Bitcoin nodes rejected it, causing an unexpected fork of the blockchain. The pre-0.8-incompatible chain (from here on, the 0.8 chain) at that point had around 60% of the mining hash power ensuring the split did not automatically resolve (as would have occurred if the pre-0.8 chain outpaced the 0.8 chain in total work, forcing 0.8 nodes to reorganise to the pre-0.8 chain).
In order to restore a canonical chain as soon as possible, BTCGuild and Slush downgraded their Bitcoin 0.8 nodes to 0.7 so their pools would also reject the larger block. This placed majority hashpower on the chain without the larger block, thus eventually causing the 0.8 nodes to reorganise to the pre-0.8 chain."
"During this time there was at least one large double spend. However, it was done by someone experimenting to see if it was possible and was not intended to be malicious."
"Because max-sized blocks had been successfully processed on the testnet, it did not occur to anyone that there could be blocks that were smaller but require more locks than were available. Prior to 0.7 unmodified mining nodes self-imposed a maximum block size of 500,000 bytes, which further prevented this case from being triggered. 0.7 made the target size configurable and miners had been encouraged to increase this target in the week prior to the incident.
Bitcoin 0.8 did not use Berkeley DB. It switched to LevelDB instead, which did not implement the same locking limits as BDB. Therefore it was able to process the forking block successfully.
Note that BDB locks are also required during processing of re-organizations. Versions prior to 0.8 may be unable to process some valid re-orgs."
Total Amount Lost
The total amount lost has been estimated at $10,000 USD.
Immediate Reactions
How did the various parties involved (firm, platform, management, and/or affected individual(s)) deal with the events? Were services shut down? Were announcements made? Were groups formed?
Large mining pools reverted their bitcoin clients back to the 0.7 version of the chain.
Ultimate Outcome
The issue was resolved on August 16th, 2013[1] which forked unpatched nodes off the network.
Total Amount Recovered
The total amount recovered has been estimated at $10,000 USD. The individual performing the double spend was not malicious in nature.
Ongoing Developments
This situation meant that older nodes which did not implement that improvement proposal or manually increase their number of supported locks would not be able to validate the bitcoin blockchain.
Individual Prevention Policies
No specific policies for individual prevention have yet been identified in this case.
For the full list of how to protect your funds as an individual, check our Prevention Policies for Individuals guide.
Platform Prevention Policies
Policies for platforms to take to prevent this situation have not yet been selected in this case.
For the full list of how to protect your funds as a financial service, check our Prevention Policies for Platforms guide.
Regulatory Prevention Policies
No specific regulatory policies have yet been identified in this case.
For the full list of regulatory policies that can prevent loss, check our Prevention Policies for Regulators guide.
References
- ↑ 1.0 1.1 1.2 1.3 March 2013 Chain Fork Post-Mortem - BIPS.xyz (Accessed Oct 11, 2022)
- ↑ 3.0 3.1 A successful DOUBLE SPEND US$10000 against OKPAY this morning. - BitcoinTalk (Aug 14, 2023)
- ↑ BIP_0050 Original Version From March 20th, 2013 10:34:00 AM MDT - Bitcoin Wiki (Accessed Mar 8, 2024)
Cite error: <ref> tag with name "newsletter-11414" defined in <references> is not used in prior text.