Author

Topic: bitcoin-qt return addresses (Read 749 times)

legendary
Activity: 3472
Merit: 4794
March 23, 2013, 12:22:19 AM
#7
- snip -
First question:  With three to choose from how did it pick this address?
- snip -

The wallet spends a previously received output in entirety.  If the other tow addresses hadn't received any bitcoins then the previous output that was spent was the one that was sent to that address that you saw.

The receiver address on the tablet transaction details was not the address the coins were sent to.

This is unlikely.  You'd have to provide details (bitcoin addresses, transactionIDs) for me to identify what you were actually seeing, but I suspect that the transaction had two outputs, one to the address the coins were sent to and another to send the change back to a newly created (and hidden from you) "change" address in Bitcoin-Qt.

I then sent another 0.01 without a fee, and it arrived OK in the tablet.  But, not only did the the sender address not match any of the three in the Qt client, that address was what was the receiver address in the first 0.01 address.  How is this possible?

As has been explained, there is no "sender address" there is only a previously unspent output.  The output that you are referring to as the "sender address" was the "change" from the first transaction being sent back to Bitcoin-Qt.  In the second transaction, this change output is then spent.  When Bitcoin-Qt creates a "change" address, it keeps track of it for you in the wallet.dat file but doesn't tell you about that new address in the user interface.
legendary
Activity: 3472
Merit: 4794
March 23, 2013, 12:14:56 AM
#6
If you want to be able to send bitcoin to someone, the proper and only reliable way to do it is for you to provide them with a way to tell you what address they want the bitcoins sent to.  If you try to guess what address to use based on some analysis of a transaction that you receive from them, you will manage in most cases to get lucky and guess at an address that will end up with bitcoins being delivered to their wallet, but you will fail and end up with bitcoins somewhere unintended often enough to at best soil the reputation of your service and quite possibly increase your costs in dealing with the situation.
administrator
Activity: 5222
Merit: 13032
March 23, 2013, 12:09:22 AM
#5
It's not recommended. SatoshiDice does it, but notice that they have this warning:

Quote
Only use wallets that allow you to receive Bitcoin from the same address you sent from. If you're not sure, test with .001 Bitcoins. If you get nothing back, then your wallet is not compatible.

If you do "auto-refunds" without a similar warning, people will lose money and be very angry.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
March 22, 2013, 11:52:34 PM
#4
Perhaps I should of said "Sender address", which I anticipate mainstream users will interpret as the "reply-to address".  

There really is no such thing - there are only UTXOs (which could either be from "coinbase" on from one or more previously unspent outputs that was part of someone's "wallet" whose output addresses generally are not anything that would or should be known to the the recipient).

In short if you want to determine who sent you a payment then create a unique payment address for them to pay to (the software and indeed the protocol are not designed to do this).
sr. member
Activity: 504
Merit: 250
Earn with impressio.io
March 22, 2013, 11:41:06 PM
#3
if a user sends coins to the return address on a transaction, will it always go to the sender (presuming that the sender is still running the same client and wallet)?

What return address?  Bitcoin doesn't have return addresses.

If you send bitcoin to a randomly selected address from one of the inputs in the transaction, the person with the private key to that address will "receive" the bitcoins.  That person may, or may not, be the "sender" of the bitcoins depending on how they sent them and what wallet they are using.

Perhaps I should of said "Sender address", which I anticipate mainstream users will interpret as the "reply-to address".   

Let me rephrase:

Before diving into bitcoinj, I'm trying to do testing to fully understand the behaviour and limitation of bitcoin and its clients.

So, I have Bitcoin Qt running on Linux with coinage, and Bitcion Wallet by Andreas
Schildbach running on Android.  The latter uses bitcoinj 0.8.

To test micropayments, I sent 0.01 with a tiny fee to the tablets.  On the tablet, it showed the sender address as being one of three addresses I had setup under the Receive Coins tab of Qt on the desktop.  First question:  With three to choose from how did it pick this address?  The receiver address on the tablet transaction details was not the address the coins were sent to.

I then sent another 0.01 without a fee, and it arrived OK in the tablet.  But, not only did the the sender address not match any of the three in the Qt client, that address was what was the receiver address in the first 0.01 address.  How is this possible?

legendary
Activity: 3472
Merit: 4794
March 22, 2013, 01:21:05 PM
#2
if a user sends coins to the return address on a transaction, will it always go to the sender (presuming that the sender is still running the same client and wallet)?

What return address?  Bitcoin doesn't have return addresses.

If you send bitcoin to a randomly selected address from one of the inputs in the transaction, the person with the private key to that address will "receive" the bitcoins.  That person may, or may not, be the "sender" of the bitcoins depending on how they sent them and what wallet they are using.
sr. member
Activity: 504
Merit: 250
Earn with impressio.io
March 22, 2013, 12:58:31 PM
#1
if a user sends coins to the return address on a transaction, will it always go to the sender (presuming that the sender is still running the same client and wallet)?
Jump to: