Skip to main content

Questions tagged [nonce]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
30 views

Bitcoin to Ethereum atomic swap with PTLCs

According to this, it wouldn't be possible to use PTLCs to swap to Ethereum: Cross-chain atomic swaps based on adaptor signatures, or at least semi-scriptless adaptor signature schemes designed for ...
rdong8's user avatar
  • 45
2 votes
1 answer
247 views

Is my k nonce being re-used here?

I'm using bitcoin core 28.0 on Debian Bookworm. I enter the following into bash: ./bitcoin-cli signmessage "p2pkh-address-here" "abc123" ... and I get the signature output in the ...
Lilacrail's user avatar
  • 161
2 votes
1 answer
102 views

Where exactly is the mining code in Bitcoin Core?

I've been looking for months for the real mining code in the Bitcoin Core source code for the function/s that implement the incrementing of the nonce and hashing blocks for mining and never found ...
Ahmad Naji's user avatar
1 vote
1 answer
51 views

What are the size constraints for extranonce2?

I am curious about the size constraints for extranonce2. Is its size effectively unlimited, or are there specific limits or practical considerations imposed on it? Could someone clarify if there are ...
Mutti Kangungu's user avatar
0 votes
0 answers
86 views

nonce search algorithm [duplicate]

I have a question about the nonce search algorithm. Let's say I have a s9 miner and my competitor has a more powerful s19. We both check nonces from 0 sequentially, so I will check nonces that my ...
Oleh Baidiuk's user avatar
0 votes
4 answers
1k views

Finding Hash with 11 leading zeroes

For an exercise, I'm trying to find a sha256 hash with 11 leading zeroes. For this reason, I wrote a Python script that basically tries all intergers from 1 to N and brute forces the hash. Now my N is ...
Howdy's user avatar
  • 1
1 vote
1 answer
259 views

Anti-exfil protocol can't be verified on multiple hardware wallets

Regarding the nonce side channel attacks detailed in posts like this one by Blockstream. Which references this mailing list by Pieter Wuille. The idea is to add another layer of protection against a ...
reggieadams's user avatar
6 votes
1 answer
1k views

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 ...
Jimmy Song's user avatar
  • 7,799
1 vote
3 answers
325 views

Why is a nonce enough to be 64 bits?

As far as I can understand the resulting hash should start with difficulty number of zeroes before a block can be mined. That is: H(HashOfPreviosBlock + nonce) < target but why is a 64 bit number ...
Lumbda Kokolala's user avatar
1 vote
1 answer
602 views

Can a signer recover their own signature's nonce `k`?

I am proofreading a blog post about nonce reuse. One point that comes up is whether someone could recover another person's private key if the other user reuses the same nonce. In that context, it was ...
Murch's user avatar
  • 77.9k
1 vote
1 answer
204 views

What is a pair of nonces?

From https://www.sps.ed.ac.uk/sites/default/files/pictures/ekja03/Mining25.pdf page 10: The bitcoin system is therefore designed to ensure that it takes around ten minutes on average before any miner ...
Erik Kaplun's user avatar
1 vote
1 answer
286 views

Question about transaction verification relating to the ECDSA "nonce"

Context about the ECDSA nonce: Questions about generating a random number for ECDSA Are these nonce values public or private? I understand that they are generated to be different every transaction and ...
Poseidon's user avatar
  • 673
2 votes
1 answer
859 views

Can the difference be determined between two nonces k1, k2, having a linear relationship if the nonce and private key are unknown, i.e., k2 - k1 = n?

My question is related to weak signature vulnerability testing where a hypothetical attacker does not know the values of the nonce or private key itself, but can determine that the nonce 'k1' is ...
Alfhilðr ínn Seiðkona's user avatar
16 votes
3 answers
25k views

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 ...
GypsyCosmonaut's user avatar
2 votes
1 answer
1k views

If two miners come up with two valid nonces, how does consensus take place?

I am trying to understand how the consensus mechanism works. My understanding is that multiple nonces can satisfy the target hash requirement. What I'm trying to understand now is: if two miners come ...
Amostafa's user avatar
1 vote
1 answer
669 views

If a lot of miners start at nonce 0, how are there no ties?

I understand what happens with ties (in the long term, the longest chain wins), however, if a majority of miners start with a nonce of zero, does it just matter who has the fastest hardware, or is ...
Kladskull's user avatar
  • 123
0 votes
1 answer
74 views

Continuation question about nonce randomness and verification of the randomness by signing parties

Original: Can a signer recover their own signature's nonce `k`? Note that under normal circumstances it is infeasible to randomly generate the same nonce, so either a non-random nonce has to have ...
Poseidon's user avatar
  • 673
0 votes
1 answer
2k views

How do I get Bitcoin block header data with nonce?

How do I get Bitcoin block header data with nonce? There are tens of so called blockchain explorer websites, tens more offering on-line Bitcoin blockchain parsing. But all I need are historic ...
darius's user avatar
  • 65
2 votes
2 answers
7k views

How is the Target Hash determined?

So, I understand how the amount of leading 0's are calculated, but how is the hexadecimal that come after the leading 0's calculated? For example, the previous mined blocks hash was ...
L M 's user avatar
  • 79
4 votes
4 answers
2k views

Is it possible for an unsolvable block to exist?

Is there a proof that the hashing will always yield a result? Or proof that there exist unsolvable blocks? It's my understanding that even if we hit an unsolvable block that eventually the ...
Addy's user avatar
  • 171
0 votes
1 answer
576 views

How will mining work after 2140?

The nonce header of a block has 32 bits. The vast majority of the time, none of the 2^32 nonces will result in a block hash below the target. So to continue mining, miners usually change the ...
JacopoStanchi's user avatar
0 votes
1 answer
988 views

Block 566687 nonce with extranonce, how to interpret?

This could apply to any block, but I was checking this one out found by Slushpool. I've looked this up in Mastering Bitcoin and here on StackExchange, but the best I can get so far is: the coinbase ...
James Young's user avatar
23 votes
2 answers
28k views

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, ...
ConstableJoe's user avatar
0 votes
2 answers
82 views

How is crypto Mining actually validating the block?

As far as I understand in crypto-mining you are trying to find the nonce such that the hash starts with some amount of zero's. I do not understand how this nonce is used to actually validate anything.
KoalaMaybe's user avatar
2 votes
3 answers
1k views

Can a miner just introduce a block full of valid predetermined transactions in the blockchain and get rewarded?

My question is - let's say a miner has control over a certain number of bitcoin addresses. He creates a block containing small transactions to and fro from these accounts ahead of time in advance and ...
Vaibhav Chopra's user avatar
5 votes
4 answers
1k views

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, ...
aitee's user avatar
  • 53
3 votes
4 answers
1k views

Why is the probability of finding a winning nonce exactly the same for a new header and a header where you've already tried 1 billion nonces?

I'm referring to this question: When do miners stop waiting for new transactions? More specifically, this statement from the top answer: "suppose you have a block header h1 on which you have ...
JonT's user avatar
  • 33
4 votes
1 answer
868 views

In Bitcoin, what happens if there is no viable nonce?

I'm assuming SHA is perfectly uniform. In bitcoin, there are $2^{32}$ possible inputs per block, which are mapped to $2^{256}$ possible outputs. So there is a $1/2^{224}$ chance that any randomly ...
Croolsby's user avatar
  • 143
0 votes
1 answer
105 views

Is the winning hash the same as the nonce?

Is the miner is trying to solve the nonce or a winning hash? "The SHA-256 hash of a block's header must be lower than or equal to the current target for the block to be accepted by the network.&...
HeyDoeFarm's user avatar
0 votes
1 answer
90 views

What determines the size of a hash during mining?

I have been struggling with this quite a bit. From what I understand is that a miner generates nonces to find a nonce that is smaller than the target hash. However, how does one determine the size of ...
lodeboon's user avatar
8 votes
4 answers
11k views

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) ...
Erik Vesterlund's user avatar
4 votes
2 answers
715 views

Is that proved that for each block there is always nonce value which will make block hash to start by n count of 0

Sorry for the obvious question, but I'm looking for a mathematical prove. Block header is calculated as a concatenation of the following values. Version hashPrevBlock hashMerkleRoot timeStamp Bits ...
Ruben's user avatar
  • 41
-2 votes
1 answer
1k views

How to get bitcoin transaction nonce from transaction signature?

Subj. Looking for a code for calculate/get bitcoin transaction nonce. Help me please. ??? Thank you.
Caraco Mongos's user avatar
0 votes
1 answer
780 views

hello please let me know whats wrong with this script for find Reuse R value [closed]

hello friends here is the code to find reuse R values of bitcoin transaction but unfortunately it is not scanning more than 51 transaction secondly it can only use one address at a time and i want to ...
Muhammad Adnan Alam's user avatar
1 vote
2 answers
1k views

Who decides for Blockchain PoW puzzle?

In PoW algorithm a miner has to solve a mathematical puzzle whose difficulty depends upon load on network and total computing power. But who decides what would be that puzzle for each block? For ...
Rizstien's user avatar
  • 111
0 votes
1 answer
87 views

When should proof-of-work be done? Does it involve in mining a coin? Can it be done without real transactions to be recorded?

I am trying to understand about what bitcoin is. I conceptualize bitcoin as a proof of work required when a new block (or new coin) is created. I also understand that a proof of work involves finding ...
Michael M.'s user avatar
0 votes
1 answer
1k views

What is the correct way to calculate timestamp for a Block(125552)?

I am just learning mining process. Today I learned that we have to find nonce for given block header. And for block header we need timestamp in UTC I took the timestamp data from below link of 125552 ...
V01's user avatar
  • 3
45 votes
2 answers
15k views

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 ...
Michael Pickens's user avatar
25 votes
1 answer
16k views

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 ...
Andrew's user avatar
  • 251
0 votes
1 answer
98 views

Understanding Transactions, Mining, and the 10 minutes block solved

I'm not entirely sure if the questions I have regard to Bitcoin all relate to each other? How do miners decide how many transactions they should have in a block in order to mine 1 bitcoin? When miners ...
hellomello's user avatar
0 votes
1 answer
112 views

Are Bitcoin transaction fees competitive?

I was listening today to their conversation about the transcation fees in Bitcoin and Michael Sailor's understanding stroke me as inaccurate. Is there any direct incentive within the Bitcoin protocol ...
John Smith's user avatar
2 votes
1 answer
704 views

How Do Peers Choose Which Peer To Trust?

So the way I understand how the blockchain works is that each new block uses the previous block's hash, which means if my block[100].hash != someone_elses_block[100].hash that means that either I ...
ABOODYFJ's user avatar
4 votes
1 answer
3k views

Why is the block header 80 bytes, not 128 bytes (= two SHA-256 blocks)?

According to the Bitcoin Developer Reference, the block header is 80 bytes total: BYTES NAME 4 version 32 previous block header hash 32 merkle root hash 4 time 4 nonce ...
Geremia's user avatar
  • 4,725
1 vote
2 answers
4k views

Nonce usage in ECDSA signing algorithm

I'm trying to understand the signing function secp256k1_ecdsa_sig_sign(), and I'm curious about the nonce usage here. static int secp256k1_ecdsa_sig_sign(const secp256k1_ecmult_gen_context *ctx, ...
svan's user avatar
  • 11
0 votes
1 answer
113 views

Do mining pools expose attempted nonces to the public?

Do mining pools expose attempted nonces to the public? I would think no because it would be counter competitive. I can let a giant mining farm tell me what nonces not to use. But let's say the nonces ...
Jay's user avatar
  • 13
1 vote
1 answer
402 views

Why do miners need a nonce if the timestamp changes the hash of the block?

As the title says. If the timestamp is constantly changing with every guess, why does the miner also include the nonce? Is it because they're mining too fast for the timestamp to change?
user95756's user avatar
0 votes
1 answer
208 views

Random Number In R Value , what is it actually, is it the same as Nonce in the blocks

I wonder about the random number in R value ... if i am right , the R value is First part of the script signature which is combined of two parts (r,s) r = Gk (elliptic curve scalar multiplication) Or ...
user1610925's user avatar
14 votes
5 answers
6k views

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 ...
morsecoder's user avatar
  • 14.2k
0 votes
1 answer
2k views

How are nonces decided in mining?

I know that when I create a new block in a Bitcoin network, I change the nonce value to generate a block. The question is, do you randomly assign the values you assign to nonces? Or do you start with ...
ASH's user avatar
  • 21
5 votes
1 answer
6k views

Blockchain SHA256 hash and nonce [duplicate]

I have been reading the SHA256 hash creation with a random nonce. So, my understanding is every miner would pull uncommited transactions and would try to create a Hash of the transactions with a ...
user7347188's user avatar