Bitcoin Forum
November 25, 2017, 04:17:28 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Getting nonces  (Read 408 times)
fevir
Newbie
*
Offline Offline

Activity: 22


View Profile
August 25, 2015, 07:29:23 PM
 #1

Hi all,

Each block in the blockchain contains a nonce - a seemingly insignificant, yet important number for each block.

Assuming I'm running a full node and have a copy of the blockchain, what would be a (preferably easy) way to get a list (just plain text will do) of all nonces from the Genesis block up untill now?

Thanks!

Cheers,
Fevir
1511583448
Hero Member
*
Offline Offline

Posts: 1511583448

View Profile Personal Message (Offline)

Ignore
1511583448
Reply with quote  #2

1511583448
Report to moderator
1511583448
Hero Member
*
Offline Offline

Posts: 1511583448

View Profile Personal Message (Offline)

Ignore
1511583448
Reply with quote  #2

1511583448
Report to moderator
1511583448
Hero Member
*
Offline Offline

Posts: 1511583448

View Profile Personal Message (Offline)

Ignore
1511583448
Reply with quote  #2

1511583448
Report to moderator
Join ICO Now Coinlancer is Disrupting the Freelance marketplace!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511583448
Hero Member
*
Offline Offline

Posts: 1511583448

View Profile Personal Message (Offline)

Ignore
1511583448
Reply with quote  #2

1511583448
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1232


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


View Profile WWW
August 25, 2015, 07:33:29 PM
 #2

You can create a script which goes through each block and uses the getblockhash and getblock rpc commands. You can retrieve the json data for each block which includes a field for the nonce. Then just extract the nonce and save that to a file.

          ▄█████▄
        ▄█████████▄
      ▄████▀   ▀████▄
    ▄████▀   ▄ ▄█▀████▄
  ▄████▀   ▄███▀   ▀████▄
▄████▀   ▄███▀   ▄   ▀████▄
█████   ███▀   ▄███   █████
▀████▄   ▀██▄▄███▀   ▄████▀
  ▀████▄   ▀███▀   ▄████▀
    ▀████▄       ▄████▀
      ▀████▄   ▄████▀
        ▀███  ████▀
          ▀█▄███▀
.
|
.
|
          ▄█████▄
        ▄█████████▄
      ▄████▀   ▀████▄
    ▄████▀   ▄ ▄█▀████▄
  ▄████▀   ▄███▀   ▀████▄
▄████▀   ▄███▀   ▄   ▀████▄
█████   ███▀   ▄███   █████
▀████▄   ▀██▄▄███▀   ▄████▀
  ▀████▄   ▀███▀   ▄████▀
    ▀████▄       ▄████▀
      ▀████▄   ▄████▀
        ▀███  ████▀
          ▀█▄███▀
unthy
fevir
Newbie
*
Offline Offline

Activity: 22


View Profile
August 25, 2015, 07:42:17 PM
 #3

Thanks! I'll see if I can create such a script.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!