Questions tagged [difficulty]

This tag should be used for questions regarding difficulty which encodes the likelihood of one hash to succeed at mining a block. Indirectly, it is a measure of the total hashing power of all miners for a given cryptocurrency.

Filter by
Sorted by
Tagged with
73 votes
3 answers
42k views

How is difficulty calculated?

Can anyone explain me in the plain English how difficulty is calculated. I have a very approximate understanding that it is calculated based on the amount of hash power in all the bitcoin community ...
user avatar
60 votes
4 answers
32k views

What keeps the average block time at 10 minutes?

I've been told "the network" sets the difficulty level such that there will be one new block mined every ten minutes. I imagine the rich would instead prefer to keep difficulty as high as possible to ...
user avatar
  • 2,020
27 votes
2 answers
16k views

What is "difficulty" and how it relates to "target"?

I don't understand what "difficulty" means and how it really relates to "target". I understand what "target" is - it tells the miners, how small the resulting hash should be. (Basically, how many ...
user avatar
  • 2,545
24 votes
2 answers
16k views

Relationship between Hash-Rate and Difficulty

What is the algebraic relationship between Total Network Hash-Rate and Difficulty?
user avatar
22 votes
1 answer
14k views

How does the Kimoto Gravity Well regulate difficulty?

Maxcoin will use the Kimoto Gravity Well (KGW) to regulate the difficulty. From what I could find about the KGW, it retargets after every block and adjusts very quickly, e.g. when multipools add and ...
user avatar
  • 63.5k
12 votes
2 answers
830 views

Is it possible for the network to stop finding valid blocks?

The hashing problem is by design computationally hard, because SHA-256 hashes are for all intents and purposes random strings with no direct link to their inputs, and there's no (known) way to ...
user avatar
  • 1,048
9 votes
3 answers
8k views

How is the target section of a block header calculated?

I've been poking around https://en.bitcoin.it/wiki/Target and I've found the current target, but I can't seem to find how it's generated. It's supposedly generated when the difficulty is adjusted, as ...
user avatar
4 votes
1 answer
1k views

Testnet difficulty change

Has something changed recently in testnet? Today I've been seeing new blocks appear every 1-5 seconds instead of the usual 10-20 minutes
user avatar
  • 41
6 votes
1 answer
4k views

What does the nBits value represent?

When a miner hashes a blocksheader and it produces a hash that is lower than the value represented by nBits then the PoW is considered solved. What exactly does this mean? For example a SHA256 hash ...
user avatar
  • 287
7 votes
1 answer
6k views

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

I'm trying to wrap my head around the mining process by doing a small example of block hashing. According to the Wiki entry about difficulty, the target for a block hash can be read from the "bits" ...
user avatar
  • 235
7 votes
1 answer
1k views

How can I find the "real" difficulty on testnet?

As is well known, testnet has a "20-minute rule": if no block is found within 20 minutes, the mining difficulty drops to 1 until a block is found. From some experimentation, it appears that bitcoind'...
user avatar
17 votes
3 answers
8k views

How to calculate new "bits" value?

Every 2016 blocks one needs to calculate new bits value. What is the formula to calculate it?
user avatar
  • 42.7k
7 votes
3 answers
22k views

How does a difficulty increase affect a miner's income?

At the time I write this, there are a lot of people getting into Bitcoin mining for the first time. Many buy ASIC hardware and are later surprised that their mining income suddenly drops due to a ...
user avatar
  • 8,319
3 votes
2 answers
3k views

Can a smart mind explain block difficulty calculation in lay terms?

I tried to read it here: https://en.bitcoin.it/wiki/Difficulty But it is closer to a rigorous math proof than to an explanation. I am interested to understand that so I can understand what makes a ...
user avatar
  • 625
3 votes
2 answers
401 views

Energy to confirm one block?

What is the minimum energy (or CPU operations) required for someone to confirm one block on their own, to launch a double-spend attack? How can I calculate this from the current difficulty or ...
user avatar
6 votes
2 answers
347 views

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

Why does Bitcoin apply a difficulty function to block hashes and then use the output of this function to add up and determine the "longest" chain? Why not just e.g. add together all block hashes (as ...
user avatar
5 votes
2 answers
243 views

Why is the difficulty adjustment restricted to a factor of 4?

What does this protect against? And why 4 in particular? I know an adjustment of this magnitude is not likely to take place at this stage, but I'm wondering why this was implemented in the first ...
user avatar
  • 2,808
1 vote
1 answer
341 views

How is the difficulty of bitcoin mining propagated?

Let's say the current difficulty is set as finding a hash with 4 leading zeroes; once this is found, a block with this hash is propagated. Every client that receives this block checks that it has 4 ...
user avatar
  • 21
32 votes
6 answers
123k views

Do these new ASIC miners really pay for themselves in 5 days?

The Bitforce 50GH/s miner costs $2,500 today, and according to the following calculation it would mine enough coins in about 5 days to pay for itself. I am sure I am missing something here. Why would ...
user avatar
  • 423
21 votes
3 answers
66k views

What does the mining difficulty number really mean?

I'm new to bitcoin; please bear with me. I'm looking into mining, how it works, and how to get started. I see a "mining difficulty" from many sources and list a 3 billion something number without ...
user avatar
  • 1,658
13 votes
4 answers
4k views

Is there empirical data about a relationship between bitcoin price and difficulty?

There have been claims that Bitcoin price and difficulty correspond. Is there empirical data to support or refute this?
user avatar
  • 26.4k
8 votes
1 answer
2k views

Where exactly is the "off-by-one" difficulty bug?

I read through How is difficulty calculated? and want to understand where the "off-by-one" bug is in calculating difficulty. Here is a Matlab snipet I wrote to calculate difficulty. What are the ...
user avatar
  • 131
3 votes
2 answers
5k views

Given the probability of finding a block, and time taken, can I infer hashrate?

I'm trying to externally calculate the hashrate of a given miner based only on an arbitrarily defined target that I assign, then calculate probability it will be found. Once this probability is ...
user avatar
2 votes
2 answers
841 views

How does the network adjust the rate at which the coins are created?

Who runs the Bitcoin network, and how do they adjust the rate at which the coins are created?
user avatar
6 votes
1 answer
445 views

Is it necessary for blocks to record the nBits difficulty parameter?

The next difficulty to solve a block is determined from how fast blocks were solved before it. In addition, the difficulty only changes once every two weeks or so. So, couldn't every node keep track ...
user avatar
  • 13.7k
5 votes
1 answer
714 views

How does mining process takes Approximately 10 minutes?

I don't think that I fully understood the "difficulty" topic in blockchain, and therefore I don't understand how mining process takes close to 10 minutes. If I have "Target" value (some hash value, ...
user avatar
4 votes
1 answer
517 views

Web API to retrieve difficulty changes

I am looking for a website that allows me to retrieve the time at which each difficulty change happened. The time doesn't need to be accurate so a time stamp from the block will do. I want to fetch ...
user avatar
  • 11.4k
2 votes
1 answer
2k views

What would happen if 90% of the Bitcoin miners suddenly stopped mining?

What would happen if 90% of the Bitcoin miners were to suddenly stop mining Bitcoin, i.e. the Bitcoin network's hashing power would drop to 10% of the previous amount. Would it become more difficult ...
user avatar
  • 41
2 votes
1 answer
947 views

Why not decrease the difficulty to increase capacity?

There is a persistent debate in Bitcoin about increasing the capacity. The popular idea seems to be to increase the blocksize from its current 1MB to push through more transactions per block. But ...
user avatar
  • 1,334
2 votes
4 answers
233 views

What is the meaning of difficulty in Bitcoin mining?

I'm a beginner in Bitcoin and Blockchain technology, so I have a question after reading about the difficulty in Bitcoin mining: What does the difficulty actually mean? I read that A high difficulty ...
user avatar
  • 21
2 votes
1 answer
566 views

Difficulty target representation in bitcoin wiki

The bitcoin wiki describes difficulty target representation as follows: How is difficulty stored in blocks? Each block stores a packed representation (called "Bits") for its actual ...
user avatar
  • 121
1 vote
2 answers
409 views

How was 59 days determined with 1 TH/sec from "Mastering Bitcoin"

In Mastering Bitcoin in the section on Difficulty Bits Andreas notes: This means that a valid block for height 277,316 is one that has a block header hash that is less than the target. In binary ...
user avatar
18 votes
4 answers
43k views

Can casual people still mine for bitcoins, now that the difficulty is much higher than it was?

Can casual people still mine for bitcoins? As of October 2012, the difficulty seems very high, being over 3,000,000. I've seen a ad for bitcoins, and watched the video. It said I could mine for them ...
user avatar
  • 181
8 votes
2 answers
13k views

Calculating average number of hashes tried before hitting a valid block

I'm toying with the idea of starting to mine, and was wondering how to calculate how many hashes on average must be tried before one will "hit" a valid block? I'm talking about a single user (not a ...
user avatar
5 votes
2 answers
779 views

Does difficulty ever stop increasing?

I know we don't have to worry about this for a very long time, but... One argument against Bitcoin, and really, digital currencies as a whole, is that, in order to time blocks with reasonable ...
user avatar
  • 6,984
15 votes
2 answers
2k views

How many Integer Operations on a GPU are necessary for one Hash?

I thought it was the ALU OPs like here: https://bitcointalk.org/index.php?topic=7964.0 ArtForz speaks of much higher values, though: https://bitcointalk.org/index.php?topic=4689.msg68933#msg68933 ...
user avatar
  • 1,999
8 votes
5 answers
9k views

Will expensive mining equipement have any worth in the future?

With more and more people picking up advanced ASIC miners, the difficulty is going up while the remaining coins are going down. If miners continue joining at this or a faster rate, the limit might be ...
user avatar
  • 325
7 votes
2 answers
2k views

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

Based on my rudimentary understanding of Bitcoins and altcoins, network difficulty is adjusted by asking the network to target a hash smaller than a specific number, which translates to calculating ...
user avatar
6 votes
2 answers
779 views

Is there a uniform measure of "difficulty", that when multiplied by price, will give "profitability of one hour of mining"?

I recently open Bitcoin Pie, a site that compares crypto-currencies. Given the exchange rate in BTC, I would like to add another column that tells "relative mining profitability", regardless of the ...
user avatar
  • 26.4k
4 votes
1 answer
3k views

understanding bits and difficulty in a block header

This block: https://blockchain.info/block/00000000000000000025c089d0a7b2bf6241888c4dd90ab7a4c4baa6a2823551 Shows difficulty at 3,007,383,866,429.73, and bits at 392009692. If I want to see how many ...
user avatar
  • 203
3 votes
2 answers
10k views

Mining Difficulty and Leading Zeros

I understand that the Bitcoin mining problem is to find a string s (hash of previous block + Merkle Tree Hash + nonce) such that sha256(s) has n leading zeros, where n determines the mining difficulty....
user avatar
18 votes
6 answers
34k views

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

I have very limited knowledge of bitcoin, but, I hope you don't mind my asking this question: As I understand it, "mining bitcoin" requires "significant" computational prowess. A lot of dedicated ...
user avatar
16 votes
2 answers
4k views

What happens if hash rate decreases rapidly?

Since difficulty is only adjusted every 2016 blocks, what would happen if hash rate was to decrease rapidly? Wouldn't this cause blocks to be created less frequently and also making the time until ...
user avatar
  • 5,297
8 votes
3 answers
500 views

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

Why this ugly looking formula to calculate 'target' from 'nBits' in block header: target = coefficient * 256**(exponent-3). Why not? : target = coefficient * 256**(exponent). What is the need of ...
user avatar
4 votes
3 answers
2k views

Why is the reward decreasing while the difficulty of mining is increasing?

I was wondering why Bitcoin has been designed in a way that rewards are decreasing while the difficulty of mining is increasing. To me this is counter-intuitive and leads to the situation when miners ...
user avatar
4 votes
1 answer
4k views

How to convert Litecoin difficulty of 6 to an expected time per block solved?

The current difficulty for mining Litecoins is about 6. If I mine them at 25kh/s, how often should I expect to solve a block with a difficulty of 6? I'd also appreciate an explanation (or formula) of ...
user avatar
4 votes
1 answer
798 views

How is mining difficulty defined (formula)?

The result of sha256(s) that miners attempt is a 256 bits long number (64-digits hexadecimal number). I understand that this 256bits number should be lower than the target threshold, the target ...
user avatar
  • 1,182
3 votes
1 answer
733 views

How does the rate of getwork requests correlate with the hashrate of a miner?

In a setup where a standard bitcoind serves full difficulty targets to some mining nodes, how can I calculate the hashrate of a mining node from looking at the rate of getwork requests? Does this ...
user avatar
  • 1,459
3 votes
2 answers
1k views

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

Using this scenario https://bitcoin.stackexchange.com/a/40435 Let's say we have two competing blockchain tips: They both start from Block A as a parent, but then there are two different blocks ...
user avatar
  • 196
2 votes
1 answer
256 views

How do nodes come to a consensus on difficulty?

Specifically I would like to know what messages are sent between nodes in order to figure out total processing power of the network and therefore difficulty. How is the new difficulty value spread ...
user avatar
  • 419