Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

57
votes
3answers
30k 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 ...
52
votes
4answers
29k 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 ...
22
votes
2answers
11k 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 ...
17
votes
1answer
13k views

Relationship between Hash-Rate and Difficulty

What is the algebraic relationship between Total Network Hash-Rate and Difficulty?
23
votes
1answer
13k 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 ...
4
votes
1answer
444 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
3
votes
2answers
354 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 ...
12
votes
2answers
722 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 ...
6
votes
1answer
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'...
3
votes
1answer
319 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 ...
7
votes
3answers
19k 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 ...
7
votes
1answer
4k 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" ...
4
votes
2answers
268 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 ...
1
vote
1answer
298 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 ...
16
votes
3answers
7k views

How to calculate new “bits” value?

Every 2016 blocks one needs to calculate new bits value. What is the formula to calculate it?
31
votes
6answers
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 ...
14
votes
4answers
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?
19
votes
3answers
63k 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 ...
5
votes
1answer
5k 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 ...
3
votes
2answers
4k 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 ...
2
votes
2answers
707 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?
4
votes
1answer
465 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 ...
3
votes
1answer
697 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 ...
2
votes
1answer
1k 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 ...
18
votes
4answers
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 ...
7
votes
1answer
11k 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 ...
8
votes
5answers
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 ...
6
votes
2answers
750 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 ...
5
votes
2answers
710 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 ...
5
votes
2answers
1k 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 ...
2
votes
2answers
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 ...
15
votes
6answers
26k 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 ...
15
votes
2answers
2k 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 ...
14
votes
2answers
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 ...
7
votes
1answer
1k 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 ...
5
votes
2answers
1k views

Why would a miner mine with a difficulty other than 'the' difficulty?

Why would a miner mine with a difficulty other than the network difficulty? Both of these questions describe miners mining in such a way. What's the benefit of this? What even does it mean?
4
votes
1answer
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 ...
4
votes
3answers
1k 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 ...
4
votes
1answer
557 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 ...
3
votes
2answers
981 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 ...
3
votes
1answer
675 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 ...
2
votes
1answer
229 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 ...
2
votes
1answer
999 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 ...
2
votes
1answer
2k views

Why must generated coins mature 120 blocks before they can be spent?

I mine bitcoin testnet blocks and I find some blocks with difficulty 1. Some examples: I mined these blocks: Block 1 Block 2 Why must generated coins mature 120 blocks before they can be spent?
1
vote
2answers
2k views

Generating blocks in regtest: “hash doesn't match nBits”

I'm getting this error in regtest mode after setgenerate RPC: ERROR: CheckProofOfWork() : hash doesn't match nBits After looking for error text in src I found a match in pow.cpp (obviously ...
0
votes
1answer
369 views

The probability of block generation by two miners in a special case?

If network would include 2 mining pools (pool_1 and pool_2) with the hashpower of 49% and 51%,respectively, then wo want to calculate the probability that in 10 minutes, exactly 2 blocks would be ...
5
votes
1answer
466 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, ...
4
votes
2answers
139 views

How many correct hashes are there giving a difficulty?

I asked a question about mining difficulty in this SO post, Nate explained that the estimated total amout of hashes being calculated to date is 100000000000000000000000000 which is about 0....
4
votes
4answers
3k views

where is difficulty target inserted?

All miners at any time must have a consensus on the "difficulty target" to be able to achieve the correct nonce (as answer of proof-of-work). Assume that the target has been updated (it means that ...
4
votes
2answers
140 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 ...