Go-Ethereum – Exporting Complete Blockchain Data

exportgo-ethereum

I'm considering running statistical analysis on ethereum's blockchain data. That idea assumes that I have all the relevant data in some readable format.

So far I've ran a geth node that synced with the network and the documentation says I can do an export.

https://github.com/ethereum/go-ethereum/wiki/Backup-&-restore

I'm just curious about this binary format of an export. Is there a way of consuming that data with some 3rd party app?

If so, can you point me to some documentation?
If this is a bad approach please do point me in the right direction.

The only goal that I need to achieve is to get all of the blockchain data in some shape or form that I can read with a 3rd party app that I'm writing at the moment.

Best Answer

As outlined here,

"Data structures are stored in Merkle Patricia tries"

I have encountered the same problem as you have described and opted to collect the data in a more consumable format by taking advantage of the fact that both Geth and Parity implement the full set of JSON RPC endpoints.

You can use web3.js for example to query these endpoints and pull data about blocks or transactions from the chain. You can then store this data in a format optimised for processing it.

Something as simple as var info = web3.eth.getBlock(3150, true); will return information about a block, and all the transactions contained within as outlined in the API docs.

Related Topic