Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 70FD8D82 for ; Mon, 2 Jul 2018 20:03:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E8F73734 for ; Mon, 2 Jul 2018 20:03:02 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 1C6B521AED for ; Mon, 2 Jul 2018 16:03:02 -0400 (EDT) Received: from web3 ([10.202.2.213]) by compute3.internal (MEProxy); Mon, 02 Jul 2018 16:03:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=romanzey.de; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=Udq9EzZnttwlNt4+y4dzCToLclLUqQ6ZgTqDUGDbojA=; b=dpJterzM XwgznbCWJVrngmL6Igptk6nEDJyz4AbRj+t8FuWdoS5BkHWOqdLJKpU0zLdZHLSt ugQBmMPtchFV0ynJU7qj4XnINb5FGB7JvCq4uh30bMWU5OPqCkhiP4IdVht5o5CG lxyLPJnw74jpLZza1I4QyRhkY44V3qA85gHznrlZljsnDj661790MXWz79vjZnKG GV2P03MXmc0Zvkzy6HCJ/LFHuUz0CtpIGIzpXiYdh/Ul6vdpB2kYynyb9d3U6tur oESQd8jgy6ROGhkFe/tvzvpILj+LV0RSEqQeazeUOiyTP/mW77CSfRicEiwXs1Bm J+yb85y52mj0bA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=Udq9EzZnttwlNt4+y4dzCToLclLUq Q6ZgTqDUGDbojA=; b=Svqm5ksoqn0eXTFPUi9LqLjjPDdfUExA1ccMJFNmhwkL0 VfPMUokG3iUUsc3LFWvnBHDPK14q4F60luSBEn/sCh7XKWuo0zJA7eRZg2x2QJMG uKxwxv1+woi4ncjKe1MabDylqiA81GlBR1ppE3SGyZY1T6HsVzCAof0FaTPOBuIj otfrjvrD97NERE1nGfF0yg5RLDmYOv0EDXWxNkeZ+r5TBEg6iBkzTLpQtDMOUeOi 1O2uDyQVjz5V846kzNLuMnZ1puNOPfCw87u8qtyXTOIVnu8gGfkehSN76oGwA0+N 5zFJRMBuxaPVrhBaaDAUz8z5iSA43YaTiqC8LZKeg== X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id BA4AC9E3AE; Mon, 2 Jul 2018 16:03:01 -0400 (EDT) Message-Id: <1530561781.1478095.1427741280.5FDF82CB@webmail.messagingengine.com> From: Roman Zeyde To: bitcoin-dev@lists.linuxfoundation.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0d8ea36c Date: Mon, 02 Jul 2018 23:03:01 +0300 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Mon, 02 Jul 2018 23:16:18 +0000 Subject: [bitcoin-dev] An efficient re-implementation of Electrum Server in Rust X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2018 20:03:03 -0000 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 :) 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