From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WERlX-0000hI-F8 for bitcoin-development@lists.sourceforge.net; Fri, 14 Feb 2014 23:01:51 +0000 Received: from mail-pb0-f41.google.com ([209.85.160.41]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WERlW-0007VI-C0 for bitcoin-development@lists.sourceforge.net; Fri, 14 Feb 2014 23:01:51 +0000 Received: by mail-pb0-f41.google.com with SMTP id up15so13011550pbc.0 for ; Fri, 14 Feb 2014 15:01:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=fyZWOQAiTh6OihIncq5GViQ/yS7Wr6UGRXNVoxIU/ak=; b=bRPRalEU8L6ozktWsC52gPd5h2eBxyW2aW6L+3rMLZM50vCxNeP88kVXMvfoRfp61P H/HdxP5xLDVHyaCBkRYYA2wu42sWjRF3jDshPxwhD2Mm0eynN09GejBD0Wode/8D0huZ thzuomHCDeOppM3d9dBLr8g3n4EX47yMaJ1t7rfryK2qTV7CpsHaOrRCb7gkLsfAFIFO /zH48UKw0zyi+N+1kif/M2qQ0q0T1O2l1wbJUR6mjujgeOv1WOkLYcvLyvTlarghM4bF Llgm/l3W5/JgP2HGfrGME7r1ztWjqH/patkIDnJMX0ezBtysZ2mnhn2nsg3cOs7Aou2B tneg== X-Gm-Message-State: ALoCoQlMgZHGez7tfF8O+6UlMQeCPn/ld+BHg2V8Z8qHq0Ve7Jg1i0u8JGr+4FJ2+4/hrNtac21n X-Received: by 10.68.133.229 with SMTP id pf5mr11985376pbb.115.1392418904329; Fri, 14 Feb 2014 15:01:44 -0800 (PST) Received: from [192.168.127.188] (50-0-36-81.dsl.dynamic.sonic.net. [50.0.36.81]) by mx.google.com with ESMTPSA id xs1sm51113645pac.7.2014.02.14.15.01.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 15:01:43 -0800 (PST) Message-ID: <52FEA055.7010408@monetize.io> Date: Fri, 14 Feb 2014 15:01:41 -0800 From: Mark Friedenbach Organization: Monetize.io Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Denis Andrejew , bitcoin-development@lists.sourceforge.net References: <52FE4782.6020001@monetize.io> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. X-Headers-End: 1WERlW-0007VI-C0 Subject: Re: [Bitcoin-development] working with the blockchain: transaction fees & sum(inputs) != sum(outputs) (newbie questions) 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, 14 Feb 2014 23:01:51 -0000 Still straightforward: get a list of transaction hashes for the block from bitcoind, then query these transactions from the UTXO changestate database. On 02/14/2014 12:56 PM, Denis Andrejew wrote: > Thanks Wladimir, perfect info! > > Mark, sounds good. But most likely this DB is keeping this > information only for the current state of the blockchain and what I > need really is to be able to get the unspent outputs (and calculate > the balance for all addresses) for any particular block I happen to > be interested in :) > > - Denis > > "Be the change you want to see in the world." (Mahatma Gandhi) > > > On Fri, Feb 14, 2014 at 5:42 PM, Mark Friedenbach > > wrote: > > On 02/14/2014 04:20 AM, Denis Andrejew wrote: >> What I'm trying to do is read the blockchain in order to find >> all unspent outputs. I'm using bitcoind via rpc as my source of >> information about the blockchain. > > By the way, bitcoind keeps this information in a special LevelDB > database in the chainstate directory. It would be rather simple to > iterate over the database for the list of al unspent outputs. > >