summaryrefslogtreecommitdiff
path: root/5e/263d5d66f3303f2d1f12a63287e37f63ca31b0
blob: c1008db42bea080a7a4c738246dcba2ab9095e3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Return-Path: <me@romanzey.de>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 70FD8D82
	for <bitcoin-dev@lists.linuxfoundation.org>;
	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 <bitcoin-dev@lists.linuxfoundation.org>;
	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 <bitcoin-dev@lists.linuxfoundation.org>;
	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: <xmx:9YQ6W45qrg3jVCdkswAqHKZzQ7eGSHHR6hyXqLlg2kOk2fTfh0yr7A>
	<xmx:9YQ6W4TcWTmNVzdg3qCyW08ysrvDjyyjL6iUDemwk3vg6EmqAh2I1w>
	<xmx:9YQ6Wzc1fWTJvG3Eu6haNrKR098pEEDGg9w4mDAZSYiJz-l5NyuBow>
	<xmx:9YQ6WwSpLsjxvAzk_xw0UvOXBwg85vkXQjyUmC2gsYevWB_FLgFIFA>
	<xmx:9YQ6W0OwMXnt_Nt9s838iWTppTLmulGrLX-5q9VguGzSlRni8EsVlQ>
	<xmx:9oQ6W5U06hcYut_rgWfoIIivyXaqkW7f05s2OWeYhLcaE7iJKCww_A>
X-ME-Sender: <xms:9YQ6W1toFJUBwgZCnFEuWzjD3nGC8yesXgL7Py6Da9rVVR925J2nZg>
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 <me@romanzey.de>
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 <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=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