Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id F16FFFF0 for ; Thu, 8 Feb 2018 16:52:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 62E2A60A for ; Thu, 8 Feb 2018 16:52:05 +0000 (UTC) Received: from piha.riseup.net (piha-pn.riseup.net [10.0.1.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id 12A1B1A05C4 for ; Thu, 8 Feb 2018 08:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1518108725; bh=8VIaHXML1MM9SJYqB1ZF12C6Yf4uYvtAJrPkHw3OwVA=; h=To:From:Subject:Date:From; b=NNA7up5ZtLjkBH28jw4AnE/MZNbPGGNCm4/F011+7xS6LRoFieqKi3tUDajeq3pce bM1IvEFhvsQyzqTHsRdBE/SujgENPqvnliBAiDG8rZ9oUqOk4dSskTqa6gyaZKHkvz UpGi2IpvNsvqovi81Ajw1ndYbmbmCIwZ7Nsm9n+w= X-Riseup-User-ID: 4A163C87609DBF14D6289276E3AE2C36DFC8AF3EDCAC23B4F70F87CE0EB2E684 Received: from [127.0.0.1] (localhost [127.0.0.1]) by piha.riseup.net with ESMTPSA id 9386556FE for ; Thu, 8 Feb 2018 08:52:04 -0800 (PST) To: bitcoin-dev@lists.linuxfoundation.org From: Chris Belcher Message-ID: <8b7bd786-9bc3-efb2-a8ed-0b703e246728@riseup.net> Date: Thu, 8 Feb 2018 16:51:59 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [bitcoin-dev] Electrum Personal Server alpha release 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: Thu, 08 Feb 2018 16:52:06 -0000 Electrum is a popular bitcoin wallet, but it is not a full node wallet as it synchronizes itself using third-party Electrum servers. The servers must be trusted to verify the rules of bitcoin, they can trick Electrum wallets into accepting fake bitcoin transactions which, for example, print infinite money. Bitcoin's security model requires that most economic activity is backed by full nodes. The Electrum servers must also be trusted with the user's privacy, as wallets send all their bitcoin addresses to the server. Spying on wallets is not much more complicated than simply grepping the server logs. Electrum wallets by default also connect to servers using their own IP address, linking it further to their revealed bitcoin addresses. A way to avoid these problems is for users to run their own Electrum server and connect their wallets only to it. But this requires significant resource usage: the full unpruned blockchain, transaction index and an extra address index, as well as more RAM and CPU usage compared to just a full node. Servers are not well suited to being shut down and started up again, they are typically always online. Electrum servers store a database of every bitcoin address ever used, which is inherently not scalable. This is resource-intensive and therefore pushes users towards centralized solutions. An alternative way would be to store only your own addresses and transactions. Introducing Electrum Personal Server; an implementation of the Electrum server protocol which fulfills the specific need of using the Electrum UI with full node verification and privacy, but without the heavyweight server backend, for a single user. It allows the user to benefit from all of Bitcoin Core's resource-saving features like pruning, blocksonly and disabled txindex. All of Electrum's feature-richness like hardware wallet integration, multisignature wallets, offline signing, mnemonic recovery phrases and so on can still be used, but backed by the user's own full node. An alpha version of Electrum Personal Server can be found on the repository: https://github.com/chris-belcher/electrum-personal-server Before using, the wallet user must configure Electrum Personal Server with their master public key and those addresses are imported into Bitcoin Core as watch-only. If the wallet contains historical transactions then it must be rescanned. One of Electrum's motivating features is "instant on", which is therefore traded away when using Electrum Personal Server in return for full node verification and privacy. Although if a brand new empty wallet is created there is no need to rescan. A script like Electrum Personal Server is also well suited to use private transaction broadcasting tech like dandelion or broadcasting through tor. Using Electrum with Electrum Personal Server is probably the most resource-efficient way right now to use a hardware wallet connected to your own full node. People who make use of Blockstream Satellite could use it to have an off-the-grid node connected to Electrum if that is their preferred wallet. In the situation of a traveller staying a cheap hostels, they could sync their node every couple of days to download recent blocks and use Electrum. Hopefully this software can be part of the plan to get full node wallets into the hands of as many people as possible. The same kind of ideas could be applied to other lightweight wallets. For example a full nodes can run on smartphones with pruning and blocksonly, then a similar script would allow the user to connect their Samourai Wallet, Breadwallet or GreenAddress app to their own full node. Further Reading: * https://bitcointalk.org/index.php?topic=2664747.msg27179198 * https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-September/015030.html * https://bitcointalk.org/index.php?topic=1634967.0;all