jaminunit (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 132
Merit: 14
Co-Founder of TheStandard.io & Vaultoro.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 06, 2013, 02:21:58 PM |
|
Hi yall, So I'm creating a little game for fun and want to automatically send winnings back to the address that funded the game. I see that http://bitbet.us/ did this. You can send them a bitcoin and they will send you any winnings back to the address it came from. I have looked all through https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list but can't seem to find the function that does that.
|
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 06, 2013, 02:22:42 PM |
|
Try get txid and then analyze this transaction.
|
|
|
|
jaminunit (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 132
Merit: 14
Co-Founder of TheStandard.io & Vaultoro.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 06, 2013, 02:35:14 PM |
|
Thanks Come-from-Beyond Hmmm this only seems to get me the receiving address
|
|
|
|
jaminunit (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 132
Merit: 14
Co-Founder of TheStandard.io & Vaultoro.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 06, 2013, 02:43:21 PM |
|
Oh ok the address is hashed.
Any tips on how to unhash it
|
|
|
|
|
kjj
Legendary
Offline
Activity: 1302
Merit: 1026
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 06, 2013, 02:57:24 PM |
|
The bitcoin system has no such concept of a "from address", as has been explained in hundreds of threads.
|
17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8 I routinely ignore posters with paid advertising in their sigs. You should too.
|
|
|
jaminunit (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 132
Merit: 14
Co-Founder of TheStandard.io & Vaultoro.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 06, 2013, 03:03:41 PM Last edit: May 06, 2013, 04:28:26 PM by jaminunit |
|
Oh ok, So does satoshi dice use the blockchain.ino api?
|
|
|
|
jaminunit (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 132
Merit: 14
Co-Founder of TheStandard.io & Vaultoro.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 06, 2013, 06:07:21 PM |
|
Ok after a heap of dry reading I think I'm going to have to change the way I track incoming and outgoing addresses and funding.
|
|
|
|
bukaj
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 06, 2013, 06:51:26 PM |
|
Ok after a heap of dry reading I think I'm going to have to change the way I track incoming and outgoing addresses and funding.
What was your idea and why you think it is wrong? I'm asking, because I'm working on accepting coins myself.
|
|
|
|
kjj
Legendary
Offline
Activity: 1302
Merit: 1026
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 06, 2013, 07:38:37 PM |
|
The short version is that coins don't "come from" anywhere. If you look at your coins, you can do a little detective work and try to figure out the last place they went to before they went to your wallet. But when they came to your wallet, they didn't come from that place.
And that is for simple transactions, it can get worse.
|
17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8 I routinely ignore posters with paid advertising in their sigs. You should too.
|
|
|
bukaj
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 06, 2013, 07:44:39 PM |
|
I get it. Thank you.
|
|
|
|
niko
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 07, 2013, 07:47:36 AM |
|
The short version is that coins don't "come from" anywhere. If you look at your coins, you can do a little detective work and try to figure out the last place they went to before they went to your wallet. But when they came to your wallet, they didn't come from that place.
And that is for simple transactions, it can get worse.
Coins come from tx inputs, and go into tx outputs. If coins "don't come from anywhere," there is no way for any node to validate a transaction, and Bitcoin doesn't work.
|
They're there, in their room. Your mining rig is on fire, yet you're very calm.
|
|
|
kjj
Legendary
Offline
Activity: 1302
Merit: 1026
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 07, 2013, 11:18:01 AM |
|
The short version is that coins don't "come from" anywhere. If you look at your coins, you can do a little detective work and try to figure out the last place they went to before they went to your wallet. But when they came to your wallet, they didn't come from that place.
And that is for simple transactions, it can get worse.
Coins come from tx inputs, and go into tx outputs. If coins "don't come from anywhere," there is no way for any node to validate a transaction, and Bitcoin doesn't work. I think you are taking some metaphors too literally.
|
17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8 I routinely ignore posters with paid advertising in their sigs. You should too.
|
|
|
niko
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 07, 2013, 11:34:06 AM |
|
The short version is that coins don't "come from" anywhere. If you look at your coins, you can do a little detective work and try to figure out the last place they went to before they went to your wallet. But when they came to your wallet, they didn't come from that place.
And that is for simple transactions, it can get worse.
Coins come from tx inputs, and go into tx outputs. If coins "don't come from anywhere," there is no way for any node to validate a transaction, and Bitcoin doesn't work. I think you are taking some metaphors too literally. I think there such thing as "from" address(es), and we can see them for any given transaction.
|
They're there, in their room. Your mining rig is on fire, yet you're very calm.
|
|
|
kjj
Legendary
Offline
Activity: 1302
Merit: 1026
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 07, 2013, 11:36:13 AM |
|
The short version is that coins don't "come from" anywhere. If you look at your coins, you can do a little detective work and try to figure out the last place they went to before they went to your wallet. But when they came to your wallet, they didn't come from that place.
And that is for simple transactions, it can get worse.
Coins come from tx inputs, and go into tx outputs. If coins "don't come from anywhere," there is no way for any node to validate a transaction, and Bitcoin doesn't work. I think you are taking some metaphors too literally. I think there such thing as "from" address(es), and we can see them for any given transaction. Well, as long as you don't mind being wrong, you are free to keep thinking that. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8 I routinely ignore posters with paid advertising in their sigs. You should too.
|
|
|
niko
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 07, 2013, 12:28:33 PM |
|
The short version is that coins don't "come from" anywhere. If you look at your coins, you can do a little detective work and try to figure out the last place they went to before they went to your wallet. But when they came to your wallet, they didn't come from that place.
And that is for simple transactions, it can get worse.
Coins come from tx inputs, and go into tx outputs. If coins "don't come from anywhere," there is no way for any node to validate a transaction, and Bitcoin doesn't work. I think you are taking some metaphors too literally. I think there such thing as "from" address(es), and we can see them for any given transaction. Well, as long as you don't mind being wrong, you are free to keep thinking that. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Explain how this is wrong: every transaction (other than generation-only) includes the public key of the payer (and the ECDSA signature using the corresponding private key of the payer). Payer's public key is thus revealed, and "from" address is simply the RIPEMD-160(SHA-256(PubKey)). Explicit example: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FeGWAQob.png&t=665&c=XXcxd5aLd_muPg) Of course, if there are multiple inputs, there will be multiple "from" addresses.
|
They're there, in their room. Your mining rig is on fire, yet you're very calm.
|
|
|
kjj
Legendary
Offline
Activity: 1302
Merit: 1026
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 07, 2013, 12:56:54 PM |
|
Explain how this is wrong: every transaction (other than generation-only) includes the public key of the payer (and the ECDSA signature using the corresponding private key of the payer). Payer's public key is thus revealed, and "from" address is simply the RIPEMD-160(SHA-256(PubKey)). Explicit example: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FeGWAQob.png&t=665&c=XXcxd5aLd_muPg) Of course, if there are multiple inputs, there will be multiple "from" addresses. Outputs have scripts, not addresses. And the recognition that transactions have lists of inputs and outputs should give you pause before thinking that you can connect an output to an input, in general. Look at these two transactions, and tell me what the "from" address for each one was. 997e5182...0f463847...P.S. blockexplorer.com having a column titled "From Address" doesn't make it so. And the tooltip note is wrong.
|
17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8 I routinely ignore posters with paid advertising in their sigs. You should too.
|
|
|
niko
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 07, 2013, 02:57:56 PM |
|
Outputs have scripts, not addresses. Not sure how this relates to the question of (non)existence of "from" addresses. And the recognition that transactions have lists of inputs and outputs should give you pause before thinking that you can connect an output to an input, in general.
Again, nothing to do with the issue discussed here. I never mentioned connecting an output to an input in the same transaction (the sum total needs to match, including miner's fees, that is all - no point connecting particular inputs to particular outputs). We agree there, but it is irrelevant. The first one seems to be a multisig attempt from 35nGJpcQr4pYVyFVR3BPbdaWUSk6NBryUD, discussed here.The second one clearly lists all addresses associated with (many) inputs. These are the "from" addresses. It's quite simple, can't we agree on this? OP was asking about "from" addresses, but was told there was no such thing in Bitcoin. I claim this is false, as transaction inputs specify public keys which translate into corresponding addresses. The coins are thus sent from these addresses, in the sense that control (ownership) of coins is reassigned from these "from" addresses (and the corresponding key pairs) to the receiveing addresses (and the corresponding key pairs).
|
They're there, in their room. Your mining rig is on fire, yet you're very calm.
|
|
|
Come-from-Beyond
Legendary
Offline
Activity: 2142
Merit: 1010
Newbie
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 07, 2013, 03:32:55 PM |
|
Outputs have scripts, not addresses.
Outputs have predicates, not scripts. ![Grin](https://bitcointalk.org/Smileys/default/grin.gif)
|
|
|
|
kjj
Legendary
Offline
Activity: 1302
Merit: 1026
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
May 07, 2013, 04:55:43 PM |
|
The second one clearly lists all addresses associated with (many) inputs. These are the "from" addresses.
It's quite simple, can't we agree on this?
OP was asking about "from" addresses, but was told there was no such thing in Bitcoin. I claim this is false, as transaction inputs specify public keys which translate into corresponding addresses. The coins are thus sent from these addresses, in the sense that control (ownership) of coins is reassigned from these "from" addresses (and the corresponding key pairs) to the receiveing addresses (and the corresponding key pairs).
In doing so, you have redefined "from" to mean "the last address that it was sent to". If muddling the two concepts works for you, then enjoy, I guess. However, when people come here asking this question, they are trying to do something. The something that they are doing is dangerous, and never the correct way to solve the (real) problem they have. Typically, what they really want is a return address. Bitcoin has no such concepts. There is no return address, just like there is no sending address. People working with bitcoin need to accept the system as it really is, not the way they want it to be. They can choose not to, as you have, but they do so at their own peril, and I won't encourage them down that road. Bitcoin transactions connect other transactions to scripts. They do not connect addresses to addresses. Just because you can sometimes (or even usually) find an address that controlled a now-redeemed transaction does not mean that the new transaction came from that address. There is no general solution, because the concepts simply do not exist in the system. Do you understand that? You are finding things that exist in some transactions that have properties similar to the thing you are looking for, and you claim that they are the thing you are looking for. What address did this little guy come from?
|
17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8 I routinely ignore posters with paid advertising in their sigs. You should too.
|
|
|
|