3

Usually, a Bitcoin wallet includes multiple addresses, and each address has a balance of 0 or more Bitcoins. When a payment is sent out, outgoing Bitcoins are taken from one or more addresses, depending on their balance.

Is it possible to choose the transaction source address (assuming that specific address has enough balance, of course)?

I can think of two ways to manually enforce it:

  • Use (or create) a new wallet with a single address, send Bitcoins from your main wallet to that address, then send the payment from the new wallet.
  • Move all the Bitcoins in your wallet to a single address in the same wallet; then each new payment will have to be origined from that address.

Is there any simpler way to obtain this?

If this feature is not included in the reference client, does any other wallet include it?

3
  • Why do you want this? It's privacy destroying and puts user funds at an unnecessary risk. It's completely intentional that this behavior exists and you shouldn't be trying to change it. If you want to send "refunds" to an address, know that the payment protocol has provisions for this.
    – user13413
    Feb 28, 2014 at 13:59
  • I'm developing a system which needs to track when user A sends a given amount to user B, but I want to do this without having the users create accounts and send confirmation emails. A user would register his/her Bitcoin address, and then use that for all transactions. Validating transactions would only require a blockchain lookup and would be fully automatic. But if you can't choose your source address, this is unfeasible...
    – Massimo
    Feb 28, 2014 at 14:58
  • N.B. I have devised a few additional ways for the system to work, but being able to track source addresses would be by far the easiest. I just want to know if selecting a source addess is possible (in an easy way) for the end user.
    – Massimo
    Feb 28, 2014 at 15:30

2 Answers 2

1

As of version 0.9.0, the bitcoin-qt reference client includes a "coin control" feature. When you create a transaction, it lets you explicitly select which past transactions will be used as inputs. You can enable this feature via the Display tab in the Options dialog.

This accomplishes what you are asking for.

0

The simplest way to obtain this behavior is to use a client operating from only one bitcoin address. Whilst I do not have an overview of which ones might do it, I suspect you should be able to configure any, including the standard client, to do this by setting a size for the pool of bitcoin address it generates for its wallet to one (a possible caveat might be that some clients might refuse to use the originating address as change address). Getting your users to consistently abide by configuring their bitcoin client/wallet used with your service could be the real problem here.

I'm quite aware of a possible use case, where for reasons of knowing your customer or doing due dilligence or even just some internal requirement you want to be sure funds are coming from the same known source. But unless you both have such requirements and lack the flexibility to find different solutions to it, you may be better served by the usual approach to tracking payments for particular purposes: Create a new bitcoin address for every payment you expect. This can equally easily be automatically validated by monitoring the blockchain, and does not need any actually automated address generation as this could happen offline in advance (with the automatic validation only having a list of public bitcoin addresses to monitor, not their private keys). If, as you explain it, you want to do this on behalf of someone else, you would ideally ask them to generate such a (long) list of bitcoin addresses they are willing to accept payment to. Then you have all you need to monitor if any of them received any payment.

4
  • The thing is, I'm not receiving payments here; users will transfer Bitcoins between themselves, and the system will never hold any funds for them; but it needs to track when these payments actually happen. Tracking sourse addresses would have been the easiest thing to do here, but since they can't be forced (at least not easily), I'll need to implement something else.
    – Massimo
    Feb 28, 2014 at 18:35
  • I understand, and yes, that's not as trivial. Yet, with apologies for repeating myself: "If, as you explain it, you want to do this on behalf of someone else, you would ideally ask them to generate such a (long) list of bitcoin addresses they are willing to accept payment to." To me, that still seems (marginally) better than to require payments to be made from a single address. But of course it's not significantly better.
    – user6049
    Feb 28, 2014 at 18:45
  • This still wouldn't do: those addresses could send and receive payments from/to everyone else. In order to confirm a payment was actually made from an user to another one, I'd need to track both the source and the destination address. Oh, well, time to use a different approach.
    – Massimo
    Feb 28, 2014 at 18:59
  • Well, just as your orignial scheme works if and only if you can convince users to abide by the rule of using a single bitcoin address to make payments from, this would depend on them agreeing not to use receiving addresses for any other purpose (including as destination for own change). Good luck finding something better! Maybe 2-out-of-2 multsig could work? A sends to AB and signs for sending from AB to B. B can complete that second leg, and knows it must have come from A... seems excessively indirect and complicated, but avoids the worries you have with the schemes discussed above.
    – user6049
    Feb 28, 2014 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.