From 36cc55e75a995873340d7ec9668f82ab4df1c900 Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Wed, 13 Mar 2019 20:27:49 -0700 Subject: [PATCH] Reliable tx submission diagram (draft) --- .../_img-sources/reliable-tx-submission.uxf | 666 ++++++++++++++++++ 1 file changed, 666 insertions(+) create mode 100644 content/_img-sources/reliable-tx-submission.uxf diff --git a/content/_img-sources/reliable-tx-submission.uxf b/content/_img-sources/reliable-tx-submission.uxf new file mode 100644 index 0000000000..7df6577d38 --- /dev/null +++ b/content/_img-sources/reliable-tx-submission.uxf @@ -0,0 +1,666 @@ + + + 10 + + UMLClass + + 470 + 80 + 180 + 90 + + Find the latest validated ledger index. Call this value A. +style=wordwrap + + + + Relation + + 540 + 40 + 30 + 60 + + lt=<- + 10.0;40.0;10.0;10.0 + + + UMLSpecialState + + 540 + 30 + 20 + 20 + + type=initial + + + + UMLClass + + 470 + 200 + 180 + 110 + + Construct transaction JSON including Sequence and LastLedgerSequence. +(LastLedgerSequence is > A) +style=wordwrap + + + + Relation + + 540 + 160 + 30 + 60 + + lt=<- + 10.0;40.0;10.0;10.0 + + + Relation + + 540 + 300 + 30 + 60 + + lt=<- + 10.0;40.0;10.0;10.0 + + + UMLClass + + 470 + 340 + 180 + 50 + + Sign transaction. +style=wordwrap + + + + UMLClass + + 470 + 420 + 180 + 130 + + Save transaction to persistent storage. Be sure to include the hash, Sequence, LastLedgerSequence, and the validated ledger index. +style=wordwrap + + + + Relation + + 540 + 380 + 30 + 60 + + lt=<- + 10.0;40.0;10.0;10.0 + + + Relation + + 540 + 540 + 30 + 60 + + lt=<- + 10.0;40.0;10.0;10.0 + + + Text + + 490 + 0 + 160 + 30 + + New transaction +style=wordwrap + + + + UMLClass + + 470 + 580 + 180 + 50 + + Submit transaction. +style=wordwrap + + + + UMLTimer + + 480 + 660 + 140 + 90 + + Wait ~4s for next +validated ledger + + + + UMLClass + + 460 + 790 + 180 + 50 + + Check status of transaction by hash. +style=wordwrap + + + + Relation + + 540 + 740 + 30 + 70 + + lt=<- + 10.0;50.0;10.0;10.0 + + + UMLSpecialState + + 530 + 880 + 40 + 40 + + type=decision + + + + Relation + + 540 + 830 + 30 + 70 + + lt=<- + 10.0;50.0;10.0;10.0 + + + Relation + + 560 + 880 + 220 + 50 + + lt=<- +[transaction is not +in a validated ledger] + 200.0;20.0;10.0;20.0 + + + Relation + + 540 + 910 + 180 + 130 + + lt=<- +[transaction is +in a validated ledger] + 10.0;110.0;10.0;10.0 + + + UMLClass + + 460 + 1020 + 180 + 50 + + Save final outcome to persistent storage. +style=wordwrap + + + + UMLSpecialState + + 540 + 1100 + 20 + 20 + + type=final + + + + Relation + + 540 + 1060 + 30 + 60 + + lt=<- + 10.0;40.0;10.0;10.0 + + + Text + + 530 + 1120 + 60 + 30 + + Done +style=wordwrap + + + + UMLSpecialState + + 760 + 880 + 40 + 40 + + type=decision + + + + Relation + + 570 + 670 + 410 + 230 + + lt=<- +r2=[latest validated leger \nis < LastLedgerSequence] + 10.0;10.0;210.0;10.0;210.0;210.0 + + + Relation + + 770 + 910 + 280 + 70 + + lt=<- +r1=[latest validated leger \nis ≥ LastLedgerSequence] + 260.0;50.0;10.0;50.0;10.0;10.0 + + + UMLSpecialState + + 1030 + 940 + 40 + 40 + + type=decision + + + + Relation + + 1040 + 970 + 320 + 90 + + lt=<- +[server has continuous ledger history +from A to LastLedgerSequence, inclusive] + + 10.0;70.0;10.0;10.0 + + + UMLSpecialState + + 1030 + 1140 + 40 + 40 + + type=decision + + + + Relation + + 1040 + 1100 + 30 + 60 + + lt=<- + 10.0;40.0;10.0;10.0 + + + Relation + + 1060 + 710 + 300 + 270 + + lt=<- +[server does not have +continuous ledger history +from A to LastLedgerSequence +(inclusive)] + + 70.0;10.0;70.0;250.0;10.0;250.0 + + + UMLClass + + 1020 + 660 + 180 + 60 + + Wait for gaps to fill in or ask a different server. +style=wordwrap + + + + Relation + + 770 + 670 + 270 + 30 + + lt=<- + 10.0;10.0;250.0;10.0 + + + UMLClass + + 970 + 1040 + 180 + 70 + + Look up account Sequence number in latest validated ledger. +style=wordwrap + + + + Relation + + 860 + 1140 + 190 + 60 + + lt=<- +[Account Sequence is +less than or equal to +transaction Sequence] + 10.0;20.0;170.0;20.0 + + + UMLSpecialState + + 770 + 1310 + 20 + 20 + + type=flow_final + + + + UMLClass + + 690 + 1120 + 180 + 80 + + Transaction has not been included in any validated ledger and never will be. +style=wordwrap + + + + UMLClass + + 690 + 1230 + 180 + 50 + + Save final outcome to persistent storage. +style=wordwrap + + + + Relation + + 770 + 1190 + 30 + 60 + + lt=<- + 10.0;40.0;10.0;10.0 + + + Relation + + 770 + 1270 + 30 + 60 + + lt=<- + 10.0;40.0;10.0;10.0 + + + Text + + 760 + 1330 + 60 + 30 + + Done +style=wordwrap + + + + UMLSpecialState + + 210 + 250 + 20 + 20 + + type=initial + + + + Text + + 140 + 220 + 190 + 30 + + Recover from outage +style=wordwrap + + + + Relation + + 1060 + 1140 + 260 + 60 + + lt=<- +[Account Sequence is +greater than transaction +Sequence] + 240.0;20.0;10.0;20.0 + + + UMLClass + + 1300 + 1130 + 180 + 80 + + Unknown transaction has been validated. Manual intervention recommended. +style=wordwrap + + + + UMLClass + + 140 + 300 + 180 + 80 + + Check persistent storage for transactions without a final outcome saved. +style=wordwrap + + + + Relation + + 210 + 260 + 30 + 60 + + lt=<- + 10.0;40.0;10.0;10.0 + + + Relation + + 210 + 370 + 30 + 60 + + lt=<- + 10.0;40.0;10.0;10.0 + + + UMLSpecialState + + 200 + 410 + 40 + 40 + + type=decision + + + + Relation + + 230 + 420 + 210 + 110 + + lt=<- +[final outcomes of +all transactions +are recorded] + 70.0;90.0;70.0;10.0;10.0;10.0 + + + Text + + 280 + 530 + 60 + 30 + + Done +style=wordwrap + + + + UMLSpecialState + + 290 + 510 + 20 + 20 + + type=final + + + + Relation + + 0 + 420 + 240 + 250 + + lt=<- +r2=[final outcomes of\nsome transactions\nare not recorded] +r2pos=-50,100 + 220.0;230.0;220.0;190.0;140.0;190.0;140.0;10.0;200.0;10.0 + + + Relation + + 540 + 620 + 30 + 60 + + lt=<- + 10.0;40.0;10.0;10.0 + + + UMLClass + + 140 + 650 + 180 + 100 + + Repeat the following steps for each transaction without a final outcome recorded. +style=wordwrap + + + + Relation + + 220 + 740 + 260 + 90 + + lt=<- + 240.0;70.0;10.0;70.0;10.0;10.0 + +