Difference between revisions of "Nonce"

(Created page with "The "nonce" in a bitcoin block is a 32-bit (4-byte) field whose value is adjusted by miners so that the hash of the block will be less than or equal to the current t...")
 
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The "nonce" in a bitcoin [[block]] is a 32-bit (4-byte) field whose value is adjusted by miners so that the [[hash]] of the block will be less than or equal to the current [[target]] of the network. The rest of the fields may not be changed, as they have a defined meaning.
+
Nonce is shorthand for 'Number Used Once' and is a number that is consumed in an action and not recorded. In this case, the true 'number' is the full block header which is hashed as a single string however the 'Nonce' field is the only part which changes during process of hashing a given block header.
  
Any change to the block data (such as the nonce) will make the block hash completely different. Since it is [[wikipedia:Cryptographic hash function|believed infeasible]] to predict which combination of bits will result in the right hash, many different nonce values are tried, and the hash is recomputed for each value until a hash less than or equal to the current [[target]] of the network is found. The [[target]] required is also represented as the [[difficulty]], where a higher [[difficulty]] represents a lower [[target]]. As this iterative calculation requires time and resources, the presentation of the block with the correct nonce value constitutes [[proof of work]].
+
The "nonce" in a Bitcoin [[block header]] is a 32-bit (4-byte) field, whose value is adjusted by Miners during the [[Proof of Work]] process in an effort to generate a block hash less than or equal to, the current [[target]] of the network. The rest of the fields, with the exception of the timestamp, may not be changed, as they have a defined meaning.
  
== Golden Nonce ==
+
Any change to the block data (such as the nonce) will make the block hash completely different. Since it is [[wikipedia:Cryptographic hash function|believed infeasible]] to predict which combination of bits will result in the right hash, many different nonce values are tried, and the hash is recomputed for each value until a hash less than or equal to the current [[target]] of the network is found. The target required is also represented as the [[difficulty]], where a higher difficulty represents a lower target. As this iterative calculation requires time and resources, the presentation of a block with a valid nonce value constitutes proof of work.
A ''golden nonce'' in Bitcoin [[mining]] is a nonce which results in a [[block hashing algorithm|hash]] value lower than the [[target]].
 
In many practical mining applications, this is simplified to any nonce which results in a block [[block hashing algorithm|hash]] which has 32 leading zeroes<ref>https://bitcointalk.org/index.php?topic=75609.msg837556#msg837556</ref>, with a secondary test checking if the actual value is lower than the target difficulty.
 
  
=== Etymology ===
+
==Attribution==
The term ''golden nonce'' most likely evolved from the term ''[http://en.wikipedia.org/wiki/Charlie_and_the_Chocolate_Factory#Plot golden ticket]'' as used to refer to a nonce satisfying the mining requirements as early as April 8th, 2011<ref>https://github.com/progranism/Bitcoin-JavaScript-Miner/blob/master/miner.js#L5</ref>
+
This content is based on content sourced from https://en.bitcoin.it/wiki/Nonce under [https://creativecommons.org/licenses/by/3.0/ Creative Commons Attribution 3.0]. Although it may have been extensively revised and updated, we acknowledge the original authors.
 
 
== References ==
 
<references />
 
 
 
[[Category:Technical]]
 
[[Category:Vocabulary]]
 

Latest revision as of 11:56, 6 November 2020

Nonce is shorthand for 'Number Used Once' and is a number that is consumed in an action and not recorded. In this case, the true 'number' is the full block header which is hashed as a single string however the 'Nonce' field is the only part which changes during process of hashing a given block header.

The "nonce" in a Bitcoin block header is a 32-bit (4-byte) field, whose value is adjusted by Miners during the Proof of Work process in an effort to generate a block hash less than or equal to, the current target of the network. The rest of the fields, with the exception of the timestamp, may not be changed, as they have a defined meaning.

Any change to the block data (such as the nonce) will make the block hash completely different. Since it is believed infeasible to predict which combination of bits will result in the right hash, many different nonce values are tried, and the hash is recomputed for each value until a hash less than or equal to the current target of the network is found. The target required is also represented as the difficulty, where a higher difficulty represents a lower target. As this iterative calculation requires time and resources, the presentation of a block with a valid nonce value constitutes proof of work.

Attribution

This content is based on content sourced from https://en.bitcoin.it/wiki/Nonce under Creative Commons Attribution 3.0. Although it may have been extensively revised and updated, we acknowledge the original authors.