public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Mark Friedenbach <mark@monetize.io>
To: Denis Andrejew <da.colonel@gmail.com>,
	 bitcoin-development@lists.sourceforge.net
Subject: Re: [Bitcoin-development] working with the blockchain: transaction fees & sum(inputs) != sum(outputs) (newbie questions)
Date: Fri, 14 Feb 2014 15:01:41 -0800	[thread overview]
Message-ID: <52FEA055.7010408@monetize.io> (raw)
In-Reply-To: <CAPc1t_8DPeEZnHHhxNNYs9YXP+C78kW-u_hgxahAAGQVLDzpFw@mail.gmail.com>

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
> <mark@monetize.io <mailto:mark@monetize.io>> 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.
> 
> 



      reply	other threads:[~2014-02-14 23:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 12:20 [Bitcoin-development] working with the blockchain: transaction fees & sum(inputs) != sum(outputs) (newbie questions) Denis Andrejew
2014-02-14 12:42 ` Wladimir
     [not found] ` <52FE4782.6020001@monetize.io>
2014-02-14 20:56   ` Denis Andrejew
2014-02-14 23:01     ` Mark Friedenbach [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52FEA055.7010408@monetize.io \
    --to=mark@monetize.io \
    --cc=bitcoin-development@lists.sourceforge.net \
    --cc=da.colonel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox