Building a Bitcoin API and Query System

Currently, in order to get information on a Bitcoin block or transaction, one has to sync his node with other nodes in a P2P network to be able to query the block for the information required.

Sumit Lahiri presented a BIP proposal to build an API that enables users to “easily query Bitcoin blocks and transactions” without having to sync with other nodes on the network.

One of the issues with the proposal is that light clients like Electrum, Spruned and Bitcore offer most if not all of the functionalities because the “servers are designed to quickly answer the query of light client wallets”.

Secondly, this is impossible because once a transaction is included in a block, the only way to view it is by downloading the entire block and not viewing a single transaction. It is also contradictory because a light client that does not work with peers but is rather anonymous is not self-validating.

This usually result in the the situation of *central validation’*which is against the principle upon which Bitcoin is built - a decentralised system with no central trust.

Some people suggest it is necessary to have such an API as it does not encourage centralisation but rather seeks to reduce “deployment cost” by removing the need to sync with other nodes and should be encouraged.

However, the the P2P network provides the ability to self-validate and any API that provides non-verifiable data supports the centralised system which is bad for the Bitcoin network.


Support us and the authors of this article by donating to the following address:


Comments powered by Talkyard.