Bitcoin Forum
December 04, 2016, 10:14:59 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Possible to send a transaction without sending ALL coins from your adress?  (Read 823 times)
Fuzzy
Hero Member
*****
Offline Offline

Activity: 560



View Profile
June 12, 2012, 06:13:21 AM
 #1

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.



1480846499
Hero Member
*
Offline Offline

Posts: 1480846499

View Profile Personal Message (Offline)

Ignore
1480846499
Reply with quote  #2

1480846499
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480846499
Hero Member
*
Offline Offline

Posts: 1480846499

View Profile Personal Message (Offline)

Ignore
1480846499
Reply with quote  #2

1480846499
Report to moderator
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
June 12, 2012, 06:17:16 AM
 #2

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
Hero Member
*****
Offline Offline

Activity: 728


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
June 12, 2012, 06:19:00 AM
 #3

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
Hero Member
*****
Offline Offline

Activity: 560



View Profile
June 12, 2012, 06:47:08 AM
 #4

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 Offline

Activity: 1008



View Profile
June 12, 2012, 06:53:45 AM
 #5

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 Offline

Activity: 1260


View Profile
June 12, 2012, 06:54:17 AM
 #6

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
Hero Member
*****
Offline Offline

Activity: 560



View Profile
June 12, 2012, 07:06:50 AM
 #7

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 Offline

Activity: 1218


Gerald Davis


View Profile
June 12, 2012, 07:12:49 AM
 #8

Yes it will work.  Blockchain.info wallet works this way
Revalin
Hero Member
*****
Offline Offline

Activity: 728


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
June 12, 2012, 07:18:34 AM
 #9

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
*
Offline Offline

Activity: 1694



View Profile
June 12, 2012, 07:39:53 AM
 #10

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 unverifiable things (while actually eating an enchilada-style burrito) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
da2ce7
Legendary
*
Offline Offline

Activity: 1218


Live and Let Live


View Profile
June 12, 2012, 12:19:43 PM
 #11

Sending change to a new address becomes a non-issue when the client finally supports deterministic wallets.  Grin

One off NP-Hard.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!