Bitcoin Forum
December 10, 2016, 10:28:18 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Attempting to understand difficulty  (Read 2606 times)
phathash
Member
**
Offline Offline

Activity: 75


View Profile
March 06, 2011, 12:22:54 PM
 #1


Current difficulty is at 55 589.518126. What is this a measure of? Is this directly related to the # of leading zeros in the SHA256 block hash we are working on? How is it possible to adjust difficulty only marginally every 2016 blocks?

 
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481408898
Hero Member
*
Offline Offline

Posts: 1481408898

View Profile Personal Message (Offline)

Ignore
1481408898
Reply with quote  #2

1481408898
Report to moderator
1481408898
Hero Member
*
Offline Offline

Posts: 1481408898

View Profile Personal Message (Offline)

Ignore
1481408898
Reply with quote  #2

1481408898
Report to moderator
1481408898
Hero Member
*
Offline Offline

Posts: 1481408898

View Profile Personal Message (Offline)

Ignore
1481408898
Reply with quote  #2

1481408898
Report to moderator
gusti
Legendary
*
Offline Offline

Activity: 1102


View Profile
March 06, 2011, 12:36:22 PM
 #2

https://en.bitcoin.it/wiki/Difficulty

If you don't own the private keys, you don't own the coins.
phathash
Member
**
Offline Offline

Activity: 75


View Profile
March 06, 2011, 02:06:38 PM
 #3

Is there somewhere where I can see difficulty history? The following link is dead -

http://nullvoid.org/bitcoin/difficultiez.php

I found it in google's cache, but it stopped at Block 106848.
dsg
Jr. Member
*
Offline Offline

Activity: 37


View Profile
March 06, 2011, 04:06:23 PM
 #4

Is there somewhere where I can see difficulty history? The following link is dead -

http://nullvoid.org/bitcoin/difficultiez.php

I found it in google's cache, but it stopped at Block 106848.

Try sipa's graphs at:
http://bitcoin.sipa.be/
slush
Legendary
*
Offline Offline

Activity: 1358



View Profile WWW
March 06, 2011, 04:11:58 PM
 #5

Try sipa's graphs at:
http://bitcoin.sipa.be/

I added sipa's graphs to wiki page about difficulty.

MoonShadow
Legendary
*
Offline Offline

Activity: 1666



View Profile
March 06, 2011, 08:02:22 PM
 #6


Current difficulty is at 55 589.518126. What is this a measure of? Is this directly related to the # of leading zeros in the SHA256 block hash we are working on? How is it possible to adjust difficulty only marginally every 2016 blocks?


The difficult is a multiple of the minimum difficulty level, which is just an arbitrary 64 bit binary integer that the hash must be less than to qualify.  The leading zeros thing is an approximatation of the method, but not entirely accurate.  If the clients were just counting leading zeros, then the difficulty could only increase as a log of 2 ( each additional leading zero doubles the difficulty).  Basicly, the 'target' is a 64 bit integer that the binary interpretation of the sha-256 hash must be less than, and the target number is adjusted up or down by a process similar to a 'fuzzy logic' type of system; always seeking it's balance.  In this case, the balance point is 6 block per hour, and every two weeks or so, the system makes a calculated guess as to how much the target must be raised or lowered based upon the average blocks per hour seen during the prior two week span.  All of the clients make this calculation independently, but because it's a deterministic calculation based upon a shared set of data, they all come up with the same answer.  The clients don't use the 'difficulty' at all, but use only the 'target'.   The 'difficulty' is just a metric devised to allow us humans to make sense of it all, because for us to look at the targets, it would be difficult for us to draw useful information from the target or it's changes over time.  Since the difficulty is expressed as a ratio (number of times more unlikely for a given hashing attempt will produce a hash below the target) it makes it easier for humans to look at the difficulty number and prior difficulty numbers and derive useful meaning from it.

"The powers of financial capitalism had another far-reaching aim, nothing less than to create a world system of financial control in private hands able to dominate the political system of each country and the economy of the world as a whole. This system was to be controlled in a feudalist fashion by the central banks of the world acting in concert, by secret agreements arrived at in frequent meetings and conferences. The apex of the systems was to be the Bank for International Settlements in Basel, Switzerland, a private bank owned and controlled by the world's central banks which were themselves private corporations. Each central bank...sought to dominate its government by its ability to control Treasury loans, to manipulate foreign exchanges, to influence the level of economic activity in the country, and to influence cooperative politicians by subsequent economic rewards in the business world."

- Carroll Quigley, CFR member, mentor to Bill Clinton, from 'Tragedy And Hope'
theymos
Administrator
Legendary
*
Offline Offline

Activity: 2506


View Profile
March 06, 2011, 08:17:11 PM
 #7

Is there somewhere where I can see difficulty history? The following link is dead -

http://nullvoid.org/bitcoin/difficultiez.php

http://blockexplorer.com/q/nethash

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
ribuck
Donator
Legendary
*
Offline Offline

Activity: 826


View Profile
March 06, 2011, 10:19:36 PM
 #8

All of the clients make this calculation independently, but because it's a deterministic calculation based upon a shared set of data, they all come up with the same answer.

Is that actually right, or do all clients use the new difficulty that was calculated by the node that generated the first block at that new difficulty?

In the latter case, different nodes could calculate slightly different difficulty-adjustments due to lack of perfect time synchronization, but only the "winning" node's calculation is used going forwards.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2002



View Profile
March 06, 2011, 10:30:57 PM
 #9

Is there somewhere where I can see difficulty history? The following link is dead -

http://nullvoid.org/bitcoin/difficultiez.php

I manually maintain a table from that source:
https://spreadsheets.google.com/pub?hl=en&hl=en&key=0AmcTCtjBoRWUdHVRMHpqWUJValI1RlZiaEtCT1RrQmc

theymos
Administrator
Legendary
*
Offline Offline

Activity: 2506


View Profile
March 06, 2011, 10:48:59 PM
 #10

Is that actually right, or do all clients use the new difficulty that was calculated by the node that generated the first block at that new difficulty?

That would be really insecure. All nodes calculate it independently. All nodes use the same time, which is based upon block timestamps.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
MoonShadow
Legendary
*
Offline Offline

Activity: 1666



View Profile
March 06, 2011, 10:50:39 PM
 #11

All of the clients make this calculation independently, but because it's a deterministic calculation based upon a shared set of data, they all come up with the same answer.

Is that actually right, or do all clients use the new difficulty that was calculated by the node that generated the first block at that new difficulty?

In the latter case, different nodes could calculate slightly different difficulty-adjustments due to lack of perfect time synchronization, but only the "winning" node's calculation is used going forwards.

Actually, I'm not positive, but my own understanding was that all generating nodes calculate this independently.  Whatever differences that could exist would be very small, not likely to cause rejections.

"The powers of financial capitalism had another far-reaching aim, nothing less than to create a world system of financial control in private hands able to dominate the political system of each country and the economy of the world as a whole. This system was to be controlled in a feudalist fashion by the central banks of the world acting in concert, by secret agreements arrived at in frequent meetings and conferences. The apex of the systems was to be the Bank for International Settlements in Basel, Switzerland, a private bank owned and controlled by the world's central banks which were themselves private corporations. Each central bank...sought to dominate its government by its ability to control Treasury loans, to manipulate foreign exchanges, to influence the level of economic activity in the country, and to influence cooperative politicians by subsequent economic rewards in the business world."

- Carroll Quigley, CFR member, mentor to Bill Clinton, from 'Tragedy And Hope'
Jim Hyslop
Member
**
Offline Offline

Activity: 98


View Profile
March 07, 2011, 01:53:12 AM
 #12

Is that actually right, or do all clients use the new difficulty that was calculated by the node that generated the first block at that new difficulty?

That would be really insecure. All nodes calculate it independently. All nodes use the same time, which is based upon block timestamps.

Yep. The algorithm is actually pretty simple. The goal is to generate 2016 blocks in two weeks, so to calculate the next difficulty:
- Calculate the actual timespan time taken to create the last 2016 blocks: subtract the timestamp in block N-2016 from the timestamp in block N (where N is the highest block number)
- Calculate the new difficulty as: current difficulty * actual timespan / target timespan

I the actual timespan is longer than two weeks, the difficulty for the next two weeks will be lower. If the actual time span is less than two weeks, the difficulty for the next two weeks will be higher.


Like my answer? Did I help? Tips gratefully accepted here: 1H6wM8Xj8GNrhqWBrnDugd8Vf3nAfZgMnq
FreeMoney
Legendary
*
Offline Offline

Activity: 1246


Strength in numbers


View Profile WWW
March 07, 2011, 05:59:43 AM
 #13

The block finder provides the timestamp? I remember hearing about some rough restrictions on acceptable times relative to other blocks. Is there enough play to allow exploitation by a miner who preferred difficulty to be a little lower.

Play Bitcoin Poker at sealswithclubs.eu. We're active and open to everyone.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 2506


View Profile
March 07, 2011, 06:11:31 AM
 #14

The block finder provides the timestamp? I remember hearing about some rough restrictions on acceptable times relative to other blocks. Is there enough play to allow exploitation by a miner who preferred difficulty to be a little lower.

They could modify it somewhat. The timestamp must be greater than the median of the last 11 blocks and not more than two hours in the future (according to network-adjusted node time).

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!