1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
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 <da.colonel@gmail.com>) 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 <bitcoin-development@lists.sourceforge.net>;
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 <da.colonel@gmail.com>
Date: Fri, 14 Feb 2014 13:20:45 +0100
Message-ID: <CAPc1t_8kp7dRpjPkK0K6K+mBz4dF9tsVx9n55eaW30FeFvU1EA@mail.gmail.com>
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: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
<mailto:bitcoin-development-request@lists.sourceforge.net?subject=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
<div dir=3D"ltr">Hi all!<div><br></div><div>I'm new to development with=
bitcoin and I have a question for you guys:</div><div><br></div><div>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.</div>
<div><br></div><div>Now one thing that I don't understand fully yet whe=
n working with the transaction data I'm being given is:</div><div><br><=
/div><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?</div>
<div><br></div><div>I am a bit confused about this part. Other than that it=
's quite fascinating to see how bitcoin works and work with it. :)</div=
><div><br></div><div>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!</div>
<div><br></div><div>And the other question would be this one (directly rela=
ted):</div><div><br></div><div>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?</div>
<div><br></div><div>These cases I have found and understand:</div><div><br>=
</div><div>1) "coinbase" transactions that "print money"=
; have no inputs, only 50/25 coins output (less in the future)</div><div>
2) transaction fees when in > out</div><div><br></div><div>Are there oth=
er cases?</div><div><br></div><div>Thanks,</div><div>Denis</div><div><br cl=
ear=3D"all"><div>"Be the change you want to see in the world." (M=
ahatma Gandhi)</div>
</div></div>
--f46d044473bd0ffc5404f25cd760--
|