From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XFj5H-0004LC-3g for bitcoin-development@lists.sourceforge.net; Fri, 08 Aug 2014 12:15:47 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of bitpay.com designates 209.85.213.175 as permitted sender) client-ip=209.85.213.175; envelope-from=jgarzik@bitpay.com; helo=mail-ig0-f175.google.com; Received: from mail-ig0-f175.google.com ([209.85.213.175]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1XFj5G-0007Kx-4J for bitcoin-development@lists.sourceforge.net; Fri, 08 Aug 2014 12:15:47 +0000 Received: by mail-ig0-f175.google.com with SMTP id uq10so908489igb.8 for ; Fri, 08 Aug 2014 05:15:40 -0700 (PDT) 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:from:date :message-id:subject:to:cc:content-type; bh=HFniACjvevm0OfS419A710454uYHnQq5zuU98p8Ek6w=; b=QUWCAWlxof7fB1SxbJ/4gcfwH/GQRQvFYTGRAcJM79981WZ1zOmmlO9Axwg6m/w8bo IzzG2K7B5TBHOzLp5DuhV9ATFeUdv8Q7Kk9G0godP3pWB7CQByQFM4Vxnuy/5mi7ZdoN 6I9QKsQHxdgwnh0Epb2msDfzZ3xwHLKLsu+wX6A+tHk1Ivm2pYdndigbeHTxJETZ5hd/ qhtQ/HvDagmF8dtlnRoBiAjTxLI0cfHUtsptPgyeBfj5WCbeKwv2kqgS5YQDJQQ0H42X 68EjSf+9I18HgXW61gCXoMiwKCJ1+EpgxSCg0dqgd6Osv8gvYBimNIYgRYGDIvQjUwbV jdlA== X-Gm-Message-State: ALoCoQmMFYhaWuHWIR4ZGy4wmxWka7REveV7V1fFz8NchME8PFFy8Bg4HMi2pO+UGg9b1/ytdDl0 X-Received: by 10.42.178.133 with SMTP id bm5mr11249399icb.75.1407500140861; Fri, 08 Aug 2014 05:15:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.10.78 with HTTP; Fri, 8 Aug 2014 05:15:19 -0700 (PDT) In-Reply-To: References: From: Jeff Garzik Date: Fri, 8 Aug 2014 08:15:19 -0400 Message-ID: To: Mike Hearn Content-Type: text/plain; charset=UTF-8 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: 1XFj5G-0007Kx-4J 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:15:47 -0000 getutxos is a special case, since we already maintain that index as part of normal operation. While I dislike some aspects of getutxos (covered elsewhere), if merged, it would be more appropriate as a special case to keep getutxos fully internal to bitcoind for implementation reasons. On Fri, Aug 8, 2014 at 8:11 AM, Mike Hearn wrote: >> 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 .... -- Jeff Garzik Bitcoin core developer and open source evangelist BitPay, Inc. https://bitpay.com/