

The calculations on this site take this bug into account to help produce the most accurate difficulty estimate possible. Even if this block somehow took an entire year to mine, it would not cause the next difficulty to drop, believe it or not! Fun facts & bugsīUG! Due to a longstanding bug in the Bitcoin source code, the time spent mining the first block in each difficulty epoch actually has no effect on the next difficulty calculation. This ratio results in the difficulty moving up or down. The Bitcoin network does this by measuring the time it took to the find the last 2,016 blocks and compares it to the expected time of 20,160 minutes (2,016 * desired 10-minute block time) At the beginning of every epoch the Bitcoin network recalculates the difficulty. With an average block time of 10 minutes, this averages to a two week period. What is a difficulty epoch?Įach 2016-block interval is known as a difficulty epoch.
:max_bytes(150000):strip_icc()/image51-d8924573410e4d2eb57df671690baf3a.png)
Lengthening the time between blocks reduces this waste. If someone mines another new block based on the old blockchain state, the network can only accept one of the two, and all the work that went into the other block gets wasted.įor example, if it takes miners 1 minute on average to learn about new blocks and new blocks come every 10 minutes, then the overall network is wasting about 10% of its work. One explanation is that 10 minutes is a sufficient amount of time for nodes to propagate blocks to all other nodes in a peer to peer fashion.Īfter a Bitcoin block is mined, it takes time for other miners in the network to find out about it, and until then, the miners are actually competing against this new block instead of adding to it. So why not 1 minute? Or one hour?īecause Satoshi never explained why block times need to average 10 minutes, we can only assume why this was chosen. The current difficulty is 27.5 trillion (T) Why is the target block time supposed to be 10 minutes?īitcoin maintains its block time to be around 10 minutes with its difficulty adjustment algorthim. The simple forumula for calculating the difficulty level is as follows: Difficulty = Difficulty Target / Current Targetĭifficulty Target is the highest possible target to be reached with a block hash.Ĭurrent Target is the hexadecimal difficulty derived from the 256 bit number in a block header.ĭifficulty is the aproximate number of hashes required to mine a single block. If blocks are mined slower, difficulty decreases (target increases). If blocks are mined faster than 10 minutes on average, difficulty increasees (target decreases). On the 2,016th block of the difficulty epoch the difficuly is recalculated. A block sequence with the same difficulty is reffered to as a "difficulty epoch". The difficulty is designed to maintain the rate of coin issuance and block confirmation times as the network grows or contracts.ĭifficulty adjusts every 2,016 blocks (~2 weeks). Hashing to a target difficulty is stochastic (randomly determined). The current difficulty number represents the number of hashes required to mine a single block.Ī Bitcoin hash is deterministic with pseudorandom result, this means that everyone can calculate the target on their own and reach the same target. Bitcoin's difficulty is simply a measure of how difficult it is mine a block.
