diff --git a/content/_img-sources/reliable-tx-submission.uxf b/content/_img-sources/reliable-tx-submission.uxf index 7df6577d38..7884d1bcf4 100644 --- a/content/_img-sources/reliable-tx-submission.uxf +++ b/content/_img-sources/reliable-tx-submission.uxf @@ -4,8 +4,8 @@ UMLClass - 470 - 80 + 160 + 60 180 90 @@ -16,19 +16,19 @@ style=wordwrap Relation - 540 - 40 - 30 - 60 + 50 + 50 + 130 + 70 lt=<- - 10.0;40.0;10.0;10.0 + 110.0;50.0;10.0;50.0;10.0;10.0 UMLSpecialState - 540 - 30 + 50 + 40 20 20 @@ -38,8 +38,8 @@ style=wordwrap UMLClass - 470 - 200 + 390 + 50 180 110 @@ -51,30 +51,30 @@ style=wordwrap Relation - 540 - 160 - 30 - 60 + 330 + 90 + 80 + 30 lt=<- - 10.0;40.0;10.0;10.0 + 60.0;10.0;10.0;10.0 Relation - 540 - 300 - 30 - 60 + 560 + 90 + 70 + 30 lt=<- - 10.0;40.0;10.0;10.0 + 50.0;10.0;10.0;10.0 UMLClass - 470 - 340 + 610 + 80 180 50 @@ -85,8 +85,8 @@ style=wordwrap UMLClass - 470 - 420 + 840 + 50 180 130 @@ -97,30 +97,30 @@ style=wordwrap Relation - 540 - 380 - 30 - 60 + 780 + 90 + 80 + 30 lt=<- - 10.0;40.0;10.0;10.0 + 60.0;10.0;10.0;10.0 Relation - 540 - 540 - 30 - 60 + 1010 + 90 + 80 + 30 lt=<- - 10.0;40.0;10.0;10.0 + 60.0;10.0;10.0;10.0 Text - 490 - 0 + 10 + 10 160 30 @@ -131,8 +131,8 @@ style=wordwrap UMLClass - 470 - 580 + 1070 + 80 180 50 @@ -143,8 +143,8 @@ style=wordwrap UMLTimer - 480 - 660 + 1080 + 230 140 90 @@ -155,8 +155,8 @@ validated ledger UMLClass - 460 - 790 + 90 + 530 180 50 @@ -164,22 +164,11 @@ validated ledger style=wordwrap - - Relation - - 540 - 740 - 30 - 70 - - lt=<- - 10.0;50.0;10.0;10.0 - UMLSpecialState - 530 - 880 + 370 + 530 40 40 @@ -189,45 +178,46 @@ style=wordwrap Relation - 540 - 830 - 30 - 70 + 260 + 540 + 130 + 30 lt=<- - 10.0;50.0;10.0;10.0 + 110.0;10.0;10.0;10.0 Relation - 560 - 880 - 220 - 50 + 400 + 530 + 240 + 60 lt=<- -[transaction is not -in a validated ledger] - 200.0;20.0;10.0;20.0 +[transaction not found, +or is found in a +non-validated ledger] + 220.0;20.0;10.0;20.0 Relation - 540 - 910 - 180 - 130 + 160 + 560 + 250 + 120 lt=<- [transaction is in a validated ledger] - 10.0;110.0;10.0;10.0 + 10.0;100.0;10.0;60.0;230.0;60.0;230.0;10.0 UMLClass - 460 - 1020 + 90 + 660 180 50 @@ -238,8 +228,8 @@ style=wordwrap UMLSpecialState - 540 - 1100 + 160 + 740 20 20 @@ -249,8 +239,8 @@ style=wordwrap Relation - 540 - 1060 + 160 + 700 30 60 @@ -260,8 +250,8 @@ style=wordwrap Text - 530 - 1120 + 150 + 760 60 30 @@ -272,8 +262,8 @@ style=wordwrap UMLSpecialState - 760 - 880 + 620 + 530 40 40 @@ -283,32 +273,34 @@ style=wordwrap Relation - 570 - 670 - 410 - 230 + 630 + 240 + 640 + 310 lt=<- -r2=[latest validated leger \nis < LastLedgerSequence] - 10.0;10.0;210.0;10.0;210.0;210.0 +r2=[latest validated ledger \nis < LastLedgerSequence] +r2pos=20,5 + 550.0;10.0;620.0;10.0;620.0;270.0;10.0;270.0;10.0;290.0 Relation - 770 - 910 - 280 - 70 + 650 + 540 + 240 + 50 lt=<- -r1=[latest validated leger \nis ≥ LastLedgerSequence] - 260.0;50.0;10.0;50.0;10.0;10.0 +r1=[latest validated ledger \nis ≥ LastLedgerSequence] +r1pos=-10,30 + 220.0;10.0;10.0;10.0 UMLSpecialState - 1030 - 940 + 870 + 530 40 40 @@ -318,22 +310,22 @@ r1=[latest validated leger \nis ≥ LastLedgerSequence] Relation - 1040 - 970 - 320 - 90 + 420 + 560 + 490 + 160 lt=<- [server has continuous ledger history from A to LastLedgerSequence, inclusive] - 10.0;70.0;10.0;10.0 + 10.0;140.0;10.0;90.0;470.0;90.0;470.0;10.0 UMLSpecialState - 1030 - 1140 + 630 + 710 40 40 @@ -343,35 +335,37 @@ from A to LastLedgerSequence, inclusive] Relation - 1040 - 1100 - 30 - 60 + 520 + 720 + 130 + 30 lt=<- - 10.0;40.0;10.0;10.0 + 110.0;10.0;10.0;10.0 Relation - 1060 - 710 - 300 - 270 + 900 + 530 + 230 + 130 lt=<- -[server does not have -continuous ledger history -from A to LastLedgerSequence +[server does not +have continuous +ledger history +from A to +LastLedgerSequence (inclusive)] - 70.0;10.0;70.0;250.0;10.0;250.0 + 210.0;20.0;10.0;20.0 UMLClass - 1020 - 660 + 1110 + 530 180 60 @@ -382,19 +376,19 @@ style=wordwrap Relation - 770 - 670 - 270 - 30 + 1240 + 240 + 90 + 330 lt=<- - 10.0;10.0;250.0;10.0 + 10.0;10.0;70.0;10.0;70.0;310.0;50.0;310.0 UMLClass - 970 - 1040 + 350 + 700 180 70 @@ -405,22 +399,22 @@ style=wordwrap Relation - 860 - 1140 - 190 - 60 + 240 + 740 + 430 + 140 lt=<- [Account Sequence is less than or equal to transaction Sequence] - 10.0;20.0;170.0;20.0 + 10.0;120.0;10.0;70.0;410.0;70.0;410.0;10.0 UMLSpecialState - 770 - 1310 + 690 + 880 20 20 @@ -430,8 +424,8 @@ transaction Sequence] UMLClass - 690 - 1120 + 200 + 860 180 80 @@ -442,8 +436,8 @@ style=wordwrap UMLClass - 690 - 1230 + 450 + 870 180 50 @@ -454,30 +448,30 @@ style=wordwrap Relation - 770 - 1190 - 30 - 60 + 370 + 880 + 100 + 30 lt=<- - 10.0;40.0;10.0;10.0 + 80.0;10.0;10.0;10.0 Relation - 770 - 1270 - 30 - 60 + 620 + 880 + 90 + 30 lt=<- - 10.0;40.0;10.0;10.0 + 70.0;10.0;10.0;10.0 Text - 760 - 1330 + 680 + 900 60 30 @@ -488,8 +482,8 @@ style=wordwrap UMLSpecialState - 210 - 250 + 50 + 220 20 20 @@ -499,8 +493,8 @@ style=wordwrap Text - 140 - 220 + 10 + 190 190 30 @@ -511,22 +505,22 @@ style=wordwrap Relation - 1060 - 1140 - 260 + 660 + 710 + 240 60 lt=<- [Account Sequence is greater than transaction Sequence] - 240.0;20.0;10.0;20.0 + 220.0;20.0;10.0;20.0 UMLClass - 1300 - 1130 + 880 + 700 180 80 @@ -537,8 +531,8 @@ style=wordwrap UMLClass - 140 - 300 + 160 + 240 180 80 @@ -549,30 +543,30 @@ style=wordwrap Relation - 210 - 260 - 30 + 50 + 230 + 130 60 lt=<- - 10.0;40.0;10.0;10.0 + 110.0;40.0;10.0;40.0;10.0;10.0 Relation - 210 - 370 - 30 - 60 + 330 + 260 + 100 + 30 lt=<- - 10.0;40.0;10.0;10.0 + 80.0;10.0;10.0;10.0 UMLSpecialState - 200 - 410 + 410 + 250 40 40 @@ -582,22 +576,22 @@ style=wordwrap Relation - 230 - 420 - 210 - 110 + 420 + 280 + 150 + 130 lt=<- [final outcomes of all transactions are recorded] - 70.0;90.0;70.0;10.0;10.0;10.0 + 10.0;110.0;10.0;10.0 Text - 280 - 530 + 410 + 410 60 30 @@ -608,8 +602,8 @@ style=wordwrap UMLSpecialState - 290 - 510 + 420 + 390 20 20 @@ -619,32 +613,33 @@ style=wordwrap Relation - 0 - 420 - 240 - 250 + 440 + 250 + 230 + 60 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 +[final outcomes of +some transactions +are not recorded] + 210.0;20.0;10.0;20.0 Relation - 540 - 620 + 1140 + 120 30 - 60 + 130 lt=<- - 10.0;40.0;10.0;10.0 + 10.0;110.0;10.0;10.0 UMLClass - 140 - 650 + 650 + 220 180 100 @@ -655,12 +650,40 @@ style=wordwrap Relation - 220 - 740 - 260 - 90 + 850 + 310 + 320 + 160 lt=<- - 240.0;70.0;10.0;70.0;10.0;10.0 + 10.0;140.0;300.0;140.0;300.0;10.0 + + + UMLNote + + 1080 + 700 + 230 + 230 + + bg=#fed74c +transparency=0 +style=wordwrap +Some reasons an unknown transaction may have been validated: +- The transaction was malleable and succeeded with a different hash. +- A different program or person with your secret key is also sending transactions from the same account. +- You previously sent a transaction, but lost your record of it. + + + + Relation + + 50 + 260 + 830 + 310 + + lt=<- + 40.0;290.0;10.0;290.0;10.0;190.0;810.0;190.0;810.0;10.0;780.0;10.0 diff --git a/content/tutorials/use-simple-xrp-payments/reliable-transaction-submission.md b/content/tutorials/use-simple-xrp-payments/reliable-transaction-submission.md index 3f4e3436e9..0d5c05137a 100644 --- a/content/tutorials/use-simple-xrp-payments/reliable-transaction-submission.md +++ b/content/tutorials/use-simple-xrp-payments/reliable-transaction-submission.md @@ -66,6 +66,10 @@ RippleAPI uses the `maxLedgerVersion` field of [Transaction Instructions](ripple ## Best Practices +The following diagram summarizes the recommended flow for submitting a transaction and determining its outcome: + +[![Reliable transaction submission flowchart](img/reliable-tx-submission.svg)](img/reliable-tx-submission.svg) + ### Reliable Transactions Submission diff --git a/img/reliable-tx-submission.png b/img/reliable-tx-submission.png new file mode 100644 index 0000000000..bf962736c3 Binary files /dev/null and b/img/reliable-tx-submission.png differ diff --git a/img/reliable-tx-submission.svg b/img/reliable-tx-submission.svg new file mode 100644 index 0000000000..cca91d34c1 --- /dev/null +++ b/img/reliable-tx-submission.svg @@ -0,0 +1,609 @@ + + +Some reasons an unknowntransaction may have beenvalidated:- The transaction wasmalleable and succeeded witha different hash.- A different program orperson with your secret key isalso sending transactionsfrom the same account.- You previously sent atransaction, but lost yourrecord of it.Repeat the followingsteps for eachtransaction without afinal outcomerecorded.DoneCheck persistentstorage fortransactions without afinal outcome saved.Unknown transactionhas been validated.Manual interventionrecommended.Recover from outageDoneSave final outcome topersistent storage.Transaction has notbeen included in anyvalidated ledger andnever will be.Look up accountSequence number inlatest validated ledger.Wait for gaps to fill inor ask a differentserver.DoneSave final outcome topersistent storage.Check status oftransaction by hash.Wait ~4s for nextvalidated ledgerSubmit transaction.New transactionSave transaction topersistent storage. Besure to include thehash, Sequence,LastLedgerSequence,and the validatedledger index.Sign transaction.Construct transactionJSON includingSequence andLastLedgerSequence.(LastLedgerSequenceis > A)Find the latestvalidated ledger index.Call this value A.[final outcomes ofsome transactionsare not recorded][final outcomes ofall transactionsare recorded][Account Sequence isgreater than transaction Sequence][Account Sequence is less than or equal totransaction Sequence][server does not have continuous ledger history from A to LastLedgerSequence (inclusive)][server has continuous ledger history from A to LastLedgerSequence, inclusive][latest validated ledger is ≥ LastLedgerSequence][latest validated ledger is < LastLedgerSequence][transaction is in a validated ledger][transaction not found,or is found in anon-validated ledger]