Electrs

Electrum Server in Rust is an efficient re-implementation of the Electrum Server, inspired by projects such as ElectrumX, Electrum Personal Server, and bitcoincore-indexd.

The motivation behind this project is to enable users to self-host an Electrum server with hardware resources similar to those of a full node. The server indexes the entire Bitcoin blockchain, allowing fast queries for user wallets and enabling real-time tracking of balances and transaction history using the Electrum wallet. Running on the user's own machine preserves the privacy of addresses and balances.

Usage

Please prefer to use OUR usage guide!

External guides can be outdated and may have various problems. Always double-check that the guide you're using is actively maintained. If you cannot use our guide, please ask about any uncertainties or consider using automated deployments.

This implementation of the Electrum server is optimized for personal/small-scale (family/friends) usage. Running it publicly is not recommended due to potential exposure to DoS and other attacks. For public server use, consider the Blockstream fork of electrs, which is better optimized for public usage but consumes significantly more resources.

Features

  • Supports Electrum protocol v1.4
  • Maintains an index over transaction inputs and outputs, allowing fast balance queries
  • Fast synchronization of the Bitcoin blockchain (~6.5 hours for ~504GB @ August 2023) using HDD storage
  • Low index storage overhead (~10%), relying on a local full node for transaction retrieval
  • Efficient mempool tracker (allowing better fee estimation)
  • Low CPU & memory usage (after initial indexing)
  • Uses a single RocksDB database for better consistency and crash recovery

Altcoins

Altcoins are not supported! Forks of Bitcoin codebase that relax the consensus rules (hard forks) are also not supported. You may find a fork of electrs that supports altcoins, but please do not file issues/PRs here.

Index Database

The database schema is described here.

Similar Projects