Bitcoin Forum
November 11, 2024, 01:21:20 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Yet another dumb question  (Read 576 times)
AliceWonder (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
June 14, 2013, 11:45:06 AM
 #1

Sure it has been asked before and maybe in a FAQ but I'm having trouble finding.

I understand the way sending works is the wallet looks for smallest addresses that cover payment.
They all become part of the transaction, but everything in those addresses is sent and the change is returned to a fresh address.

So if I have 7 BTC in one address and 11 BTC in another and I buy something that costs 14 BTC, both addresses are emptied and 4 BTC is sent to fresh address in the wallet, 4 BTC that is mine but can't be spent until the confirmations are done, correct?

But if I send 8 BTC, will it use the 7 and 11 and return 10 or will it leave the 7 alone, send the 11 and return 3 ??
That's what I suspect (the latter), that's logical as it doesn't then freeze ability to spend from the 7 until confirmations are done.

But will that eventually end up with a bunch of addresses that all have tiny amounts building up? Is there a way to consolidate these tiny amounts into a single address, say, whenever their sum reaches 0.5 BTC ??

QuarkCoin - what I believe bitcoin was intended to be. On reddit: http://www.reddit.com/r/QuarkCoin/
dbkeys
Full Member
***
Offline Offline

Activity: 486
Merit: 104


View Profile
June 14, 2013, 12:22:54 PM
 #2

Interesting questions. I'm sure that if you have several addresses with small amounts you can pay them all to yourself into another address (perhaps at another device) to consolidate them. I would agree that it is preferable to not put your funds into "transaction limbo" for even a few minutes if its not necessary.  I have heard the Armory client has more features. It might let you choose which addresses to take funds from, but I haven't checked it out myself. https://bitcoinarmory.com/

DNS Seeder / Node Trackers
Fiyasko
Legendary
*
Offline Offline

Activity: 1428
Merit: 1001


Okey Dokey Lokey


View Profile
June 14, 2013, 12:58:17 PM
 #3

Pffbfbbfb what the heck is going on, Since when can the bitcoin wallet system----- OHHHHHHhhhhhhhhhhh I am so fucking stupid
If the 7btc and 11btc are in the same wallet.dat, Then there will not be a "refund transaction" we'll call it, of 4btc  the 7 btc address will be depleted to zero, and the 11btc address will lose another 7btc to complete the full amout, Leaving you with 4btc in your 11btc address.

It will always deplete the smaller btc amount address first (from what i've experianced from using the bitcoin-qt wallet, This is not fact)

http://bitcoin-otc.com/viewratingdetail.php?nick=DingoRabiit&sign=ANY&type=RECV <-My Ratings
https://bitcointalk.org/index.php?topic=857670.0 GAWminers and associated things are not to be trusted, Especially the "mineral" exchange
AliceWonder (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
June 14, 2013, 01:15:26 PM
 #4

Pffbfbbfb what the heck is going on, Since when can the bitcoin wallet system----- OHHHHHHhhhhhhhhhhh I am so fucking stupid
If the 7btc and 11btc are in the same wallet.dat, Then there will not be a "refund transaction" we'll call it, of 4btc  the 7 btc address will be depleted to zero, and the 11btc address will lose another 7btc to complete the full amout, Leaving you with 4btc in your 11btc address.

It will always deplete the smaller btc amount address first (from what i've experianced from using the bitcoin-qt wallet, This is not fact)


Then I'm not understanding something, because from what I read, someone had 900 BTC and send himself 1 and restored his drive, resulting in a 899 loss because he hadn't backed up the key generated to receive the 899 that was change for sending himself 1.

So has the protocol changed or did I not understand what happened?

QuarkCoin - what I believe bitcoin was intended to be. On reddit: http://www.reddit.com/r/QuarkCoin/
Open4lies
Sr. Member
****
Offline Offline

Activity: 552
Merit: 250


View Profile
June 14, 2013, 01:21:42 PM
 #5

the way bitcoin-qt uses inputs is not much predictable by my experience. It tries to join many small old inputs and dont care about fees


░░░░░░░░░░░░░░░░░░░░▄▄
░░░░░░░░░░░░░░░░░░░░████▄▄
░░░░░░░░░▄▄░░░░░░░░░████████
░░░░░▄▄██████▄▄░░░░░███████████▄▄
░▄▄██████████████▄▄███████████████▄
░▀▀██████████████▀▀░░░▀▀████████████
██▄▄▀▀██████▀▀░░░░░░░░░░░▀▀████████
██████▄▄▀▀░░░░░░░░░░░░░░░░░░▀███████
████████░░░░░░░░░▄▄▄░░░░░░░░░░░▀▀███
████████░░░░░▄▄███████▄▄░░░░░███▄▄░░▀
████████░░░███████████████░░░███████▄
░░▀▀████░░░░░▀▀███████▀▀░░░░░████████
██▄▄░░▀▀░░░░░░░░░▀▀▀░░░░░░░░░████████
██████▄▄░░░░░░░░░░░░░░░░░▄▄░░▀███████
████████░░░░░░░░░░░░░▄▄██████▄▄▀▀███
██████████▄▄░░░░▄▄██████████████▄▄
██████████████▄▄▀▀██████████████▀▀
░░▀▀████████████░░░░▀▀██████▀▀
░░░░░░▀▀████████░░░░░░░░▀▀
░░░░░░░░░▀▀██████
░░░░░░░░░░░░░▀▀██
OATH

████▀
███▀  ▀
██▀  ▀
█▀  ▀
▀  ▀
▄  ▄
█▄  ▄
██▄  ▄
███▄  ▄
████▄


▀████
▀  ▀███
▀  ▀██
▀  ▀█
▀  ▀
▄  ▄
▄  ▄█
▄  ▄██
▄  ▄███
▄████


             ▄████▄▄   ▄
█▄          ██████████▀▄
███        ███████████▀
▐████▄     ██████████▌
▄▄██████▄▄▄▄█████████▌
▀████████████████████
  ▀█████████████████
  ▄▄███████████████
   ▀█████████████▀
    ▄▄█████████▀
▀▀██████████▀
    ▀▀▀▀▀


                   ▄▄████
              ▄▄████████▌
         ▄▄█████████▀███
    ▄▄██████████▀▀ ▄███▌
▄████████████▀▀  ▄█████
▀▀▀███████▀   ▄███████▌
      ██    ▄█████████
       █  ▄██████████▌
       █  ███████████
       █ ██▀ ▀██████▌
       ██▀     ▀████
                 ▀█▌


█▄▄              █▄▄
█████▄▄         ██████▄▄
████████       ████████ █
████████ ██   ████████ ██
████████ ███ ████████ ███
████████ ████ ██████ ████
████████ █████ ████ █████
████████ ▀█████ ██ ██████
████████    ▀▀██  ███████
▀███████         ▀███████
   ▀▀███            ▀▀███
       ▀                ▀
mprep
Global Moderator
Legendary
*
Offline Offline

Activity: 3794
Merit: 2612


In a world of peaches, don't ask for apple sauce


View Profile WWW
June 14, 2013, 01:36:02 PM
 #6

the way bitcoin-qt uses inputs is not much predictable by my experience. It tries to join many small old inputs and dont care about fees
Yeah, probably that's true.

niko
Hero Member
*****
Offline Offline

Activity: 756
Merit: 501


There is more to Bitcoin than bitcoins.


View Profile
June 14, 2013, 01:44:25 PM
 #7

Pffbfbbfb what the heck is going on, Since when can the bitcoin wallet system----- OHHHHHHhhhhhhhhhhh I am so fucking stupid
If the 7btc and 11btc are in the same wallet.dat, Then there will not be a "refund transaction" we'll call it, of 4btc  the 7 btc address will be depleted to zero, and the 11btc address will lose another 7btc to complete the full amout, Leaving you with 4btc in your 11btc address.

It will always deplete the smaller btc amount address first (from what i've experianced from using the bitcoin-qt wallet, This is not fact)

This is completely wrong.

Question from OP is a good one, and different client software deals with it differently. It has nothing to do with Bitcoin protocol.  The issue of fragmentation/consolidation  has been on developers'  minds, just search the project development board.

They're there, in their room.
Your mining rig is on fire, yet you're very calm.
Foxpup
Legendary
*
Offline Offline

Activity: 4533
Merit: 3184


Vile Vixen and Miss Bitcointalk 2021-2023


View Profile
June 14, 2013, 10:52:01 PM
 #8

They all become part of the transaction, but everything in those addresses is sent and the change is returned to a fresh address.
Close. However, instead of addresses, it is previously received transactions that have to be spent in their entirety. eg, if you received BTC3 in one transaction and BTC4 in another transaction to the same address, each of those amounts would be treated separately (eg, you could send BTC2 and receive BTC1 change) even though they are at the same address.

So if I have 7 BTC in one address and 11 BTC in another and I buy something that costs 14 BTC, both addresses are emptied and 4 BTC is sent to fresh address in the wallet, 4 BTC that is mine but can't be spent until the confirmations are done, correct?
This is something that varies between wallets. While some work as you describe, others (including Bitcoin-Qt) do not actually require confirmations before change can be spent. There is no technical reason to wait for confirmations before sending coins, however unconfirmed transactions usually can't be trusted to not be double-spent. But since change is sent from yourself, to yourself, it is always trustworthy (unless you're trying to rip yourself off).

But will that eventually end up with a bunch of addresses that all have tiny amounts building up?
No. Think about what would happen if you did have a bunch of tiny amounts built up, and tried to spend them. Say you have BTC10 in ten lots of BTC1, and you want to send BTC4.5. You would take 5 of those BTC1 (and the recipient receives a single BTC4.5, so the individual BTC1 units don't exist anymore) and you would get a single BTC0.5 in change. About half of your "dust" is suddenly gone. The more "dust" you have, the more likely it is that a future transaction you send will consume a large chunk of it in this way.

Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
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!