
First, to deal with a couple of misconceptions:
-
The nonce is a part of the block, along with all its transactions (together with the miner payout handle), timestamp, earlier block hash, … Altering any of those will fully change the block hash.
-
The issue is not the variety of 0 bits required within the hash. Reasonably, all the block hash is interpreted as a 256-bit quantity, and in comparison with one thing known as the “goal”, additionally a quantity. If the hash is decrease than the goal, the proof of labor is legitimate. Problem adjustment ought to actually be known as goal adjustment: each 2016 blocks, the goal is elevated or decreased to maintain the common fee of blocks at 1 per 10 minutes. Problem is the ratio of the very best potential (=best) goal divided by the precise goal.
-
The accepted chain shouldn’t be essentially the longest chain; reasonably, it’s the chain with essentially the most collected work. Work right here is (roughly) outlined because the sum of the difficulties of the blocks in all the chain. Which means the speed of manufacturing blocks is immaterial for deciding who creates the profitable chain, as sooner blocks even have decrease issue.
Then as in your actual query: what are the dangerous results of a shorter inter-block time?
The aim for the time between blocks is giving the community time to propagate the newly-found block, so that every one nodes and miners are on the identical web page.
Think about it takes 1 second for a block to propagate via the community, and for miners to start out constructing on prime of it (so this quantity consists of community latency, but additionally validation time, the time it takes to construct a brand new candidate set of transactions to incorporate in a subsequent block, and to distribute this data to hashers).
Miner A finds a block, and begins propagating it, so miners B, C and D all find out about this block 1 second later. Throughout that 1 second, B, C, and D are successfully losing their time, as they’re making an attempt to construct on prime of the earlier block nonetheless. Nonetheless, A doesn’t waste any time: it could actually swap to engaged on prime of the brand new block instantly. This creates a tiny benefit for A, proportional to the chance that one other block is discovered inside this 1 second propagation time.
With an inter-block time of on common 10 minutes, this benefit is tiny (roughtly 0.17% likelihood to discover a block in 1 second), but it surely grows very considerably because the inter-block time and propagation time get nearer to one another:
- 600s vs 1s: 0.17%
- 60s vs 1s: 1.7%
- 10s vs 1s: 9.5%
- 1s vs 1s: 63%
This has various results:
- Even with out malice, shorter block occasions proportionally profit bigger miners extra. That is counter to the intent of truthful mining, the place anybody can enter the mining house and get advantages proportional to their investments.
- It may be deliberately exploited extra simply via so-called “egocentric mining” assaults, that are at all times potential, however propagation occasions worsen it.
- A potential 51% attacker (one who ignores blocks produced by trustworthy miners and solely builds on prime of their very own) ignores this propagation price. So the chance for a block to be discovered whereas the earlier block continues to be propagating immediately interprets to a profit 51% attackers have.