Author

Topic: What have they done to the Nonce? (Read 3192 times)

legendary
Activity: 3472
Merit: 4801
September 24, 2012, 05:05:07 PM
#18
Same way you increment anything.

coinbase = coinbase +1
coinbase++;
donator
Activity: 1218
Merit: 1079
Gerald Davis
September 21, 2012, 11:28:05 AM
#17
can anyone tell me how to increment the coinbase after going though all the nonce..

Same way you increment anything.

coinbase = coinbase +1
full member
Activity: 140
Merit: 100
September 21, 2012, 09:54:20 AM
#16
can anyone tell me how to increment the coinbase after going though all the nonce..
hero member
Activity: 728
Merit: 500
165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
September 20, 2012, 11:10:39 PM
#15
I wonder if the endian-ness of things might be a clue as to Satoshi's origins... maybe he was a big-iron programmer from back in the day or something?

Is there any definitive statements on why the endian-ness is swapped around so strangely from the start?


http://en.wikipedia.org/wiki/Endianness#Endianness_in_networking
full member
Activity: 140
Merit: 100
September 20, 2012, 07:20:28 PM
#14
The generation (block reward) tx has a single input.  Normally the input of any tx is the unspent output of a prior tx however generated coins are produced from "thin air".  The input is a special type of tx called the coinbase.   The Bitcoin network doesn't use the value in here for anything (although it is now used by subordinate chain in merged mining).   Miners can modify this to produce more possible block headers for the same set of inputs.

So say for a given set of transactions, time, prior block, and difficulty you try all nonces 0 to 2^32-1.  What can you hash next if you don't want to wait for any of the other values to change.  You simply change the value in the coinbase field to another value.  That will produce a new merkle tree and thus a new markle root hash.  Technically it doesn't need to be incremented any new value is fine but for simplicity and record keeping (pools) it makes sense to just increment the value.   Pools do this to issue work to multiple workers that are otherwise the same.   solo miners will need to increment this if they have a hashing rate greater than ~4GH/s.

can some provide an example of how it is done..
donator
Activity: 1218
Merit: 1079
Gerald Davis
September 20, 2012, 05:58:51 PM
#13
hash extension attacks are only possibly on arbitrary sized message.
Bitcoin block headers are fixed size.  A valid block header must be exactly 640 bits (no more, no less).
I was going by this.

Yeah the answer is technically correct in the general sense.  Double hash is a useful cryptographic feature to prevent extension attacks.  The author of that answer may not have been aware that Bitcoin has a fixed size header.
donator
Activity: 1218
Merit: 1079
Gerald Davis
September 20, 2012, 05:55:28 PM
#12
The generation (block reward) tx has a single input.  Normally the input of any tx is the unspent output of a prior tx however generated coins are produced from "thin air".  The input is a special type of tx called the coinbase.   The Bitcoin network doesn't use the value in here for anything (although it is now used by subordinate chain in merged mining).   Miners can modify this to produce more possible block headers for the same set of inputs.

So say for a given set of transactions, time, prior block, and difficulty you try all nonces 0 to 2^32-1.  What can you hash next if you don't want to wait for any of the other values to change.  You simply change the value in the coinbase field to another value.  That will produce a new merkle tree and thus a new markle root hash.  Technically it doesn't need to be incremented any new value is fine but for simplicity and record keeping (pools) it makes sense to just increment the value.   Pools do this to issue work to multiple workers that are otherwise the same.   solo miners will need to increment this if they have a hashing rate greater than ~4GH/s.
legendary
Activity: 1246
Merit: 1077
September 20, 2012, 05:53:41 PM
#11
hash extension attacks are only possibly on arbitrary sized message.
Bitcoin block headers are fixed size.  A valid block header must be exactly 640 bits (no more, no less).
I was going by this.
full member
Activity: 140
Merit: 100
September 20, 2012, 05:50:45 PM
#10
I wonder if the endian-ness of things might be a clue as to Satoshi's origins... maybe he was a big-iron programmer from back in the day or something?

Hmm.  Never thought about that angle before.  I mean for 99% of programmers all these endian conversions just make the code more confusion to understand however for some programmers it might be second nature.

Then again there are a lot of other "quirks" which are equally hard to explain.

Why use 32 bit nonce + extra nonce?  Why not just use a 64 bit nonce?

Why a double SHA-256?  If the fear was that SHA-256 would be partially compromised one would gain some security by using two algorithms but you don't really gain much performing the same algorithm twice.

please can anyone explain how the extra nonce portion work..
donator
Activity: 1218
Merit: 1079
Gerald Davis
September 20, 2012, 05:50:21 PM
#9
hash extension attacks are only possibly on arbitrary sized message.
Bitcoin block headers are fixed size.  A valid block header must be exactly 640 bits (no more, no less).
legendary
Activity: 1246
Merit: 1077
September 20, 2012, 05:47:37 PM
#8
I wonder if the endian-ness of things might be a clue as to Satoshi's origins... maybe he was a big-iron programmer from back in the day or something?

Hmm.  Never thought about that angle before.  I mean for 99% of programmers all these endian conversions just make the code more confusion to understand however for some programmers it might be second nature.

Then again there are a lot of other "quirks" which are equally hard to explain.

Why use 32 bit nonce + extra nonce?  Why not just use a 64 bit nonce?

Why a double SHA-256?  If the fear was that SHA-256 would be partially compromised one would gain some security by using two algorithms but you don't really gain much performing the same algorithm twice.
The double SHA-256 prevents, I believe, hash extension attacks.
donator
Activity: 1218
Merit: 1079
Gerald Davis
September 20, 2012, 05:46:11 PM
#7
I wonder if the endian-ness of things might be a clue as to Satoshi's origins... maybe he was a big-iron programmer from back in the day or something?

Hmm.  Never thought about that angle before.  I mean for 99% of programmers all these endian conversions just make the code more confusion to understand however for some programmers it might be second nature.

Then again there are a lot of other "quirks" which are equally hard to explain.

Why use 32 bit nonce + extra nonce?  Why not just use a 64 bit nonce?

Why a double SHA-256?  If the fear was that SHA-256 would be partially compromised one would gain some security by using two algorithms but you don't really gain much performing the same algorithm twice.
legendary
Activity: 1260
Merit: 1000
September 20, 2012, 05:39:12 PM
#6
I wonder if the endian-ness of things might be a clue as to Satoshi's origins... maybe he was a big-iron programmer from back in the day or something?

Is there any definitive statements on why the endian-ness is swapped around so strangely from the start?
donator
Activity: 1218
Merit: 1079
Gerald Davis
September 20, 2012, 05:35:53 PM
#5
i used the converter here http://number.webmasters.sk/numerical.php and it tell's me that "42a14695" is equal to "1117865621"

Yeah I forgot Satoshi for some reason messed around with the endianess of each 16bit bit portion of the number.

12345678 -> 12 34 56 78 -> 78 56 34 12 -> 78563412

So
42a14695 -> 42 a1 46 95 -> 95 46 a1 42 -> 9546a142
legendary
Activity: 1862
Merit: 1011
Reverse engineer from time to time
September 20, 2012, 05:31:01 PM
#4
They haven't "done" anything.  It is called hexadecimal.


You seriously can't count? It's 2 billion, 504 million...where on earth did you see 2 trillion and how do you expect it to fit in a 32-bit variable?
full member
Activity: 140
Merit: 100
September 20, 2012, 05:15:42 PM
#3
They haven't "done" anything.  It is called hexadecimal.

2504433986 = 0x42a14695 = 1001100011011011110001 = "two trillion five hundred and four million, four hundred and thirty three thousand, nine hundred eighty six"

Not to be rude or anything but this thread combined with your other thread on blockheader indicates you lack even the most basics of programming.  Jumping right into something as complex as Bitcoin is unlikely going to pay any dividends if you don't have a foundation.

You may be better served by some self study of just basic programming concepts.  The language doesn't really matter but java is generally pretty easy for a beginner to pick up.

i used the converter here http://number.webmasters.sk/numerical.php and it tell's me that "42a14695" is equal to "1117865621"
donator
Activity: 1218
Merit: 1079
Gerald Davis
September 20, 2012, 05:11:08 PM
#2
They haven't "done" anything.  It is called hexadecimal.

full member
Activity: 140
Merit: 100
September 20, 2012, 05:07:19 PM
#1
In https://en.bitcoin.it/wiki/Block_hashing_algorithm the algorithm show's that the nonce is "42a14695" and blockexplorer http://blockexplorer.com/block/00000000000000001e8d6829a8a21adc5d38d0a473b144b6765798e61f98bd1d show's that the nonce is 2504433986

so what is done to the nonce to make it "42a14695"
Jump to: