Bitcoin Forum
May 02, 2024, 01:03:26 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: New block exactly every 10min? how?  (Read 1014 times)
nookiegirl (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
April 25, 2013, 01:12:39 PM
 #1

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?
1714611806
Hero Member
*
Offline Offline

Posts: 1714611806

View Profile Personal Message (Offline)

Ignore
1714611806
Reply with quote  #2

1714611806
Report to moderator
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
drawingthesun
Legendary
*
Offline Offline

Activity: 1176
Merit: 1015


View Profile
April 25, 2013, 01:24:50 PM
 #2

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)
saddambitcoin
Legendary
*
Offline Offline

Activity: 1610
Merit: 1004



View Profile
April 25, 2013, 01:29:43 PM
 #3

the network adjusts its difficulty according to the overall hashrate to reach these targets

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

BenTuras
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1001



View Profile
April 25, 2013, 01:36:39 PM
 #4

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 ?

I am selling in stock OneStringMiner boards, based on the Bitfury chips. Have a look here: https://bitcointalk.org/index.php?topic=495536.0
nookiegirl (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
April 25, 2013, 01:41:20 PM
 #5

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

Activity: 756
Merit: 500

It's all fun and games until somebody loses an eye


View Profile
April 25, 2013, 01:54:57 PM
 #6

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.com

The best place for betting with bitcoin: BitBet.us
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1083


View Profile
April 25, 2013, 01:55:41 PM
 #7

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 Offline

Activity: 1176
Merit: 1015


View Profile
April 25, 2013, 02:35:16 PM
 #8

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 Offline

Activity: 1890
Merit: 1075


Ian Knowles - CIYAM Lead Developer


View Profile WWW
April 25, 2013, 02:37:26 PM
 #9

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).

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4612



View Profile
April 25, 2013, 03:13:16 PM
Last edit: April 25, 2013, 03:51:07 PM by DannyHamilton
 #10

Quote
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 Offline

Activity: 1176
Merit: 1015


View Profile
April 25, 2013, 03:16:41 PM
 #11

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%5E256

How many zeros are we up to right now?
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1075


Ian Knowles - CIYAM Lead Developer


View Profile WWW
April 25, 2013, 03:18:18 PM
 #12

How many zeros are we up to right now?

http://blockchain.info/block-index/378457/00000000000001aea0dbcf76505cba633639210ddbcaca13dbac43869e09327d

Check the "hash" on the top right (or just in the URL itself) - as you can see - there is a lot of room left. Smiley

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
April 25, 2013, 03:41:37 PM
 #13

Quote
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 2192 is not.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4612



View Profile
April 25, 2013, 03:50:35 PM
 #14

Quote
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 2192 is not.

Oops.  Thanks.  I've got to be more careful about that.  Grin

Fixed.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!