diff options
-rw-r--r-- | design-documents/037-wallet-transactions-lifecycle.rst | 9 | ||||
-rw-r--r-- | transaction-pull-credit-states.dot | 76 | ||||
-rw-r--r-- | transaction-pull-debit-states.dot | 57 | ||||
-rw-r--r-- | transaction-push-credit-states.dot | 80 | ||||
-rw-r--r-- | transaction-push-debit-states.dot | 56 |
5 files changed, 83 insertions, 195 deletions
diff --git a/design-documents/037-wallet-transactions-lifecycle.rst b/design-documents/037-wallet-transactions-lifecycle.rst index 9355de5c..abc6c131 100644 --- a/design-documents/037-wallet-transactions-lifecycle.rst +++ b/design-documents/037-wallet-transactions-lifecycle.rst @@ -129,7 +129,6 @@ offered. .. image:: ../transaction-common-states.png - :width: 800 Boxed labels indicate an end state in which there is no network activity and @@ -322,7 +321,6 @@ Transaction Type: Withdrawal .. image:: ../transaction-withdrawal-states.png - :width: 800 Transaction Type: Payment to Merchant @@ -459,7 +457,6 @@ Transaction Type: Payment to Merchant with it. .. image:: ../transaction-payment-states.png - :width: 800 Transaction Type: Refund @@ -738,7 +735,6 @@ Transaction Type: Deposit All memory of the deposit operation is lost. .. image:: ../transaction-deposit-states.png - :width: 800 Transaction Type: Peer Push Debit @@ -817,7 +813,6 @@ States and transitions: All memory of the push debit operation is lost. .. image:: ../transaction-push-debit-states.png - :width: 800 Transaction Type: Peer Push Credit @@ -945,7 +940,6 @@ States and transitions: All memory of the push credit operation is lost. .. image:: ../transaction-push-credit-states.png - :width: 800 Transaction Type: Peer Pull Credit @@ -1053,7 +1047,6 @@ TODO: Also specify variant where account reserve needs to be created / funded fi * ``deleted`` .. image:: ../transaction-pull-credit-states.png - :width: 800 Transaction Type: Peer Pull Debit @@ -1126,8 +1119,6 @@ Transaction Type: Peer Pull Debit All information about the invoice has been deleted. .. image:: ../transaction-pull-debit-states.png - :width: 800 - Alternatives ============ diff --git a/transaction-pull-credit-states.dot b/transaction-pull-credit-states.dot index 7202a370..351c6819 100644 --- a/transaction-pull-credit-states.dot +++ b/transaction-pull-credit-states.dot @@ -1,65 +1,43 @@ digraph G { - initial[label="", shape="circle"]; - pending_create[label="pending(purse-create)"]; - pending_qr[label="pending(qr-ready)", shape="box"]; - aborting_delete[label="aborting(delete-purse)"]; - pending_withdraw[label="pending(withdraw)"]; - suspended_withdraw[label="suspended(withdraw)", shape="box"]; - pending_kyc[label="pending(kyc)"]; - suspended_kyc[label="suspended(kyc)", shape="box"]; - pending_aml[label="pending(aml)"]; - suspended_aml[label="suspended(aml)", shape="box"]; - - aborted[label="aborted", shape="box"]; - failed[label="failed", shape="box"]; + pending_create[label="purse-create"]; + pending_qr[label="qr-ready"]; + aborting_delete[label="delete-purse", style=dashed]; + pending_withdraw[label="withdraw"]; + pending_kyc[label="kyc"]; + pending_aml[label="aml"]; + + aborted[label="aborted", shape="box", style=dashed]; done[label="done", shape="box"]; - deleted[label="deleted", shape="box"]; // subgraph { // rank = same; pending_withdraw; failed; // } - initial->pending_create [color="blue", label="form data"]; - - pending_create->pending_qr; - pending_create->deleted [color="red", label="failure"]; - pending_create->deleted [color="blue", label="cancel"]; - - pending_qr->aborted [label="timeout"]; - pending_qr->aborting_delete [color="blue", label="abort"]; - pending_qr->pending_withdraw; - pending_qr->aborting_delete [color="red", label="poll-failure"]; + subgraph { + rank=max; + aborted; done; + } - aborting_delete->pending_withdraw [color="red", label="failure:already-merged"]; - aborting_delete->aborted; - aborting_delete->failed [color="red", label="failure:other"]; - aborting_delete->failed [color="blue", label="force-abort"]; + subgraph { + rank=same; + pending_create; pending_qr; + } - aborted->deleted [color="blue", label="delete"]; + initial->pending_create; - pending_withdraw->done; - pending_withdraw->failed [color="red", label="failure"]; - pending_withdraw->pending_kyc [label="kyc-required"]; - pending_withdraw->pending_aml [label="aml-required"]; - pending_withdraw->suspended_withdraw [color="blue", label="suspend"]; - - suspended_withdraw->pending_withdraw [color="blue", label="resume"]; - suspended_withdraw->deleted [color="blue", label="force-delete"]; - - pending_kyc->suspended_kyc [color="blue", label="suspend"]; - pending_kyc->pending_withdraw [color="purple", label="poll-success"]; - - suspended_kyc->pending_kyc [color="blue", label="resume"]; - suspended_kyc->deleted [color="blue", label="force-delete"]; + pending_create->pending_qr; - pending_aml->suspended_aml [color="blue", label="suspend"]; - pending_aml->pending_withdraw [color="purple", label="poll-success"]; + pending_qr->aborting_delete [color="blue", style=dashed]; + pending_qr->pending_withdraw [color=green]; - suspended_aml->pending_aml [color="blue", label="resume"]; - suspended_aml->deleted [color="blue", label="force-delete"]; + aborting_delete->pending_withdraw [color="red"]; + aborting_delete->aborted [color=green]; - failed->deleted [color="blue", label="delete"]; - done->deleted [color="blue", label="delete"]; + pending_withdraw->done [color=green]; + pending_withdraw->pending_kyc [color=red]; + pending_withdraw->pending_aml [color=red]; + pending_kyc->pending_withdraw [color="green"]; + pending_aml->pending_withdraw [color="green"]; } diff --git a/transaction-pull-debit-states.dot b/transaction-pull-debit-states.dot index bec08c19..4a3d0dde 100644 --- a/transaction-pull-debit-states.dot +++ b/transaction-pull-debit-states.dot @@ -1,53 +1,34 @@ digraph G { initial[label="", shape="circle"]; - pending_download[label="pending(download)"]; - suspended_download[label="suspended(download)", shape="box"]; - pending_user[label="pending(user)", shape="box"]; + pending_download[label="download"]; + pending_user[label="monolog", shape="box"]; - pending_deposit[label="pending(deposit)"]; - suspended_deposit[label="suspended(deposit)", shape="box"]; - aborting_refund[label="aborting(refund)"]; - aborting_refresh[label="aborting(refresh)"]; + pending_deposit[label="deposit"]; + aborting_refresh[label="refresh", style=dashed]; - aborted[label="aborted", shape="box"]; - failed[label="failed", shape="box"]; + aborted[label="aborted", shape="box", style=dashed]; done[label="done", shape="box"]; - deleted[label="deleted", shape="box"]; -// subgraph { -// rank = same; pending_withdraw; failed; -// } + subgraph { + rank=same; + done; aborted; + } - initial->pending_download [color="blue", label="URI trigger"]; + subgraph { + rank=same; + pending_download; + pending_user; + } - pending_download->suspended_download [color="blue", label="suspend"]; - pending_download->pending_user; + initial->pending_download; - suspended_download->pending_download [color="blue", label="resume"]; - suspended_download->deleted [color="blue", label="cancel"]; + pending_download->pending_user [color=green]; - pending_user->pending_deposit [color="blue", label="confirm-pay"]; - pending_user->deleted [color="blue", label="cancel"]; - pending_user->aborted [label="timeout"]; + pending_user->pending_deposit [color="blue"]; - pending_deposit->done; - pending_deposit->suspended_deposit [color="blue", label="suspend"]; - pending_deposit->aborting_refresh [color="red", label="failure:timeout"]; - - suspended_deposit->pending_deposit [color="blue", label="resume"]; - suspended_deposit->aborting_refund [color="blue", label="abort"]; - - aborting_refund->aborting_refresh; - aborting_refund->aborting_refresh [color="red", label="failure"]; - aborting_refund->failed [color="blue", label="force-abort"]; + pending_deposit->done [color=green]; + pending_deposit->aborting_refresh [color=red]; aborting_refresh->aborted; - aborting_refresh->failed [color="red", label="failure"]; - aborting_refresh->failed [color="blue", label="force-abort"]; - - aborted->deleted [color="blue", label="delete"]; - failed->deleted [color="blue", label="delete"]; - done->deleted [color="blue", label="delete"]; - } diff --git a/transaction-push-credit-states.dot b/transaction-push-credit-states.dot index 41106995..c51da308 100644 --- a/transaction-push-credit-states.dot +++ b/transaction-push-credit-states.dot @@ -1,75 +1,37 @@ digraph G { - initial[label="", shape="circle"]; + initial[label="", shape="circle", xlabel="peer-push-credit"]; pending_download[label="pending(download)"]; - suspended_download[label="suspended(download)", shape="box"]; - pending_user[label="pending(user)", shape="box"]; - pending_merge[label="pending(merge)"]; - pending_merge_kyc[label="pending(merge-kyc)"]; - suspended_merge_kyc[label="suspended(merge-kyc)", shape="box"]; - pending_withdraw[label="pending(withdraw)"]; - suspended_withdraw[label="suspended(withdraw)", shape="box"]; - pending_withdraw_kyc[label="pending(withdraw-kyc)"]; - suspended_withdraw_kyc[label="suspended(withdraw-kyc)", shape="box"]; - pending_withdraw_aml[label="pending(withdraw-aml)"]; - suspended_withdraw_aml[label="suspended(withdraw-aml)", shape="box"]; - - failed[label="failed", shape="box"]; - done[label="done", shape="box"]; - deleted[label="deleted", shape="box"]; + pending_user[label="dialog", shape="box"]; + pending_merge[label="merge"]; + pending_merge_kyc[label="merge-kyc"]; + pending_withdraw[label="withdraw"]; + pending_withdraw_kyc[label="withdraw-kyc"]; + pending_withdraw_aml[label="withdraw-aml"]; subgraph { - rank = same; pending_withdraw; failed; + rank=same; + pending_merge; pending_withdraw_kyc; pending_withdraw_aml; } - initial->pending_download [color="blue", label="URI trigger"]; - - pending_download->suspended_download [color="blue", label="suspend"]; - pending_download->pending_user; - - suspended_download->pending_download [color="blue", label="resume"]; - suspended_download->deleted [color="blue", label="force-delete"]; - - pending_user->pending_merge [color="blue", label="accept"]; - pending_user->deleted [color="blue", label="force-delete"]; - pending_user->failed [label="timeout"]; - - pending_merge->pending_withdraw; - pending_merge->pending_merge_kyc [label="kyc-required"]; - pending_merge->failed [label="timeout"]; - pending_merge->failed [color="red", label="failure"]; - - pending_merge_kyc->pending_merge [color="purple", label="poll-success"]; - pending_merge_kyc->suspended_merge_kyc [color="blue", label="suspend"]; - pending_merge_kyc->failed [label="timeout"]; - - suspended_merge_kyc->pending_merge_kyc [color="blue", label="resume"]; - suspended_merge_kyc->deleted [color="blue", label="force-delete"]; - suspended_merge_kyc->failed [label="timeout"]; - - pending_withdraw->pending_withdraw_kyc [label="kyc-required"]; - pending_withdraw->pending_withdraw_aml [label="aml-required"]; - pending_withdraw->done; - pending_withdraw->suspended_withdraw [color="blue", label="suspend"]; - pending_withdraw->failed [color="red", label="failure"]; + done[label="done", shape="box"]; - suspended_withdraw->pending_withdraw [color="blue", label="resume"]; - suspended_withdraw->deleted [color="blue", label="force-delete"]; + initial->pending_download; + pending_download->pending_user [color=green]; - pending_withdraw_kyc->suspended_withdraw_kyc [color="blue", label="suspend"]; - pending_withdraw_kyc->pending_withdraw [color="purple", label="poll-success"]; + pending_user->pending_merge [color="blue", label="OK"]; - suspended_withdraw_kyc->pending_withdraw_kyc [color="blue", label="resume"]; - suspended_withdraw_kyc->deleted [color="blue", label="force-delete"]; + pending_merge->pending_withdraw [color=green]; + pending_merge->pending_merge_kyc [color=red]; - pending_withdraw_aml->suspended_withdraw_aml [color="blue", label="suspend"]; - pending_withdraw_aml->pending_withdraw [color="purple", label="poll-success"]; + pending_merge_kyc->pending_merge [color="green"]; - suspended_withdraw_aml->pending_withdraw_aml [color="blue", label="resume"]; - suspended_withdraw_aml->deleted [color="blue", label="force-delete"]; + pending_withdraw->pending_withdraw_kyc [color=red]; + pending_withdraw->pending_withdraw_aml [color=red]; + pending_withdraw->done [color=green]; - failed->deleted [color="blue", label="delete"]; - done->deleted [color="blue", label="delete"]; + pending_withdraw_kyc->pending_withdraw [color="green"]; + pending_withdraw_aml->pending_withdraw [color="green"]; } diff --git a/transaction-push-debit-states.dot b/transaction-push-debit-states.dot index 4d13c155..47b7bc54 100644 --- a/transaction-push-debit-states.dot +++ b/transaction-push-debit-states.dot @@ -1,56 +1,32 @@ digraph G { - initial[label="", shape="circle"]; - pending_create[label="pending(purse-create)"]; - suspended_create[label="suspended(purse-create)", shape="box"]; - pending_qr[label="pending(qr-ready)"]; - aborting_delete[label="aborting(delete-purse)"]; - aborting_refresh[label="aborting(refresh)"]; - aborting_refund[label="aborting(refund)"]; - - // FIXME(CG): operation unclear - // pending_refundable[label="pending(refundable)"]; - + initial[label="", shape="circle", xlabel="peer-push-debit"]; + pending_create[label="purse-create"]; + pending_qr[label="qr-ready"]; + aborting_delete[label="delete-purse", style=dashed]; + aborting_refresh[label="refresh", style=dashed]; done[label="done", shape="box"]; aborted[label="aborted", shape="box"]; - failed[label="failed", shape="box"]; - deleted[label="deleted", shape="box"]; subgraph { - rank = same; done; aborted; failed; + rank = same; done; aborted; } - initial->pending_create [color="blue", label="push debit form data"]; - - pending_create->suspended_create [color="blue", label="suspend"]; - pending_create->aborting_refund [color="red", label="failure"]; - pending_create->pending_qr; + subgraph { + rank=same; pending_qr;aborting_delete; aborting_refresh; + } - suspended_create->pending_create [color="blue", label="resume"]; - suspended_create->aborting_refund [color="blue", label="abort"]; + initial->pending_create; - pending_qr->aborting_delete [color="blue", label="abort"]; - pending_qr->aborting_refresh [label="purse-timeout"]; - pending_qr->done [label="poll-success"]; + pending_create->pending_qr [color=green]; - // FIXME(CG): or go to delete_purse? Or just retry? - pending_qr->aborting_refresh [color="red", label="poll-failure"]; + pending_qr->aborting_delete [color="blue", style=dashed]; + pending_qr->aborting_refresh [xlabel="timeout"]; + pending_qr->done [color=green]; aborting_delete->aborting_refresh; - aborting_delete->done [color="red", label="processed-failed\n(already-merged)"]; - aborting_delete->aborting_refresh [color="red", label="failed(other)"]; - aborting_delete->failed [color="blue", label="abort-force"]; + aborting_delete->done [color="red", label="already\nmerged"]; + aborting_delete->aborting_refresh [color="red"]; aborting_refresh->aborted; - aborting_refresh->failed [color="red", label="failed"]; - aborting_refresh->failed [color="blue", label="abort-force"]; - - aborting_refund->aborting_refresh; - aborting_refund->aborting_refresh [color="red", label="failed"]; - aborting_refund->failed [color="blue", label="abort-force"]; - - done->deleted [color="blue", label="delete"]; - aborted->deleted [color="blue", label="delete"]; - failed->deleted [color="blue", label="delete"]; - } |