Is it possible to explore the blockchain without downloading the blockchain?

2

1

I'm doing some experiments involving bitcoin and the blockchain, and I need to access some informations about addresses, block, and transactions. The problem is that I need a lot of data, so I can't use online APIs such as blockchain.info. I know it is possible to do such things by downloading and accessing directly the blockchain, but this solution is pretty impracticable, given its size. Is it possible to access this data without downloading the full blockchain? For example by directly making some kind of request to the nodes?

El3k0n

Posted 2017-07-30T02:05:13.767

Reputation: 23

Can you include what exactly you need from the blockchain? The answer will depend on what you need and the information that you already know.Andrew Chow 2017-07-30T04:51:24.977

For example, I would like to get the amount of bitcoins an address has or the addresses involved in a transactionEl3k0n 2017-07-30T14:14:45.433

Answers

2

To get anything other than blocks, you will need to download the entire blockchain. The only things you can request from a node is a block if you know the block hash, and transactions, if you know the transaction id AND the transaction is still in the node's mempool. Transactions which have already been confirmed cannot be requested as the node will have removed the transaction from its memory and stored it to disk with the block. Everything else requires the full blockchain as they are mostly human abstractions of the blocks and transactions that are not relevant to the network.

The "balance" of an address (besides technically not existing) can only be found by having the entire blockchain and reading through the blockchain and scanning all transactions for any inputs and outputs that are associated with that address. Getting the transactions that an address is involved in requires doing the same thing. This is because addresses don't exist to the network as they are only abstractions for humans to more easily think about transactions. Balances don't exist either as Bitcoin does not use an accounts or balance system for tracking money. Rather it is all based on transaction outputs.

Andrew Chow

Posted 2017-07-30T02:05:13.767

Reputation: 40 910