nookiegirl (OP)
|
|
April 25, 2013, 01:12:39 PM |
|
Hi everybody,
I am trying to get deeper into the understanding of bitcoins, but there are still a few things unclear.
So If we all mine bitcoins, then what we do is just to find a hash, that matches a specific criteria. If this hash is found, then a new block is found and (currently) rewarded with 25 BTC.
But how can this happen exactly every 10 min? How can this be timed so accurately?
If I compare this with password bruteforcing, I have no estimate about the time, I will find a correct hash?
|
|
|
|
drawingthesun
Legendary
Offline
Activity: 1176
Merit: 1015
|
|
April 25, 2013, 01:24:50 PM |
|
Hi everybody,
I am trying to get deeper into the understanding of bitcoins, but there are still a few things unclear.
So If we all mine bitcoins, then what we do is just to find a hash, that matches a specific criteria. If this hash is found, then a new block is found and (currently) rewarded with 25 BTC.
But how can this happen exactly every 10 min? How can this be timed so accurately?
If I compare this with password bruteforcing, I have no estimate about the time, I will find a correct hash?
Its a average of 10 minutes, if you look at blocks found some are slower and some are faster. The network adjusts after a set amount of time to make the average 10 minutes. If more power is added and the average block time shortens, the network adjusts to make it harder. (This also works the other way around)
|
|
|
|
|
BenTuras
|
|
April 25, 2013, 01:36:39 PM |
|
This is done by adjusting the difficulty factor. And to explain this in a few words:
1. Imagine doing a difficult calculation(double sha256) on 16 64-bits values 2. One of these 64-bits values is incremented until the answer is found 3. Each iteration of the difficult calculation leads to 8 new 64 bits values of more or less random value. 4. Of these 8 new 64 bits values, one value must be of value 0x0000 0000 0000 0000 0000 ..... xxxx xxxx, or less. (The difficulty factor) 5. The number of leading zeroes is adjusted so that on average this difficult calculation leads to a correct value every 10 minutes.
The difficulty factor is adjusted every 2160 blocks, in such a way that finding the correct answer of those last 2160 blocks would have taken 2160*10 minutes.
Does this makes sense ?
|
|
|
|
nookiegirl (OP)
|
|
April 25, 2013, 01:41:20 PM |
|
So the smaller the difficulty, the more zero's?
If so, what if the difficulty is so low (has so many zero's up front), that there are only 2 digits left on the right and you could only create 0xFF more calculations?
|
|
|
|
Peter Lambert
|
|
April 25, 2013, 01:54:57 PM |
|
Hi everybody,
I am trying to get deeper into the understanding of bitcoins, but there are still a few things unclear.
So If we all mine bitcoins, then what we do is just to find a hash, that matches a specific criteria. If this hash is found, then a new block is found and (currently) rewarded with 25 BTC.
But how can this happen exactly every 10 min? How can this be timed so accurately?
If I compare this with password bruteforcing, I have no estimate about the time, I will find a correct hash?
It does not happen exactly every 10 minutes, as was said above if you look at the actual block times they vary by quite a bit. Sometimes you get two blocks within a minute, and sometimes it takes over an hour to get a block, but the average is 10 minutes. Think of it like if you roll dice, if you roll a 6 sided die once a second you would expect to get a 1 about every 6 seconds. But sometimes you would roll a 1 two times in a row, and sometimes you would roll a bunch of other numbers, but on average the 1 would come up about every 6 seconds. If more people start mining bitcoins then the blocks will start coming faster. Like in my die rolling example, if you start rolling two dice then you will get a 1 twice as often. But what happens is the bitcoin protocol adjusts the difficulty every so often (about every two weeks, but actually there is a set number of blocks which it recalculates at). So in our dice example, after rolling two dice for a while you get changed to 12 sided dice, so then the rate of finding 1's goes back to where it was before. The difference between this and brute forcing a password is that there are more possible answers for this (any number less than difficulty, as opposed to just one right answer). You could make an estimation of the time it takes to do a brute force, but since you are just looking for one answer the probable time is less meaningful, people usually state the time needed to try all possible passwords. So if your brute force can run through all possible passwords in 10 days, the average time to find the password would be 5 days, but you might find it in the fist day or you might find it in the last day.
|
Use CoinBR to trade bitcoin stocks: CoinBR.comThe best place for betting with bitcoin: BitBet.us
|
|
|
TierNolan
Legendary
Offline
Activity: 1232
Merit: 1104
|
|
April 25, 2013, 01:55:41 PM |
|
If so, what if the difficulty is so low (has so many zero's up front), that there are only 2 digits left on the right and you could only create 0xFF more calculations?
You mean so high. You mean that you need 248 out of the 256 bits to be zero? That requires 2^248 attempts on average. On the other side, there is a minimum allowed difficulty. You always have to do at least 2^32 (on average) to get a block.
|
1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
|
|
|
drawingthesun
Legendary
Offline
Activity: 1176
Merit: 1015
|
|
April 25, 2013, 02:35:16 PM |
|
To ask something I don't know, is there a max to the difficulty? Could we run out of space for leading zeros?
|
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
|
April 25, 2013, 02:37:26 PM |
|
To ask something I don't know, is there a max to the difficulty? Could we run out of space for leading zeros?
In short no - to understand this better you need to try and fathom exactly how big 2^256 is (there are other topics about it if you are keen to search).
|
|
|
|
DannyHamilton
Legendary
Offline
Activity: 3514
Merit: 4894
|
|
April 25, 2013, 03:13:16 PM Last edit: April 25, 2013, 03:51:07 PM by DannyHamilton |
|
If we built a Dyson sphere around the sun and captured all its energy for 32 years, without any loss, we could power a computer to count up to 2192. Of course, it wouldn’t have the energy left over to perform any useful calculations with this computer. But that’s just one star, and a measly one at that. A typical supernova releases something like 1051 ergs. If all of this energy could be channelled into a single orgy of computation, a 219-bit counter could be cycled through all of its states. These numbers have nothing to do with the technology of the devices; they are the maximums that thermodynamics will allow.
- Bruce Shneier
In other words, it really isn't likely that we will ever run into a situation where a 256 bit difficulty will become "too easy". It could happen if a weakness is discovered in the future in the SHA-256 algorithm, but if that happens it is very likely that bitcoin will switch to a different proof-of-work algorithm.
|
|
|
|
drawingthesun
Legendary
Offline
Activity: 1176
Merit: 1015
|
|
April 25, 2013, 03:16:41 PM |
|
To ask something I don't know, is there a max to the difficulty? Could we run out of space for leading zeros?
In short no - to understand this better you need to try and fathom exactly how big 2^256 is (there are other topics about it if you are keen to search). Thanks! So we would run out after this many zeros: http://www.wolframalpha.com/input/?i=2%5E256How many zeros are we up to right now?
|
|
|
|
|
kjj
Legendary
Offline
Activity: 1302
Merit: 1026
|
|
April 25, 2013, 03:41:37 PM |
|
If we built a Dyson sphere around the sun and captured all its energy for 32 years, without any loss, we could power a computer to count up to 2192. Of course, it wouldn’t have the energy left over to perform any useful calculations with this computer. But that’s just one star, and a measly one at that. A typical supernova releases something like 1051 ergs. If all of this energy could be channelled into a single orgy of computation, a 219-bit counter could be cycled through all of its states. These numbers have nothing to do with the technology of the devices; they are the maximums that thermodynamics will allow.
- Bruce Shneier
In other words, it really isn't likely that we will ever run into a situation where a 256 bit difficulty will become "too easy". It could happen if a weakness is discovered in the future in the SHA-256 algorithm, but if that happens it is very likely that bitcoin will switch to a different proof-of-work algorithm. Heh. When pasting things with superscripts, it is very helpful to fix them. Counting to 2192 is trivial. Counting to 2 192 is not.
|
17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8 I routinely ignore posters with paid advertising in their sigs. You should too.
|
|
|
DannyHamilton
Legendary
Offline
Activity: 3514
Merit: 4894
|
|
April 25, 2013, 03:50:35 PM |
|
If we built a Dyson sphere around the sun and captured all its energy for 32 years, without any loss, we could power a computer to count up to 2192. Of course, it wouldn’t have the energy left over to perform any useful calculations with this computer. But that’s just one star, and a measly one at that. A typical supernova releases something like 1051 ergs. If all of this energy could be channelled into a single orgy of computation, a 219-bit counter could be cycled through all of its states. These numbers have nothing to do with the technology of the devices; they are the maximums that thermodynamics will allow.
- Bruce Shneier
In other words, it really isn't likely that we will ever run into a situation where a 256 bit difficulty will become "too easy". It could happen if a weakness is discovered in the future in the SHA-256 algorithm, but if that happens it is very likely that bitcoin will switch to a different proof-of-work algorithm. Heh. When pasting things with superscripts, it is very helpful to fix them. Counting to 2192 is trivial. Counting to 2 192 is not. Oops. Thanks. I've got to be more careful about that. Fixed.
|
|
|
|
|