-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distinguish between success and failure in Close
message
#242
Comments
I would argue a From the spec section for
|
But there are multiple OrderStatus messages and who knows what the text of the message will be. This isn't better than using |
This should not be the case...we're currently using |
Yes, correct. @diehuxx we tell customer agents to continue polling until a Close message has been written to the exchange |
I see, thanks for clarifying @angiejones @phoebe-lew ! There are few possible solutions that come to mind. Let me know if any of these appeal to you. Proposal 1: Always be
|
@diehuxx |
@angiejones I looked at the spec again and it looks like
If you are interested in avoid breaking changes, we should avoid Proposal 1. Proposal 1 would constitute a breaking change in both message structure and the exchange state machine. After some additional thought, I recommend an approach that combines aspects of Proposals 2 and 3 Recommended Proposal: Add
|
@diehuxx to your point I think the spec is a bit ambiguous around this. All of the following can be found in the spec:
We should prob aim to clarify this in the text. In what you've described it sounds like the effect would be that a I understand why Alice should not be able to send a -edited to add:- What I like about having a TBF about breaking changes though, I think all of our reference implementations treat
Implementations don't have to consume the new boolean field on This was long. Anyway I like Occam's Razor, which says that the simplest approach is often the most correct one. |
This is risky when dealing with reversible payments. A broader discussion of refunds is outside the scope of this issue, but it is worth considering the possibility of a refund/chargeback/failure after the fact. It's not clear to me that we need to mark all exchanges as permanently closed once the payments are complete. If a successful exchange is permanently closed, what is the expected behavior when an exchange needs to be "reopened"? We may not want to require that every exchange eventually be closed. I'd like to discuss more about this line of the PR description:
What flows do we have in mind? E.g. If Alice receives a notification from her lightning wallet that she was paid, does she also need a TBDex message telling her she got paid? |
I dont think we need to overcomplicate this. Again "Adding Close.data.success as a boolean field" is a very simple solution that doesn't break the current implementation or message flow |
Adding the field to In addition to the broader questions I raised in my previous comment (payment reversal, whether "closing" successful exchanges is necessary or desirable), we also need to address the details of adding a success boolean to |
Ah, I see your point. I have always viewed Close as the single final message of an exchange. Let me read everything again, including the spec, and come back... |
i think until now the interpretation and reference implementations have followed the guidance that i do see the PR in the js implementation from 2 weeks ago that went in to add the
so many crossed wires. clarity will be nice |
ok I read everything again. I don't see a different interpretation of "Close is the final message of the exchange".
I assume even if no Order is ever placed, once the Quote expires, a Close message will be sent. I'll ask Frank and Moe to weigh in so that we're all on the same page (even without the proposed 'success' flag) |
Hey hey all, just catching up to this, apologies, I would've weighed in earlier had I known about it I just spent some time trying to dig through history to find the references to what I'm about to say, but I was unsuccessful Granted, the spec may not reflect what I have said here, and/or these semantic definitions may have evolved since I last touched this subject. Nevertheless, we have a problem to be solved here in the current moment, and solve it we shall! I'm hesitant to vote for the proposal here (@angiejones in your comment above):
Because it's a slight conflation between the two semantic use cases. In an abstract sense, we need one message type which will deterministically terminate the exchange during a premature phase, and then we also need a separate message type which is an application-defined generic space to represent the state of the given Alright, a lot of words, I'm sorry, payments are difficult. The next thing I would say to the above is, "but Kendall, sure there is no standard state of finality, but every transaction, even those which are reversible, does enter a state wherein it's considered to be successful and we can all go about our lives, albeit in some mediums that state can be reversed, the state still exists in standard!" So, I'll put forth two possible proposals (either or, but not both):
|
There's a lot of tangential conversations happening in the GH issue now. Essentially, |
At the protocol level, I think it's a bad idea to worry about PFI specific state machines. Necessitating a
Examples:
Going to create a separate github issue to discuss all possible usages of |
@KendallWeihe, we can discuss what you raised in that separate github issue. |
will raise in that separate github issue |
this would be new to me to hear that a reversible transaction is one single transaction which has been reversed, and that transactions don't typically have finality. my understanding is that transactions always have finality, and a reversal would happen as a separate, self-contained transaction (even if it looks to the customer like a given transaction was "reversed"). if we think of traditional ledgers, the original transaction doesn't get modified or erased, but rather followed up with a second transaction to show its reversal. so a reversal would be two transactions that zero out. but super interested to hear where you learned about this and to learn more about that approach! @mistermoe @angiejones and all I mentioned in this comment a recent change went into the latest release where Once we have clarity we'll need a follow up issue to address, either in the tbdex SDK implementations, or in the docs + reference implementations. Just raising for viz! |
This is perfect. Thank you, Moe! Only thing I would add is that for the below, they can also consult
|
Do we allow Edit: we have a consensus here on this ticket, disregard this comment (created a new ticket) |
@kirahsapong Reversibility exists in many many types of fiat payments. The traditional payments system does not have finality, or at least finality can take very long -- on the order of weeks or even months. Satoshi discusses some of the tradeoffs of reversibility in the Introduction to the bitcoin whitepaper. Reversibility is also discussed in section 6.0.2 of the TBDex whitepaper. Payment reversal is a significant risk that financial institutions take on when they process payments. This is one reason why exchanging fiat for bitcoin is risky: Alice sends Bob bitcoin, Bob sends Alice dollars, Bob calls his bank to issue a chargeback, and now Alice is out of luck. There is trust inherent in the transaction. Alice must trust Bob and Bob's bank not to leave her emptyhanded. TBDex represents a trust layer that can facilitate decentralized exchange of fiat and crypto. In this case there are three "money movements": bitcoin payment, dollar payment, and dollar chargeback. But since Bob initiated both the dollar payment and chargeback, it is useful to think of that as a single transaction. In a ledgering software services I have used, you're right that there are typically two database rows representing a money movement are present when a transaction is reversed. It is also common for those two rows to have the same |
@diehuxx i didn't dispute the concept of reversibility in payments. i disputed:
and
distinct from reversibility of payments, to be clear. coming from a banking background and merchant services baked into my childhood, i'm just sharing my perspective. but let me know what you decide. :) |
Lot's of killer discourse, but for the sake of implementation focus, summarizing the new features here:
With regards to how this state machine can drive wallet (GUI) experience, see comment here
LMK if I have anything incorrect! Edit: this PR makes it clear to me, we have a consensus that |
Proposal to close this ticket in favor of:
|
from @angiejones
The text was updated successfully, but these errors were encountered: