Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: JollyGreen on March 06, 2011, 09:33:37 PM



Title: How do I know who paid me?
Post by: JollyGreen on March 06, 2011, 09:33:37 PM
So lets say, I run a fictional ebay account selling goods to people and I want to accept BTC.  Everytime I make a sale and someone wants to pay me in BTC, I go into my Bitcoin client go to address book and click on receiving, and then select my ebay receiving BTC address.  I copy it to clipboard and email it off to the customer to pay me, and wait on their payment to arrive before I ship.

This is all fine and good until I have more than 1 customers who haven't paid.  I somehow need to verify which customers have paid and which ones have not.  But I cannot tell that by looking at the addresses of coins I receive via Bitcoin.  Okay, maybe the items cost different amounts and I can distinguish the orders by looking at the price, but say all the items cost $5.99 so price alone can't determine the customer.

Is there a solution to this problem?  Do I have to create a new address for every new order?


Title: Re: How do I know who paid me?
Post by: Neereus on March 06, 2011, 09:35:44 PM
Is there a solution to this problem?  Do I have to create a new address for every new order?

Answered your own question.


Title: Re: How do I know who paid me?
Post by: kiba on March 06, 2011, 09:36:26 PM
Is there a solution to this problem?  Do I have to create a new address for every new order?

This is a good solution. The next step is automating it to remove the chance for errors and to reduce cost of generating addresses.


Title: Re: How do I know who paid me?
Post by: wb3 on March 07, 2011, 12:10:22 AM
Personally, I would love to see this. A new Hash for every transaction, around the world. And searchable; that would solve a lot of problems for me. Currently I believe it is a Hash160, or Tiger of the public key. I think most hash systems would have collisions pretty quickly if every transaction around the would had a new hash for each and every transaction.

What happens during a collision?  Do both get paid?  That would be cool.


Title: Re: How do I know who paid me?
Post by: So_Cynical on March 07, 2011, 12:34:00 PM
Is there a solution to this problem?  Do I have to create a new address for every new order?

This is a good solution. The next step is automating it to remove the chance for errors and to reduce cost of generating addresses.

There's a cost to generate addresses?

I have a BTC based business idea that involves selling identically priced products en mass...its going to be very tiresome and time consuming documenting what address belongs to what client....some sort of message option on incoming coin would be great.


Title: Re: How do I know who paid me?
Post by: kiba on March 07, 2011, 06:42:38 PM
There's a cost to generate addresses?

It's not a monetary cost, but a mental and time cost. It may not be a lot, but it would be troublesome if you have to repeat the process for hundred of items for auction.


Title: Re: How do I know who paid me?
Post by: Jim Hyslop on March 08, 2011, 01:12:10 AM
This is all fine and good until I have more than 1 customers who haven't paid.  I somehow need to verify which customers have paid and which ones have not.  But I cannot tell that by looking at the addresses of coins I receive via Bitcoin.  Okay, maybe the items cost different amounts and I can distinguish the orders by looking at the price, but say all the items cost $5.99 so price alone can't determine the customer.

Is there a solution to this problem?  Do I have to create a new address for every new order?

Interesting question. You could, as Neereus suggested, create a different bitcoin address for each transaction.

Another possibility would be to embed a text message in the transaction. There's no provision in the GUI for it, but the source code allows for it (it's just not implemented at the moment).


Title: Re: How do I know who paid me?
Post by: asdf on March 09, 2011, 12:00:40 AM
Every time you make a sale, create a new address and match this address to the record of sale in a database.

Otherwise you can give the new address a unique "account name" that identifies the sale so you can then match this up with the payment. This would be fine if you're making only a few sales a day. Totally manageable. For larger businesses, you really need a database of some sort.

Some people have coded bitcoin shopping cart modules for CMSs like Joomla. This might be helpful. I haven't looked into it though.

I can write some customised code and create a database for you for a BTC fee.

You definitely want to create a new address for each sale. This will help you for dodging tax if you're audited and I don't know if there's an easy way to identify a payer otherwise.


Title: Re: How do I know who paid me?
Post by: we6jbo on March 09, 2011, 12:32:28 AM
This is all fine and good until I have more than 1 customers who haven't paid.  I somehow need to verify which customers have paid and which ones have not.  But I cannot tell that by looking at the addresses of coins I receive via Bitcoin.  Okay, maybe the items cost different amounts and I can distinguish the orders by looking at the price, but say all the items cost $5.99 so price alone can't determine the customer.

Is there a solution to this problem?  Do I have to create a new address for every new order?

Interesting question. You could, as Neereus suggested, create a different bitcoin address for each transaction.

Another possibility would be to embed a text message in the transaction. There's no provision in the GUI for it, but the source code allows for it (it's just not implemented at the moment).

I did not know that you can send messages with your transactions. Are these messages readable by participating bitcoin clients or something like blockexplorer (if they were to modify their website to include these fields)? Also; how about using this message field to include a GPG public key. That way if someone sends me a Bitcoin, they can also send me an encrypted message through a different messaging protocol which I can then decrypt.


Title: Re: How do I know who paid me?
Post by: Gavin Andresen on March 09, 2011, 12:58:15 AM
You can't send messages with transactions.

There was some discussion of adding another "standard" transaction type that allowed you to add N bytes of arbitrary data.  I think that is a good idea (I think people would find all sorts of interesting uses for it), but there are higher priority things on the development roadmap.


Title: Re: How do I know who paid me?
Post by: Jim Hyslop on March 09, 2011, 01:36:26 AM
Another possibility would be to embed a text message in the transaction. There's no provision in the GUI for it, but the source code allows for it (it's just not implemented at the moment).
I did not know that you can send messages with your transactions.

As Gavin said, you can't. But I didn't say you could - I said the source code supports it. Subtle but important distinction. It would require modifications to pass messages in the prerequisite script passed to SignSignature. And, of course, modifications to see what's there.


Title: Re: How do I know who paid me?
Post by: we6jbo on March 09, 2011, 02:22:31 AM
Another possibility would be to embed a text message in the transaction. There's no provision in the GUI for it, but the source code allows for it (it's just not implemented at the moment).
I did not know that you can send messages with your transactions.

As Gavin said, you can't. But I didn't say you could - I said the source code supports it. Subtle but important distinction. It would require modifications to pass messages in the prerequisite script passed to SignSignature. And, of course, modifications to see what's there.

I already understood that with the current bitcoind client you can't send messages with your transactions because otherwise people would be using it but what it sounds like you're saying is that someone could create a patch for the bitcoin sourcecode which would add this functionality to bitcoin even though there are no plans from the developers to include a messaging feature. In the case where Gaven modified the source to include a vanity feature, someone else in the next half hour could modify the source to allow a PGP public signature to pass with the transaction and then anyone with that modified source would be able to see it or the intended recipient would also be able to see the PGP public key. And finally; this could be done without disrupting the Bitcoin network because you're using something that's already in the protocol?


Title: Re: How do I know who paid me?
Post by: Jim Hyslop on March 09, 2011, 02:46:20 AM
(various questions)
Yes. To all questions.


Title: Re: How do I know who paid me?
Post by: theymos on March 09, 2011, 11:51:50 AM
I already understood that with the current bitcoind client you can't send messages with your transactions because otherwise people would be using it but what it sounds like you're saying is that someone could create a patch for the bitcoin sourcecode which would add this functionality to bitcoin even though there are no plans from the developers to include a messaging feature. In the case where Gaven modified the source to include a vanity feature, someone else in the next half hour could modify the source to allow a PGP public signature to pass with the transaction and then anyone with that modified source would be able to see it or the intended recipient would also be able to see the PGP public key. And finally; this could be done without disrupting the Bitcoin network because you're using something that's already in the protocol?

It is possible. Each output can contain about 9kB of arbitrary data. Bitcoin won't relay/include non-standard transactions any more, though, so you'd have to create a block to get the transaction included in the block chain. You could also include a substantial fee with the transactions, which would encourage miners to change their rules.


Title: Re: How do I know who paid me?
Post by: wb3 on March 09, 2011, 04:00:33 PM
Another possibility would be to embed a text message in the transaction. There's no provision in the GUI for it, but the source code allows for it (it's just not implemented at the moment).
I did not know that you can send messages with your transactions.

As Gavin said, you can't. But I didn't say you could - I said the source code supports it. Subtle but important distinction. It would require modifications to pass messages in the prerequisite script passed to SignSignature. And, of course, modifications to see what's there.

Ah well, that is not exactly true.  If I send these amounts to someone, 72.69, 76.76, 79.32, I have sent a message. Hopefully, they send one amount back to me for, 228.77 to reload my message machine.

Or tie amounts to dictionaries and voila, just another "slow" IM.


Title: Re: How do I know who paid me?
Post by: myrkul on March 09, 2011, 04:45:49 PM
Here's a rather radical idea... Perhaps have the payer's send address on the order form?

Or, failing that, add/subtract a random, very small amount from the price, thus making each price subtly unique?


Title: Re: How do I know who paid me?
Post by: Steve on March 10, 2011, 02:56:51 PM
You can't send messages with transactions.

There was some discussion of adding another "standard" transaction type that allowed you to add N bytes of arbitrary data.  I think that is a good idea (I think people would find all sorts of interesting uses for it), but there are higher priority things on the development roadmap.


I think this could also be done "out of band" so to speak...keep the core code around the peer and block block very clean and very simple.  A payer could for example sign a message incorporating a transaction ID and send that along via smtp or xmpp...if a payee wanted definitive proof that someone actually owned the account from which money originated, the payee could request the payer to somehow sign a token with the private key of the account (maybe also sign with their gpg key).  This could all be done in a nice and simple way in a bitcoin client without touching the core block chain code.


Title: Re: How do I know who paid me?
Post by: Mike Hearn on March 10, 2011, 03:22:47 PM
The reason BitCoin doesn't support messages in blockchain broadcast transactions is that Satoshi felt it couldn't be done without making the system too expensive to run by bloating the chain. It's a deliberate choice, not simply something that wasn't implemented yet.


Title: Re: How do I know who paid me?
Post by: Jim Hyslop on March 11, 2011, 03:31:47 AM
The reason BitCoin doesn't support messages in blockchain broadcast transactions is that Satoshi felt it couldn't be done without making the system too expensive to run by bloating the chain.
Hmmm... well, maybe this is something that can be revisited once the block-headers-only protocol gets implemented.

Or, as theymos suggested, add the capability but enforce hefty (relatively speaking) transaction fees for text.


Title: Re: How do I know who paid me?
Post by: ByteCoin on March 17, 2011, 12:23:44 AM
You can't send messages with transactions.

You CAN encode a message in a currently accepted transaction using the broadband subliminal channel inherent to DSA (and ECDSA).

It would require patching the code to include the message but it could be extracted by some maths on the data displayed by Bitcoin Block Explorer or by extracting it from the block chain file.


ByteCoin


Title: Re: How do I know who paid me?
Post by: Gavin Andresen on March 17, 2011, 12:46:48 AM
You CAN encode a message in a currently accepted transaction using the broadband subliminal channel inherent to DSA (and ECDSA).

Googling for 'ECDSA broadband subliminal channel' to figure out what the heck you're talking about...

... doesn't that require that the recipient (as well as the sender) know the private key?
(you encode the message in the 'k' param, which the recipient can only recover using the private key?)


Title: Re: How do I know who paid me?
Post by: Gavin Andresen on March 17, 2011, 12:53:37 AM
Thanks for the link to the wikipedia page in the other thread... so receiver CAN recover 'k' given the public key and signature.

Cool!

That doesn't solve the problem I'd like to solve (because you still need to generate a new keypair for every transaction), but it is cool.


Title: Re: How do I know who paid me?
Post by: ByteCoin on March 17, 2011, 10:54:29 AM
Thanks for the link to the wikipedia page in the other thread... so receiver CAN recover 'k' given the public key and signature.

Thanks for bearing this useful fact in mind.

Another thing to consider, once any coins associated with an address have ever been spent then the public keys associated with that address are public by virtue of the signature in the transaction. If the merchant's public key is available in this fashion then the customer and merchant can generate a shared secret using Diffie-Hellman key agreement or some similar scheme. This shared secret could be used as the "authentication key" mentioned in the wikipedia article.

Of course, if you're thinking of now enabling currently forbidden scripting features then a lot of options become available.

ByteCoin