2

Is there a technical reason for which there isn't an option in Bitcoin Core that would deploy an internal Electrum Server, or something similar so that a software wallet can fetch addresses and balances?

2 Answers 2

2

Electrum servers are simply not compatible with Bitcoin Core on a development or operational level. They require a vast amount of indexes created which the node does not have, and must be created by an external tool. With the state of the art electrs Electrum server, it needs upwards of a day of time to create these indexes, and more than 50GB of additional data stored on disk. For the server to be performant, forks of the software use over 1TB of additional storage for these indexes.

4
  • 1TB or about 50GB? that's a big difference, can you elaborate? electrs or which fork? I run an electrumx server and was thinking about changing to electrs but last time I checked electrs was not indexing mempool transactions.
    – Pedro
    Jul 1, 2020 at 18:41
  • 1
    50GB or so for the main electrs that is fairly slow due to passing requests back to Bitcoin Core for data consistently. 500GB-1TB for the esplorer fork which doesn't need to do RPC requests for Bitcoin Core.
    – Claris
    Jul 1, 2020 at 20:16
  • 1
    wow, that's why blockstream.info is so fast! mystery solved.
    – Pedro
    Jul 1, 2020 at 20:28
  • Yep. Typical time memory trade off.
    – Claris
    Jul 2, 2020 at 0:35
1

I think the preferred technique to use 'bitcoin core as a wallet backend' is through block filters, like the new compact block filters (an improvement over bloom filters). The protocol is known as Neutrino and lowers the CPU and storage requirements for your bitcoin core node (an electrumx database takes around 50 GB right now). To create these filters in bitcoin core, you need to launch add the bitcoind option blockfilterindex=1 or blockfilterindex=basic. With these filters, you can filter for blocks that affect the addresses (scriptPubKeys) that belong to your wallet. Several lightning wallets use this technique

This block filtering technique produces some false-positives, so you will fetch blocks that end up not affecting your addresses. Because you are requesting more than just the relevant transactions to your wallet, you end up consuming much more bandwidth than using an electrum server but it has the advantage of being more private.

Neutrino is used by several lightning network wallets:

Your Answer

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

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