Hey everyone, I'm curious if there's a script, tool, or method available to find the nonce value from older transactions or blocks. I know the nonce is already determined for all mined blocks, but I’m just wondering if there’s any way to dig this info up?
How to locate nonce in past blocks or transactions
11 replies 450 views
LoyceV very nicely compiled all of the nonces used in the blocks here: https://loyce.club/blockdata/nonce.txt.
I'm not sure where to find the extra nonce though, they're located in the Coinbase transaction.
Thanks for that. Their is always some ninja here with knowledge needed. This is obviously historical block data? Any idea how to find individual transaction nonce? Thanks
ledger_chainMember
Posts: 749 · Reputation: 103
#4Dec 20, 2023, 04:58 AM
It turns out that the extraNonce is not included in the block or block header formats. This is a reply from theymos:
There is no nonce for individual transactions, because it only applies to block generation. Individual transactions have no use knowing the nonce, since that would just waste more bytes making the tx larger. It's a 32-bit counter located in the last 4 bytes of the block header.
The transaction nonce is what is used to create the signature of the transaction or the r,s. It's private as it involves the private key to sign transactions
titan_degenMember
Posts: 886 · Reputation: 114
#6Dec 20, 2023, 11:54 AM
Is the data you're looking for included in any of those files?
http://blockdata.loyce.club/inputs/blockchair_bitcoin_inputs_20110615.tsv.gz
http://blockdata.loyce.club/outputs/blockchair_bitcoin_outputs_20110615.tsv.gz
http://blockdata.loyce.club/transactions/blockchair_bitcoin_transactions_20110615.tsv.gz
(Reference thread: Bitcoin block data: inputs, outputs and transactions)
If it's in here, I can get you the data.
I'm kinda clueless here, but if it's private, it's not on the blockchain, right?
Brute forced as in mining is only way I am familiar with
Correct. It's in the Coinbase transaction and since it's not a protocol standard, it can be a bit ambiguous, any changes in the transactions will alter the merkle root though I think using an extranonce makes it simpler.
The r and s values are 32 bytes each and located in the signature. If you want to parse it but I imagine that will take sometime, not sure what this can yield though. They're meant to be completely random under normal circumstances.
ledger_chainMember
Posts: 749 · Reputation: 103
#9Dec 21, 2023, 02:38 PM
Ah, I seem to get it now. He's talking about in the ECDSA signature algorithm where a secret number k, the so-called transaction nonce (though this is the first time I heard it being called a nonce to be honest) is chosen that is used to create r and s.
Obviously that's not available in the raw transaction as he pointed out, but in another thread here I made a process for getting the nonce k from the private key, the message data - in this case the raw transaction with a few fields unfilled - , r and s: https://bitcointalk.org/index.php?topic=5316741.msg56331333#msg56331333
Yes you got it my friend sorry. I can't find much data on it. Block nonce is usually 10 decimal characters 8 hex 32 bit. Was wandering what format the secret K value is if it is also a 32 bit string
Interesting thread thank you. Although I don't see the point in finding K if you have P? Finding K leads you to P.
I find this interesting:
S1 = (h1+rx1*P)/k => k = (h1+rx1*P)/S1
S2 = (h2+rx2*P)/(k+1) => k+1 = (h2+rx2*P)/S2
((h1+rx1*P)/S1) + 1 = (h2+rx2*P)/S2
.........
P = (h2*S1 - h1*S2 - S2)/(rx1*S2 - rx2*S1)
dr_satoshiNewbie
Posts: 132 · Reputation: 11
#12Dec 22, 2023, 05:07 AM
Hello friends. Inspired by the table on iceland's rsz, I created code in phyton for the cases where k,k+1...k+m. Since there is no such example whose private key I know, I ask you to check it. If it works, I will publish it on github. As far as I can see, there is no such resource, we can all benefit from it. Can anyone who sees it please check it out and give their opinions?
?Reply
Sign in to reply to this topic
Related topics
- Looking for 3 examples of r, s, z and nonce data 19
- Testing 64-bit Nonce Collision on the Genesis Block with an Extended Header 2
- Bitcoin Core displaying coins (UTXOs) in a new tab 13
- Are you in favor of BIP-110? Let's get a Bitcoin poll going. 0
- Erlay seems to have some issues here’s a better proposal for a bitcoin protocol without invites 3
- New Optional Hourglass Implementation is Live 3