New web service: obtain dump of bitcoin block NNNN

7 messages BitcoinTalk Jeff Garzik, nelisky, Satoshi Nakamoto, vess, Insti August 26, 2010 — August 30, 2010
Jeff Garzik (jgarzik) August 26, 2010 00:21 UTC Source ·

As part of Bitcoin Watch, a new feature provides a developer-friendly dump of a bitcoin block at the specified height.

GET parameters: “h” - height of block to download “json” - set to non-zero value, to enable application/json output rather than HTML output

Examples:

Dump block 72000: http://blk.bitcoinwatch.com/b?h=72000

Dump block 72000, with JSON: http://blk.bitcoinwatch.com/b?h=72000&json=1

Jeff Garzik (jgarzik) August 27, 2010 07:22 UTC Source ·

This sub-page of Bitcoin Watch shows the last 7 days worth of blocks, each block linking to expanded data:

http://blk.bitcoinwatch.com/

nelisky August 27, 2010 11:04 UTC Source ·

Superb! Thanks a lot.

Satoshi Nakamoto August 27, 2010 16:13 UTC Source ·

That’s kind of interesting as an upside-down bar chart of how many blocks were produced each day.  The target is 144 blocks per day.

vess August 30, 2010 16:45 UTC Source ·

Thanks for this. Question for the developers: what do I need to hash, exactly to get the sha-256 hash for this block? Is it the JSON, or is it kept in some other data format in the database? I’m interested in generating blocks myself, and am not clear what exactly is being hashed.

Insti August 30, 2010 18:56 UTC Source ·
Quote from: vess on August 30, 2010, 4:45:13 PM UTC

Thanks for this. Question for the developers: what do I need to hash, exactly to get the sha-256 hash for this block? Is it the JSON, or is it kept in some other data format in the database? I’m interested in generating blocks myself, and am not clear what exactly is being hashed.

More detail on the block hashing algorithm can be found here: http://www.bitcoin.org/wiki/doku.php?id=block_hashing_algorithm

(or look at the code.)

vess August 30, 2010 21:27 UTC Source ·

Thanks, I’ve read that. I was hoping for a simpler than code review resource for the exact bits and bytes. If one doesn’t turn up, I’ll dig a little deeper.