<blockquote>
<p>The question is, is it necessary to store the full blockchain on disk?</p>
</blockquote>
<p>No, it is not required.</p>
<blockquote>
<p>Could I just query other nodes for newly generated blocks after the specific hash and check transactions in these blocks?</p>
</blockquote>
<p>No you can't arbitrarily query nodes like a database -- unless you are referring to a block explorer API.</p>
<p>For reference purposes you can look at a project I did called <a href="https://github.com/coinables/NoNodePay" rel="nofollow noreferrer">NoNodePay</a> with the purpose to allow someone to accept bitcoin payments on shared hosting without a node or having to sign up with an API service. Again just a reference point, it has bugs.</p>

CC BY-SA 4.0
2022-03-20T02:04:06.210Z
By "query other nodes" I mean using `getheaders` or `getblocks` RPC call with a known hash of the last block. That hash could be fetched from the block explorer only once. Then use `getdata` to get transactions. Isn't it possible? I think that's how the blockchain is normally downloaded
AlexGlass
CC BY-SA 4.0
2022-03-19T17:02:31.083Z
2022-03-19T17:02:31.083Z
m1xolyd1an
<p>I want create a program that receives payments via bitcoin and sends them to other addresses. I'm going to generate unique address for each payment, then check if there are transactions with outputs for that address. When the required amount of bitcoins is received, I'm going to make a new  transaction for the receiver addresses.</p>
<p>The question is, is it necessary to store the full blockchain on disk? Could I just query other nodes for newly generated blocks after the specific hash and check transactions in these blocks? That specific hash could be fetched from the blockchain explorer. Moreover, if the new block is generated every 10 minutes, is it enough to check new blocks every 10 minutes? Should I also check different nodes to ensure that the blocks are the same?</p>

<client><payment><validation>
Bitcoin payments without storing blockchain
AlexGlass
# Bitcoin payments without storing blockchain

(Asked by: username_0 on 2022-03-19)

I want create a program that receives payments via bitcoin and sends them to other addresses. I'm going to generate unique address for each payment, then check if there are transactions with outputs for that address. When the required amount of bitcoins is received, I'm going to make a new transaction for the receiver addresses.

The question is, is it necessary to store the full blockchain on disk? Could I just query other nodes for newly generated blocks after the specific hash and check transactions in these blocks? That specific hash could be fetched from the blockchain explorer. Moreover, if the new block is generated every 10 minutes, is it enough to check new blocks every 10 minutes? Should I also check different nodes to ensure that the blocks are the same?

**Tags:** client, payment, validation


---

## 1 answers

### Answer by username_1 on 2022-03-19. Score: 0

> The question is, is it necessary to store the full blockchain on disk?

No, it is not required.

> Could I just query other nodes for newly generated blocks after the specific hash and check transactions in these blocks?

No you can't arbitrarily query nodes like a database -- unless you are referring to a block explorer API.

For reference purposes you can look at a project I did called [NoNodePay](https://github.com/coinables/NoNodePay) with the purpose to allow someone to accept bitcoin payments on shared hosting without a node or having to sign up with an API service. Again just a reference point, it has bugs.

> **Comments:**
> **username_0**: By "query other nodes" I mean using `getheaders` or `getblocks` RPC call with a known hash of the last block. That hash could be fetched from the block explorer only once. Then use `getdata` to get transactions. Isn't it possible? I think that's how the blockchain is normally downloaded  

---

