Bitcoin Forum
December 08, 2016, 10:10:07 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 »  All
  Print  
Author Topic: Difficulty - I don't get it  (Read 1421 times)
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
July 07, 2011, 07:08:00 PM
 #1

Can anyone please explain me?

So I read that every new block should appear after 10 minutes from the previous one.
And this is enforced by the difficulty.
So the difficulty is recalculated every few blocks , adjusting itself to the current hashing speed of the network, trying to reach 10min/block in the perfect case, which never happens...

Is this right?

Because if so it would imply that you cannot really predict an actual date when a specific block number would appear in the network.
Or can you?

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
1481191807
Hero Member
*
Offline Offline

Posts: 1481191807

View Profile Personal Message (Offline)

Ignore
1481191807
Reply with quote  #2

1481191807
Report to moderator
1481191807
Hero Member
*
Offline Offline

Posts: 1481191807

View Profile Personal Message (Offline)

Ignore
1481191807
Reply with quote  #2

1481191807
Report to moderator
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
BitcoinHoarder
Full Member
***
Offline Offline

Activity: 145


View Profile
July 07, 2011, 07:11:06 PM
 #2

The network adjusts every 2016 blocks, that is coded in the p2p algorithms.

You can't predict exactly when a block will be solved.  I can't even predict exactly when the next block will be solved.  But we know how fast, approximately, the network is operating so we get pretty close.

See https://en.bitcoin.it/wiki/Difficulty
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
July 07, 2011, 07:17:05 PM
 #3

but i wonder about a long term effect.
if they say that the last block that gives the actual mining incentive will be introduced in the year 2136 or something - how accurate is such statement?

is the difficulty calculated to compensate the inherited error, or is it only to match the next 2016 blocks so they would be all 10min long from now on?

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
ANSYSiC
Newbie
*
Offline Offline

Activity: 27



View Profile
July 07, 2011, 07:32:45 PM
 #4

theese 6 blocks/hour are in average, so you can say that the last block is found ~2033 (i dont know)
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
July 08, 2011, 07:05:58 PM
 #5

One would think that on the bitcoin forum this kind of questions would rather get answered... Smiley
I'm not sure if the protocol allows to re-ask, but I would really appreciate anyone explaining this difficulty stuff to me.
So, should I keep asking until I get answered (or banned)? Or maybe re-asking wont help anyway, because the only way to know this is to look into the source code? Smiley

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
supersonic3974
Member
**
Offline Offline

Activity: 70


View Profile
July 08, 2011, 07:08:36 PM
 #6

What hasn't been answered by the previous posts??
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
July 08, 2011, 07:09:33 PM
 #7

is the difficulty calculated to compensate the inherited error, or is it only to match the next 2016 blocks so they would be all 10min long from now on?

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
MoonShadow
Legendary
*
Offline Offline

Activity: 1666



View Profile
July 08, 2011, 07:18:53 PM
 #8

is the difficulty calculated to compensate the inherited error, or is it only to match the next 2016 blocks so they would be all 10min long from now on?

No, difficulty does not attempt to compensate for the inherited error.  So assuming that difficulty continues to go up, and never down, average block creation over the lifetime of Bitcoin will be something slightly faster than every ten minutes.  Thus it is possible that the entire production curve for bitcoins will be compressed slightly, and the blocks wherein the block reward will come earlier than projected.  However, there will still be exactly the same amount of bitcoins issued as is projected.

"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'
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
July 08, 2011, 07:20:31 PM
 #9

Thank you. That's exactly what I needed to know.

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
mjsa
Newbie
*
Offline Offline

Activity: 7


View Profile
July 08, 2011, 07:26:41 PM
 #10

The difficulty is used to control the Bitcoin economy, and inflation in a way?
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
July 08, 2011, 07:33:25 PM
 #11

I guess in a way it also controls an inflation, but only in a short term, since the total number of bitcoins is limited at the end, anyway.

But the difficulty, and the way it changes serves many purposes.
The most important one is I guess to decentralize the power of one PC, over the entire network.
So there is this difficulty that makes it difficult to screw over the others Smiley

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
RodeoX
Legendary
*
Offline Offline

Activity: 2114


The revolution will be monetized!


View Profile
July 08, 2011, 07:36:54 PM
 #12

The difficulty is used to control the Bitcoin economy, and inflation in a way?
Not really to control inflation. It has tended to lead to deflation, but the main reasons and advantages are to feed a steady, secure supply into the economy. It takes a lot of computer power to create a bitcoin. That means cost.  Mining provides an incentive to use energy to produce BTC. Difficulty makes it hard to overproduce. The more people trying with better machines, the harder it gets. Difficulty has to be adjusted because the hash power of all computers on the network is always changing.  

The gospel according to Satoshi - https://bitcoin.org/bitcoin.pdf

Free bitcoin=https://bitcointalk.org/index.php?topic=1610684
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
July 08, 2011, 07:41:44 PM
 #13

But also there is a problem that if anyone would manage to take over more than a half of the network's hashing speed - then he would basically take over the network.
Right?
So the difficulty is also to protect against that, not only to make it more expensive to mine bitcoins? Though, I have to admit that these two things are pretty much related Smiley

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
MoonShadow
Legendary
*
Offline Offline

Activity: 1666



View Profile
July 08, 2011, 07:50:57 PM
 #14

But also there is a problem that if anyone would manage to take over more than a half of the network's hashing speed - then he would basically take over the network.
Right?
So the difficulty is also to protect against that, not only to make it more expensive to mine bitcoins? Though, I have to admit that these two things are pretty much related Smiley

No, an attacker with 50% of the hashing would not be able to take over the network.  Such an attacker would be able to prevent transactions from being processed, and potentially double-spend coins that he recently possessed; but would still be unable to do anything to anyone's coins that he had never actually owned.  The 50% mark just makes an attack possible, it doesn't make it easy.

"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'
TiagoTiago
Hero Member
*****
Offline Offline

Activity: 616


Firstbits.com/1fg4i                :Ƀ


View Profile
July 08, 2011, 07:55:51 PM
 #15

The difficulty is like saying you need to get less than N when rolling a gazillion sided dice to be acknowledged as having cracked a block; people can get lots of dices and roll them at the same time to increase their chances of getting a small enough number, if people start using too many dices, the threshold is changed so that even with all the additional dices everyone together still only get a number bellow the threshold around 6 times per hour on average, same thing if people  start using less dices, but in the opposite direction.

(I dont always get new reply notifications, pls send a pm when you think it has happened)

Wanna gimme some BTC for any or no reason? 1FmvtS66LFh6ycrXDwKRQTexGJw4UWiqDX Smiley

The more you believe in Bitcoin, and the more you show you do to other people, the faster the real value will soar!

Do you like mmmBananas?!
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
July 08, 2011, 07:58:08 PM
 #16

But also there is a problem that if anyone would manage to take over more than a half of the network's hashing speed - then he would basically take over the network.
Right?
So the difficulty is also to protect against that, not only to make it more expensive to mine bitcoins? Though, I have to admit that these two things are pretty much related Smiley

No, an attacker with 50% of the hashing would not be able to take over the network.  Such an attacker would be able to prevent transactions from being processed, and potentially double-spend coins that he recently possessed; but would still be unable to do anything to anyone's coins that he had never actually owned.  The 50% mark just makes an attack possible, it doesn't make it easy.
Sorry, I don't mean to spread any panic or something.
Of course he cannot get money that people had generated before.
But if he can prevent transactions and take all the freshly generated coins to himself - isn't it technically taking over the network?

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
MoonShadow
Legendary
*
Offline Offline

Activity: 1666



View Profile
July 08, 2011, 08:05:47 PM
 #17


But if he can prevent transactions and take all the freshly generated coins to himself - isn't it technically taking over the network?


Anyone who has such hashing power has to choose between assaulting the network and participating honestly within it.  If said person has 51% of the hashing power, and participates honestly, he can capture 51% of the newly generated coins.  He could choose to reject every transaction, and simply publish empty blocks, but this isn't an attack on the network, really.  It does no harm, since transactions can still be expected to be processed by the miners who capture the other 49% of blocks.  However, such a person could choose to prevent all transactions, but to do this he has to turn his miners to the task of reversing all of the blocks that are created by other miners, so he would still only be able to capture about the same number of blocks over the same time period.  The effective hash rate of the network would be cut in half, but only if the attacker is successful at reversing all honest blocks before another honest block could be built upon it.  The odds of this continuing for any extended period of time is remote with only 51%.

"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'
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
July 08, 2011, 08:14:01 PM
 #18


But if he can prevent transactions and take all the freshly generated coins to himself - isn't it technically taking over the network?


Anyone who has such hashing power has to choose between assaulting the network and participating honestly within it.  If said person has 51% of the hashing power, and participates honestly, he can capture 51% of the newly generated coins.  He could choose to reject every transaction, and simply publish empty blocks, but this isn't an attack on the network, really.  It does no harm, since transactions can still be expected to be processed by the miners who capture the other 49% of blocks.  However, such a person could choose to prevent all transactions, but to do this he has to turn his miners to the task of reversing all of the blocks that are created by other miners, so he would still only be able to capture about the same number of blocks over the same time period.  The effective hash rate of the network would be cut in half, but only if the attacker is successful at reversing all honest blocks before another honest block could be built upon it.  The odds of this continuing for any extended period of time is remote with only 51%.
I know it is unlikely.
But you say that he can deny to publish all the transactions.
What I think would be more dangerous is if he defines a filter that accepts some transactions, but not others.
It could turn into corporations ruling over what can and what cannot be sent through.
So it's more likely to happen Smiley

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
MoonShadow
Legendary
*
Offline Offline

Activity: 1666



View Profile
July 08, 2011, 08:19:43 PM
 #19


What I think would be more dangerous is if he defines a filter that accepts some transactions, but not others. This would give him much more power than stopping all the transactions - so it's more likely to happen Smiley

Yes, but miner defined filters are part of the protocol.  It's expected that, in the future, some miners will simply choose to reject fee-less transactions, as an example.  Future bitcoin-banks could choose to ignore transactions, free or not, that are not issued by clients of other banks that they have reciproprocity agreements with.  Wal-mart could ignore transactions intended for Target, and vice versa, if they can identify them.  None of this would cause harm to the Bitcoin network at large, and is not an attack. The worst thing that can happen to such a transaction is that it's in limbo until such time that a miner that doesn't discriminate processes a block.

"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'
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
July 08, 2011, 08:23:14 PM
 #20

Yeah, even then, it's only a mater of time until my transaction gets mined by an honest miner Smiley
The guy who invented it is really a genius - Edison is nothing next to him Smiley

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
Pages: [1] 2 »  All
  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!