1

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.

2
  • 3
    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
    Feb 2, 2023 at 9:41
  • @josie Thanks for the tip! I will do definitely do that.
    – xor
    Feb 2, 2023 at 20:17

1 Answer 1

4

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.

7
  • How can I retrieve transactions data I want with hosted wallets?
    – xor
    Feb 2, 2023 at 22:25
  • You don't. The wallet will tell you what your balance is. Feb 2, 2023 at 22:45
  • So in order to retrieve transaction data, I have to either run full node or use block explorers.
    – xor
    Feb 2, 2023 at 23:21
  • 1
    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. Feb 3, 2023 at 1:43
  • 1
    @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. Feb 5, 2023 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.