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 tackle), timestamp, earlier block hash, … Altering any of those will utterly change the block hash.
-
The issue is not the variety of 0 bits required within the hash. Reasonably, your complete block hash is interpreted as a 256-bit quantity, and in comparison with one thing referred to as the “goal”, additionally a quantity. If the hash is decrease than the goal, the proof of labor is legitimate. Issue adjustment ought to actually be referred to as goal adjustment: each 2016 blocks, the goal is elevated or decreased to maintain the typical price of blocks at 1 per 10 minutes. Issue is the ratio of the very best potential (=best) goal divided by the precise goal.
-
The accepted chain will not be essentially the longest chain; fairly, it’s the chain with essentially the most gathered work. Work right here is (roughly) outlined because the sum of the difficulties of the blocks in your complete chain. Which means the speed of manufacturing blocks is immaterial for deciding who creates the successful 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 each one nodes and miners are on the identical web page.
Think about it takes 1 second for a block to propagate by 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 info 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 attempting to construct on prime of the earlier block nonetheless. Nonetheless, A doesn’t waste any time: it could possibly change to engaged on prime of the brand new block instantly. This creates a tiny benefit for A, proportional to the likelihood 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 numerous results:
- Even with out malice, shorter block instances proportionally profit bigger miners extra. That is counter to the intent of honest mining, the place anybody can enter the mining area and get advantages proportional to their investments.
- It may be deliberately exploited extra simply by so-called “egocentric mining” assaults, that are all the time potential, however propagation instances worsen it.
- A potential 51% attacker (one who ignores blocks produced by sincere miners and solely builds on prime of their very own) ignores this propagation value. So the likelihood for a block to be discovered whereas the earlier block remains to be propagating instantly interprets to a profit 51% attackers have.