1905 (OP)
Full Member
Offline
Activity: 198
Merit: 100
Give him a mask and he will tell you the truth.
|
|
August 25, 2011, 03:09:42 AM |
|
i need to explain how difficulty works exactly. How does it calculate what the next difficulty will be and under what circumstances does it lower etc.
|
Man is least himself when he talks in his own person. Give him a mask and he will tell you the truth.
- Oscar Wilde
|
|
|
|
paulkoan
Newbie
Offline
Activity: 43
Merit: 0
|
|
September 10, 2012, 04:23:22 AM |
|
I have read that, and still don't fully get what difficulty is. It is described as the difficulty in processing the next block - it which case it is just a measure. But it is also described as a mechanism for ensuring that blocks are not uncovered to quickly - in which case it influences difficulty rather than measures it.
If it influences difficulty, and is based on how long previous blocks took to uncover, then how is this orchestrated through the network - how does everyone agree how long a block took?
|
|
|
|
obisunk
Newbie
Offline
Activity: 23
Merit: 0
|
|
September 10, 2012, 04:50:06 AM |
|
From what I understand: Given the same hashrate, doubling the difficulty means doubling the time. Therefore, you can say that difficulty scales linearly with time. My assumption is based on the formula time = difficulty * 2^32 / hashrate listed on ( https://en.bitcoin.it/wiki/Difficulty) Example: The current difficulty is ~2.7 million ( http://bitcoincharts.com/ shows the difficulty number in the topmost dash). If the difficulty doubled to 5.4 million and the network hashrate remained the same, then the expected time to solve a block would double (the expected number of blocks solved per unit time would be halved). (edited for clarity)
|
|
|
|
JoelKatz
Legendary
Offline
Activity: 1596
Merit: 1012
Democracy is vulnerable to a 51% attack.
|
|
September 10, 2012, 04:52:18 AM |
|
If it influences difficulty, and is based on how long previous blocks took to uncover, then how is this orchestrated through the network - how does everyone agree how long a block took?
The blocks are timestamped.
|
I am an employee of Ripple. Follow me on Twitter @JoelKatz 1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
|
|
|
tiberiandusk
|
|
September 10, 2012, 04:57:02 AM |
|
It is adjusted to keep the average time to find a block at 10 min.
|
|
|
|
paulkoan
Newbie
Offline
Activity: 43
Merit: 0
|
|
September 10, 2012, 05:00:36 AM |
|
If it influences difficulty, and is based on how long previous blocks took to uncover, then how is this orchestrated through the network - how does everyone agree how long a block took?
The blocks are timestamped. By whom? Or more clearly, how are clock errors in participants reduced, does the network agree what time it is somehow?
|
|
|
|
dotcom
|
|
September 10, 2012, 05:02:24 AM |
|
i've been interested in this too
|
|
|
|
JoelKatz
Legendary
Offline
Activity: 1596
Merit: 1012
Democracy is vulnerable to a 51% attack.
|
|
September 10, 2012, 05:02:44 AM |
|
By whom? Or more clearly, how are clock error in participants reduced, does the network agree what time it is somehow?
Each block is timestamp by the entity that mined it. The block is accepted if the timestamp is roughly correct. Every 2,016 blocks, difficulty is adjusted based on the timestamps of the blocks to keep the average block mining rate at one per ten minutes. There's a slight oversimplification in the algorithm that results in the block discovery rate being a little higher than this if network hash rate is increasing.
|
I am an employee of Ripple. Follow me on Twitter @JoelKatz 1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
|
September 10, 2012, 05:06:29 AM |
|
By whom? Or more clearly, how are clock errors in participants reduced, does the network agree what time it is somehow?
Blocks are timestamped by the person solving it. The network does maintain a "network average time" which all nodes share so the timestamp of any new block can't deviate by more than 3 hours from network time. The network attempts to solve one block per ten minutes. Every 2016 blocks difficulty is recalculated. The timestamp between the first and last block should be 2016 * 10 = 20,160 minutes (~14 days). The difficulty necessary to make the prior 2016 blocks exactly 20,160 minutes is computed and that becomes the difficulty for the next 2016 blocks. It is possible to spoof the timestamp of a block but only by so much. An attacker can't really influence difficulty by any meaningful way because only the first and last block matter and they can only deviate from network time by more than 3 hours.
|
|
|
|
natd
|
|
December 08, 2013, 08:31:08 PM |
|
Can the difficulty go down as well?
|
In search of light in cryptocurrency.
|
|
|
VolanicEruptor
|
|
December 08, 2013, 08:34:53 PM |
|
Just imagine 25 bitcoins falling out of the sky every 10 minutes. The more people there are who want these, the harder it is for each individual to catch a reasonable share. At this rate, all of our energy resources will be drained just so we can continue catching them with better efficiency. In this sense, bitcoin is a virus about to destroy our world.
|
|
|
|
alexb___
Newbie
Offline
Activity: 10
Merit: 0
|
|
December 08, 2013, 08:46:08 PM |
|
Can the difficulty go down as well?
I tink it depends of the coins. For bitcoin, it can not. even if you stop mining.
|
|
|
|
musicchimp
Newbie
Offline
Activity: 10
Merit: 0
|
|
December 08, 2013, 09:00:13 PM |
|
That's a very good question but difficult to answer. I'll try and get back to you but it might be difficult
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
|
December 08, 2013, 09:08:10 PM |
|
Can the difficulty go down as well?
I tink it depends of the coins. For bitcoin, it can not. even if you stop mining. That is not correct. Difficulty can (and has) gone down. If the hashrate of the network doubles, then the time between blocks will be cut in half and next adjustment difficulty will double. If the hashrate of the network is cut in half, then the time between blocks will double, and next adjustment difficulty will be cut in half.
|
|
|
|
dark143i
Jr. Member
Offline
Activity: 56
Merit: 1
|
|
December 08, 2013, 09:42:43 PM |
|
Can the difficulty go down as well?
Yes, When I was farming difficulty changed. Went down and up too. So definitely can go down. I hope that answers your question.
|
|
|
|
USB mining
Newbie
Offline
Activity: 10
Merit: 0
|
|
December 08, 2013, 10:29:48 PM |
|
thanks for answers, I was looking for this a long time ago.
|
|
|
|
natd
|
|
December 08, 2013, 10:51:48 PM |
|
thanks for answers, I was looking for this a long time ago.
ditto
|
In search of light in cryptocurrency.
|
|
|
Lander12
Newbie
Offline
Activity: 7
Merit: 0
|
|
April 27, 2014, 09:18:35 PM |
|
Long time no post on this but need to ask a question on this topic.
Hypothetical - if Bitcoin takes a hard of enough crash to stop 95% of miners from mining it stops the block-chain from publishing new blocks and paying the other 10% of miner. I see this with other dead or dieng sha-256 coins out there which the block chain is frozen because the difficulty is "stuck" at a High level where its going to take years for the 2016 block to be reached. If BTC falls into this situation are there any plans to keep blocks moving at 1 per 10 mins if a crazy drop in mining power would happen and average block time goes into weeks? I was looking at the failure byte coin which got me thinking.
|
|
|
|
cookiemonsterwhat
|
|
April 28, 2014, 02:42:26 AM |
|
Despite knowing it, these days you can just go to bitcoinwisdom and it`ll state the next difficulty hike
It also explains the #`s on percent.
|
|
|
|
|