Roy Badami [ARCHIVE] on Nostr: 📅 Original date posted:2014-01-30 📝 Original message:On Thu, Jan 30, 2014 at ...
📅 Original date posted:2014-01-30
📝 Original message:On Thu, Jan 30, 2014 at 07:03:57PM +0700, Chuck wrote:
> On 1/30/2014 7:02 PM, Pieter Wuille wrote:
> > On Thu, Jan 30, 2014 at 12:59 PM, Mike Hearn <mike at plan99.net> wrote:
> >> With the way it works in bitcoinj, the tx is only committed to the wallet if
> >> the server accepts the Payment message and ACKs it. So the tx would not be
> >> retried if there's a failure submitting or some kind of internal server
> >> error, and the UI would show that the payment failed. That seems
> >> straightforward and how I'd expect things to work as a user.
> > That's one right way to do it imho, but not what is suggested or
> > required by the specification, and not what bitcoin core master
> > currently implements.
> >
> If you sent the Payment message and the server goes silent after
> receiving it, you retry to delivery. However, the merchant can
> broadcast the transactions and force them into your wallet anyway. You
> could, quite likely, pay and never get an ACK.
I think in that case, you absolultely have to invalidate all the
transactions in the Payment message by broadcasting a send-to-self
transaction as soon as possible; until that point your wallet balance
is indeterminate. Otherwise what will happen if the merchant did in
fact receive the Payment message, and then processes it (and
broadcasts the transaction) after some delay?
Then what the user will see is: an apparently failed attempt to pay,
leaving their wallet balance unchanged. Then, perhaps many hours
later, their wallet balance will appear to spontaneously decrement.
roy
Published at
2023-06-07 15:12:52Event JSON
{
"id": "5b56b49b107b82df5073b55203e08060ab5cca7c5c4f52182b7f7423e56549db",
"pubkey": "58f160e0dbc661605704b190e36f5199f881c861e53763c7057e6bc0c13e6950",
"created_at": 1686150772,
"kind": 1,
"tags": [
[
"e",
"ca814c3187baf530859293da884d43f9b75d876aac144840146db91ec4b86815",
"",
"root"
],
[
"e",
"351e9c85f498eab5d5b179438864df9a91123fc70538f7a22a50a574969aa60c",
"",
"reply"
],
[
"p",
"31fc418002a35b6a48e41e212021606bbb8b80d712f5f72b9df407cacad2761e"
]
],
"content": "📅 Original date posted:2014-01-30\n📝 Original message:On Thu, Jan 30, 2014 at 07:03:57PM +0700, Chuck wrote:\n\u003e On 1/30/2014 7:02 PM, Pieter Wuille wrote:\n\u003e \u003e On Thu, Jan 30, 2014 at 12:59 PM, Mike Hearn \u003cmike at plan99.net\u003e wrote:\n\u003e \u003e\u003e With the way it works in bitcoinj, the tx is only committed to the wallet if\n\u003e \u003e\u003e the server accepts the Payment message and ACKs it. So the tx would not be\n\u003e \u003e\u003e retried if there's a failure submitting or some kind of internal server\n\u003e \u003e\u003e error, and the UI would show that the payment failed. That seems\n\u003e \u003e\u003e straightforward and how I'd expect things to work as a user.\n\u003e \u003e That's one right way to do it imho, but not what is suggested or\n\u003e \u003e required by the specification, and not what bitcoin core master\n\u003e \u003e currently implements.\n\u003e \u003e\n\u003e If you sent the Payment message and the server goes silent after \n\u003e receiving it, you retry to delivery. However, the merchant can \n\u003e broadcast the transactions and force them into your wallet anyway. You \n\u003e could, quite likely, pay and never get an ACK.\n\nI think in that case, you absolultely have to invalidate all the\ntransactions in the Payment message by broadcasting a send-to-self\ntransaction as soon as possible; until that point your wallet balance\nis indeterminate. Otherwise what will happen if the merchant did in\nfact receive the Payment message, and then processes it (and\nbroadcasts the transaction) after some delay?\n\nThen what the user will see is: an apparently failed attempt to pay,\nleaving their wallet balance unchanged. Then, perhaps many hours\nlater, their wallet balance will appear to spontaneously decrement.\n\nroy",
"sig": "e8c6233ab517755176407e05f955143112fc3f83062484ad2dd72df7ca43b9f4e4d41ef54998bc82d81caeb15ae81a0ef49c8c45a04355a7b1cb12497b829d85"
}