Pages:
Author

Topic: An efficient re-implementation of Electrum Server in Rust - page 2. (Read 627 times)

newbie
Activity: 8
Merit: 1
Thanks for the compliment Smiley

Quote
I will suggest though is that you list the limitations of your implementation so others, if not you, can improve on it as it grows.

Good point, will add a document for that!

N.B.
https://github.com/romanz/electrs/issues/8
sr. member
Activity: 1344
Merit: 307
Hello all,

I was working on this project for the last few months, so a user could run his own Electrum server, with required hardware resources not much beyond those of a full node (using ideas from ElectrumX [1], Electrum Personal Server [2] and bitcoincore-indexd [3]).

The code and usage instructions can be found here:
https://github.com/romanz/electrs

The server indexes the entire Bitcoin blockchain, and the resulting index [4] enables fast queries for any given user wallet, allowing the user to keep real-time track of his balances and his transaction history using the Electrum wallet [5].
Since it runs on the user's own machine, there is no need for the wallet to communicate with external Electrum servers, thus preserving the privacy of the user's addresses and balances.

Features:
 * Supports latest Electrum protocol [6].
 * Maintains an index of transaction inputs and outputs, allowing fast balance queries
 * Fast synchronization of the Bitcoin blockchain (~2.5 hours for ~185GB @ June 2018) on modest hardware [7]
 * Low CPU & memory usage (after initial indexing)
 * Low index storage overhead (~20%), relying on a local full node for transaction retrieval
 * Efficient mempool tracker allowing better fee estimation [8].
 * `-txindex` is not required for the Bitcoin node
 * Uses `rust-bitcoin` library [9] for efficient serialization/deserialization of Bitcoin transactions
 * Uses a single RocksDB [10] database, for better consistency and crash recovery

Hope you'll find it useful Smiley
Questions, suggestions and pull requests are welcome!

[1] https://github.com/kyuupichan/electrumx
[2] https://github.com/chris-belcher/electrum-personal-server
[3] https://github.com/jonasschnelli/bitcoincore-indexd
[4] https://github.com/romanz/electrs/blob/master/doc/schema.md
[5] https://electrum.org
[6] https://electrumx.readthedocs.io/en/latest/protocol.html
[7] https://gist.github.com/romanz/cd9324474de0c2f121198afe3d063548
[8] https://github.com/spesmilo/electrum/blob/59c1d03f018026ac301c4e74facfc64da8ae4708/RELEASE-NOTES#L34-L46)
[9] https://github.com/rust-bitcoin/rust-bitcoin
[10] https://github.com/spacejam/rust-rocksdb

About a year ago, I attempted to redo electrum in rust (mainly the server side of it) mainly to push away from using python on a server, and to create something that would have high performance while remaining scalable, secured and have a low footprint.  Decided to move to a different route than to re-implement it, but I will say you got WAY further than me. Even though you do have a TODO list, one thing I will suggest though is that you list the limitations of your implementation so others, if not you, can improve on it as it grows.
newbie
Activity: 8
Merit: 1
Hello all,

I was working on this project for the last few months, so a user could run his own Electrum server, with required hardware resources not much beyond those of a full node (using ideas from ElectrumX [1], Electrum Personal Server [2] and bitcoincore-indexd [3]).

The code and usage instructions can be found here:
https://github.com/romanz/electrs

The server indexes the entire Bitcoin blockchain, and the resulting index [4] enables fast queries for any given user wallet, allowing the user to keep real-time track of his balances and his transaction history using the Electrum wallet [5].
Since it runs on the user's own machine, there is no need for the wallet to communicate with external Electrum servers, thus preserving the privacy of the user's addresses and balances.

Features:
 * Supports latest Electrum protocol [6].
 * Maintains an index of transaction inputs and outputs, allowing fast balance queries
 * Fast synchronization of the Bitcoin blockchain (~2.5 hours for ~185GB @ June 2018) on modest hardware [7]
 * Low CPU & memory usage (after initial indexing)
 * Low index storage overhead (~20%), relying on a local full node for transaction retrieval
 * Efficient mempool tracker allowing better fee estimation [8].
 * `-txindex` is not required for the Bitcoin node
 * Uses `rust-bitcoin` library [9] for efficient serialization/deserialization of Bitcoin transactions
 * Uses a single RocksDB [10] database, for better consistency and crash recovery

Hope you'll find it useful Smiley
Questions, suggestions and pull requests are welcome!

[1] https://github.com/kyuupichan/electrumx
[2] https://github.com/chris-belcher/electrum-personal-server
[3] https://github.com/jonasschnelli/bitcoincore-indexd
[4] https://github.com/romanz/electrs/blob/master/doc/schema.md
[5] https://electrum.org
[6] https://electrumx.readthedocs.io/en/latest/protocol.html
[7] https://gist.github.com/romanz/cd9324474de0c2f121198afe3d063548
[8] https://github.com/spesmilo/electrum/blob/59c1d03f018026ac301c4e74facfc64da8ae4708/RELEASE-NOTES#L34-L46)
[9] https://github.com/rust-bitcoin/rust-bitcoin
[10] https://github.com/spacejam/rust-rocksdb
Pages:
Jump to: