Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: jgarzik on August 26, 2010, 12:21:31 AM



Title: New web service: obtain dump of bitcoin block NNNN
Post by: jgarzik on August 26, 2010, 12:21:31 AM

As part of Bitcoin Watch (http://www.bitcoinwatch.com/), 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 (http://blk.bitcoinwatch.com/b?h=72000)

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



Title: Re: New web service: obtain dump of bitcoin block NNNN
Post by: jgarzik on August 27, 2010, 07:22:11 AM

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

http://blk.bitcoinwatch.com/



Title: Re: New web service: obtain dump of bitcoin block NNNN
Post by: nelisky on August 27, 2010, 11:04:34 AM
Superb! Thanks a lot.


Title: Re: New web service: obtain dump of bitcoin block NNNN
Post by: satoshi on August 27, 2010, 04:13:16 PM
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.


Title: Re: New web service: obtain dump of bitcoin block NNNN
Post by: vess on August 30, 2010, 04:45:13 PM
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.


Title: Re: New web service: obtain dump of bitcoin block NNNN
Post by: Insti on August 30, 2010, 06:56:34 PM
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 (http://www.bitcoin.org/wiki/doku.php?id=block_hashing_algorithm)

(or look at the code.)



Title: Re: New web service: obtain dump of bitcoin block NNNN
Post by: vess on August 30, 2010, 09:27:01 PM
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.


Title: Re: New web service: obtain dump of bitcoin block NNNN
Post by: Ground Loop on August 31, 2010, 11:11:59 PM
I dunno.. just my two cents: I thought the wiki info was great.
Every field that goes into the hash, when it changes, and how the nonce iteration works.

To get more technical than that, you have to bring up your code editor. :)


Title: Re: New web service: obtain dump of bitcoin block NNNN
Post by: jgarzik on February 24, 2011, 03:45:05 AM
This service has been discontinued.  Bitcoin Block Explorer (http://blockexplorer.com/) is far better than this rudimentary service, so bitcoinwatch is now linking directly to BBE.