Demo sender fallback#1510
Open
arminsabouri wants to merge 2 commits intopayjoin:masterfrom
Open
Conversation
Co-authored-by: zealsham <shammahagwor@gmail.com> If the v1 sender fails to post the original proposal or process the payjoin then they broadcast the fallback tx.
Collaborator
Coverage Report for CI Build 25166916130Coverage increased (+0.2%) to 85.159%Details
Uncovered Changes
Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
Contributor
|
What's left to do here? Just a v2 fallback test? Or we're still not handling the v2 case completely and a decision needs to be made on the experience? |
1d59adf to
88effb0
Compare
Co-authored-by: zealsham <shammahagwor@gmail.com> After a replay, if the session is closed due to being cancled or failure we broadcast the fallback.
88effb0 to
72c21a6
Compare
Collaborator
Author
I decided a second resume was not the way forward. PJ cli will replay and check for the fallback condition before exiting the app. Fall back test was added as a integration test in pj cli as opposed to a e2e test. Creating e2e conditions for protocol failure was tricky without manually updating the db. Integration test ended up being simpler . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code migrated from #1164. There were many conflicts.
The tricky thing with v2 is we don't want to fallback when there is a transient error. Luckly, our session outcome abstracts all that away. If after a replay a session is closed due to either a failure or cancellation we broadcast the fallback. But this requires a replay. Say your payjoin proposal was faulty, currently you have to resume again for the fallback to be broadasted which I think defeats the purpose of a "demo". i.e what we wants devs to replicate in their apps.
Instead, internally in Pj-cli we can replay again if an error occured (or if #1197 we can avoid disk reads) check if the session is closed and fallback accordingly.
cc @zealsham @chavic
Pull Request Checklist
Please confirm the following before requesting review:
AI
in the body of this PR.