38 votes
Accepted

Can bitcoin exist without miners?

if in the coming years the difficulty increases so much that mining is no longer profitable That's not really possible. The mining power is set so that the miners need 10 minutes in average to mine a ...
user avatar
  • 2,057
18 votes

How is difficulty calculated?

Meni's answer is good. I just want to give some practical detail method about difficulty calculation, perhaps helpful for future views of this question's answer. Let's take a look at Satoshi's ...
user avatar
  • 481
18 votes
Accepted

How is the target section of a block header calculated?

The target section of the block header is called nBits in the code. nBits is a 32-bit compact encoding of a 256-bit target threshold. It works like scientific notation, except that it uses base-256 ...
user avatar
16 votes
Accepted

Isn't Bitcoin's hash target supposed to be a power of 2?

Contrary to popular belief, the target is not actually based on the number of leading zeroes. This is a major simplification that is used to get the general idea across, but is not actually how the ...
user avatar
  • 62.4k
15 votes
Accepted

How is a block header hash compared to the target (bits)?

How to calculate the target from bits Let's start with a block-header, always 80-bytes that looks like this: ...
user avatar
  • 7,639
14 votes

Isn't Bitcoin's hash target supposed to be a power of 2?

As Andrew's answer points out, the 'number of leading zeros' is just a simplification, so I thought I would give an example to more concretely illustrate this: Block hashes are usually represented in ...
user avatar
  • 17.4k
13 votes

Why can't they use super computers to mine all the bitcoins?

A supercomputer is way slower than mining with ASICs. A supercomputer only has much CPU power, not even GPU power and ASICs are way more powerfull than GPUs. ASICs represent the hashing algorithm as ...
user avatar
13 votes
Accepted

Why is it harder to compute nonce for a hash with a certain number zero prefixes than it is for any other hash?

A hash is 256 bits long, so there are 2^256 possible hashes in the hash space. But if you assert that the hash has to begin with a 0, that halves the number of hashes that are allowed (and thus ...
user avatar
  • 11.4k
11 votes

How many zeroes does the current target have?

17 judging by the latest blocks published on blockchain.info: https://blockchain.info/block/0000000000000000057fcc708cf0130d95e27c5819203e9f967ac56e4df598ee
user avatar
  • 686
11 votes
Accepted

Why didn't the difficulty adjust for the first 30,240 blocks?

Because blocks were not being mined in less than 10 minutes on average during this time (so the difficulty would only decrease and not increase), and the difficulty cannot go lower than 1.
user avatar
  • 2,808
11 votes
Accepted

Why are block header bits necessary? (Valid difficulty is already implied by chain history)

They aren't really necessary. The reason that they are included can only be known by Satoshi, and AFAIK, he did not state why he chose to include nBits in the block header (or many other things that ...
user avatar
  • 62.4k
9 votes

When will next halving events occur?

The Bitcoin reward schedule follows a predetermined pattern, see Controlled supply from the Bitcoin wiki. The next reward drop will happen at block number 420000. The current block number at the time ...
user avatar
  • 3,421
9 votes

What will happen to Bitcoin when it takes years to complete a calculation?

Mining is a self-adjusting system. The difficulty only rises in accordance to the available mining power. Hence, it can neither go to a difficulty where it will take months for a block to be found, ...
user avatar
  • 64.5k
9 votes
Accepted

Why is target stored in the block at all?

You're presenting it as a choice between either allowing miners to choose the difficulty, or having it be implied by previous history. In fact, neither is true. The target is determined by history (...
user avatar
9 votes

Testnet difficulty change

Testnet has a built in functionality that changes the difficulty to 1 if the mining process takes 20 minutes or longer. This question explains the dropping of difficulty to 1. So while the ...
user avatar
9 votes

Why this ugly looking formula to calculate 'target' from 'nBits' in block header: target = coefficient * 256**(exponent-3)

TL;DR The formula comes from turning an algorithm into a mathematical formula. nBits encodes the target with the first bytes as the size of the final target, followed by the 3 most significant bytes ...
user avatar
  • 62.4k
8 votes

What does the mining difficulty number really mean?

Miners task is to find a hash below a target T. Obviously if T is smaller, its more difficult to find the hash number. Difficulty D is defined by: D = Tmax/T where Tmax is: 2^224 The probability of ...
user avatar
8 votes
Accepted

Is there actual consensus on the blockchain's tip or only until the next block?

No, there is no consensus until the next block is found. The network is experiencing a blockchain-fork. It will only mend once one of the tips pulls ahead by adding another block. Then all nodes will ...
user avatar
  • 64.5k
8 votes
Accepted

Is there a rationale for the compact representation of the target?

It looks like the format was designed for other purposes than Bitcoin's target, and used unmodified in the code. If you want a rationale for why a compact representation in the first place: not to ...
user avatar
7 votes
Accepted

How can I forecast the date Bitcoin will hit a certain blockheight?

Take the difference (in days) between the current date and the date you are trying to estimate the block height for. Then multiple that difference by 24 hours and by 6 (6 blocks per hour) Current ...
user avatar
7 votes
Accepted

Why was the maximum target set to 0xffff0000000...?

I admit that I don't know for sure, but I have a guess. Since Satoshi was mining by himself for the first blocks, he probably set the initial target to whatever would take approximately 10 minutes to ...
user avatar
  • 8,734
7 votes
Accepted

Why is difficulty measured in a hash’s leading zeroes?

The "leading zeros" are a simplification. The difficulty is encoded as a target which is essentially a 256 bit number. Since block hashes are produced by SHA-256, they're also a string of 256 bits. If ...
user avatar
  • 64.5k
7 votes

understanding bits and difficulty in a block header

Contrary to popular belief, Bitcoin's proof of work is not actually based on the number of zeroes. Rather the block hash, when interpreted as a 256 bit integer, must be less than the target value. The ...
user avatar
  • 62.4k
7 votes

Why aren't block hashes used directly as scores for difficulty purposes?

The "apparent" work is 2x higher than actual work due to luck, but the reason it's good bitcoin doesn't use the apparent work is because it has bad stability properties due to variance, and bad game ...
user avatar
  • 7,519
7 votes

Would Bitcoin still work without a target difficulty?

It's not trivial a) to agree on the time in a distributed system, especially how much time has passed between two events, b) to establish when exactly a block candidate was found. Further, when a node ...
user avatar
  • 64.5k
7 votes
Accepted

Bitcoin difficulty - why leading 0s?

Not understanding the math behind it in-depth, the best answer I can come up with is that the protocol requires that the proof of work hash (hash of nonce and block data) should be equal to or lower ...
user avatar
  • 62.4k
6 votes

When will next halving events occur?

On average, since the creation of Bitcoin, a new block has been created every 9 minutes and 20 seconds. This is 7% faster than the correct time of 10 minutes. Taking that into account, I predict that ...
user avatar
  • 28.8k
6 votes

How is difficulty calculated?

I would like to give my 2 cents here, by expliciting the relationship between the probability of mining a block given the current target t and the corresponding difficulty d as it is calculated in ...
user avatar
6 votes
Accepted

Why not decrease the difficulty to increase capacity?

One problem is that lower block times mean an increased chance of forking, which makes head of the chain, and the system, less reliable. Another problem is that it normally takes a block a few ...
user avatar
  • 1,034
6 votes

How does solving reduced difficulty hashes contribute to solving a block?

Contrary to popular belief, mining is not something where there is progress. Each hash has the same probability of being a valid block hash. You could get lucky and find a valid hash with your next ...
user avatar
  • 62.4k

Only top scored, non community-wiki answers of a minimum length are eligible