Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192]
	helo=mx.sourceforge.net)
	by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <mh.in.england@gmail.com>) id 1WGjZl-00035E-JI
	for bitcoin-development@lists.sourceforge.net;
	Fri, 21 Feb 2014 06:27:09 +0000
Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com
	designates 209.85.219.54 as permitted sender)
	client-ip=209.85.219.54; envelope-from=mh.in.england@gmail.com;
	helo=mail-oa0-f54.google.com; 
Received: from mail-oa0-f54.google.com ([209.85.219.54])
	by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1WGjZk-0008UF-CR
	for bitcoin-development@lists.sourceforge.net;
	Fri, 21 Feb 2014 06:27:09 +0000
Received: by mail-oa0-f54.google.com with SMTP id g12so3212126oah.27
	for <bitcoin-development@lists.sourceforge.net>;
	Thu, 20 Feb 2014 22:27:03 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.60.84.199 with SMTP id b7mr6587478oez.55.1392964022904; Thu,
	20 Feb 2014 22:27:02 -0800 (PST)
Sender: mh.in.england@gmail.com
Received: by 10.76.71.231 with HTTP; Thu, 20 Feb 2014 22:27:02 -0800 (PST)
Received: by 10.76.71.231 with HTTP; Thu, 20 Feb 2014 22:27:02 -0800 (PST)
In-Reply-To: <CAJHLa0OD7w0Rs5ygAE4C14EWm1=x57YHG2kOee1pzxvj3FQ38g@mail.gmail.com>
References: <CAJHLa0OD7w0Rs5ygAE4C14EWm1=x57YHG2kOee1pzxvj3FQ38g@mail.gmail.com>
Date: Fri, 21 Feb 2014 06:27:02 +0000
X-Google-Sender-Auth: 2ho_jMVZIGnojH8sTS3lQMplO3Q
Message-ID: <CANEZrP2siw9hGPVsPjQ6WyohacOrs8rqs5p9ZsFY5kF0URnPWg@mail.gmail.com>
From: Mike Hearn <mike@plan99.net>
To: Jeff Garzik <jgarzik@bitpay.com>
Content-Type: multipart/alternative; boundary=089e0102dc82c52d1604f2e4b536
X-Spam-Score: -0.5 (/)
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 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
	(mh.in.england[at]gmail.com)
	-0.0 SPF_PASS               SPF: sender matches SPF record
	1.0 HTML_MESSAGE           BODY: HTML included in message
	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: 1WGjZk-0008UF-CR
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
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: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Fri, 21 Feb 2014 06:27:09 -0000

--089e0102dc82c52d1604f2e4b536
Content-Type: text/plain; charset=UTF-8

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" <jgarzik@bitpay.com> 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
>

--089e0102dc82c52d1604f2e4b536
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr">Bear in mind a separate process doesn&#39;t buy you anything=
 without a sandbox, and those are expensive (in terms of complexity).</p>
<div class=3D"gmail_quote">On 21 Feb 2014 11:40, &quot;Jeff Garzik&quot; &l=
t;<a href=3D"mailto:jgarzik@bitpay.com">jgarzik@bitpay.com</a>&gt; wrote:<b=
r type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[Meta: &quot;Bitcoin Core&quot; is the newfangled branding of bitcoind /<br=
>
Bitcoin-Qt reference implementation, in case you wondering.]<br>
<br>
Several sites, including BitPay, use bitcoind outside the standard<br>
role of wallet software. =C2=A0bitcoind can be used purely for payment<br>
network access and management. =C2=A0I call this the &quot;border router&qu=
ot; role.<br>
Upcoming version 0.9 will feature the ability to disable the bitcoind<br>
wallet at compile time or runtime. This permits a more optimized<br>
border router profile, reducing process size by 40-200MB according to<br>
some reports.<br>
<br>
Recent IRC discussion have floated a rough proposal for a wallet<br>
next-step: =C2=A0Running the Bitcoin Core wallet as a separate process, a<b=
r>
separate binary, from the blockchain engine. =C2=A0The wallet process would=
<br>
communicate with the blockchain engine using existing RPC and P2P<br>
channels, becoming a real SPV client. =C2=A0This accomplishes a<br>
longstanding security goal of sandboxing away wallet keys and<br>
sensitive data from the network-exposed P2P engine, in a separate<br>
process, among other benefits.<br>
<br>
Simple forking was explored a bit. =C2=A0I did some hacking in that<br>
direction, as it seemed potentially lightweight and somewhat easy to<br>
me: <a href=3D"https://github.com/jgarzik/bitcoin/tree/fork" target=3D"_bla=
nk">https://github.com/jgarzik/bitcoin/tree/fork</a> =C2=A0fork+pipe is fin=
e<br>
for Linux and OSX/BSD. =C2=A0However, Windows requires an exec-like<br>
solution to create a new process. =C2=A0MSDN does give us a Unix-pipe-like<=
br>
solution: <a href=3D"http://msdn.microsoft.com/en-us/library/edze9h7e%28v=
=3Dvs.80%29.aspx" target=3D"_blank">http://msdn.microsoft.com/en-us/library=
/edze9h7e%28v=3Dvs.80%29.aspx</a><br>
=C2=A0Others pointed to boost interprocess communication APIs, which come<b=
r>
with their own set of caveats. =C2=A0Such a solution would involve a brand<=
br>
new IPC protocol, and lots of brand new glue code.<br>
<br>
Separate programs seems better. =C2=A0Windows forces us to achieve process<=
br>
separation via exec-like method. =C2=A0We already have IPC: RPC + P2P.<br>
Modern OS&#39;s make localhost sockets just about as fast as other IPCs<br>
methods. =C2=A0Linux, at least, employs zero-copy for localhost sockets in<=
br>
many situations, similar to the kernel&#39;s pipe tricks.<br>
<br>
Pieter has been working on headers-first sync:<br>
<a href=3D"https://github.com/bitcoin/bitcoin/pull/2964" target=3D"_blank">=
https://github.com/bitcoin/bitcoin/pull/2964</a> =C2=A0Moving along this<br=
>
wallet/blockchain engine split requires upping the review&amp;test<br>
bandwidth on Pieter&#39;s PRs, such as<br>
<a href=3D"https://github.com/bitcoin/bitcoin/pull/3514" target=3D"_blank">=
https://github.com/bitcoin/bitcoin/pull/3514</a><br>
<br>
Unsure how much of the separate-binary discussion Gavin saw, so cc&#39;d<br=
>
for emphasis.<br>
<br>
--<br>
Jeff Garzik<br>
Bitcoin core developer and open source evangelist<br>
BitPay, Inc. =C2=A0 =C2=A0 =C2=A0<a href=3D"https://bitpay.com/" target=3D"=
_blank">https://bitpay.com/</a><br>
<br>
---------------------------------------------------------------------------=
---<br>
Managing the Performance of Cloud-Based Applications<br>
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.<br>
Read the Whitepaper.<br>
<a href=3D"http://pubads.g.doubleclick.net/gampad/clk?id=3D121054471&amp;iu=
=3D/4140/ostg.clktrk" target=3D"_blank">http://pubads.g.doubleclick.net/gam=
pad/clk?id=3D121054471&amp;iu=3D/4140/ostg.clktrk</a><br>
_______________________________________________<br>
Bitcoin-development mailing list<br>
<a href=3D"mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-develo=
pment@lists.sourceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-development=
" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-de=
velopment</a><br>
</blockquote></div>

--089e0102dc82c52d1604f2e4b536--