Author

Topic: send BTC generate new address? (Read 1656 times)

donator
Activity: 362
Merit: 250
February 28, 2012, 10:19:03 PM
#16
I finally got back to trying this and it seems to work just fine using bitcoind 0.5.2.  I believe this is what robocop was looking for and shows it is possible in the standard client if you take a step first to isolate the account and ensure that you always send the entire remaining balance to the desired address.  Just keep in mind that this will expose the exact remaining balance of the account/address to anyone you send BTC.

To make things easier while playing with this I made a quick script to generate the sendmany command for sending a payment to a single address and automatically send the remaining balance (-0.0005 tx fee) back to the specified address.  It assumes you are using an address in the default "" account in a dedicated wallet.

Code:
#!/bin/bash
# Usage: send.sh
echo "./bitcoind sendmany \"\" '{\"$2\":$3,\"$1\":`echo "(\`./bitcoind getbalance "" 0\`-$3-0.0005)"|bc`}'"

p.s. Holliday - I should have figured this out before running that p2pool donation cron job; it would have tracked correctly like we had wanted!!
donator
Activity: 362
Merit: 250
February 16, 2012, 10:06:47 AM
#15
I thought sendmany allows you to specify from which "account" you are sending, so you could create a new "account" first and move BTC to an address there to isolate the inputs.
full member
Activity: 154
Merit: 102
Bitcoin!
February 16, 2012, 10:00:32 AM
#14
Couldn't you just use "sendmany" to send to the recipient and back to your own address?  (I haven't tried this)
Yes, you can.

Except you don't know which input sendmany is going to use, so you don't know how much to send back.
True, I stand corrected. So with the (unmodified) Satoshi client, the best answer is you really can't.
legendary
Activity: 1072
Merit: 1181
February 16, 2012, 09:59:09 AM
#13
Couldn't you just use "sendmany" to send to the recipient and back to your own address?  (I haven't tried this)
Yes, you can.

Except you don't know which input sendmany is going to use, so you don't know how much to send back.
full member
Activity: 154
Merit: 102
Bitcoin!
February 16, 2012, 09:58:23 AM
#12
Couldn't you just use "sendmany" to send to the recipient and back to your own address?  (I haven't tried this)
Yes, you can.
donator
Activity: 362
Merit: 250
February 16, 2012, 09:56:55 AM
#11
Couldn't you just use "sendmany" to send to the recipient and back to your own address?  (I haven't tried this)
sr. member
Activity: 252
Merit: 250
February 15, 2012, 05:30:19 PM
#10
Thx all for your helping answers. Now I have what I want.
I will use Multibit for my new project. More informations coming soon. ;-)
donator
Activity: 308
Merit: 250
February 15, 2012, 04:32:19 PM
#9
This isn't technically possible. There is no way to spend just part of the balance of an address. You have to spend it all, so the client sends the rest ("change") back to itself.

This is not correct. There is no way to spend just part of a single transaction output ("coin"), but the balance of an address may consist of several transaction outputs, in which case they can be spent individually.
My apologies. What I meant to say instead of address was output (or input, depending on where you're looking from).
legendary
Activity: 1072
Merit: 1181
February 15, 2012, 04:25:49 PM
#8
This isn't technically possible. There is no way to spend just part of the balance of an address. You have to spend it all, so the client sends the rest ("change") back to itself.

This is not correct. There is no way to spend just part of a single transaction output ("coin"), but the balance of an address may consist of several transaction outputs, in which case they can be spent individually.
legendary
Activity: 1652
Merit: 2301
Chief Scientist
February 15, 2012, 04:16:15 PM
#7
If I have 50 BTC on my address and I want to send 10 BTS to another address then the rest of 50 BTC = 40 BTC will sent to a new generated address.
I know that was integrated to make the flow more anonymous.

Is there a possibilty to deactivate this function?

Because I need a clean simple transaction history where I and other users can check it.

I've got a "noprivacy" branch of bitcoin that I use for the Faucet:
  https://github.com/gavinandresen/bitcoin-git/tree/noprivacy

Instead of creating a new address for change, it uses one of the input's addresses.

It works nicely if your entire bitcoin balance is one "account", but will fail if you're using the accounts feature to keep track of separate balances (which is why it will probably never be a mainline feature).

legendary
Activity: 1708
Merit: 1066
February 15, 2012, 02:51:10 PM
#6
Whilst you cannot specify a change address, MultiBit sends the change back to the original sending address (not a new address).
This might be 'clean' enough for the OP.

For instance, if you look at a transaction I just made in MultiBit:

http://blockchain.info/tx-index/15642797/8877b6e815e319d0153ec7d4aa3b952c9f246b8a98a75bde858350bd4ba3d19b

You can see that the 0.01 BTC went from 1Kqnx... to 1Jixz... and the change went back to 1Kqnx...
donator
Activity: 1218
Merit: 1079
Gerald Davis
February 15, 2012, 02:45:24 PM
#5
If I have 50 BTC on my address and I want to send 10 BTS to another address then the rest of 50 BTC = 40 BTC will sent to a new generated address.
I know that was integrated to make the flow more anonymous.

Is there a possibilty to deactivate this function?

Because I need a clean simple transaction history where I and other users can check it.

You could (w/ a modified client) specify which change address you want the 40 BTC sent to.

Alternatively you could create a mult-spend transaction sending 10 BTC to A and 40 BTC to B and thus the change will be zero.

It is completely impossible to just send 10 from an address which has 50 BTC (from one output).  Bitcoin doesn't move values it moves prior outputs.

Your address has 50 BTC because there is some prior transaction(s) which has it as an ouput.  When you "spend" or "move" coins what you are actually doing is specifying a prior output and directing it to a new input.  You can specify part of an output.

donator
Activity: 308
Merit: 250
February 15, 2012, 02:40:18 PM
#4
This isn't technically possible. There is no way to spend just part of the balance output of an address. You have to spend it all, so the client sends the rest ("change") back to itself.
hero member
Activity: 560
Merit: 501
February 15, 2012, 02:35:32 PM
#3
Is there a possibilty to deactivate this function?

I believe you are asking to specify the address for the "change" to land at.

The only client that I'm aware of that lets you choose the address where the change should land at is My Wallet from http://BlockChain.info/wallet (which is a  Javascript wallet accessed from a browser)

A workaround is, using the bitcoin-qt client, to make more than one transaction.  So you would send a 10 BTC payment and then click "add recipient" to send the 40 BTC (or 39.9995 to account if paying a 0.0005 fee) right back to the address that you would be sending from.

I think what this person is asking for is a way to have a transaction with only a single output. This is what they're referring to when they mean a "clean" transaction.

To answer the question:
Yes and no. In the scenario you describe, I would send the 10BTC to an address you still control, and to the recipient from there - if there weren't any fees there should only be a single output.
legendary
Activity: 2506
Merit: 1010
February 15, 2012, 02:18:59 PM
#2
Is there a possibilty to deactivate this function?

I believe you are asking to specify the address for the "change" to land at.

The only A client that I'm aware of that lets you choose the address where the change should land at is My Wallet from http://BlockChain.info/wallet (which is a  Javascript wallet accessed from a browser)

A workaround is, using the bitcoin-qt client, to make more than one transaction.  So you would send a 10 BTC payment and then click "add recipient" to send the 40 BTC (or 39.9995 to account if paying a 0.0005 fee) right back to the address that you would be sending from.

 [Update: A client that sends the change back to an input address is MultiBit -- see jim618's response below.]
sr. member
Activity: 252
Merit: 250
February 15, 2012, 12:10:22 PM
#1
If I have 50 BTC on my address and I want to send 10 BTS to another address then the rest of 50 BTC = 40 BTC will sent to a new generated address.
I know that was integrated to make the flow more anonymous.

Is there a possibilty to deactivate this function?

Because I need a clean simple transaction history where I and other users can check it.
Jump to: