From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WGjwY-0002FB-P2 for bitcoin-development@lists.sourceforge.net; Fri, 21 Feb 2014 06:50:42 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of bitpay.com designates 74.125.82.173 as permitted sender) client-ip=74.125.82.173; envelope-from=jgarzik@bitpay.com; helo=mail-we0-f173.google.com; Received: from mail-we0-f173.google.com ([74.125.82.173]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WGjwX-0000iq-Jl for bitcoin-development@lists.sourceforge.net; Fri, 21 Feb 2014 06:50:42 +0000 Received: by mail-we0-f173.google.com with SMTP id x48so2218090wes.18 for ; Thu, 20 Feb 2014 22:50:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=zCNSdUWxip2Gdp6qmh9VAheySJQcDe9bVCzIWHeUadM=; b=ivWXKCWCkE+6oB5Fa2uH7U6K3uKOCh9Am//Qi2bdHCkB69Vswi861BRNiXPHXV6ZTN XFk0ymCvo/4gwmzTlQqA2Bpa/oL00E+eIu7of9PnvvmU/84mwoLjUwULPCaHLKM8VBuC QHteC3Q0j6JCCNj7kScykHs4vked6a3y33V2MV8GasFhvByRGoKe6jYAYp7k27RcOF/f r3UrfSQPwFQ4ILmSBvUJ/A5G7KuRn3pBFL5ZFvd5vJy7OMgmoTmGXoMXDuOfLlAhd7RK 28YH237tmcymamW+zWbVtQwgNybDkrhWNbqsWQzy9vjeG06WEhY/E7Ea2RljffYv8YDD NfgA== X-Gm-Message-State: ALoCoQlOl83oLCB2G/i8j2zziZ1EyBEmRRcWqJT9iixuCppPJVNwt9k46moiBI8DPRVaYN8qPyxY MIME-Version: 1.0 X-Received: by 10.194.110.41 with SMTP id hx9mr5720839wjb.28.1392965435286; Thu, 20 Feb 2014 22:50:35 -0800 (PST) Received: by 10.194.82.197 with HTTP; Thu, 20 Feb 2014 22:50:35 -0800 (PST) In-Reply-To: References: Date: Fri, 21 Feb 2014 01:50:35 -0500 Message-ID: From: Jeff Garzik To: Mike Hearn Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -1.6 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1WGjwX-0000iq-Jl Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] Bitcoin Core trial balloon: splitting blockchain engine and wallet X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2014 06:50:42 -0000 RE "doesn't buy you anything" Today, when unlocked, plaintext private keys reside in the same address space as the blockchain engine (BCE). Process separation increases the difficulty of accessing key data from the BCE, even presuming a normal, no-chroot, same-uid, parent-child process relationship. The attack surface is clearly changed from "one buffer overflow can touch this data." Regardless, the split makes sense given existing modularity and coding directions. I wouldn't micro-focus on the "sandbox" word. On Fri, Feb 21, 2014 at 1:27 AM, Mike Hearn wrote: > Bear in mind a separate process doesn't buy you anything without a sandbox, > and those are expensive (in terms of complexity). > > On 21 Feb 2014 11:40, "Jeff Garzik" wrote: >> >> [Meta: "Bitcoin Core" is the newfangled branding of bitcoind / >> Bitcoin-Qt reference implementation, in case you wondering.] >> >> Several sites, including BitPay, use bitcoind outside the standard >> role of wallet software. bitcoind can be used purely for payment >> network access and management. I call this the "border router" role. >> Upcoming version 0.9 will feature the ability to disable the bitcoind >> wallet at compile time or runtime. This permits a more optimized >> border router profile, reducing process size by 40-200MB according to >> some reports. >> >> Recent IRC discussion have floated a rough proposal for a wallet >> next-step: Running the Bitcoin Core wallet as a separate process, a >> separate binary, from the blockchain engine. The wallet process would >> communicate with the blockchain engine using existing RPC and P2P >> channels, becoming a real SPV client. This accomplishes a >> longstanding security goal of sandboxing away wallet keys and >> sensitive data from the network-exposed P2P engine, in a separate >> process, among other benefits. >> >> Simple forking was explored a bit. I did some hacking in that >> direction, as it seemed potentially lightweight and somewhat easy to >> me: https://github.com/jgarzik/bitcoin/tree/fork fork+pipe is fine >> for Linux and OSX/BSD. However, Windows requires an exec-like >> solution to create a new process. MSDN does give us a Unix-pipe-like >> solution: >> http://msdn.microsoft.com/en-us/library/edze9h7e%28v=vs.80%29.aspx >> Others pointed to boost interprocess communication APIs, which come >> with their own set of caveats. Such a solution would involve a brand >> new IPC protocol, and lots of brand new glue code. >> >> Separate programs seems better. Windows forces us to achieve process >> separation via exec-like method. We already have IPC: RPC + P2P. >> Modern OS's make localhost sockets just about as fast as other IPCs >> methods. Linux, at least, employs zero-copy for localhost sockets in >> many situations, similar to the kernel's pipe tricks. >> >> Pieter has been working on headers-first sync: >> https://github.com/bitcoin/bitcoin/pull/2964 Moving along this >> wallet/blockchain engine split requires upping the review&test >> bandwidth on Pieter's PRs, such as >> https://github.com/bitcoin/bitcoin/pull/3514 >> >> Unsure how much of the separate-binary discussion Gavin saw, so cc'd >> for emphasis. >> >> -- >> Jeff Garzik >> Bitcoin core developer and open source evangelist >> BitPay, Inc. https://bitpay.com/ >> >> >> ------------------------------------------------------------------------------ >> Managing the Performance of Cloud-Based Applications >> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. >> Read the Whitepaper. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk >> _______________________________________________ >> Bitcoin-development mailing list >> Bitcoin-development@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bitcoin-development -- Jeff Garzik Bitcoin core developer and open source evangelist BitPay, Inc. https://bitpay.com/