Roy Badami [ARCHIVE] on Nostr: 📅 Original date posted:2012-11-28 📝 Original message:> If a Receipt is not ...
📅 Original date posted:2012-11-28
📝 Original message:> If a Receipt is not received for any reason (timeout, error) and
> Payment.transactions has not been broadcast by the merchant on the
> Bitcoin p2p network, then the Bitcoin client should assume that the
> payment failed, inform the customer that the payment failed, and
> return coins involved in the transaction to the customer's wallet.
I'm not sure I understand the rationale for this. In the above
scenario the buyer has no way to determine whether the merchant still
has a copy of the transaction that they could broadcast in future.
Maybe there is simply a systems problem at the merchant which has
temporarily delayed the transaction broadcast. Or maybe a dishonest
merchant deliberately engineered this situation in an attempt to
mislead the buyer as to the status of their payment.
Either way, having the buyer think the coins have been returned to
their wallet - only to disappear from their wallet again at some later
time - would seriously damage user confidence in Bitcoin IMHO.
It seems to me that the first thing the buyer should do given the
protocol as it stands is simply resend the Payment message - if there
was a temporary problem then resending the payment message (with the
same signed transation) might resolve the sitution.
If after several retries the status of the transaction is still
undefined then it's really not clear what to do, but it seems
desireable to have the client take steps so that it can return to a
state of certainly about its wallet balance as quickly as possible.
Two things I can imagine that the buyer might want their client to do
at this point are:
* broadcast the transaction itself, so they are sure the payment
transaction will make it into the blockchain without any further
action on their part, or
* invalidate the transaction by immediately broadcasting a
pay-to-self transaction that spends one or more of the same outputs
that the payment transaction spends (and treat the funds as part of
the unconfirmed balance until this pay-to-self transaction
confirms). This ensures the merchant can't subsequently use a
transaction which the buyer thinks has failed
It seems to me it would be simpler and cleaner if the buyer just
always broadcasted the transaction on the p2p network, regardless of
whether the Invoice includes a receiptURI. If a receiptURI is
included, the buyer's client would also include the transaction in the
Purchase message. The merchant then tries to broadcast the
transaction as well (unless their bitcoind has already seen it, which
may well be the common case). This approach seems to me to have fewer
nasty edge cases.s
roy
Published at
2023-06-07 10:41:48Event JSON
{
"id": "7705842191afd410b44de27c8b094b65be45c4018ccfe01208054d8f425470d8",
"pubkey": "58f160e0dbc661605704b190e36f5199f881c861e53763c7057e6bc0c13e6950",
"created_at": 1686134508,
"kind": 1,
"tags": [
[
"e",
"f5f2400f8aa8a7067be3d080f096fd7cbfeecdd6e589c178b85b63a9338150a5",
"",
"root"
],
[
"e",
"48a3d3d576ed75a32b177c0dfc7cf11c72c5d81f97f6429e3c8504f97d3a3842",
"",
"reply"
],
[
"p",
"daa2fc676a25e3b5b45644540bcbd1e1168b111427cd0e3cf19c56194fb231aa"
]
],
"content": "📅 Original date posted:2012-11-28\n📝 Original message:\u003e If a Receipt is not received for any reason (timeout, error) and\n\u003e Payment.transactions has not been broadcast by the merchant on the\n\u003e Bitcoin p2p network, then the Bitcoin client should assume that the\n\u003e payment failed, inform the customer that the payment failed, and\n\u003e return coins involved in the transaction to the customer's wallet.\n\nI'm not sure I understand the rationale for this. In the above\nscenario the buyer has no way to determine whether the merchant still\nhas a copy of the transaction that they could broadcast in future.\nMaybe there is simply a systems problem at the merchant which has\ntemporarily delayed the transaction broadcast. Or maybe a dishonest\nmerchant deliberately engineered this situation in an attempt to\nmislead the buyer as to the status of their payment.\n\nEither way, having the buyer think the coins have been returned to\ntheir wallet - only to disappear from their wallet again at some later\ntime - would seriously damage user confidence in Bitcoin IMHO.\n\nIt seems to me that the first thing the buyer should do given the\nprotocol as it stands is simply resend the Payment message - if there\nwas a temporary problem then resending the payment message (with the\nsame signed transation) might resolve the sitution.\n\nIf after several retries the status of the transaction is still\nundefined then it's really not clear what to do, but it seems\ndesireable to have the client take steps so that it can return to a\nstate of certainly about its wallet balance as quickly as possible.\nTwo things I can imagine that the buyer might want their client to do\nat this point are:\n\n * broadcast the transaction itself, so they are sure the payment\n transaction will make it into the blockchain without any further\n action on their part, or\n\n * invalidate the transaction by immediately broadcasting a\n pay-to-self transaction that spends one or more of the same outputs\n that the payment transaction spends (and treat the funds as part of\n the unconfirmed balance until this pay-to-self transaction\n confirms). This ensures the merchant can't subsequently use a\n transaction which the buyer thinks has failed\n\nIt seems to me it would be simpler and cleaner if the buyer just\nalways broadcasted the transaction on the p2p network, regardless of\nwhether the Invoice includes a receiptURI. If a receiptURI is\nincluded, the buyer's client would also include the transaction in the\nPurchase message. The merchant then tries to broadcast the\ntransaction as well (unless their bitcoind has already seen it, which\nmay well be the common case). This approach seems to me to have fewer\nnasty edge cases.s\n\nroy",
"sig": "14ac372142af234db9f778178593f150ebfe4125eb1cd5f3c755f69e47d5d3b98a9ca65696ce1cf049f037627107de3acd98fe6a90a761a818b009150e55232f"
}