Bitcoin Forum
July 29, 2024, 03:15:31 PM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Let'me get mining straight  (Read 1800 times)
jmoon (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
April 06, 2013, 05:23:30 PM
 #1

There is one thing that I still do not understand about bitcoin and bitcoin mining:

The problem is to find a 32bit number - nonce - that yields the desired digest for the full block.
Additionally, the block has the time-stamp parameter which changes every second.

But being the nonce the only "free variable", and having 2^32 (~4.3x10^9) possibilities, how come a 4.3GH/s machine cant find it in one second?
Not every time-stamps allow nonce to get the desired hash?

Best regards
mitty
Sr. Member
****
Offline Offline

Activity: 359
Merit: 250



View Profile
April 06, 2013, 05:24:15 PM
 #2

Not every time-stamps allow nonce to get the desired hash?
Yup

The probability of any one given hash producing a block (at current difficulty) can be found here: http://blockexplorer.com/q/probability

A nonce has 2^32 possible values, but most of the time none of those nonces produce a block. (you can see why given the probability above)
jmoon (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
April 06, 2013, 06:07:53 PM
 #3

Ok,

so If i've a 8.6GH/s, in each second I calculate nonce for two time-stamps?
jmoon (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
April 06, 2013, 08:03:44 PM
 #4

Ok,

so If i've a 8.6GH/s, in each second I calculate nonce for two time-stamps?

By this I mean: Given a block, with a time stamp, lets say "0x00000000" after calculating all nonce's, in half a second, in order to keep the CPU running the miner updates its timestamp to calculate the nonce for the next second "0x00000001"?
I believe then that the block must only be dispatched to the network at the given time, right?

Or the block can be dispatched to the network even if the network time-stamp is lower, and it will be the winning block if noone finds a block with a lower time-stamp?


molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
April 06, 2013, 08:38:51 PM
 #5

Ok,

so If i've a 8.6GH/s, in each second I calculate nonce for two time-stamps?

By this I mean: Given a block, with a time stamp, lets say "0x00000000" after calculating all nonce's, in half a second, in order to keep the CPU running the miner updates its timestamp to calculate the nonce for the next second "0x00000001"?
I believe then that the block must only be dispatched to the network at the given time, right?

Or the block can be dispatched to the network even if the network time-stamp is lower, and it will be the winning block if noone finds a block with a lower time-stamp?

Bitcoin doesn't rely on the timestamp at all afaik. I think it can even be lower than the one of the previous block.

EDIT: I'm sorry, there are some rules:

  • Block timestamp must not be more than two hours in the future
  • Reject if timestamp is the median time of the last 11 blocks or before

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
jmoon (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
April 06, 2013, 09:20:01 PM
Last edit: April 06, 2013, 09:37:31 PM by jmoon
 #6

ok, so if it cant be latter than 2 hours, and before the median of last 11, this sets a maximum span time: 11*2+2 = 24hours

a 24hour span limits the total freedom to something like  24*3600*2^32 = 3.8x10^14.
Considering that current network capacity is something around 5.6x10^13, it only needs to be multiplied by 8 - which with current technology advancements doen't seems take too long - so that a new block can be found all possible time-stamps and nonce's are tested every second. After that, the network will need to stop, and wait second by second to see if the timestamp 2h+1s after allows nonce to yield the desired digest.

As so, this number, 380 TH/s is what i belive is the theoretical maximum network hashrate, since after this, the network will have to completely stop till the end of current second, waiting for the next second...

Was this predicted before?


jmoon (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
April 06, 2013, 09:51:40 PM
 #7

And this is assuming the worst case where a new block is generated every 2 hours. For a 10min span, this number gets lower.
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1432



View Profile
April 06, 2013, 10:18:51 PM
 #8

Considering that current network capacity is something around 5.6x10^13, it only needs to be multiplied by 8 - which with current technology advancements doen't seems take too long - so that a new block can be found all possible time-stamps and nonce's are tested every second.
modify coinbase = new hash.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
jmoon (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
April 06, 2013, 10:46:56 PM
 #9

good point. Forgot about coinbase!

Above all, it means that what i said before was only valid for each solo/pool individually, not the entire network.

But is it currently being also used as another degree of freedom? I cant eve see how can it be changed...


grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1432



View Profile
April 08, 2013, 03:26:27 PM
 #10

good point. Forgot about coinbase!

Above all, it means that what i said before was only valid for each solo/pool individually, not the entire network.

But is it currently being also used as another degree of freedom? I cant eve see how can it be changed...



if you change the merkle tree in any way (add, delete, or reorder transactions), you also get new hash.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
April 08, 2013, 03:28:17 PM
 #11

The reward tx (where miners are paid) in the block has a extra nonce field.  It can contain any random arbitrary value.  One doesn't need to manipulate the timestamp.  Just generate a new merkle tree.  The max hash rate is infinite.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
April 08, 2013, 03:30:51 PM
 #12

good point. Forgot about coinbase!

Above all, it means that what i said before was only valid for each solo/pool individually, not the entire network.

But is it currently being also used as another degree of freedom? I cant eve see how can it be changed...

Why couldn't it be changed.  One could simply use a different payout address = new coinbase tx = new tx hash = new merkle tree = new merkle root hash = new blockheader.

Of course it is even easier than that.  Since the coinbase has no input it has space for an "extra nonce".  Some pools even put messages in that space.  It can contain a arbitrary value allowing the creation of an infinite amount of block headers in any given time period, even by a single solo miner (assuming sufficient computing power).

In hindsight it probably would have been cleaner to just make the nonce field 64 bits.  One would think alt-coins would have improved on that but since they are all pump and dump copies they did not.
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!