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
2 votes
4 answers
330 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 ...
4 votes
1 answer
295 views

Attack vectors for difficulty retargeting with BCH and BTC?

Since the existence of BCH, miners can now switch chains to mine on. Assuming they mine greedily based on price and difficulty. Can the following attack happen and how could it be mitigated: Assuming ...
4 votes
1 answer
409 views

What is the lowest possible value for target?

Similar question was asked here but the answer doesn't really provide an answer. This answer says that the lowest possible value for target is "all zeros plus a one". Pieter Wuille in the ...
8 votes
3 answers
763 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 ...
1 vote
1 answer
135 views

Why does the Stratum protocol use a Share Difficulty of 2^32?

In the comments below his answer to my recent question about Network Difficulty, Pieter noted that Stratum Share Difficulty is an entirely separate concept. See https://bitcoin.stackexchange.com/a/...
0 votes
1 answer
79 views

Calculating daily mined BTC

Hopefully an easy Question. I was updating some data tables and wanted to estimate monthly yield based on difficulty and known hashrate of the miner in this cash 110 TH/S. I had it in my head the ...
0 votes
1 answer
98 views

Is the maximum target a consensus rule?

What is "difficulty" and how it relates to "target"? states that the largest possible target value (max target value) is: ...
4 votes
1 answer
905 views

Why is the maximum target not (2^256 - 1)?

I'm reading the Difficulty page on the Bitcoin wiki. Why is the maximum target 0x00000000FFFF0… instead of (2^256 - 1) (i.e. 0xFFFFFFFFFFFF…)?
3 votes
3 answers
364 views

What is the numeric precision of Network Difficulty?

My understanding is that Difficulty (aka Network Difficulty) is an approximate representation of the Target, a 256-bit number which is hard to reason about or work with in human-readable Decimal ...
2 votes
2 answers
2k views

What is the formula for inferring hash rate from difficulty and block frequency?

Two parts to this question 1/ There have recently been concerns over drops in hash rate observed on sites such as blockchain.com. However, my understanding is that hash rate is inferred from the ...
-2 votes
3 answers
175 views

Could you hack Bitcoin / Proof of Work with one leading zero for each block?

I believe that in Bitcoin, if you would like to replace the chain, you need to pass 3 conditions. You need to have a longer chain (more blocks), you need to have a greater total difficulty (the ...
2 votes
1 answer
206 views

Would it work just fine if "bits" was set to "1cd86a52" instead of "1d00d86a" at the first difficulty adjustment?

The first difficulty adjustment on the network happened at block 32256. The time for block 32255 (one block before the adjustment) is 1262152739 and the time for block 30239 (2016 blocks before the ...
1 vote
2 answers
512 views

With the current hashrate, how does it still take 10min to solve a bitcoin block?

No matter how high the difficuly is (or how low the target is), I don't understand how the Bitcoin network takes an average of 10 minutes to solve each block. For any given block header, there are ...
0 votes
1 answer
25 views

Breakdown of BTC mining and correlation with past metrics

I am having trouble understand the current BTC market. Do current (technical) indicators like mining difficulty, hashing power, electricity costs not mean that the price should be trending upwards?
78 votes
3 answers
45k 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 ...
2 votes
1 answer
65 views

Is it possible to create an output locked to a specific mining difficulty target?

When the network sees a block appear with enough difficulty nodes can detect this as potentially the longest valid chain allowing the blocks miner to officially claim the block reward via coinbase ...
1 vote
2 answers
820 views

What is most efficient way to validate bitcoin target (difficulty) value in C++

I have two values 1. h = hash of the block (32 bytes long in memory representation - not hex) 2. bits (uint32_t) To make the calculation easier we create a function difficulty such that: auto d = ...
13 votes
3 answers
13k views

What are the equations to convert between bits and difficulty?

If we take block hash 0000000000000006770c3806960539ca83a24facbd99ea212f37f2a0e6a5629a for example. The difficulty as a 32 bit float is 50810339.04827648. The difficulty in bits as an unsigned 32 bit ...
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?
9 votes
3 answers
9k 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 ...
1 vote
1 answer
156 views

Delay time for the second block of Bitcoin blockchain

According to the data stored in the blockchain, the genesis block is mined at Jan 03, 2009. The second block is mined at Jan 09, 2009, 6:24:25 AM. Which is 6 days later. At first, it seems rational to ...
2 votes
1 answer
154 views

What is the nBits field in the CBlockHeader class?

In the source code for the CBlockHeader class, there is a field called nBits. /** Nodes collect new transactions into a block, hash them into a hash tree, * and scan through nonce values to make the ...
2 votes
2 answers
978 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 ...
3 votes
2 answers
227 views

How to calculate nBits from target?

I was wondering how the nBits are calculated from the target, I know how the the target is calculated from nBits, but how is the nBits calculated from the target?
0 votes
2 answers
212 views

Why does SHA256 miner hash have to be lower than the current target 256bit hex? [duplicate]

I'd like to ask if someone can help explain this definition found on https://en.bitcoin.it/wiki/Target "The SHA-256 hash of a block's header must be lower than or equal to the current target for ...
28 votes
3 answers
17k 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 ...
4 votes
2 answers
4k 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 ...
5 votes
1 answer
557 views

How is nbits calculated?

When generating a new block, how is the nbits field in block header calculated? Is nbits calculated for every new block like: nbits=nbits of last block * (timstamp of lastblock-timestamp of (...
2 votes
1 answer
105 views

What's the logic behind the way block proofs (in GetBlockProof) is calculated?

Bitcoin Core uses GetBlockProof() function to determine the contribution of a block to the total difficulty of the current chain, aka, nChainWork in CBlockIndex. I'm having trouble understanding the ...
1 vote
1 answer
67 views

Does the length of the blockchain affect computing power needed to verify transactions?

As the blockchain for something like BTC grows, does that affect the time needed to verify new transactions and/or the integrity of the blockchain? From my understanding, miners only verify the hash ...
2 votes
2 answers
609 views

Why does Bitcoin adjust the difficulty every 2016 instead of 2048 blocks?

I am reading Bitcoin wiki and it says over the previous 2016 blocks. Can be further simplified to D * 2**32 / 600 without much loss of accuracy. I guess the reason of reducing to 2**32 is for ...
1 vote
1 answer
117 views

Proof of work: comparing computed hash with target hash

According to the source code here is where the hash computed by a miner is compared with the target hash: bool CheckProofOfWork(uint256 hash, unsigned int nBits, const Consensus::Params& params) { ...
2 votes
3 answers
3k views

Where, or how, can I get a complete history of difficulty?

I would like to have a complete list of the historical mining difficulty of bitcoin. Preferably it would be a text list or csv, but a webpage that displays the data in any text format will do. I've ...
0 votes
1 answer
89 views

How to estimate pool hashrates based on the number of blocks they have found?

What is the formula used to estimate the pool hashrate based on the number of blocks found by that pool? For example, Braiins provides an estimated hashrate that is calculated based on the amount of ...
0 votes
1 answer
158 views

I'm not able to mine as much Bitcoin as I was able to a couple of months ago

I’ve been using two AntMiner S5 ~1155Gh/s and was able to mine about 0.02 Bitcoin. However, recently I’m just able to about 0.01 Bitcoin. I use F2Pool for mining. I thought first the other one isn’t ...
2 votes
0 answers
61 views

cw-144 oscillation problems [closed]

I am starting to get into Difficulty Algorithms and attacks on them. I came across cw-144 which used to be BCH's DAA at least until mid 2020 (recent developments do not interest me and this is not the ...
-1 votes
1 answer
62 views

Does difficulty target remains static for 2016 blocks in Bitcoin?

I know that in Bitcoin the difficulty target adjust after creating 2016 blocks. So, it means that within these 2016 block the difficulty target remains same (static). Am I correct? If this is correct ...
1 vote
1 answer
75 views

Bitcoin hash rates/difficulty

i read that some ASIC cards can produce upto 100 TH/s (= 100,000 bn hashes/s = 100 tn hashes/s) Further, lets say network difficulty at the moment is 30tn (i understand this to mean that on average it ...
7 votes
1 answer
480 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 ...
2 votes
4 answers
4k views

Where to get difficulty data for all crypto coins? [closed]

I need to get difficulty data and exchange rate for past 10 days for making a graph out of it (i.e., for all coins). Can anyone suggest where can I get it?
0 votes
1 answer
159 views

What's the point for mining pools to set a higher target?

I'm reading the Mastering Bitcoin 10th chapter, and quote Similarly, a mining pool will set a (higher and easier) pool target that will ensure that an individual pool miner can find block header ...
1 vote
1 answer
190 views

How often does target hash change and how to find it?

So basically I was researching target hash and trying to figure out how I can find it. I know there are posts out there that have said that Bitcoins target hash is a 256 bit number with 32 bits of ...
8 votes
2 answers
14k 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 ...
0 votes
1 answer
87 views

How does the bitcoin network difficulty syntax work?

So, essentially what my question is what does the "syntax" of a bdiff (bitcoin target difficulty) look like? I know that its a number, i.e the current network difficulty is set at around ...
1 vote
1 answer
107 views

How do you derive "0x008000 is the smallest legal value for the lower 24 bits since targets are always stored with the lowest possible exponent"?

From https://en.bitcoin.it/wiki/Difficulty: How is difficulty stored in blocks? Each block stores a packed representation (called "Bits") for its actual hexadecimal target. The target can ...
8 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 ...
1 vote
1 answer
58 views

Why is explorers shows different difficulty values?

Just take a random block for example, for block 506068, blockchain.info shows difficulty as 2,603,077,300,218.59, while blockcypher shows 392,962,374, do the explorers use a different way to calculate ...
2 votes
1 answer
150 views

can the network stagnate if the difficulty grows too big?

So im mainly thinking in the very early days of bitcoin when the networks compute power was minimal. What would happen if say a big organization with exponentially more compute power than the network, ...
0 votes
3 answers
79 views

if the lower bound of a blocks timestamps is the median of the previous blocks, how can the network difficulty ever decrease?

according to bitcoin developer documentation the lower bound for a blocks timestamp is the median of the previous 11 blocks. and also according to the documentation the network difficulty is ...
2 votes
1 answer
59 views

Algorithm behind Bitcoin Core's hashes/s metric

The call bitcoin-cli getmininginfo returns a metric networkhashps among others. It shows how many hashes the entire Bitcoin network generates per second. This metric however, is not directly stored ...

1
2 3 4 5
7