Bitcoin Forum
November 11, 2024, 05:49:36 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoin-qt return addresses  (Read 749 times)
erik777 (OP)
Sr. Member
****
Offline Offline

Activity: 504
Merit: 250


Earn with impressio.io


View Profile
March 22, 2013, 05: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)?

.▄███     ██████     ███▄
██████   ███████   ██████
 ██████ ██████████ ██████
  ██████████████████████
   █████████  ████████
    ██████    ██████
    ███████    ██████
   █████████  █████████
  ██████████████████████
 ██████ ██████████ ██████
██████   ██████   ██████
 ▀███     ██████     ███▀
IMPRESSIO     ▄███████████████▄
     ██             ██
     ▀███████████████▀
           ██ ██
           ██ ██
       ▄▄█████████▄▄ ▄███▄
    ▄███▀▀       ▀▀████ ▀██▄
  ▄██▀   ▄▄█████▄▄   ▀██▄ ██
 ▄██  ▄███  █  █████▄  ██▄█▀
 ██  ███         █████  ██
██  ██████  ███   █████  ██
██  ██████  ▀▀▀  ▄█████  ██
██  ██████  ▄▄▄▄  █████  ██
██  ██████  ████   ████  ██
 ██  ███          ████  ██
 ▀██  ▀███  █  █████▀  ██▀
  ▀██▄   ▀▀█████▀▀   ▄██▀
    ▀███▄▄       ▄▄███▀
       ▀▀█████████▀▀
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
March 22, 2013, 06: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.
erik777 (OP)
Sr. Member
****
Offline Offline

Activity: 504
Merit: 250


Earn with impressio.io


View Profile
March 23, 2013, 04:41:06 AM
 #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?


.▄███     ██████     ███▄
██████   ███████   ██████
 ██████ ██████████ ██████
  ██████████████████████
   █████████  ████████
    ██████    ██████
    ███████    ██████
   █████████  █████████
  ██████████████████████
 ██████ ██████████ ██████
██████   ██████   ██████
 ▀███     ██████     ███▀
IMPRESSIO     ▄███████████████▄
     ██             ██
     ▀███████████████▀
           ██ ██
           ██ ██
       ▄▄█████████▄▄ ▄███▄
    ▄███▀▀       ▀▀████ ▀██▄
  ▄██▀   ▄▄█████▄▄   ▀██▄ ██
 ▄██  ▄███  █  █████▄  ██▄█▀
 ██  ███         █████  ██
██  ██████  ███   █████  ██
██  ██████  ▀▀▀  ▄█████  ██
██  ██████  ▄▄▄▄  █████  ██
██  ██████  ████   ████  ██
 ██  ███          ████  ██
 ▀██  ▀███  █  █████▀  ██▀
  ▀██▄   ▀▀█████▀▀   ▄██▀
    ▀███▄▄       ▄▄███▀
       ▀▀█████████▀▀
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1086


Ian Knowles - CIYAM Lead Developer


View Profile WWW
March 23, 2013, 04:52:34 AM
 #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).

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5376
Merit: 13407


View Profile
March 23, 2013, 05: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.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
March 23, 2013, 05: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.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
March 23, 2013, 05: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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!