Bitcoin Forum
May 04, 2024, 02:50:23 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: valid assumption?: scriptSig can be used to return coins to sender?  (Read 1218 times)
monsterer (OP)
Legendary
*
Offline Offline

Activity: 1008
Merit: 1000


View Profile
October 15, 2013, 03:21:09 PM
 #1

Hi guys,

Trying to work out if I can use the pubKey part of scriptSig in an transaction VIN, to hash in order to generate a valid return address for the sender of the transaction, for plain pay to pub key transaction types?

Cheers, Paul.
1714791023
Hero Member
*
Offline Offline

Posts: 1714791023

View Profile Personal Message (Offline)

Ignore
1714791023
Reply with quote  #2

1714791023
Report to moderator
1714791023
Hero Member
*
Offline Offline

Posts: 1714791023

View Profile Personal Message (Offline)

Ignore
1714791023
Reply with quote  #2

1714791023
Report to moderator
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714791023
Hero Member
*
Offline Offline

Posts: 1714791023

View Profile Personal Message (Offline)

Ignore
1714791023
Reply with quote  #2

1714791023
Report to moderator
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
October 15, 2013, 03:40:00 PM
 #2

Trying to work out if I can use the pubKey part of scriptSig in an transaction VIN, to hash in order to generate a valid return address for the sender of the transaction, for plain pay to pub key transaction types?
This is not a safe assumption. The previous places that coins were sent to may have nothing to do with the rightful recipient of returned coins, in common cases like shared wallets or in less common cases like various transaction privacy mechanisms. It's also incompatible with privacy preserving practices like using an address only once, and accounting practices (you may end up sending funds to some offline key of the senders or some key they've destroyed). Many wallets will also not recognize a pay to pubkey transaction as their own. The assumption that you can infer a working return address has observably caused people to lose funds in the past.

Fixing yourself on receiving only particular transaction types is also hostile to the ecosystem, since it denies people autonomy in how they manage their own wallets.  If you may need a refund, you should be collecting a refund address before you provide a pay to address.

The new payment protocol stuff handles that atomically.
tgerring
Full Member
***
Offline Offline

Activity: 142
Merit: 100


Hive/Ethereum


View Profile WWW
October 15, 2013, 03:45:34 PM
 #3

It's possible, but people will tell you to wait for 0.9 features.

I'm not keen on waiting on other people when I can help myself, so I did it anyway to implement refunds on http://paythru.to

If the protocol landscape changes, I'll update my app in due time, but asking developers not to develop is ridiculous.

Hive, a beautiful wallet for Mac OS X, now available for testing. Follow the story here.
BitcoinKit.framework and Tor.framework, now available to iOS and Mac OS X developers
Tweeting at @hivewallet. Donations appreciated at 142m1MpXHhymF4aASiWwYohe1Y55v5BQwc
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
October 15, 2013, 03:48:41 PM
 #4

It's possible, but people will tell you to wait for 0.9 features.

I'm not keen on waiting on other people when I can help myself, so I did it anyway to implement refunds on http://paythru.to

If the protocol landscape changes, I'll update my app in due time, but asking developers not to develop is ridiculous.
Please don't be irresponsible. Do you plan on compensating people out of pocket for funds lost due to your practices?

No one was telling you to wait for anything.
tgerring
Full Member
***
Offline Offline

Activity: 142
Merit: 100


Hive/Ethereum


View Profile WWW
October 15, 2013, 03:52:35 PM
 #5

It's possible, but people will tell you to wait for 0.9 features.

I'm not keen on waiting on other people when I can help myself, so I did it anyway to implement refunds on http://paythru.to

If the protocol landscape changes, I'll update my app in due time, but asking developers not to develop is ridiculous.
Please don't be irresponsible. Do you plan on compensating people out of pocket for funds lost due to your practices?

No one was telling you to wait for anything.

If you can describe a better way to provide refund ability in the current ecosystem without asking a user to register for any sort of account, I'll implement it.

I relied on scriptSig, because there doesn't appear to be a better solution available today.

Edit: If they're using a shared wallet service that doesn't accept funds from sending addresses, that's their service's fault, not mine.

Hive, a beautiful wallet for Mac OS X, now available for testing. Follow the story here.
BitcoinKit.framework and Tor.framework, now available to iOS and Mac OS X developers
Tweeting at @hivewallet. Donations appreciated at 142m1MpXHhymF4aASiWwYohe1Y55v5BQwc
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
October 15, 2013, 03:59:33 PM
Last edit: October 15, 2013, 05:28:55 PM by gmaxwell
 #6

If you can describe a better way to provide refund ability in the current ecosystem without asking a user to register for any sort of account, I'll implement it.
You don't need an account at all.  You're already prompting for a destination email address before giving the user an address to pay to. Prompt for a return address at the same time, it's as trivial as that. This is the standard, widely adopted, best practice in industry right now.

A failure to do that makes your service available to fewer customers, risks customer confusion/dissatisfaction and funds loss (when not if), and reduces Bitcoin user's autonomy over their own wallet management practices.

Quote
Edit: If they're using a shared wallet service that doesn't accept funds from sending addresses, that's their service's fault, not mine.
It isn't just a matter of accepting, those funds may go to other people, they may go to keys that no longer exist. When the returned funds show up the recipient may have no idea which transaction they were being refunded for and may, as a result, double pay (or improperly credit someone else). There may not even be a service involved, but regardless shared wallet services have been a common feature of the Bitcoin ecosystem system 2010. They are common well supported and within best practices. What you are doing is not.
tgerring
Full Member
***
Offline Offline

Activity: 142
Merit: 100


Hive/Ethereum


View Profile WWW
October 15, 2013, 05:43:45 PM
 #7

If you can describe a better way to provide refund ability in the current ecosystem without asking a user to register for any sort of account, I'll implement it.
You don't need an account at all.  You're already prompting for a destination email address before giving the user an address to pay to. Prompt for a return address at the same time, it's as trivial as that. This is the standard, widely adopted, best practice in industry right now.

There is no user-supplied data except the entity which you're trying to look up, so I'm not sure where you're seeing "prompting". An example via cURL:

Code:
curl -LH "Accept: application/json" http://paythru.to/@TaylorGerring
Code:
{
        "address": "1TAYLoRvKqjytcokRx9ZfNNF9odQyU4Bf",
        "uri": "twitter:TaylorGerring",
        "addressstatus": "2"
}

Now, because that call results in the the address claimed by that Twitter account (status = 2), PAYTHRUto never touches the bitcoins--the entire transaction is handled by the wallet.

Because I have no way of knowing if a URI has a published Bitcoin address before a request is made, there's no sane way for me to conditionally collect a refund address beforehand. Perhaps I could collect a refund address as a parameter, i.e. `?refund=1ThisisARefundAddressSuppliedByTheUser`, but it's clunky and requires the user to tell me something extra even if they're not actually sending anything. So make it optional? Then we're right back to square 1.

Quote
[..] shared wallet services have been a common feature of the Bitcoin ecosystem system 2010. They are common well supported and within best practices

Spending from addresses of private keys you don't own with a bunch of other people is a "best practice"? That's almost laughable since it suggests stripping control away from the user is a good thing.

Hive, a beautiful wallet for Mac OS X, now available for testing. Follow the story here.
BitcoinKit.framework and Tor.framework, now available to iOS and Mac OS X developers
Tweeting at @hivewallet. Donations appreciated at 142m1MpXHhymF4aASiWwYohe1Y55v5BQwc
jl2012
Legendary
*
Offline Offline

Activity: 1792
Merit: 1093


View Profile
October 15, 2013, 05:51:19 PM
 #8

It's possible, but people will tell you to wait for 0.9 features.

I'm not keen on waiting on other people when I can help myself, so I did it anyway to implement refunds on http://paythru.to

If the protocol landscape changes, I'll update my app in due time, but asking developers not to develop is ridiculous.

This is extremely IRRESPONSIBLE. You don't even warn people for not to use a shared wallet in the FAQ. This is just a TRAP

Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
tgerring
Full Member
***
Offline Offline

Activity: 142
Merit: 100


Hive/Ethereum


View Profile WWW
October 15, 2013, 09:01:58 PM
 #9

You don't even warn people for not to use a shared wallet in the FAQ. This is just a TRAP

It is in the FAQ:
Quote
What happens if no one claims the funds I sent?

There is a 2016 block (configurable) limit which will trigger a refund to the first address on the "input" to the transaction. More specifically, the "input" is the previous transaction's outputs, so non-simple transactions may not work as expected. It's not perfect, but it's the best that can be done with the current protocol. It would be much preferrable if the person publishes thier own Bitcoin address Smiley

A trap would be just keeping the money, like the shared wallet services do.

In any case, back to the question of returning to scriptSig... as you can see, some people hate it. Satoshi Dice made a fortune off of it.

Hive, a beautiful wallet for Mac OS X, now available for testing. Follow the story here.
BitcoinKit.framework and Tor.framework, now available to iOS and Mac OS X developers
Tweeting at @hivewallet. Donations appreciated at 142m1MpXHhymF4aASiWwYohe1Y55v5BQwc
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
October 15, 2013, 09:42:52 PM
Last edit: October 15, 2013, 10:44:18 PM by gmaxwell
 #10

That's almost laughable since it suggests stripping control away from the user is a good thing.
Your service strips control away from users— by sending funds back to random addresses. When they have funds randomly show up how will they know where they came from?  Is it the prior person that they gave that address to— the only person in the world they gave that address to— paying them again (and so should they ship out some more product as a result?)  is it one of your payto's refunding? Should they want to send the funds another way, how do they know which payto was refunded?

As I have said several times here, shared wallet services are not the only case where your service will cause funds to be lost (though they're currently the most common one). It's hostile to good key management retiring old keys, and it's hostile to wallets anonymizing payments by making joint transactions. Worst of all, it makes the users private wallet management practices— which should be their own personal business— constrained by you.  It degrades coin fungibility because the user may have coins they can pay you with (ones that were sent to convenient addresses they can receive more payments with) and ones they can't.

You are already taking a twitter-to address, just take a refund address as part of the same URL. Whats the big deal?

Is your own service even compatible with its own practices?  What happens if a paythru user releases their funds to an exchange using the same practices as your site (fortunately none currently do) which does an emergency shutdown and refunds all coins using the same algorithm you use? I assume you'll just uselessly loop at that point.

The impression I'm getting here is that I wouldn't personally trust you with my money. You seem to be somewhat blasé about putting other peoples funds at risk.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4615



View Profile
October 15, 2013, 11:10:01 PM
 #11

You seem to be somewhat blasé about putting other peoples funds at risk.

I really wish more people would take this into consideration before using services like this.
tgerring
Full Member
***
Offline Offline

Activity: 142
Merit: 100


Hive/Ethereum


View Profile WWW
October 16, 2013, 01:53:49 PM
 #12

That's almost laughable since it suggests stripping control away from the user is a good thing.
Your service strips control away from users— by sending funds back to random addresses. When they have funds randomly show up how will they know where they came from?  Is it the prior person that they gave that address to— the only person in the world they gave that address to— paying them again (and so should they ship out some more product as a result?)  is it one of your payto's refunding? Should they want to send the funds another way, how do they know which payto was refunded?

As I have said several times here, shared wallet services are not the only case where your service will cause funds to be lost (though they're currently the most common one). It's hostile to good key management retiring old keys, and it's hostile to wallets anonymizing payments by making joint transactions. Worst of all, it makes the users private wallet management practices— which should be their own personal business— constrained by you.  It degrades coin fungibility because the user may have coins they can pay you with (ones that were sent to convenient addresses they can receive more payments with) and ones they can't.

You are already taking a twitter-to address, just take a refund address as part of the same URL. Whats the big deal?

Is your own service even compatible with its own practices?  What happens if a paythru user releases their funds to an exchange using the same practices as your site (fortunately none currently do) which does an emergency shutdown and refunds all coins using the same algorithm you use? I assume you'll just uselessly loop at that point.

The impression I'm getting here is that I wouldn't personally trust you with my money. You seem to be somewhat blasé about putting other peoples funds at risk.


PAYTHRU don't want people's bitcoins, so you're absolutely right that you shouldn't trust the service.

But also, I think it's fairly clear that you don't have a grasp on what PAYTHRU actually attempts to do, so perhaps we can stick to OP's topic instead of making personal attacks.

Hive, a beautiful wallet for Mac OS X, now available for testing. Follow the story here.
BitcoinKit.framework and Tor.framework, now available to iOS and Mac OS X developers
Tweeting at @hivewallet. Donations appreciated at 142m1MpXHhymF4aASiWwYohe1Y55v5BQwc
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
October 16, 2013, 07:08:17 PM
 #13

PAYTHRU don't want people's bitcoins, so you're absolutely right that you shouldn't trust the service.
But also, I think it's fairly clear that you don't have a grasp on what PAYTHRU actually attempts to do, so perhaps we can stick to OP's topic instead of making personal attacks.
I load paythru.to.

I type president@whitehouse.gov

The site returns "president@whitehouse.gov can be sent bitcoins at 1NCbXKdyo9xhwN9EhLc6jKgtDSFQZ1MAUj"

And you're telling me this isn't an address that you control, but instead it's really a key controlled by the president? AMAZING.

And that if I send coins there, they'll actually be received by he president for sure, and not end up in a black hole or "refunded" to some random address of mine, where I'll never figure out it was a refund vs someone else donating to me? AMAZING.

... In any case, this was all on the OPs topic: You can try to infer out working addresses that way, but its unreliable. And at least several people believe that doing so smacks of the kind of irresponsible behavior that goes along with the moral hazard of handling third party money without enforcement or regulation stronger than reputation.
tgerring
Full Member
***
Offline Offline

Activity: 142
Merit: 100


Hive/Ethereum


View Profile WWW
October 16, 2013, 07:44:23 PM
 #14

PAYTHRU don't want people's bitcoins, so you're absolutely right that you shouldn't trust the service.
But also, I think it's fairly clear that you don't have a grasp on what PAYTHRU actually attempts to do, so perhaps we can stick to OP's topic instead of making personal attacks.
And you're telling me this isn't an address that you control, but instead it's really a key controlled by the president? AMAZING.

I'm sorry, but you're just coming off as rude and unhelpful. The first thing on the page not part of the template itself says, "This is an unclaimed Bitcoin address". It's even styled/colored differently than the "This Bitcoin address is published!" message. The API also reflects this information through the `status` field.

Anyhow, an email was dispatched to president@whitehouse.gov, explaining how to publish their own bitcoin address and receive any bitcoins held. If that were to happen, the page text would update to reflect that, in which case it would be AMAZING.


Quote
In any case, this was all on the OPs topic: You can try to infer out working addresses that way, but its unreliable.

If I find a wallet on the ground, I'm going to mail it back to the address on the ID card. Maybe they moved, but I have no way of knowing that.

Hive, a beautiful wallet for Mac OS X, now available for testing. Follow the story here.
BitcoinKit.framework and Tor.framework, now available to iOS and Mac OS X developers
Tweeting at @hivewallet. Donations appreciated at 142m1MpXHhymF4aASiWwYohe1Y55v5BQwc
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!