From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 519E83EE for ; Fri, 7 Apr 2017 21:14:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E841422B for ; Fri, 7 Apr 2017 21:14:52 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 405F520B1A; Fri, 7 Apr 2017 17:14:52 -0400 (EDT) Received: from web3 ([10.202.2.213]) by compute2.internal (MEProxy); Fri, 07 Apr 2017 17:14:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=77Jyat DyzgsuGrQP/MJnVPTGCiFAAPC6x5eLEN792NA=; b=k1lI5dSU8samJbcpI7TaLb mjqoXOBy7E6useh3M2OuUT6dAq82hcC4snw5VkBNvftaojQqAJRkUlmfBo+xEd1S mFQmtqnAOU0phCB+1j1avu10t2cqDgYds9nyBw/lMJavQqAc8l1dusVaGChU5jiC af9QmHjphAXfqhlPg88q1fv+bcMMb7MB3bd2yTOrGNU2mq9BM7qebcQ9tH4Yyc3W mjCPIdYwPKfhcd3ojMXon0aUy+XK9ZRe9Eqi5GPn/D/CIOAkp/CpYFpXxrY3a65j Aiv4/4T0ws20x30G9PD0wgzcqXV0dcmIXNI//o9/MqrScgtSmW+iV50i3nrWUNMg == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 1252C9EC4C; Fri, 7 Apr 2017 17:14:52 -0400 (EDT) Message-Id: <1491599691.1245876.937920664.6EBA20DC@webmail.messagingengine.com> From: Tomas To: Bram Cohen , Gregory Maxwell , Bitcoin Protocol Discussion MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: multipart/alternative; boundary="_----------=_149159969112458761" X-Mailer: MessagingEngine.com Webmail Interface - ajax-7c174d5d In-Reply-To: References: <1491516747.3791700.936828232.69F82904@webmail.messagingengine.com> Date: Fri, 07 Apr 2017 23:14:51 +0200 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Fri, 07 Apr 2017 21:15:41 +0000 Subject: Re: [bitcoin-dev] Using a storage engine without UTXO-index X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Apr 2017 21:14:55 -0000 This is a multi-part message in MIME format. --_----------=_149159969112458761 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" Answering both, On Fri, Apr 7, 2017 at 11:18 AM, Gregory Maxwell via bitcoin-dev wrote: >> >> I'm still lost on this-- AFAICT your proposals long term resource >> requirements are directly proportional to the amount of >> unspent output >> data, which grows over time at some fraction of the total transaction >> volume (plus the rate of spending which is more or less a constant). >> >> Can you help out my understanding here? >> On Fri, Apr 7, 2017, at 20:39, Bram Cohen wrote: > Expanding on this question a bit, it's optimized for parallel access, > but hard drive access isn't parallel and memory accesses are very > fast, so shouldn't the target of optimization be about cramming as > much as possible in memory and minimizing disk accesses? The long term *minimal disk storage* requirement, can obviously not be less then all the unspent outputs. Minimal disk requirements is not something bitcrust attempts to address. The storage that is accessed during peak load (block validation with pre-synced transactions), is minimized as this only needs the transaction index (to lookup ptrs from hashes), the tip of the spend- tree and the tip of the spend-index (together to check double spents/spending non-existing outputs). These not only easily fit in RAM, but are accessed in a cache efficient way. *These* only grow with inputs as the spend tree contains one record per input referencing the output being spent. Script validation is also not something bitcrust *directly* addresses; it uses libbitcoinconsensus for the actual validation and lookups to outputs are mostly similar. They are kept fast by trusting the OS on MRU caching of transaction-outputs; I don't think that for this part the UTXO index has much drawbacks,. Bitcrust seems to have a small advantage due to the awesomeness of Rayon's parallelization and the lock-free data structures, but a disadvantage in that keeping all spent outputs decreases spatial locality of reference. Script validation is not the innovative part. Tomas --_----------=_149159969112458761 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset="utf-8"
Answering both,

On Fri, Apr 7, 2017 at 11:18 AM, Gregory Maxwell via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:

I'm still lost on this-- AFAICT your proposals long term resource
requirements are directly proportional to the amount of unspent output
data, which grows over time at some fraction of the total transaction
volume (plus the rate of spending which is more or less a constant).

Can you help out my understanding here?


On Fri, Apr 7, 2017, at 20:39, Bram Cohen wrote:
Expanding on this question a bit, it's optimized for parallel access, but hard drive access isn't parallel and memory accesses are very fast, so shouldn't the target of optimization be about cramming as much as possible in memory and minimizing disk accesses?

The long term *minimal disk storage* requirement, can obviously not be less then all the unspent outputs. Minimal disk requirements is not something bitcrust attempts to address.

The storage that is accessed during peak load (block validation with pre-synced transactions), is minimized as this only needs the transaction index (to lookup ptrs from hashes), the tip of the spend-tree and the tip of the spend-index (together to check double spents/spending non-existing outputs). These not only easily fit in RAM, but are accessed in a cache efficient way. *These* only grow with inputs as the spend tree contains one record per input referencing the output being spent.

Script validation is also not something bitcrust *directly* addresses; it uses libbitcoinconsensus for the actual validation and lookups to outputs are mostly similar. They are kept fast by trusting the OS on MRU caching of transaction-outputs; I don't think that for this part the UTXO index has much drawbacks,. Bitcrust seems to have a small advantage due to the awesomeness of Rayon's parallelization and the lock-free data structures, but a disadvantage in that keeping all spent outputs decreases spatial locality of reference. Script validation is not the innovative part.

Tomas
--_----------=_149159969112458761--