Author

Topic: Possible to send a transaction without sending ALL coins from your adress? (Read 1049 times)

legendary
Activity: 1222
Merit: 1016
Live and Let Live
Sending change to a new address becomes a non-issue when the client finally supports deterministic wallets.  Grin
legendary
Activity: 4542
Merit: 3393
Vile Vixen and Miss Bitcointalk 2021-2023
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.
hero member
Activity: 728
Merit: 500
165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
It's no technicality.  It works just fine.

Again, this will fully use all of JUST the inputs (not the whole balance of A).
donator
Activity: 1218
Merit: 1079
Gerald Davis
Yes it will work.  Blockchain.info wallet works this way
hero member
Activity: 560
Merit: 500
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?
legendary
Activity: 1204
Merit: 1015
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.
legendary
Activity: 1015
Merit: 1001
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.
hero member
Activity: 560
Merit: 500
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.
hero member
Activity: 728
Merit: 500
165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
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.
donator
Activity: 1218
Merit: 1079
Gerald Davis
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.
hero member
Activity: 560
Merit: 500
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.



Jump to: