Post
Topic
Board Bitcoin Discussion
Re: Selfish mining theory
by
hhanh00
on 30/09/2014, 03:59:28 UTC
It's not just the longest chain that wins, it's the chain with the most amount of work behind it.

@9kv

Like @impulse said, if you mine with a lower hashrate, either you won't find blocks as fast as the rest of the network or you have to lower the difficulty to compensate.

In either case, you will be behind when you merge back to the main chain. Every block has a 'nonce' and a 'bits' field. The nonce lets the miner tweak the hash, the bits translates to the difficulty - how much tolerance you accepted on the hash.

The network verifies both. If your nonce gives a hash too high for your bits then your block is invalid. If your bits is too low, you are not competitive and your block is rejected.

Without this, the system is totally broken. Hypothetically if the bits were not part of the calculation:
You run bitcoin core in regtest mode. It creates a private blockchain starting with the same genesis block. Issue a 'set generate true 1000000' to produce 1 million blocks at the lowest difficulty with all rewards going to your wallet. And then broadcast it to the network. Your chain wins and the entire blockchain is wiped out.