Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: jackjack on March 31, 2013, 07:45:26 PM



Title: Raw blocks
Post by: jackjack on March 31, 2013, 07:45:26 PM
Hi,
I want to know if there is a website that has the raw blocks data.
I didn't find anything like this in blockchain.info and BBE doesn't give the raw data but the json dump of it...


Title: Re: Raw blocks
Post by: r.willis on March 31, 2013, 08:08:46 PM
I have some. PM me, if you need them.


Title: Re: Raw blocks
Post by: jackjack on March 31, 2013, 10:38:48 PM
Thanks, sent
But I'm still interested in a website that can provide all of them


Title: Re: Raw blocks
Post by: kjj on April 01, 2013, 12:20:47 AM
Why not just parse them out of the files directly?


Title: Re: Raw blocks
Post by: jackjack on April 01, 2013, 12:38:54 AM
Because the system has currently access to HTTP and nothing else


Title: Re: Raw blocks
Post by: deepceleron on April 01, 2013, 07:03:07 AM
The easiest (hardest if you expect someone else to do the work) solution if you want a web site that offers something different is to modify ABE (https://bitcointalk.org/index.php?topic=22785.0) to display data as you wish.


Title: Re: Raw blocks
Post by: Xenland on April 01, 2013, 07:04:59 AM
You can use the Bitcoind api/command in windows and linux. I believe you need to look up each block 0 up until the latest block and output each block info


Title: Re: Raw blocks
Post by: deepceleron on April 01, 2013, 08:58:12 AM
You can use the Bitcoind api/command in windows and linux. I believe you need to look up each block 0 up until the latest block and output each block info

RPC only allows a JSON output, and only shows the hashes of transactions, not the full content of the block.
Code:
>bitcoind.exe getblock 000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506
{
    "hash" : "000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506",
    "confirmations" : 129031,
    "size" : 957,
    "height" : 100000,
    "version" : 1,
    "merkleroot" : "f3e94742aca4b5ef85488dc37c06c3282295ffec960994b2c0d5ac2a25a95766",
    "tx" : [
        "8c14f0db3df150123e6f3dbbf30f8b955a8249b62ac1d1ff16284aefa3d06d87",
        "fff2525b8931402dd09222c50775608f75787bd2b87e56995a7bdd30f79702c4",
        "6359f0868171b1d194cbee1af2f16ea598ae8fad666d9b012c8ed2b79a236ec4",
        "e9a66845e05d5abc0ad04ec80f774a7e585c6e8db975962d069a522137b80c1d"
    ],
    "time" : 1293623863,
    "nonce" : 274148111,
    "bits" : "1b04864c",
    "difficulty" : 14484.16236123,
    "previousblockhash" : "000000000002d01c1fccc21636b607dfd930d31d01c3a62104612a1719011250",
    "nextblockhash" : "00000000000080b66c911bd5ba14a74260057311eaeb1982802f7010f1a9f090"
}

It looks like what you are looking for actually existed before:
https://bitcointalk.org/index.php?topic=928.0

pynode (https://github.com/jgarzik/pynode) also is a good way to access raw blocks; look at how mkbootstrap pulls raw blocks out of the pynode blockchain.


Title: Re: Raw blocks
Post by: Xenland on April 01, 2013, 07:16:40 PM
You can use the Bitcoind api/command in windows and linux. I believe you need to look up each block 0 up until the latest block and output each block info

RPC only allows a JSON output, and only shows the hashes of transactions, not the full content of the block.
Code:
>bitcoind.exe getblock 000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506
{
    "hash" : "000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506",
    "confirmations" : 129031,
    "size" : 957,
    "height" : 100000,
    "version" : 1,
    "merkleroot" : "f3e94742aca4b5ef85488dc37c06c3282295ffec960994b2c0d5ac2a25a95766",
    "tx" : [
        "8c14f0db3df150123e6f3dbbf30f8b955a8249b62ac1d1ff16284aefa3d06d87",
        "fff2525b8931402dd09222c50775608f75787bd2b87e56995a7bdd30f79702c4",
        "6359f0868171b1d194cbee1af2f16ea598ae8fad666d9b012c8ed2b79a236ec4",
        "e9a66845e05d5abc0ad04ec80f774a7e585c6e8db975962d069a522137b80c1d"
    ],
    "time" : 1293623863,
    "nonce" : 274148111,
    "bits" : "1b04864c",
    "difficulty" : 14484.16236123,
    "previousblockhash" : "000000000002d01c1fccc21636b607dfd930d31d01c3a62104612a1719011250",
    "nextblockhash" : "00000000000080b66c911bd5ba14a74260057311eaeb1982802f7010f1a9f090"
}

It looks like what you are looking for actually existed before:
https://bitcointalk.org/index.php?topic=928.0

pynode (https://github.com/jgarzik/pynode) also is a good way to access raw blocks; look at how mkbootstrap pulls raw blocks out of the pynode blockchain.

I thought there was a way to use that information to "get" the transaction list from the block ( i can't remember which code that took right now but im almost sure there was a way ) its just not convient as "abe" or other already made solutions.