Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XFj1A-0001fl-BI for bitcoin-development@lists.sourceforge.net; Fri, 08 Aug 2014 12:11:32 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.219.47 as permitted sender) client-ip=209.85.219.47; envelope-from=mh.in.england@gmail.com; helo=mail-oa0-f47.google.com; Received: from mail-oa0-f47.google.com ([209.85.219.47]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1XFj19-0002go-D3 for bitcoin-development@lists.sourceforge.net; Fri, 08 Aug 2014 12:11:32 +0000 Received: by mail-oa0-f47.google.com with SMTP id g18so3950223oah.34 for ; Fri, 08 Aug 2014 05:11:26 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.159.232 with SMTP id xf8mr29916451oeb.16.1407499885970; Fri, 08 Aug 2014 05:11:25 -0700 (PDT) Sender: mh.in.england@gmail.com Received: by 10.76.35.234 with HTTP; Fri, 8 Aug 2014 05:11:25 -0700 (PDT) In-Reply-To: References: Date: Fri, 8 Aug 2014 14:11:25 +0200 X-Google-Sender-Auth: ioFRv-5n_Q579rhKqpJtisCOX7A Message-ID: From: Mike Hearn To: Wladimir Content-Type: multipart/alternative; boundary=047d7bd6c4e4b9930f05001d1a96 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: 1XFj19-0002go-D3 Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] NODE_EXT_SERVICES and advertising related services 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, 08 Aug 2014 12:11:32 -0000 --047d7bd6c4e4b9930f05001d1a96 Content-Type: text/plain; charset=UTF-8 > > Something like `getutxos` or this proposal could be implemented as an > external application or script, instead of having to integrate > everything into bitcoind. > Right, although getutxos needs access to the UTXO set which bitcoind already has. An external plugin would have to recalculate it from scratch which seems redundant. However there are many other useful services that could be added in such a way, like -txindex or the nLockTime storage facility we talked about the other day. > Bitcoind would need a local interprocess message bus for that Maybe, that feels like it could be overkill though. Probably just something like ./bitcoind -servicecookie= -allowextservices=127.0.0.1/8 and then any program can connect to bitcoind as normal, send "registersrv" with the cookie and a list of command ids it's interested in, maybe a service bit to set, and start receiving those messages wrapped in a new structure that gives some kind of client ID (like IP address). So any library that can do the basic P2P protocol could then be extended with not much code to get a multiplexed stream of messages from different clients. An additional standalone program can then bridge this mechanism to running a shell command for particular messages, though given the history of shell based exploits I'd feel safer with something that doesn't do that .... --047d7bd6c4e4b9930f05001d1a96 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Something like `getutxos` or this proposal could= be implemented as an
external application or script, instead of having to integrate
everything into bitcoind.

Right, althou= gh getutxos needs access to the UTXO set which bitcoind already has. An ext= ernal plugin would have to recalculate it from scratch which seems redundan= t.

However there are many other useful services that could= be added in such a way, like -txindex or the nLockTime storage facility we= talked about the other day.
=C2=A0
Bitcoind would need a local interprocess message bus for that
<= div>
Maybe, that feels like it could be overkill though. Prob= ably just something like

./bitcoind -servicecookie= =3D<long random string> -allowextservices=3D127.0.0.1/8

and then any program can connect to bitcoind as normal,= send "registersrv" with the cookie and a list of command ids it&= #39;s interested in, maybe a service bit to set, and start receiving those = messages wrapped in a new structure that gives some kind of client ID (like= IP address). So any library that can do the basic P2P protocol could then = be extended with not much code to get a multiplexed stream of messages from= different clients.

An additional standalone program can then bridge this m= echanism to running a shell command for particular messages, though given t= he history of shell based exploits I'd feel safer with something that d= oesn't do that ....
--047d7bd6c4e4b9930f05001d1a96--