Bitcoin Forum
April 25, 2024, 07:26:24 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Could coins from an unconfirmed transaction accidently be paid as fees? [Nope]  (Read 606 times)
ManaUser (OP)
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
November 07, 2013, 11:16:44 AM
Last edit: November 07, 2013, 03:38:47 PM by ManaUser
 #1

I recently had some bitcoins stuck in unconfirmed limbo for a while, it's taken care of, but it got me thinking... could the following happen?

1AAA is a bitcoin address. It contains 10 BTC.
I attempt to send all of it to 1BBB, but for whatever reason, this doesn't make it into the blockchain.
Presumably I'd notice that, but maybe I'm in a hurry and plan to deal with it later.
In the mean time: 1CCC sends another 1 BTC to 1AAA.
And I try to send half of that on to 1DDD.
My client believes 1AAA only contains 1 BTC so...
It would go something like txin=1AAA txout=1DDD:0.5 txout=1EEE:0.5 (the latter being my change)
But the rest of the network thinks 1AAA has 11 BTC in it so...
"Hey they didn't mention these 10 BTC, it must our fee, yay!"

Would Bitcoin-qt actually do this? If not, what steps does it take to avoid this situation?
1714029984
Hero Member
*
Offline Offline

Posts: 1714029984

View Profile Personal Message (Offline)

Ignore
1714029984
Reply with quote  #2

1714029984
Report to moderator
In order to get the maximum amount of activity points possible, you just need to post once per day on average. Skipping days is OK as long as you maintain the average.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
domob
Legendary
*
Offline Offline

Activity: 1135
Merit: 1161


View Profile WWW
November 07, 2013, 11:53:27 AM
 #2

No, this is not possible (if I understand your concern correctly).  The point is that transaction inputs are never addresses but unspent outputs.  In your case, let's assume that the initial 10 BTC are form a single transaction, then the 1AAA address contains this one output.  If you now receive 1 BTC to 1AAA in addition, you have now two outputs that can be spent with the private key of 1AAA, but they only will be spent if the client explicitly includes both outputs (or one of them, then only the coins of that one will be spent).

If now one transaction with the 10 BTC is stuck, the client only thinks the other unspent output with 1 BTC is available; and if it creates a new transaction, it spends this output, but this has nothing to do with the other 10 BTC.  So it can never accidentally spend more than it thinks it spends, because it has to be completely aware of all outputs that you try to spend when you create a new transaction.

Use your Namecoin identity as OpenID: https://nameid.org/
Donations: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS | GPG 0xA7330737
ManaUser (OP)
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
November 07, 2013, 03:36:17 PM
 #3

I see. Yes I think that was the distinction I was missing.
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!