Bitcoin Forum
May 22, 2024, 03:56:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is a full blockchain fork possible?  (Read 529 times)
Massimo80 (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100


View Profile
May 07, 2014, 02:48:17 PM
 #1

Let's say someone creates a blockchain fork starting from the genesis block, when the difficulty was absurdly low compared to today; then he starts mining new blocks from there up to the current block index.

Normally, this would require such an amount of time to make it completely impossibile to catch up with the real blockchain; even if he used today's powerful mining hardware, the difficulty increase would compensate for it quickly. But, here's the catch: he customizes his mining software to not ever increase the difficulty, even if it's mining hundreds of blocks per second; block timestamps are simply faked in order to make it seem they were generated at ~10 minutes interval.

When the fake blockchain is longer then the real one (currently ~300000 blocks), he starts broadcasting it; it appears to conform to all rules, and it's longer than the current one, thus all clients and miners treat this as a winning fork and switch to working on it. Of course, difficulty increases abruptly as soon as the full network hashing power is thrown at it, and after some time block generation resumes normal levels.

But now the creator of the fake blockchain owns all Bitcoins that have been generated from the genesis block to when he released it.

Is this scenario actually possible? If not, why? How would Bitcoin nodes reacts to a 300000-blocks-long fork? Is there a limit on how long a fork can be?
Rannasha
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


View Profile
May 07, 2014, 02:57:26 PM
 #2

This has been discussed several time before, including a thread that is still ongoing: https://bitcointalk.org/index.php?topic=596892.0

The gist of it is: The measure of "longest chain" doesn't only look at the blockcount, but instead at the total amount of work completed in a chain. That is, blockcount with each block weighted by its difficulty. Your proposed attack will generate a chain that is equal or greater in blockcount to the main chain, but will be orders of magnitude smaller in terms of total amount of work and will therefore not be accepted.
Massimo80 (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100


View Profile
May 07, 2014, 03:01:23 PM
 #3

This has been discussed several time before, including a thread that is still ongoing: https://bitcointalk.org/index.php?topic=596892.0

The gist of it is: The measure of "longest chain" doesn't only look at the blockcount, but instead at the total amount of work completed in a chain. That is, blockcount with each block weighted by its difficulty. Your proposed attack will generate a chain that is equal or greater in blockcount to the main chain, but will be orders of magnitude smaller in terms of total amount of work and will therefore not be accepted.

Ok, thanks Grin

Sorry if this had already been discussed, of course I did some searching, but I couldn't find a good way to search for this.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
May 07, 2014, 03:08:14 PM
 #4

he customizes his mining software to not ever increase the difficulty, even if it's mining hundreds of blocks per second; block timestamps are simply faked in order to make it seem they were generated at ~10 minutes interval.

When the fake blockchain is longer then the real one (currently ~300000 blocks), he starts broadcasting it; it appears to conform to all rules, and it's longer than the current one

As pointed out the "longest chain" is the one with the highest sum of difficulty.  However even if that wasn't the case the blocks would be invalid.   The timestamp of the genesis block is fixed at 01/03/2009. To avoid a difficulty increase no more than 144 blocks can be mined per day.  To mine a chain longer than the current chain would require 2083 days of faked timestamps.  That would make the timestamp of the last block 09/18/2014 or almost 4 months into the future.  Blocks which deviate from the network median time by more than 2 hours are invalid, in other words they "don't conform to all the rules".

Massimo80 (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100


View Profile
May 07, 2014, 03:23:20 PM
 #5

As pointed out the "longest chain" is the one with the highest sum of difficulty.  However even if that wasn't the case the blocks would be invalid.   The timestamp of the genesis block is fixed at 01/03/2009. To avoid a difficulty increase no more than 144 blocks can be mined per day.  To mine a chain longer than the current chain would require 2083 days of faked timestamps.  That would make the timestamp of the last block 09/18/2014 or almost 4 months into the future.  Blocks which deviate from the network median time by more than 2 hours are invalid, in other words they "don't conform to all the rules".

Nice catch Cheesy
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!