Bitcoin Forum

Other => Beginners & Help => Topic started by: uminatsu on January 15, 2014, 05:16:03 AM



Title: Thought experiments on a potential weakness.
Post by: uminatsu on January 15, 2014, 05:16:03 AM
I'm contemplating a scenario where a small pool (say 10% of the total hash rate) could cause a major disruption and possibly launch a double-spending attack.

From what I see, the bitcoin protocol does not prohibit mining a block with a much higher difficulty than the current network difficulty. So a pool with 10% the total network hashrate could conceivably mine at 100x the current difficulty. For every 10 minutes the pool will have a 0.1% probability to get a block. Since there's 144 blocks per day on average, it takes slightly less than a week for the pool to get a block.
Suppose that the pool always tries to mine a block using prev_hash that belongs to the 50th newest block, then when they do succeed (which happens once every week), they'll effectively fork the network and invalidate all 50 most recent blocks (about 9 hours worth of transactions). All the nodes on the network will be compelled to accept this block because its difficulty is 100x that of the network difficulty, so the new block has twice the difficulty than the 50 most recent blocks combined.

Am I missing anything?


Title: Re: Thought experiments on a potential weakness.
Post by: uminatsu on January 15, 2014, 05:35:56 AM
Note: I'm seriously asking for a review of this scenario. Maybe someone already thought of this and proved it impractical, but I'd like to know the details.

As far as I can see, this attack would work if (1) blocks with much higher than normal difficulty is accepted, and (2) chain with highest sum of difficulty wins, not just the longest chain by the number of blocks.


Title: Re: Thought experiments on a potential weakness.
Post by: Foxpup on January 15, 2014, 09:35:36 AM
All the nodes on the network will be compelled to accept this block because its difficulty is 100x that of the network difficulty, so the new block has twice the difficulty than the 50 most recent blocks combined.
You're confused about how difficulty works. A block's difficulty is simply the inverse of the current target, which is the magic number that the block hash must be lower than in order to be valid. Note that it does not matter how much lower the hash is; a block either meets the target or it doesn't. A block whose hash is a hundred times lower than the target has exactly the same difficulty as a block whose hash is just barely low enough.

The reason for this is that because hashes are random, blocks are occasionally produced with extremely low hashes purely by chance. These blocks do not have any adverse effect on the difficulty.