Questions tagged [nonce]

should be used for questions related to the nonce used in bitcoin block

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 coinbase transaction is also updated during mining. The changes to the coinbase transaction form the "extranonce". This is needed since the 32-bit search space of the nonce is too little.

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 the block with the correct nonce value constitutes proof of work.

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

124 questions
45
votes
2 answers

Nonce size - Will it always be big enough?

If I understand correctly, the block only has 4 bytes (32 bits) for the nonce. Is it possible for the difficulty to become high enough that there are no nonce solutions? If so, then what options does a miner have?
Michael Pickens
  • 903
  • 1
  • 7
  • 11
25
votes
1 answer

When a block is "discovered" how is the nonce determined?

I know that a block is based on a random number called a nonce, but if that number is random and unknown to the miner, how is that number actually verified as the correct nonce and not some arbitrary number?
Andrew
  • 251
  • 1
  • 3
  • 3
23
votes
2 answers

What is the extraNonce?

This question helps identify the various components of the getwork "data" field, but I'm curious where the extraNonce comes from. My hunch is it's the first four bytes of the second half of the data, because I believe this is still part of the…
ConstableJoe
  • 655
  • 2
  • 7
  • 14
18
votes
3 answers

Looking for nonces of even numbers

Each one of bitcoin and its derived crypto-currencies has a nonce value in the block, no matter what the algorithm is. Every miner tries to search for a luck nonce which can make the hash value smaller than the target under the required…
jclin
  • 450
  • 3
  • 13
16
votes
3 answers

What is a nonce?

When I see the block info on blockchain, I see that there is a field named "nonce", I could not find any relevant information on web regarding what a nonce is. Please explain what a nonce is what is the purpose of it.
GypsyCosmonaut
  • 305
  • 1
  • 3
  • 10
13
votes
5 answers

Why didn't Satoshi make the nonce space larger?

I know Satoshi isn't around to ask anymore, so this might be futile to ask, but I'm hoping someone might have some insight about this. Bitcoin mining typically utilizes an extraNonce (bnExtraNonce in the coinbase tx's scriptSig) and a nonce field…
morsecoder
  • 14,008
  • 2
  • 42
  • 92
9
votes
4 answers

How cooperative or competitive is the mining process?

As each miner works out which nonces it has tried, does it notify the network so that energy isn't wasted on re-processing the same thing by each node? Or is it totally competitive with everyone for themselves?
Andrew Vit
  • 545
  • 2
  • 8
8
votes
4 answers

What is the precise nonce finding protocol?

There are many descriptions of what mining is, but none of them describe it exactly. From what I gather: Mining means finding a nonce c such that for some information s the hash value h(s||c) begins with a certain number of zeros (h is sha-256, ||…
Erik Vesterlund
  • 225
  • 1
  • 2
  • 6
8
votes
1 answer

Is it possible to run out of nonce values?

Miners can vary at least these things when searching for hashes: A 32-bit nonce Which transactions are included in the block. Is it ever possible for a currency using the Bitcoin protocol to get 'stuck'? That is, can all combinations of parameters…
Michael Burge
  • 499
  • 2
  • 10
8
votes
1 answer

What happened to the nonce distribution between blocks 24480-69120?

See: http://pastebin.com/raw.php?i=Sk6vyBRu (each row represents 1440 blocks, each column represents a range of 100M values, covering blocks 0-216000) I've been doing some simple nonce analysis, as you can see, and it appears that something happened…
extcoin
  • 219
  • 1
  • 5
6
votes
3 answers

Does every nonce really have an equal chance of winning?

I set out to test the claim: "Every nonce has an equal chance of winning." Time Evolution So, I plotted, with gnuplot, the nonce values vs. hashes for all the valid blocks in the blockchain:(Also, in the last plot, you can really visualize the…
Geremia
  • 4,469
  • 4
  • 37
  • 75
6
votes
1 answer

What happens when the nonce field overflows?

The nonce field of a block header is 4 bytes, so the max nonce is: 4,294,967,295. That could be computed in a few seconds with a reasonable rig (solo mining) or much quicker on large pools. What happens at that point? I assume you'd change the…
Anonymous
  • 473
  • 4
  • 6
6
votes
1 answer

Why is it important that nonces when signing not be related?

I understand that if nonces (usually denoted k in the signature algorithm) are related signing with the same public key that this reveals information about the private key. I would like to get a better conceptual understanding of why this is.
Jimmy Song
  • 7,709
  • 16
  • 35
6
votes
2 answers

Can it be mathematically proven that a block can be solved?

In other words, that there exists a nonce for the block that will result in sha256(sha256(block header + nonce)) hash under the current difficulty barrier number.
user1497250
  • 181
  • 4
5
votes
4 answers

Why search for a nonce linearly (+1) vs searching only even or odd nonces?

As a solo miner, you have the disadvantage of a minuscule hash rate compared to mining pools. Is it not possible to searching for only even nonces? Of course you risk the chance of missing the nonce, but you gain an effective 2x hash rate. I wonder…
aitee
  • 53
  • 3
1
2 3
8 9