<blockquote>
<p>How can I run a Bitcoin SPV node?</p>
</blockquote>
<p>You run Bitcoin SPV software. They're often called &quot;lightweight clients&quot; or &quot;lightweight wallets&quot;. Several mobile wallets implement SPV validation, as does Electrum (though note that Electrum is not technically a node; it connects to Electrum servers, not to P2P nodes).</p>
<blockquote>
<p>Am I able to run SPV nodes with Bitcoin core?</p>
</blockquote>
<p>No, Bitcoin Core only implements a fully-validation node.</p>
<blockquote>
<p>If so, can I use JSON-RPC by sending requests to full nodes?</p>
</blockquote>
<p>No, Bitcoin Core's JSON-RPC interface is designed for the owner/operator of the node to connect to their own trusted node. It's not designed to be exposed to third parties.</p>
<p>Furthermore, the JSON-RPC interface is specific to Bitcoin Core. Other software will have different ways of communicating or interacting with it.</p>
<blockquote>
<p>I couldn't find a good way to retrieve transaction data other than installing a full node.</p>
</blockquote>
<p>That's pretty much by design. Bitcoin is defined to minimize trust; if you want validated data there is really no way but validating it yourself using a full node.</p>
<p>The alternative is trusting other parties to do it for you. If that security model is acceptable to you, with the security and privacy risks that entails, you can e.g. use block explorer websites, or hosted wallets.</p>

CC BY-SA 4.0
2023-02-02T22:25:36.807Z
How can I retrieve transactions data I want with hosted wallets?
xor
CC BY-SA 4.0
2023-02-02T22:45:15.993Z
You don't. The wallet will tell you what your balance is.
Pieter Wuille
CC BY-SA 4.0
2023-02-02T23:21:48.550Z
So in order to retrieve transaction data, I have to either run full node or use block explorers.
xor
CC BY-SA 4.0
2023-02-03T01:43:07.173Z
Any node can request blocks from their peers; it's just that lightweight clients generally don't fetch (all) blocks, because they're specifically designed to be lightweight. So yes, I'd say the best way of getting transaction data, if you want *all* transactions, is to just run a node yourself.
Pieter Wuille
CC BY-SA 4.0
2023-02-05T13:57:01.737Z
To be more clear with my question, with the lightweight client, can I send a request to full node "I want all the transaction data of certain blocks"?
xor
CC BY-SA 4.0
2023-02-05T14:18:13.737Z
@xor My comment was abstract: any node software can indeed ask other nodes for whatever it wants. If you write a simple P2P node yourself, it can do that. But existing lightweight node software you find typically won't do that, as its purpose is exactly **not** needing to download everything, and just act as a wallet for the users, downloading only the relevant parts. If you want to just have all the block data, you're much better off running an existing full node.
Pieter Wuille
CC BY-SA 4.0
2023-02-05T15:09:31.403Z
I see thank you so much for the help. Last question, if I want to write a simple P2P node myself, what are some resources I can reference to? Do you have any recommended resources?
xor
CC BY-SA 4.0
2023-02-02T20:27:02.653Z
2023-02-02T20:27:02.653Z
Pieter Wuille
<p>How can I run a Bitcoin SPV node? Am I able to run SPV nodes with Bitcoin core? If so, can I use JSON-RPC by sending requests to full nodes? I couldn't find a good way to retrieve transaction data other than installing a full node.</p>

CC BY-SA 4.0
2023-02-02T09:41:43.760Z
Hi @xor, these are some good questions, but I'd suggest breaking these questions down into multiple posts. The more detailed and specific you can be in each question, the better
josie
CC BY-SA 4.0
2023-02-02T20:17:41.340Z
@josie Thanks for the tip! I will do definitely do that.
xor
<bitcoin-core><lightning-network><spv>
Running Bitcoin SPV Node
xor
# Running Bitcoin SPV Node

(Asked by: username_0 on 2023-02-02)

How can I run a Bitcoin SPV node? Am I able to run SPV nodes with Bitcoin core? If so, can I use JSON-RPC by sending requests to full nodes? I couldn't find a good way to retrieve transaction data other than installing a full node.

**Tags:** bitcoin-core, lightning-network, spv

> **Comments:**
> **username_1**: Hi @username_0, these are some good questions, but I'd suggest breaking these questions down into multiple posts. The more detailed and specific you can be in each question, the better  
> **username_0**: @username_1 Thanks for the tip! I will do definitely do that.  

---

## 1 answers

### Answer by username_2 on 2023-02-02. Score: 4 | Accepted answer

> How can I run a Bitcoin SPV node?

You run Bitcoin SPV software. They're often called "lightweight clients" or "lightweight wallets". Several mobile wallets implement SPV validation, as does Electrum (though note that Electrum is not technically a node; it connects to Electrum servers, not to P2P nodes).

> Am I able to run SPV nodes with Bitcoin core?

No, Bitcoin Core only implements a fully-validation node.

> If so, can I use JSON-RPC by sending requests to full nodes?

No, Bitcoin Core's JSON-RPC interface is designed for the owner/operator of the node to connect to their own trusted node. It's not designed to be exposed to third parties.

Furthermore, the JSON-RPC interface is specific to Bitcoin Core. Other software will have different ways of communicating or interacting with it.

> I couldn't find a good way to retrieve transaction data other than installing a full node.

That's pretty much by design. Bitcoin is defined to minimize trust; if you want validated data there is really no way but validating it yourself using a full node.

The alternative is trusting other parties to do it for you. If that security model is acceptable to you, with the security and privacy risks that entails, you can e.g. use block explorer websites, or hosted wallets.

> **Comments:**
> **username_0**: How can I retrieve transactions data I want with hosted wallets?  
> **username_2**: You don't. The wallet will tell you what your balance is.  
> **username_0**: So in order to retrieve transaction data, I have to either run full node or use block explorers.  
> **username_2**: Any node can request blocks from their peers; it's just that lightweight clients generally don't fetch (all) blocks, because they're specifically designed to be lightweight. So yes, I'd say the best way of getting transaction data, if you want *all* transactions, is to just run a node yourself.  
> **username_0**: To be more clear with my question, with the lightweight client, can I send a request to full node "I want all the transaction data of certain blocks"?  
> **username_2**: @username_0 My comment was abstract: any node software can indeed ask other nodes for whatever it wants. If you write a simple P2P node yourself, it can do that. But existing lightweight node software you find typically won't do that, as its purpose is exactly **not** needing to download everything, and just act as a wallet for the users, downloading only the relevant parts. If you want to just have all the block data, you're much better off running an existing full node.  
> **username_0**: I see thank you so much for the help. Last question, if I want to write a simple P2P node myself, what are some resources I can reference to? Do you have any recommended resources?  

---

