<p>That's exactly what your bitcoind client does. It asks for specific blocks in network calls and if you wanted to, you can create a simple client that asks only for certain tx's and blocks like you said.</p>

<p>That is in fact what most SPV wallets (phone-based wallets and some others) are doing. They ask for block headers only and then ask for transactions related to those blocks to prove that certain transactions exist.</p>

CC BY-SA 3.0
2016-12-31T02:38:31.877Z
This is not true for bitcoind (if you're referring to the Bitcoin Core rpc server binary), but it is true for some other clients. Bitcoin Core always downloads all blocks, because it cannot do full validation when gaps are missing.
Pieter Wuille
CC BY-SA 3.0
2016-12-31T07:36:07.650Z
I meant that bitcoind asks peers "what is thisk block" or "what is this tx"
Jimmy Song
CC BY-SA 3.0
2016-12-29T22:31:30.797Z
2016-12-29T22:31:30.797Z
Jimmy Song
<p>Rather than download the full blockchain or a pruned version; would it be viable to peer-to-peer ask 'what is this block' or 'what is this tx'?</p>

<p>We download the full blockchain from several peers so why not ask peers for just on piece of info?</p>

<p><strong>Is there a javascript/node.js library that does this?</strong></p>

CC BY-SA 3.0
2017-04-08T04:39:01.837Z
What kind of queries? Bitcoind needs to download all blocks in order to be able to validate them. If you want to ask certain queries and don't care whether you're being lied to, then sure, a lot of that work is not needed.
Pieter Wuille
<blockchain><peers>
Negate the need for blockchain explores and full blockchain syncing for simple queries
Ben Muircroft
# Negate the need for blockchain explores and full blockchain syncing for simple queries

(Asked by: username_0 on 2016-12-29)

Rather than download the full blockchain or a pruned version; would it be viable to peer-to-peer ask 'what is this block' or 'what is this tx'?

We download the full blockchain from several peers so why not ask peers for just on piece of info?

**Is there a javascript/node.js library that does this?**

**Tags:** blockchain, peers

> **Comments:**
> **username_1**: What kind of queries? Bitcoind needs to download all blocks in order to be able to validate them. If you want to ask certain queries and don't care whether you're being lied to, then sure, a lot of that work is not needed.  

---

## 1 answers

### Answer by username_2 on 2016-12-29. Score: 1 | Accepted answer

That's exactly what your bitcoind client does. It asks for specific blocks in network calls and if you wanted to, you can create a simple client that asks only for certain tx's and blocks like you said.

That is in fact what most SPV wallets (phone-based wallets and some others) are doing. They ask for block headers only and then ask for transactions related to those blocks to prove that certain transactions exist.

> **Comments:**
> **username_1**: This is not true for bitcoind (if you're referring to the Bitcoin Core rpc server binary), but it is true for some other clients. Bitcoin Core always downloads all blocks, because it cannot do full validation when gaps are missing.  
> **username_2**: I meant that bitcoind asks peers "what is thisk block" or "what is this tx"  

---

