<p>Transacions don't have input and output addresses, they have input and output scripts. Addresses are just short-hand notation for particular scripts. </p>

<p>When making a transaction, you don't just say what the input and output scripts are. You have to explicitly reference which UTXO (unspent transaction outputs) a transaction spends, and then you also make a set of new UTXOs. Each UTXO has an amount associated with it. </p>

<blockquote>
  <p>t2 has input address as a1 as described here - What does a transaction look like?</p>
</blockquote>

<p>If t2 is trying to spend the coins that were sent to it in t1, then it would need to reference t1 (not a1 or a2). Specifically, it would need to reference the UTXO in t1 that credited the a2 script.</p>

<blockquote>
  <p>Because t2 does not mention a2, the anonymity of a2 is preserved.</p>
</blockquote>

<p>Not really. Anonymity is only preserved by not linking your address to your name, such as by posting on a social media website. </p>

<blockquote>
  <p>t2 is confirmed because unspent balance of a2 at this point is 50.00 BTC. (Not sure how, but sounds like it.)</p>
</blockquote>

<p>If t2 were confirmed, spending the UTXO made in t1, then, yes, it would be successful because the total inputs is more than the total outputs. Actually, it's total inputs are 10 BTC more than it's total outputs, so that 10 BTC would just go to the miners (and not be left on the 'address balance'). </p>

<blockquote>
  <p>After t2 is confirmed, unspent balance of a2 is 10.00 BTC.</p>
</blockquote>

<p>Not actually, like mentioned above, it doesn't really work like that. Transaction outputs are either completely spent or are unspent. So after t2, the output is completely spent. If the 10 BTC is not sent to another output in t2, then it is just assumed to be a very generous miner fee. </p>

CC BY-SA 3.0
2014-11-10T15:32:15.090Z
"Transacions don't have input and output addresses, they have input and output scripts. Addresses are just short-hand notation for particular scripts. " Thanks for that !

My intention is to co-relate the debit/credit and its confirmation in the block-chain. 

I will do some more reading.
cogitoergosum
CC BY-SA 3.0
2014-11-10T15:05:23.873Z
2014-11-10T15:05:23.873Z
morsecoder
<p><strong><em>Newbie alert ! Please let me know if this is not the right forum.</em></strong></p>

<p>So I have spent time reading up on Bitcoin. I think, I understand now; but, would love to have it confirmed.</p>

<p>To start with, we have a transaction, t1 as below.</p>

<pre><code>t1 : {a1, 50.00 BTC, a2}
</code></pre>

<p>Where, 
t1 is the transaction that goes to the block-chain (ledger) for confirmation. 
a1 is the input, for example, Mt Gox from whom 50.00 BTC were purchased. 
a2 is the output address who purchased the bitcoins from Mt Gox.</p>

<p>After t1 is confirmed, the unspent amount of a2 is 50.00 BTC.</p>

<p>Let us say, a2 wants to send 40.00 BTC to a3 for some service. Then, a new transaction t2 is created as below.</p>

<pre><code>t2 : {a1, 40.00 BTC, a3}
</code></pre>

<p>As before, t2 goes to block-chain awaiting confirmation. The input to t2 is a1, amount 40.00 BTC and the addressee (or recipient) is a3.</p>

<p>Are the following correct ?</p>

<ol>
<li>t2 has input address as a1 as described here - <a href="http://www.coindesk.com/information/how-do-bitcoin-transactions-work/" rel="nofollow">What does a transaction look like?</a></li>
<li>Because t2 does not mention a2, the anonymity of a2 is preserved.</li>
<li>t2 is confirmed because unspent balance of a2 at this point is 50.00 BTC. (Not sure how, but sounds like it.)</li>
<li>After t2 is confirmed, unspent balance of a2 is 10.00 BTC.</li>
</ol>

<p>For reference, I used the following.</p>

<pre><code>t1 : eac977ae6ee885b62c4756230f6bdd27ccfa7de215836e6f5fc379c66f4c6a81
a1 : 1LNWw6yCxkUmkhArb2Nf2MPw6vG7u5WG7q
a2 : 16fKtcRS2P57pH6dF5stJ4wF1SC4SzaMJK
</code></pre>

<p>and, </p>

<pre><code>t2 : c8a8db01733a4300ad14e1fd78ff776ec21260e7081dd48c7b2f5ad1a9a1da46
a3 : 1Cmerw473xaaNpR6T9Lo5DA6d99uXLe3gc
</code></pre>

CC BY-SA 3.0
2014-11-10T09:33:42.620Z
What is your question exactly. You've stated your points, but it is not clear what you are asking. I think you are mistaking Unspent Transaction Outputs (UTXOs), with addresses, because in your example a1 would have to have to have previously received money to pay both transactions.
T9b
CC BY-SA 3.0
2014-11-10T09:54:35.577Z
I just want to understand _a_ transaction completely. I think, I know the dots, but am unable to connect them. :( How do the t1, t2, a1, a2 and a3 all work out ?
cogitoergosum
CC BY-SA 3.0
2014-11-10T09:58:10.413Z
I'm not sure you do 'know the dots'. I found the following explanation very helpful, it is a specific piece of software, but the README breaks down all the steps in a transaction. https://github.com/spesmilo/sx
T9b
<transactions>
A life-cycle of a transaction - correct?
cogitoergosum
# A life-cycle of a transaction - correct?

(Asked by: username_0 on 2014-11-10)

***Newbie alert ! Please let me know if this is not the right forum.***

So I have spent time reading up on Bitcoin. I think, I understand now; but, would love to have it confirmed.

To start with, we have a transaction, t1 as below.

```
t1 : {a1, 50.00 BTC, a2}

```

Where,
t1 is the transaction that goes to the block-chain (ledger) for confirmation.
a1 is the input, for example, Mt Gox from whom 50.00 BTC were purchased.
a2 is the output address who purchased the bitcoins from Mt Gox.

After t1 is confirmed, the unspent amount of a2 is 50.00 BTC.

Let us say, a2 wants to send 40.00 BTC to a3 for some service. Then, a new transaction t2 is created as below.

```
t2 : {a1, 40.00 BTC, a3}

```

As before, t2 goes to block-chain awaiting confirmation. The input to t2 is a1, amount 40.00 BTC and the addressee (or recipient) is a3.

Are the following correct ?

1. t2 has input address as a1 as described here - [What does a transaction look like?](http://www.coindesk.com/information/how-do-bitcoin-transactions-work/)
2. Because t2 does not mention a2, the anonymity of a2 is preserved.
3. t2 is confirmed because unspent balance of a2 at this point is 50.00 BTC. (Not sure how, but sounds like it.)
4. After t2 is confirmed, unspent balance of a2 is 10.00 BTC.

For reference, I used the following.

```
t1 : eac977ae6ee885b62c4756230f6bdd27ccfa7de215836e6f5fc379c66f4c6a81
a1 : 1LNWw6yCxkUmkhArb2Nf2MPw6vG7u5WG7q
a2 : 16fKtcRS2P57pH6dF5stJ4wF1SC4SzaMJK

```

and,

```
t2 : c8a8db01733a4300ad14e1fd78ff776ec21260e7081dd48c7b2f5ad1a9a1da46
a3 : 1Cmerw473xaaNpR6T9Lo5DA6d99uXLe3gc

```

**Tags:** transactions

> **Comments:**
> **username_1**: What is your question exactly. You've stated your points, but it is not clear what you are asking. I think you are mistaking Unspent Transaction Outputs (UTXOs), with addresses, because in your example a1 would have to have to have previously received money to pay both transactions.  
> **username_0**: I just want to understand _a_ transaction completely. I think, I know the dots, but am unable to connect them. :( How do the t1, t2, a1, a2 and a3 all work out ?  
> **username_1**: I'm not sure you do 'know the dots'. I found the following explanation very helpful, it is a specific piece of software, but the README breaks down all the steps in a transaction. https://github.com/spesmilo/sx  

---

## 1 answers

### Answer by username_2 on 2014-11-10. Score: 1

Transacions don't have input and output addresses, they have input and output scripts. Addresses are just short-hand notation for particular scripts.

When making a transaction, you don't just say what the input and output scripts are. You have to explicitly reference which UTXO (unspent transaction outputs) a transaction spends, and then you also make a set of new UTXOs. Each UTXO has an amount associated with it.

> t2 has input address as a1 as described here - What does a transaction look like?

If t2 is trying to spend the coins that were sent to it in t1, then it would need to reference t1 (not a1 or a2). Specifically, it would need to reference the UTXO in t1 that credited the a2 script.

> Because t2 does not mention a2, the anonymity of a2 is preserved.

Not really. Anonymity is only preserved by not linking your address to your name, such as by posting on a social media website.

> t2 is confirmed because unspent balance of a2 at this point is 50.00 BTC. (Not sure how, but sounds like it.)

If t2 were confirmed, spending the UTXO made in t1, then, yes, it would be successful because the total inputs is more than the total outputs. Actually, it's total inputs are 10 BTC more than it's total outputs, so that 10 BTC would just go to the miners (and not be left on the 'address balance').

> After t2 is confirmed, unspent balance of a2 is 10.00 BTC.

Not actually, like mentioned above, it doesn't really work like that. Transaction outputs are either completely spent or are unspent. So after t2, the output is completely spent. If the 10 BTC is not sent to another output in t2, then it is just assumed to be a very generous miner fee.

> **Comments:**
> **username_0**: "Transacions don't have input and output addresses, they have input and output scripts. Addresses are just short-hand notation for particular scripts. " Thanks for that !  My intention is to co-relate the debit/credit and its confirmation in the block-chain.   I will do some more reading.  

---

