Bitcoin Forum
June 20, 2024, 05:45:30 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Lost .00000001 of a bitcoin  (Read 1927 times)
Garrett Burgwardt (OP)
Sr. Member
****
Offline Offline

Activity: 406
Merit: 256


View Profile
May 04, 2011, 06:09:01 AM
 #1

So after I installed the latest version right now, I wanted to test the fancy new send feature (sans message field!) and the full precision transactions. I sent a 32.28999999 transaction to myself and the software seems to have debited my address for the full 32.29 instead of just the amount I sent.

Did I stumble upon an actual bug or is Gavin going to swoop in here and explain how I'm missing something? Tongue
Garrett Burgwardt (OP)
Sr. Member
****
Offline Offline

Activity: 406
Merit: 256


View Profile
May 04, 2011, 06:10:15 AM
 #2

Oh, my mistake - seems I paid a transaction fee of that amount - why though? I wasn't asked and I don't have a transaction fee set in the GUI - and this shouldn't run afoul of the new fee rules that I know about.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5236
Merit: 13089


View Profile
May 04, 2011, 06:19:10 AM
 #3

You were breaking a 32.29 BTC coin. The change was .00000001. In order to send a transaction with outputs less than 0.01, the network requires a fee of 0.01. This would obviously be pointless, so Bitcoin just threw the BTC away.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
error
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500



View Profile
May 04, 2011, 06:24:12 AM
 #4

I think that'll be the first lost single satoshi. And I figured that was at least 50 years away!

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
walidzohair
Full Member
***
Offline Offline

Activity: 184
Merit: 100


View Profile
May 04, 2011, 09:03:53 AM
 #5

I think that'll be the first lost single satoshi. And I figured that was at least 50 years away!

I lost about 20 BTC in my first days playing with miners and wallets Smiley
Garrett Burgwardt (OP)
Sr. Member
****
Offline Offline

Activity: 406
Merit: 256


View Profile
May 04, 2011, 10:13:54 AM
 #6

Okay, new question then, as I've never heard as to why this is:

Why does change happen in this way? Couldn't the protocol simply allow you to only send so much of your balance from one address (say I have 10 btc at address 1X, and I send 5 of it to alice) and the rest just remains there?
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5236
Merit: 13089


View Profile
May 04, 2011, 10:58:54 AM
 #7

Okay, new question then, as I've never heard as to why this is:

Why does change happen in this way? Couldn't the protocol simply allow you to only send so much of your balance from one address (say I have 10 btc at address 1X, and I send 5 of it to alice) and the rest just remains there?

You can only spend entire coins. Otherwise, the system would have to track balances for inputs (or addresses), which would add a lot of complexity and probably break some things.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
pc
Sr. Member
****
Offline Offline

Activity: 253
Merit: 250


View Profile
May 04, 2011, 11:54:34 AM
 #8

Does it check to see if it could add another input in order to avoid throwing money away in a fee, or does it just look for the first input that fits, and it's just too bad if it's less than 0.01 more than the amount of the transaction?
Gavin Andresen
Legendary
*
Offline Offline

Activity: 1652
Merit: 2222


Chief Scientist


View Profile WWW
May 04, 2011, 12:41:36 PM
 #9

Does it check to see if it could add another input in order to avoid throwing money away in a fee, or does it just look for the first input that fits, and it's just too bad if it's less than 0.01 more than the amount of the transaction?

The latest version of bitcoin does try to avoid "sub-cent change" by adding more inputs.

If it can't avoid it (e.g. you have 32.29 in your wallet and you send 32.28999999), then the sub-cent change becomes a sub-cent transaction fee.  It isn't lost, the miner that includes the transaction will get it.

How often do you get the chance to work on a potentially world-changing project?
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!