Fuzzy (OP)
|
|
June 12, 2012, 06:13:21 AM |
|
Does the bitcoin protocol support the ability to send a portion of your balance from address A to someone else's address X without sending ALL the coins from address A?
As I understand, the default transaction method in the standard client would take all the coins from A, send whatever amount you specified to address X, and send the remainder to address B, which is just another address in your wallet address pool.
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
|
June 12, 2012, 06:17:16 AM |
|
No.
The reason why is Bitcoin doesn't know/care about address balances. You spend (use as inputs) prior tx ouputs. We call these outputs "unspent" outputs. Due to the way that Bitcoin tx are constructed any Output can only be spent once. So all outputs can be classified as either spent or unspent. The spent ones can be pruned away and the sum of all the unspent outputs for which you have private keys is the "value" of your wallet.
As a technicallity you can "send" less than the value of an output but the output is still totally spent. If you create tx with 50 BTC input and 1 BTC output then you just created a tx w/ a 49 BTC tx fee. Lucky miner to be the one who mines that block.
|
|
|
|
Revalin
|
|
June 12, 2012, 06:19:00 AM |
|
Close. It will take all the coins from certain prior outputs in address A - but not necessarily the whole balance since there may be other transactions - and send them all to X and B. It already does this routinely.
It is not possible to spend only part of a transaction. You have to generate change unless you're spending the exact amount of one of the prior outputs.
|
War is God's way of teaching Americans geography. --Ambrose Bierce Bitcoin is the Devil's way of teaching geeks economics. --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
|
|
|
Fuzzy (OP)
|
|
June 12, 2012, 06:47:08 AM |
|
Interesting. Could you then Just have a wallet with two addresses, A and B, and bounce the change from one to the other when sending to X?
ie, your wallet has address A and B only, and A holds 50 BTC. X,Y,Z are various addresses you want to send coins to.
A sends 10 to X, remaining 40 to B
B now has 40 BTC.
B sends 10 to Y, remaining 30 to A
A now has 30 BTC
A sends 10 to Z, remaining 20 to B
B now has 20 BTC.
etc etc...
I'm looking at the possibility of hard-coding the private keys for A and B into an executable, in case anyone is wondering why I'm asking.
|
|
|
|
bitcats
Legendary
Offline
Activity: 1014
Merit: 1001
|
|
June 12, 2012, 06:53:45 AM |
|
Does the bitcoin protocol support the ability to send a portion of your balance from address A to someone else's address X without sending ALL the coins from address A?
As I understand, the default transaction method in the standard client would take all the coins from A, send whatever amount you specified to address X, and send the remainder to address B, which is just another address in your wallet address pool.
You can use Electrum if you automatically want to get the change back to the sending address.
|
"Unser Problem ist nicht ziviler Ungehorsam, unser Problem ist ziviler Gehorsam." - Howard Zinn
|
|
|
Maged
Legendary
Offline
Activity: 1204
Merit: 1015
|
|
June 12, 2012, 06:54:17 AM |
|
Oh, in that case, let me add an important detail: the change address can be any Bitcoin address, including an address that signed an input.
So, A sends 10 to X, remaining 40 to A.
|
|
|
|
Fuzzy (OP)
|
|
June 12, 2012, 07:06:50 AM |
|
Oh, in that case, let me add an important detail: the change address can be any Bitcoin address, including an address that signed an input.
So, A sends 10 to X, remaining 40 to A.
Bingo! Talk about a technicality o.O Just to be sure, can anyone confirm this will work without some other technical catch?
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
|
June 12, 2012, 07:12:49 AM |
|
Yes it will work. Blockchain.info wallet works this way
|
|
|
|
Revalin
|
|
June 12, 2012, 07:18:34 AM |
|
It's no technicality. It works just fine.
Again, this will fully use all of JUST the inputs (not the whole balance of A).
|
War is God's way of teaching Americans geography. --Ambrose Bierce Bitcoin is the Devil's way of teaching geeks economics. --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
|
|
|
Foxpup
Legendary
Online
Activity: 4532
Merit: 3183
Vile Vixen and Miss Bitcointalk 2021-2023
|
|
June 12, 2012, 07:39:53 AM |
|
Oh, in that case, let me add an important detail: the change address can be any Bitcoin address, including an address that signed an input.
So, A sends 10 to X, remaining 40 to A.
Bingo! Talk about a technicality o.O Just to be sure, can anyone confirm this will work without some other technical catch? There's no technical catch, just a privacy catch: by using a different address for change, there is no way to know with absolute certainty (though you can make an educated guess) which address is the recipient and which is the change; sending change to the original address removes the guesswork involved in determining who the recipient is.
|
Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4I 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!
|
|
|
da2ce7
Legendary
Offline
Activity: 1222
Merit: 1016
Live and Let Live
|
|
June 12, 2012, 12:19:43 PM |
|
Sending change to a new address becomes a non-issue when the client finally supports deterministic wallets.
|
One off NP-Hard.
|
|
|
|