4
I just started studying bitcoin.
I would like to be able to download a single block from the Bitcoin network.
This should be an old block, already mined, and which I can know the nonce.
Then I would like, via bash linux commands, to verify that such nonce solves the block.
Thanks to a question asked here, I know I could look at
https://blockchain.info/block-height/474044?format=json
However this is JSON, I imagine I can't use it to verify the nonce.
Hence my question is:
- How can I download a block?
- What is the file format of such block?
- At what bytes start the nonce field I can increment, for example with a Python script?
- Once I get to put the right (and known :) ) nonce how can verify that the block is solved? I mean, its hash should starts with lots of zeros, could I treat the block as a string and pass directly to the python hashlib function?
Thanks in advance.
You beat me to it. – Penquin – 2017-07-03T17:51:54.473