<p dir="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="gmail_quote">On 21 Feb 2014 11:40, &quot;Jeff Garzik&quot; &lt;<a href="mailto:jgarzik@bitpay.com">jgarzik@bitpay.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="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.  bitcoind can be used purely for payment<br>
network access and management.  I call this the &quot;border router&quot; 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:  Running the Bitcoin Core wallet as a separate process, a<br>
separate binary, from the blockchain engine.  The wallet process would<br>
communicate with the blockchain engine using existing RPC and P2P<br>
channels, becoming a real SPV client.  This 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.  I did some hacking in that<br>
direction, as it seemed potentially lightweight and somewhat easy to<br>
me: <a href="https://github.com/jgarzik/bitcoin/tree/fork" target="_blank">https://github.com/jgarzik/bitcoin/tree/fork</a>  fork+pipe is fine<br>
for Linux and OSX/BSD.  However, Windows requires an exec-like<br>
solution to create a new process.  MSDN does give us a Unix-pipe-like<br>
solution: <a href="http://msdn.microsoft.com/en-us/library/edze9h7e%28v=vs.80%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/edze9h7e%28v=vs.80%29.aspx</a><br>
 Others pointed to boost interprocess communication APIs, which come<br>
with their own set of caveats.  Such a solution would involve a brand<br>
new IPC protocol, and lots of brand new glue code.<br>
<br>
Separate programs seems better.  Windows forces us to achieve process<br>
separation via exec-like method.  We already have IPC: RPC + P2P.<br>
Modern OS&#39;s make localhost sockets just about as fast as other IPCs<br>
methods.  Linux, 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="https://github.com/bitcoin/bitcoin/pull/2964" target="_blank">https://github.com/bitcoin/bitcoin/pull/2964</a>  Moving 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="https://github.com/bitcoin/bitcoin/pull/3514" target="_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.      <a href="https://bitpay.com/" target="_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="http://pubads.g.doubleclick.net/gampad/clk?id=121054471&amp;iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=121054471&amp;iu=/4140/ostg.clktrk</a><br>
_______________________________________________<br>
Bitcoin-development mailing list<br>
<a href="mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-development@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/bitcoin-development" target="_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-development</a><br>
</blockquote></div>