The Electrum Personal Server promises a resource-efficient, secure and private way to use bitcoin with hardware and software wallets, connected to full nodes. Developed by open-source programmer Christian Belcher, best known for his contributions to JoinMarket, the Electrum Personal Server directly addresses vulnerabilities with the popular Electrum Bitcoin wallet, while sparing users the significant resource usage of an Electrum server.
According to Belcher, connecting Electrum with the Electrum Personal Server is the most resource-efficient, secure and private way to use a hardware or software wallet connected to a full node. It is important for all users to connect their wallets to full nodes for the Bitcoin network to maintain long-term security, he maintains.
“If bitcoin is digital gold, then a full node wallet is your own personal goldsmith who checks for you that received payments are genuine,” explained Belcher in correspondence with Bitcoin Magazine.
Full Nodes vs. Thin Clients Refresher
In the Bitcoin blockchain, full nodes are programs that validate transactions and blocks on the network. Full nodes assist the network by accepting transactions and blocks from other full nodes, validating them and sharing them with other full nodes. Essentially, full nodes are the referees of the Bitcoin blockchain –– they check to see that chains are following the rules of the network and ignore chains who break them. As an example, Belcher noted that “[transactions] printing infinite money would be rejected by [full nodes] as if they never existed.” In this way, Bitcoin can ensure that no more than 21 million coins are ever minted.
While full nodes are the most secure, they are are also more resource-intensive. A full node takes up around 156 GB of disk space (a number which is growing by more than 50 GB per year), can take days to sync when used for the first time, requires significant amount of bandwidth each month, and takes up CPU power validating all transactions and blocks on the network.
Thin clients (also known as lightweight clients), however, do not download the entire Bitcoin blockchain. Instead, they only download a copy of all the headers for the blocks in the blockchain. Thin clients are able to achieve increased efficiency and speed by receiving notifications when a transaction affects their wallet specifically. But this does mean that thin clients must tell a third party which addresses belong to them, which is bad for privacy. Additionally, thin clients trade full validation and security for efficiency, placing their trust in full nodes to verify that rules are being followed on the Bitcoin blockchain.
Since 2011, the Electrum wallet –– a light client –– has been among the community favorites. It features a pleasant user interface, hardware wallet connectivity, “forgiving” seed recovery phrases, cold storage solutions, decentralized servers to prevent downtimes, and multi-sig permissions. However, similar to other thin clients, the Electrum wallet’s lightweight connection with the Bitcoin blockchain comes at the cost of privacy, validity and scalability.
By default, the Electrum wallet sends all its bitcoin addresses to an Electrum server, which sends back a user’s history and balance. According to Belcher, “This means that the Electrum server knows all the user’s bitcoin addresses and could spy on them, essentially seeing everything a user does.” Users should note that anytime their bitcoin addresses are stored on a thin-client server, their transactions can be monitored.
Like other thin clients, if Electrum servers do not properly verify the rules of the Bitcoin blockchain, wallets can be deceived. For example, a compromised Electrum server could lead the Electrum wallet to accept a fake transaction for USD $1000 worth of bitcoin that would not have been validated by a full node.
Electrum servers also store records of every address ever used on the Bitcoin network, which, as user-base increases, poses a hindrance to scalability.
In the Electrum ecosystem, the only way for a user to avoid these vulnerabilities inherent to the Electrum thin client is to run their own Electrum server and connect it to their wallet. This fix is more resource-intensive than running a Bitcoin full node; it requires the unpruned Bitcoin blockchain, the full transaction index and extra address index. Electrum Servers are also more RAM and CPU intensive than full nodes, and are not made to be turned on and off efficiently.
Electrum Personal Server Solution
The Electrum Personal Server provides bitcoin users with increased efficiency, security and privacy. In this implementation of the Electrum server protocol, users seeking a full node connection can interact with all traditional Electrum wallet features while running a Bitcoin full node, instead of downloading an Electrum server.
From an efficiency perspective, connecting an Electrum wallet to a full node allows users to take advantage of resource-saving Bitcoin Core features such as pruning, disabled txindex and blocksonly. These features are not available to an Electrum server.
Users also benefit from the traditional Electrum wallet user experience/user interface and functionality such as hardware wallet integration, offline signing, recovery phrases and multi-signature wallets.
Security and Privacy
Because users are connected to a full node, they aren’t prone to any of the aforementioned privacy and security threats posed to thin clients.
There is a caveat –– users lose the popular “instant-on” feature of the Electrum wallet when using a full node such as the Electrum Personal Server. The full node must synchronize first, before displaying a wallet’s bitcoin balance. Depending on connection speeds and time since last connectivity, this process could take a few minutes or hours.
For users seeking to connect their wallet to an Electrum Personal Server, the process is fairly straightforward. According to Belcher’s blog post, users must:
- Download the alpha version;
- Configure the Electrum Personal server with their master public key. Those addresses are then imported into Bitcoin Core as watch-only;
- Rescan the wallet if it contains historical transactions. There is no need to rescan, however, if a new, empty wallet is created.
Why Should the Average Bitcoin User Care?
Belcher outlined that since the inception of the Bitcoin network, the basic security model has relied on most of the economy using full node wallets, not thin clients that are vulnerable to manipulation. This way, legitimate Bitcoin transactions are always accurately verified, nefarious transactions are always rejected, and the hard limit of 21 million bitcoins (which are really just bits and bytes) is enforced.
Belcher believes that “bitcoin is dead in the long term” if most of the Bitcoin economy does not use full node wallets.
He hopes that the Electrum Personal Server can serve as a framework for other lightweight Bitcoin wallets to connect to full nodes run by users, rather than (centralized) servers. For instance, a Samourai Wallet or Breadwallet can utilize a script similar to the Electrum Personal Server to connect to a full node.
This article originally appeared on Bitcoin Magazine.
Powered by WPeMatico