From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WEHlY-0004Cw-Ut for bitcoin-development@lists.sourceforge.net; Fri, 14 Feb 2014 12:21:13 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmail.com designates 74.125.82.175 as permitted sender) client-ip=74.125.82.175; envelope-from=da.colonel@gmail.com; helo=mail-we0-f175.google.com; Received: from mail-we0-f175.google.com ([74.125.82.175]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WEHlY-0005HA-3B for bitcoin-development@lists.sourceforge.net; Fri, 14 Feb 2014 12:21:12 +0000 Received: by mail-we0-f175.google.com with SMTP id q59so8783016wes.34 for ; Fri, 14 Feb 2014 04:21:05 -0800 (PST) X-Received: by 10.180.85.234 with SMTP id k10mr2017255wiz.32.1392380465902; Fri, 14 Feb 2014 04:21:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.102.66 with HTTP; Fri, 14 Feb 2014 04:20:45 -0800 (PST) From: Denis Andrejew Date: Fri, 14 Feb 2014 13:20:45 +0100 Message-ID: To: bitcoin-development@lists.sourceforge.net Content-Type: multipart/alternative; boundary=f46d044473bd0ffc5404f25cd760 X-Spam-Score: -0.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 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (da.colonel[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message -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: 1WEHlY-0005HA-3B Subject: [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 12:21:13 -0000 --f46d044473bd0ffc5404f25cd760 Content-Type: text/plain; charset=ISO-8859-1 Hi all! I'm new to development with bitcoin and I have a question for you guys: 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. Now one thing that I don't understand fully yet when working with the transaction data I'm being given is: How do transaction fees work? More specifically: I can see that there is often a gap between the sum of the ins and the sum of the outs in a transaction and I understand that this is the transaction fee. But how can the miner spend it if it is not assigned as an output of any transaction? Is there special code somewhere that keeps track of all the btc not spent in all the transactions of a block and allows the miner's address (ie the address in the first tx of that block) to spend that? But if so, how would that work then? I should be finding transactions then where the sum of the ouputs is higher than the sum of the inputs and one of the inputs should have the miner's address attached to it or what? I am a bit confused about this part. Other than that it's quite fascinating to see how bitcoin works and work with it. :) So if one of you could kindly explain to me the technical view of transaction fees (i.e. how exactly do I find them and account for them in the blockchain), that would be brilliant! And the other question would be this one (directly related): What are the cases where the sum of the input values (from the referenced transactions) can be different from the sum of the output values? These cases I have found and understand: 1) "coinbase" transactions that "print money" have no inputs, only 50/25 coins output (less in the future) 2) transaction fees when in > out Are there other cases? Thanks, Denis "Be the change you want to see in the world." (Mahatma Gandhi) --f46d044473bd0ffc5404f25cd760 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi all!

I'm new to development with= bitcoin and I have a question for you guys:

What = I'm trying to do is read the blockchain in order to find all unspent ou= tputs. I'm using bitcoind via rpc as my source of information about the= blockchain.

Now one thing that I don't understand fully yet whe= n working with the transaction data I'm being given is:

<= /div>
How do transaction fees work? More specifically: I can see that t= here is often a gap between the sum of the ins and the sum of the outs in a= transaction and I understand that this is the transaction fee. But how can= the miner spend it if it is not assigned as an output of any transaction? = Is there special code somewhere that keeps track of all the btc not spent i= n all the transactions of a block and allows the miner's address (ie th= e address in the first tx of that block) to spend that? But if so, how woul= d that work then? I should be finding transactions then where the sum of th= e ouputs is higher than the sum of the inputs and one of the inputs should = have the miner's address attached to it or what?

I am a bit confused about this part. Other than that it= 's quite fascinating to see how bitcoin works and work with it. :)

So if one of you could kindly explain to me the techni= cal view of transaction fees (i.e. how exactly do I find them and account f= or them in the blockchain), that would be brilliant!

And the other question would be this one (directly rela= ted):

What are the cases where the sum of the inpu= t values (from the referenced transactions) can be different from the sum o= f the output values?

These cases I have found and understand:

=
1) "coinbase" transactions that "print money"= ; have no inputs, only 50/25 coins output (less in the future)
2) transaction fees when in > out

Are there oth= er cases?

Thanks,
Denis

"Be the change you want to see in the world." (M= ahatma Gandhi)
--f46d044473bd0ffc5404f25cd760--