Bitcoin Forum
November 09, 2024, 07:55:40 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I have a misunderstanding about nonce.  (Read 202 times)
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1694
Merit: 8326


Fiatheist


View Profile WWW
May 13, 2020, 09:53:02 PM
 #1

In mining, miners take the prevblockhash, the merkle root, some other stuff like version and also they set an interval called nonce that is nothing but a number that they change its time, because it changes completely the final result.

Miners also make more than trillions of hashes per second on their mining farms right? Isn't the only thing that they change the nonce? If yes, why is it always within that range and not above 10^15 (for example) ?




I hope I was clear.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Loganota
Hero Member
*****
Offline Offline

Activity: 1778
Merit: 882


View Profile
May 13, 2020, 10:09:04 PM
Merited by nc50lc (1)
 #2

AFAIK, nonce is a 32-bit number1, so it can range from 0 to 4,294,967,295 (232 - 1)

[1]: https://en.bitcoin.it/wiki/Nonce
TravelMug
Hero Member
*****
Offline Offline

Activity: 2814
Merit: 872



View Profile
May 14, 2020, 03:29:36 AM
 #3

AFAIK, nonce is a 32-bit number1, so it can range from 0 to 4,294,967,295 (232 - 1)

[1]: https://en.bitcoin.it/wiki/Nonce

And just to make it clear, nonce is a 32-bit unsigned integers, thus they are always non-negative (0 or positive) so the range is from 0 to 4,294,967,295.

As opposed to a 32-bit signed integers, that can be both positive or negative, hence -2,147,483,648 through 2,147,483,647.

 
█▄
R


▀▀██████▄▄
████████████████
▀█████▀▀▀█████
████████▌███▐████
▄█████▄▄▄█████
████████████████
▄▄██████▀▀
LLBIT▀█ 
  TH#1 SOLANA CASINO  
████████████▄
▀▀██████▀▀███
██▄▄▀▀▄▄████
████████████
██████████
███▀████████
▄▄█████████
████████████
████████████
████████████
████████████
█████████████
████████████▀
████████████▄
▀▀▀▀▀▀▀██████
████████████
███████████
██▄█████████
████▄███████
████████████
█░▀▀████████
▀▀██████████
█████▄█████
████▀▄▀████
▄▄▄▄▄▄▄██████
████████████▀
........5,000+........
GAMES
 
......INSTANT......
WITHDRAWALS
..........HUGE..........
REWARDS
 
............VIP............
PROGRAM
 .
   PLAY NOW    
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6360


Self-proclaimed Genius


View Profile
May 14, 2020, 03:56:07 AM
 #4

AFAIK, nonce is a 32-bit number1, so it can range from 0 to 4,294,967,295 (232 - 1)
This ^

And if it reached the maximum, the miner should change "something" in the coinbase transaction (like a random character in "mined by ###" that they're adding);
That will change the merkle root and of-course merkle root hash, then they can start nonce from 0 again.

That's described as "extraNonce" here: https://en.bitcoin.it/wiki/Block_hashing_algorithm

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3626
Merit: 11020


Crypto Swap Exchange


View Profile
May 14, 2020, 04:11:26 AM
 #5

And just to make it clear, nonce is a 32-bit unsigned integers, thus they are always non-negative (0 or positive) so the range is from 0 to 4,294,967,295.

As opposed to a 32-bit signed integers, that can be both positive or negative, hence -2,147,483,648 through 2,147,483,647.

since nonce has no meaning then how you interpret it makes no difference. it is simply 32 zeros and ones (aka bits) and goes from 000....000 to 000...001 and up to 111...111. keep in mind that there is no difference between Int32 and UInt32 when you look at them in binary.

And if it reached the maximum, the miner should change "something" in the coinbase transaction (like a random character in "mined by ###" that they're adding);
the correct way of saying it is that miner has to change something in "block header", that thing can be the extra nonce in coinbase transaction to change merkle root, or it could be the transactions in the block (change order, add/remove,...), it could be block time or block version. this last one is why we see weird block versions sometimes.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6360


Self-proclaimed Genius


View Profile
May 14, 2020, 04:23:02 AM
 #6

the correct way of saying it is that miner has to change something in "block header", that thing can be the extra nonce in coinbase transaction to change merkle root, or it could be the transactions in the block (change order, add/remove,...), it could be block time or block version. this last one is why we see weird block versions sometimes.
Those are what overt ASIC-boost miners using to get "extra entropy" (block version), but it was just being exploited;
"block time" is changed every second (though can vary) which is the main concern of the OP since a mining pool's hash per second can reach more than the list of mined block's typical nonce.
So we're talking about what to change within that second (in which case, both are trueSmiley

"extraNonce" however is what the link described.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1694
Merit: 8326


Fiatheist


View Profile WWW
May 14, 2020, 07:28:23 AM
 #7

the correct way of saying it is that miner has to change something in "block header", that thing can be the extra nonce in coinbase transaction to change merkle root, or it could be the transactions in the block (change order, add/remove,...), it could be block time or block version. this last one is why we see weird block versions sometimes.
Those are what overt ASIC-boost miners using to get "extra entropy" (block version), but it was just being exploited;
"block time" is changed every second (though can vary) which is the main concern of the OP since a mining pool's hash per second can reach more than the list of mined block's typical nonce.
So we're talking about what to change within that second (in which case, both are trueSmiley

"extraNonce" however is what the link described.

Blocktime is the current time? I thought time is this:
https://youtu.be/MJ0OzrkHvXA?t=2658

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6360


Self-proclaimed Genius


View Profile
May 14, 2020, 09:03:06 AM
 #8

Blocktime is the current time? I thought time is this:
https://youtu.be/MJ0OzrkHvXA?t=2658
Yes, and that video explains how much the "block timestamp" can vary to be still valid since each of the miner's/mining pool's clocks can't always be the same with each other.
It can also be used as another entropy since they can fake it as long as it's within the valid range.

I used "block time" because it was used in pooya's post that I replied to and the only "time" in the header is the timestamp.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!