Bitcoin Forum
April 19, 2024, 08:55:25 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Expaining bitcoin transaction: When does Alice posses the fund?  (Read 153 times)
bolfio (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 2


View Profile
December 02, 2018, 08:31:00 PM
Merited by d5000 (1)
 #1

I have a question. I know that a transaction consists of an input and an output, whereas an unspent transaction output (UTXO) is equivalent to an amount someone holds. Clearly, every output contains a locking script, whereas each input contains a corresponding unlocking script.

My question is the following: We consider the following picture (unfortuatley, [img]http://doesn't work...


https://freedomnode.com/uploads/images/ad1f3d1790b9f1f7764fbc72f2337b6c44cd5adfba10324a9a8a65e5b6b09125.png

The picture shows that Bob spends 0.5 BTC to Alice. This is quite clear. He signs the transaction. But now this is what I don't understand: When do the 0.5 BTC appear in Alices wallet? Does she now posses the Output of transaction A? Because this is an unspent output. Only when she wants to pay her employee, she unlocks this output, such that the input of transaction B consumes the output of transaction A. Then, her empoyee "holds" the output of transaction B.

Is this the correct way? In my understanding, an input only consumes a previous output, when someone wants to make a subsequent transaction. This is why this picture irritates me a little, because it says "Alice receives"... But isn't she already the owner of the output, before the input of transaction B consumes the output of transaction A?

So, in my optionen: Alice won't unlock the 0.5 BTC in order to possess them, but in order to spend them.

I hope someone can explain me......
1713516925
Hero Member
*
Offline Offline

Posts: 1713516925

View Profile Personal Message (Offline)

Ignore
1713516925
Reply with quote  #2

1713516925
Report to moderator
1713516925
Hero Member
*
Offline Offline

Posts: 1713516925

View Profile Personal Message (Offline)

Ignore
1713516925
Reply with quote  #2

1713516925
Report to moderator
1713516925
Hero Member
*
Offline Offline

Posts: 1713516925

View Profile Personal Message (Offline)

Ignore
1713516925
Reply with quote  #2

1713516925
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713516925
Hero Member
*
Offline Offline

Posts: 1713516925

View Profile Personal Message (Offline)

Ignore
1713516925
Reply with quote  #2

1713516925
Report to moderator
1713516925
Hero Member
*
Offline Offline

Posts: 1713516925

View Profile Personal Message (Offline)

Ignore
1713516925
Reply with quote  #2

1713516925
Report to moderator
1713516925
Hero Member
*
Offline Offline

Posts: 1713516925

View Profile Personal Message (Offline)

Ignore
1713516925
Reply with quote  #2

1713516925
Report to moderator
hubballi
Sr. Member
****
Offline Offline

Activity: 882
Merit: 297


View Profile
December 02, 2018, 09:35:56 PM
 #2

I dont know much technically but in simple way, when A sells to B and when the transaction gets confirmed, it automatically moves the funds from A account to B account.

Until the transaction is not confirmed the funds are holded in between the A and B transaction data.

Once A  sends the funds it will be moved from his account and gets stuck in transaction and until it is not confirmed in B account it will be lying their. So now nor A or B can use that funds until it is not confirmed or rejected.

achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6509


Just writing some code


View Profile WWW
December 02, 2018, 11:21:46 PM
Merited by Foxpup (4), ABCbits (1)
 #3

When do the 0.5 BTC appear in Alices wallet?
It depends on the wallet software. Typically wallet software will show the BTC as appeared in her wallet as soon as the transaction is received by that wallet. It will be unconfirmed at that point, so it is potientially unsafe to spend the outputs in that transaction.

Does she now posses the Output of transaction A? Because this is an unspent output. Only when she wants to pay her employee, she unlocks this output, such that the input of transaction B consumes the output of transaction A. Then, her empoyee "holds" the output of transaction B.

Is this the correct way? In my understanding, an input only consumes a previous output, when someone wants to make a subsequent transaction. This is why this picture irritates me a little, because it says "Alice receives"... But isn't she already the owner of the output, before the input of transaction B consumes the output of transaction A?

So, in my optionen: Alice won't unlock the 0.5 BTC in order to possess them, but in order to spend them.
Yes, that is correct. Alice does not have to do anything in order to receive the Bitcoin. Once Bob has created an unspent output that Alice can spend, she can say that she has received the Bitcoin.

Of course, there is a caveat to this. Bob can't just make any output script that he wants that Alice can spend. There are a lot of output scripts that Alice could theoretically unlock and spent as an input in another transaction. However Alice is not tracking all of those things. Rather she has a specific set of output scripts that she can spend and she gives out addresses that correspond to those scripts. In order for Alice to consider Bob to have paid her, he needs to make an output with a script that corresponds to the address Alice gave him, otherwise Alice will not consider that transaction to be hers.

bolfio (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 2


View Profile
December 03, 2018, 03:36:31 AM
 #4

...

Wow, fantastic explanation. Now it's clear. Thank you very much!
odolvlobo
Legendary
*
Offline Offline

Activity: 4298
Merit: 3190



View Profile
December 03, 2018, 05:18:29 PM
 #5

...
Is this the correct way? In my understanding, an input only consumes a previous output, when someone wants to make a subsequent transaction. This is why this picture irritates me a little, because it says "Alice receives"... But isn't she already the owner of the output, before the input of transaction B consumes the output of transaction A?

So, in my optionen: Alice won't unlock the 0.5 BTC in order to possess them, but in order to spend them.

I hope someone can explain me......

Yes. It is more accurate to say that you receive or possess the ability to use bitcoins, rather than saying that you receive or possess the bitcoins themselves, though they are effectively the same.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!