TicketBatch: diagrams, more references

This commit is contained in:
mDuo13
2020-11-24 17:50:08 -08:00
parent 9e3c369a8d
commit 175ed822e9
8 changed files with 871 additions and 9 deletions

View File

@@ -0,0 +1,208 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="14.2">
<zoom_level>10</zoom_level>
<element>
<id>UMLClass</id>
<coordinates>
<x>420</x>
<y>150</y>
<w>130</w>
<h>100</h>
</coordinates>
<panel_attributes>TicketCreate
transaction
--
Account: rf1Bi...
TicketCount: 3
Sequence: 101</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>660</x>
<y>80</y>
<w>440</w>
<h>330</h>
</coordinates>
<panel_attributes>Ledger State Data (After)
lt=.</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>690</x>
<y>130</y>
<w>130</w>
<h>110</h>
</coordinates>
<panel_attributes>Account
--
ID: rf1Bi...
*Sequence: 104*</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>690</x>
<y>270</y>
<w>120</w>
<h>70</h>
</coordinates>
<panel_attributes>Ticket
--
Account: rf1Bi...
Sequence: 101</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>820</x>
<y>270</y>
<w>120</w>
<h>70</h>
</coordinates>
<panel_attributes>Ticket
--
Account: rf1Bi...
Sequence: 102</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>950</x>
<y>270</y>
<w>120</w>
<h>70</h>
</coordinates>
<panel_attributes>Ticket
--
Account: rf1Bi...
Sequence: 103</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>80</x>
<y>70</y>
<w>240</w>
<h>340</h>
</coordinates>
<panel_attributes>Ledger State Data (Before)
lt=.</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>130</x>
<y>130</y>
<w>130</w>
<h>110</h>
</coordinates>
<panel_attributes>Account
--
ID: rf1Bi...
Sequence: 101</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>250</x>
<y>170</y>
<w>190</w>
<h>30</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;&lt;-</panel_attributes>
<additional_attributes>170.0;10.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>540</x>
<y>160</y>
<w>170</w>
<h>50</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;&lt;-
updates</panel_attributes>
<additional_attributes>150.0;20.0;10.0;20.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>540</x>
<y>210</y>
<w>190</w>
<h>160</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;&lt;-</panel_attributes>
<additional_attributes>170.0;130.0;140.0;140.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>540</x>
<y>210</y>
<w>330</w>
<h>170</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;&lt;-</panel_attributes>
<additional_attributes>310.0;130.0;140.0;150.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>540</x>
<y>210</y>
<w>470</w>
<h>190</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;&lt;-</panel_attributes>
<additional_attributes>450.0;130.0;150.0;170.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Text</id>
<coordinates>
<x>540</x>
<y>280</y>
<w>70</w>
<h>30</h>
</coordinates>
<panel_attributes>creates</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>80</x>
<y>370</y>
<w>240</w>
<h>40</h>
</coordinates>
<panel_attributes>...
style=wordwrap
halign=center</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>660</x>
<y>370</y>
<w>440</w>
<h>40</h>
</coordinates>
<panel_attributes>...
style=wordwrap
halign=center</panel_attributes>
<additional_attributes/>
</element>
</diagram>

View File

@@ -0,0 +1,228 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="14.2">
<zoom_level>10</zoom_level>
<element>
<id>UMLClass</id>
<coordinates>
<x>750</x>
<y>80</y>
<w>440</w>
<h>330</h>
</coordinates>
<panel_attributes>Ledger State Data (After)
lt=.</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>70</x>
<y>120</y>
<w>130</w>
<h>110</h>
</coordinates>
<panel_attributes>Account
--
ID: rf1Bi...
Sequence: 104</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>70</x>
<y>260</y>
<w>120</w>
<h>70</h>
</coordinates>
<panel_attributes>Ticket
--
Account: rf1Bi...
Sequence: 101</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>200</x>
<y>260</y>
<w>120</w>
<h>70</h>
</coordinates>
<panel_attributes>Ticket
--
Account: rf1Bi...
Sequence: 102</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>330</x>
<y>260</y>
<w>120</w>
<h>70</h>
</coordinates>
<panel_attributes>Ticket
--
Account: rf1Bi...
Sequence: 103</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>530</x>
<y>120</y>
<w>170</w>
<h>120</h>
</coordinates>
<panel_attributes>(Any type of
transaction)
--
Account: rf1Bi...
Sequence: 0
TicketSequence: 102
...</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>40</x>
<y>80</y>
<w>440</w>
<h>330</h>
</coordinates>
<panel_attributes>Ledger State Data (Before)
lt=.</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>280</x>
<y>200</y>
<w>270</w>
<h>80</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;&lt;-
used</panel_attributes>
<additional_attributes>250.0;10.0;10.0;60.0</additional_attributes>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>790</x>
<y>130</y>
<w>130</w>
<h>110</h>
</coordinates>
<panel_attributes>Account
--
ID: rf1Bi...
Sequence: 104</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>950</x>
<y>140</y>
<w>130</w>
<h>30</h>
</coordinates>
<panel_attributes>Doesn't change</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>890</x>
<y>150</y>
<w>90</w>
<h>50</h>
</coordinates>
<panel_attributes>lt=&lt;-</panel_attributes>
<additional_attributes>10.0;30.0;70.0;10.0</additional_attributes>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>790</x>
<y>270</y>
<w>120</w>
<h>70</h>
</coordinates>
<panel_attributes>Ticket
--
Account: rf1Bi...
Sequence: 101</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>1040</x>
<y>270</y>
<w>120</w>
<h>70</h>
</coordinates>
<panel_attributes>Ticket
--
Account: rf1Bi...
Sequence: 103</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>690</x>
<y>200</y>
<w>280</w>
<h>100</h>
</coordinates>
<panel_attributes>lt=&lt;&lt;&lt;-
</panel_attributes>
<additional_attributes>260.0;80.0;220.0;60.0;60.0;40.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Text</id>
<coordinates>
<x>930</x>
<y>290</y>
<w>90</w>
<h>50</h>
</coordinates>
<panel_attributes>Ticket 102 deleted
style=wordwrap</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>40</x>
<y>370</y>
<w>440</w>
<h>40</h>
</coordinates>
<panel_attributes>...
style=wordwrap
halign=center</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Text</id>
<coordinates>
<x>750</x>
<y>370</y>
<w>440</w>
<h>40</h>
</coordinates>
<panel_attributes>...
style=wordwrap
halign=center</panel_attributes>
<additional_attributes/>
</element>
</diagram>

View File

@@ -2,9 +2,11 @@ A sequence number is a 32-bit unsigned integer that is used to make sure transac
Every [account in the XRP Ledger](accounts.html) has a sequence number in its `Sequence` field, which increases by 1 whenever that account sends a transaction and that transaction gets included in a [validated ledger](ledgers.html). Each [transaction](transaction-basics.html) also has a sequence number in its `Sequence` field, which must match the account's current sequence number when the transaction executes. For each account, each sequence number can only be used once, in numerical order.
[Tickets](tickets.html) :not_enabled: make some exceptions from these rules so that it is possible to send transactions out of the normal order. Tickets represent sequence numbers reserved for later use; a transaction can use a Ticket instead of a normal sequence number.
With the [DeletableAccounts amendment](known-amendments.html#deletableaccounts), the starting `Sequence` number for an account matches the [Ledger Index][] of the ledger version where the account was created. Before DeletableAccounts, every account started with `Sequence` number 1.
Whenever a transaction is included in a ledger, it uses up a sequence number regardless of whether the transaction executed successfully or failed with a [`tec`-class error code](tec-codes.html). Other transaction failures don't get included in ledgers, so they don't change the sender's sequence number (or have any other effects).
Whenever a transaction is included in a ledger, it uses up a sequence number (or Ticket) regardless of whether the transaction executed successfully or failed with a [`tec`-class error code](tec-codes.html). Other transaction failures don't get included in ledgers, so they don't change the sender's sequence number (or have any other effects).
Within the ledger, an [Address][] and a sequence number are sometimes used together to identify an object that was created by the validated transaction with that sender and sequence number. [Escrows](escrow.html) and [Offers](offers.html) are examples of objects identified this way.

View File

@@ -16,6 +16,7 @@
"PaymentChannelFund",
"SetRegularKey",
"SignerListSet",
"TicketCreate",
"TrustSet"
] %}
{% set pstxtypes = [

View File

@@ -1,5 +1,5 @@
---
html: reserves.html
html: tickets.html
funnel: Build
doc_type: Concepts
category: Payment System Basics
@@ -17,7 +17,7 @@ A Ticket in the XRP Ledger is a way of setting aside a [sequence number][Sequenc
[Transactions](transaction-basics.html) have sequence numbers so that any given transaction can execute no more than once. Sequence numbers also make sure any given transaction is unique: if you send the exact same amount of money to the same person multiple times, the Sequence Number is one detail that is guaranteed to be different each time. Finally, Sequence Numbers provide an elegant way to put transactions in a consistent order, even if some of them to arrive out of order when sent throughout the network.
However, there are some situations where sequence numbers are too limiting. Some possible situations include:
However, there are some situations where sequence numbers are too limiting. For example:
- Two or more users share access to an account, each with the ability to send transactions independently. If these users try to send transactions around the same time without coordinating first, they may each try to use the same Sequence number for different transactions, and only one can succeed.
- You may want to prepare and sign a transaction in advance, then save it in some secure storage so that it can be executed at any future point if certain events occur. However, if you want to continue using your account as normal in the meantime, you don't know what Sequence number the set-aside transaction will need.
@@ -28,17 +28,46 @@ Tickets provide a solution to all of these problems by setting aside sequence nu
## Tickets Are Reserved Sequence Numbers
A Ticket is a record that a sequence number has been set aside to be used later. An account first sends a [TicketCreate transaction][] to set aside one or more sequence numbers as Tickets; this puts a record in the ledger's state data, in the form of a [Ticket object][], for each sequence number reserved. Later, the account can use a specific Ticket instead of a sequence number; doing so removes the corresponding Ticket from the ledger's state data.
A Ticket is a record that a sequence number has been set aside to be used later. An account first sends a [TicketCreate transaction][] to set aside one or more sequence numbers as Tickets; this puts a record in the [ledger's state data](ledgers.html), in the form of a [Ticket object][], for each sequence number reserved.
Tickets are numbered using the sequence numbers that were set aside to create them. For example, if your account's current sequence number is 101 and you create 3 Tickets, those Tickets have Ticket Sequence numbers 101, 102, and 103. Doing so increases your account's sequence number to 104. After this point, you can send a transaction normally using sequence number 104, or you can send a transaction using any of the three Tickets you just created. Suppose you send a transaction using Ticket 102; doing so deletes Ticket 102 from the ledger. Your next transaction after that can use sequence number 104, Ticket 101, or Ticket 103.
Tickets are numbered using the sequence numbers that were set aside to create them. For example, if your account's current sequence number is 101 and you create 3 Tickets, those Tickets have Ticket Sequence numbers 101, 102, and 103. Doing so increases your account's sequence number to 104.
**Tip:** When you create Tickets, your account's sequence number increases by the number of Tickets you created. When you use a Ticket, your account's sequence number does not change, but the ledger deletes the Ticket you used.
{{ include_svg("img/ticket-creation.svg", "Diagram: Creating three Tickets") }}
Later, you can send a transaction using a specific Ticket instead of a sequence number; doing so removes the corresponding Ticket from the ledger's state data and does not change your account's normal sequence number. You can also still send transactions using normal sequence numbers without using Tickets. You can use any of your available Tickets in any order at any time, but each Ticket can only be used once.
{{ include_svg("img/ticket-usage.svg", "Diagram: Using Ticket 102.") }}
Continuing the above example, you can send a transaction using sequence number 104 or any of the three Tickets you created. If you send a transaction using Ticket 102, doing so deletes Ticket 102 from the ledger. Your next transaction after that can use sequence number 104, Ticket 101, or Ticket 103.
**Caution:** Each Ticket counts as a separate item for the [owner reserve](reserves.html), so you must set aside 5 XRP for each Ticket. (The XRP becomes available again after you use the Ticket.) This cost can add up quickly if you create a large number of Tickets at once.
As with sequence numbers, sending a transaction uses up the Ticket _if and only if_ the transaction is confirmed by [consensus](consensus.html). However, transactions that fail to do what they were intended to do can still be confirmed by consensus with [`tec`-class result codes](tec-codes.html).
***TODO: diagram depicting creating and using Tickets***
To look up what Tickets an account has available, use the [account_objects method][].
## Limitations
Any account can create and use Tickets on any type of transaction. However, some restrictions apply:
- Each Ticket can only be used once. It is possible to have multiple different candidate transactions
- Each account cannot have more than 250 Tickets in the ledger at a time. Therefore, you cannot create more than 250 Tickets at a time, either.
- You _can_ use a Ticket to create more Tickets. If you do, the Ticket you used does not count towards the total number of Tickets you can have at once.
- Each Ticket counts toward the [owner reserve](reserves.html), so you must set aside 5 XRP for each Ticket you have not used yet. The XRP becomes available for you to use again after the Ticket is used.
- Within an individual ledger, transactions that use Tickets execute after other transactions from the same sender. If an account has multiple transactions using Tickets in the same ledger version, those Tickets execute in order from lowest Ticket Sequence to highest. (For more information, see the documentation on consensus's [canonical order](consensus.html#calculate-and-share-validations).)
- To "cancel" a Ticket, use the Ticket to [perform a no-op](about-canceling-a-transaction.html) [AccountSet transaction][]. This deletes the Ticket so that you don't have to meet its reserve requirement.
## See Also
<!-- TODO: add a tutorial for creating & using a Ticket -->
- **Concepts:**
- [Multi-Signing](multi-signing.html)
- **References:**
- [TicketCreate transaction][]
- [Transaction Common Fields](transaction-common-fields.html)
- [Ticket object](ticket.html)
- [account_objects method][]
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -35,8 +35,6 @@ A TicketCreate transaction sets aside one or more [sequence numbers][Sequence Nu
|:-----------------|:-----------------|:------------------|:-------------------|
| `TicketCount` | Number | UInt32 | How many Tickets to create. This must be a positive number, and cannot cause the account to own more than 250 Tickets after executing this transaction. |
**Caution:** Each Ticket counts as a separate item for the [owner reserve](reserves.html), so you must set aside 5 XRP for each Ticket. (The XRP becomes available again after you use the Ticket.) This cost can add up quickly if you create a large number of Tickets at once.
**Tip:** This transaction increases the sending account's [sequence number][Sequence Number] by the number of tickets created (`TicketCount`). This is the only transaction that increases an account's sequence number by more than 1.
## Error Cases

193
img/ticket-creation.svg Normal file
View File

@@ -0,0 +1,193 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
<svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" width="1060" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" viewBox="60 50 1060 380" height="380" xmlns="http://www.w3.org/2000/svg" font-family="'Dialog'" font-style="normal" stroke-linejoin="miter" font-size="12px" stroke-dashoffset="0" image-rendering="auto"
><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
/><g
><defs id="defs1"
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"
><path d="M0 0 L2147483647 0 L2147483647 2147483647 L0 2147483647 L0 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath2"
><path d="M0 0 L0 40 L440 40 L440 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath3"
><path d="M0 0 L0 40 L240 40 L240 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath4"
><path d="M0 0 L0 30 L70 30 L70 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath5"
><path d="M0 0 L0 110 L130 110 L130 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath6"
><path d="M0 0 L0 340 L240 340 L240 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath7"
><path d="M0 0 L0 70 L120 70 L120 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath8"
><path d="M0 0 L0 330 L440 330 L440 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath9"
><path d="M0 0 L0 100 L130 100 L130 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath10"
><path d="M0 0 L0 190 L470 190 L470 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath11"
><path d="M0 0 L0 170 L330 170 L330 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath12"
><path d="M0 0 L0 160 L190 160 L190 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath13"
><path d="M0 0 L0 50 L170 50 L170 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath14"
><path d="M0 0 L0 30 L190 30 L190 0 Z"
/></clipPath
></defs
><g font-family="sans-serif" font-size="14px" transform="translate(660,370)"
><text x="213" xml:space="preserve" y="18.1094" clip-path="url(#clipPath2)" stroke="none"
>...</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(80,370)"
><text x="113" xml:space="preserve" y="18.1094" clip-path="url(#clipPath3)" stroke="none"
>...</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(540,280)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath4)" stroke="none"
>creates</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(130,130)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="128.5" height="108.5" y="0.5" clip-path="url(#clipPath5)" stroke="none"
/></g
><g transform="translate(130,130)"
><rect fill="none" x="0.5" width="128.5" height="108.5" y="0.5" clip-path="url(#clipPath5)"
/><text x="36" font-size="14px" y="18.1094" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account</text
><path fill="none" d="M1 24.1094 L129 24.1094" clip-path="url(#clipPath5)"
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>ID: rf1Bi...</text
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 101</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(80,70)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="238.5" height="338.5" y="0.5" clip-path="url(#clipPath6)" stroke="none"
/></g
><g stroke-dasharray="8,5" stroke-miterlimit="5" transform="translate(80,70)" stroke-linecap="butt"
><rect fill="none" x="0.5" width="238.5" height="338.5" y="0.5" clip-path="url(#clipPath6)"
/><text x="25" font-size="14px" y="18.1094" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Ledger State Data (Before)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(950,270)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath7)" stroke="none"
/></g
><g transform="translate(950,270)"
><rect fill="none" x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath7)"
/><text x="38" font-size="14px" y="18.1094" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Ticket</text
><path fill="none" d="M1 24.1094 L119 24.1094" clip-path="url(#clipPath7)"
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account: rf1Bi...</text
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 103</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(820,270)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath7)" stroke="none"
/></g
><g transform="translate(820,270)"
><rect fill="none" x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath7)"
/><text x="38" font-size="14px" y="18.1094" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Ticket</text
><path fill="none" d="M1 24.1094 L119 24.1094" clip-path="url(#clipPath7)"
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account: rf1Bi...</text
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 102</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(690,270)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath7)" stroke="none"
/></g
><g transform="translate(690,270)"
><rect fill="none" x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath7)"
/><text x="38" font-size="14px" y="18.1094" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Ticket</text
><path fill="none" d="M1 24.1094 L119 24.1094" clip-path="url(#clipPath7)"
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account: rf1Bi...</text
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 101</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(690,130)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="128.5" height="108.5" y="0.5" clip-path="url(#clipPath5)" stroke="none"
/></g
><g transform="translate(690,130)"
><rect fill="none" x="0.5" width="128.5" height="108.5" y="0.5" clip-path="url(#clipPath5)"
/><text x="36" font-size="14px" y="18.1094" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account</text
><path fill="none" d="M1 24.1094 L129 24.1094" clip-path="url(#clipPath5)"
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>ID: rf1Bi...</text
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" font-weight="bold" xml:space="preserve"
>Sequence: 104</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(660,80)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="438.5" height="328.5" y="0.5" clip-path="url(#clipPath8)" stroke="none"
/></g
><g stroke-dasharray="8,5" stroke-miterlimit="5" transform="translate(660,80)" stroke-linecap="butt"
><rect fill="none" x="0.5" width="438.5" height="328.5" y="0.5" clip-path="url(#clipPath8)"
/><text x="131" font-size="14px" y="18.1094" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Ledger State Data (After)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(420,150)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="128.5" height="98.5" y="0.5" clip-path="url(#clipPath9)" stroke="none"
/></g
><g transform="translate(420,150)"
><rect fill="none" x="0.5" width="128.5" height="98.5" y="0.5" clip-path="url(#clipPath9)"
/><text x="20" font-size="14px" y="18.1094" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>TicketCreate</text
><text x="25" font-size="14px" y="34.2188" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>transaction</text
><path fill="none" d="M1 40.2188 L129 40.2188" clip-path="url(#clipPath9)"
/><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account: rf1Bi...</text
><text x="5" font-size="14px" y="71.4375" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>TicketCount: 3</text
><text x="5" font-size="14px" y="87.5469" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 101</text
></g
><g transform="translate(540,210)"
><path fill="none" d="M449.5088 130.6322 L150.5 170.5" clip-path="url(#clipPath10)"
/><path fill="none" d="M150.5 170.5 L10.5 10.5" clip-path="url(#clipPath10)"
/><path d="M437.9857 125.611 L450.0044 130.5661 L439.7039 138.497 Z" clip-path="url(#clipPath10)" stroke="none"
/><path fill="none" d="M437.9857 125.611 L450.0044 130.5661 L439.7039 138.497 Z" clip-path="url(#clipPath10)"
/></g
><g transform="translate(540,210)"
><path fill="none" d="M309.5068 130.6168 L140.5 150.5" clip-path="url(#clipPath11)"
/><path fill="none" d="M140.5 150.5 L10.5 10.5" clip-path="url(#clipPath11)"
/><path d="M298.0627 125.4184 L310.0034 130.5584 L299.5817 138.3293 Z" clip-path="url(#clipPath11)" stroke="none"
/><path fill="none" d="M298.0627 125.4184 L310.0034 130.5584 L299.5817 138.3293 Z" clip-path="url(#clipPath11)"
/></g
><g transform="translate(540,210)"
><path fill="none" d="M169.5513 130.8162 L140.5 140.5" clip-path="url(#clipPath12)"
/><path fill="none" d="M140.5 140.5 L10.5 10.5" clip-path="url(#clipPath12)"
/><path d="M157.2896 128.0519 L170.0257 130.6581 L161.4005 140.3848 Z" clip-path="url(#clipPath12)" stroke="none"
/><path fill="none" d="M157.2896 128.0519 L170.0257 130.6581 L161.4005 140.3848 Z" clip-path="url(#clipPath12)"
/></g
><g transform="translate(540,160)"
><path fill="none" d="M149.5 20.5 L10.5 20.5" clip-path="url(#clipPath13)"
/><path d="M138.7417 14 L150 20.5 L138.7417 27 Z" clip-path="url(#clipPath13)" stroke="none"
/><path fill="none" d="M138.7417 14 L150 20.5 L138.7417 27 Z" clip-path="url(#clipPath13)"
/><text x="52.625" font-size="14px" y="32.1094" clip-path="url(#clipPath13)" font-family="sans-serif" stroke="none" xml:space="preserve"
>updates</text
></g
><g transform="translate(250,170)"
><path fill="none" d="M169.5 10.5 L10.5 10.5" clip-path="url(#clipPath14)"
/><path d="M158.7417 4 L170 10.5 L158.7417 17 Z" clip-path="url(#clipPath14)" stroke="none"
/><path fill="none" d="M158.7417 4 L170 10.5 L158.7417 17 Z" clip-path="url(#clipPath14)"
/></g
></g
></svg
>

After

Width:  |  Height:  |  Size: 12 KiB

203
img/ticket-usage.svg Normal file
View File

@@ -0,0 +1,203 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
<svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" width="1190" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" viewBox="20 60 1190 370" height="370" xmlns="http://www.w3.org/2000/svg" font-family="'Dialog'" font-style="normal" stroke-linejoin="miter" font-size="12px" stroke-dashoffset="0" image-rendering="auto"
><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
/><g
><defs id="defs1"
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"
><path d="M0 0 L2147483647 0 L2147483647 2147483647 L0 2147483647 L0 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath2"
><path d="M0 0 L0 40 L440 40 L440 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath3"
><path d="M0 0 L0 50 L90 50 L90 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath4"
><path d="M0 0 L0 70 L120 70 L120 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath5"
><path d="M0 0 L0 30 L130 30 L130 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath6"
><path d="M0 0 L0 110 L130 110 L130 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath7"
><path d="M0 0 L0 330 L440 330 L440 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath8"
><path d="M0 0 L0 120 L170 120 L170 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath9"
><path d="M0 0 L0 100 L280 100 L280 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath10"
><path d="M0 0 L0 80 L270 80 L270 0 Z"
/></clipPath
></defs
><g font-family="sans-serif" font-size="14px" transform="translate(750,370)"
><text x="213" xml:space="preserve" y="18.1094" clip-path="url(#clipPath2)" stroke="none"
>...</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(40,370)"
><text x="213" xml:space="preserve" y="18.1094" clip-path="url(#clipPath2)" stroke="none"
>...</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(930,290)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath3)" stroke="none"
>Ticket 102</text
><text x="5" xml:space="preserve" y="34.2188" clip-path="url(#clipPath3)" stroke="none"
>deleted</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(1040,270)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
/></g
><g transform="translate(1040,270)"
><rect fill="none" x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath4)"
/><text x="38" font-size="14px" y="18.1094" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Ticket</text
><path fill="none" d="M1 24.1094 L119 24.1094" clip-path="url(#clipPath4)"
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account: rf1Bi...</text
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 103</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(790,270)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
/></g
><g transform="translate(790,270)"
><rect fill="none" x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath4)"
/><text x="38" font-size="14px" y="18.1094" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Ticket</text
><path fill="none" d="M1 24.1094 L119 24.1094" clip-path="url(#clipPath4)"
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account: rf1Bi...</text
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 101</text
></g
><g font-family="sans-serif" font-size="14px" transform="translate(950,140)"
><text x="5" xml:space="preserve" y="18.1094" clip-path="url(#clipPath5)" stroke="none"
>Doesn't change</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(790,130)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="128.5" height="108.5" y="0.5" clip-path="url(#clipPath6)" stroke="none"
/></g
><g transform="translate(790,130)"
><rect fill="none" x="0.5" width="128.5" height="108.5" y="0.5" clip-path="url(#clipPath6)"
/><text x="36" font-size="14px" y="18.1094" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account</text
><path fill="none" d="M1 24.1094 L129 24.1094" clip-path="url(#clipPath6)"
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>ID: rf1Bi...</text
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 104</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(40,80)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="438.5" height="328.5" y="0.5" clip-path="url(#clipPath7)" stroke="none"
/></g
><g stroke-dasharray="8,5" stroke-miterlimit="5" transform="translate(40,80)" stroke-linecap="butt"
><rect fill="none" x="0.5" width="438.5" height="328.5" y="0.5" clip-path="url(#clipPath7)"
/><text x="125" font-size="14px" y="18.1094" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Ledger State Data (Before)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(530,120)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="168.5" height="118.5" y="0.5" clip-path="url(#clipPath8)" stroke="none"
/></g
><g transform="translate(530,120)"
><rect fill="none" x="0.5" width="168.5" height="118.5" y="0.5" clip-path="url(#clipPath8)"
/><text x="42" font-size="14px" y="18.1094" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" xml:space="preserve"
>(Any type of</text
><text x="42" font-size="14px" y="34.2188" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" xml:space="preserve"
>transaction)</text
><path fill="none" d="M1 40.2188 L169 40.2188" clip-path="url(#clipPath8)"
/><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account: rf1Bi...</text
><text x="5" font-size="14px" y="71.4375" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 0</text
><text x="5" font-size="14px" y="87.5469" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" xml:space="preserve"
>TicketSequence: 102</text
><text x="5" font-size="14px" y="103.6562" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" xml:space="preserve"
>...</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(330,260)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
/></g
><g transform="translate(330,260)"
><rect fill="none" x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath4)"
/><text x="38" font-size="14px" y="18.1094" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Ticket</text
><path fill="none" d="M1 24.1094 L119 24.1094" clip-path="url(#clipPath4)"
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account: rf1Bi...</text
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 103</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(200,260)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
/></g
><g transform="translate(200,260)"
><rect fill="none" x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath4)"
/><text x="38" font-size="14px" y="18.1094" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Ticket</text
><path fill="none" d="M1 24.1094 L119 24.1094" clip-path="url(#clipPath4)"
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account: rf1Bi...</text
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 102</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(70,260)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
/></g
><g transform="translate(70,260)"
><rect fill="none" x="0.5" width="118.5" height="68.5" y="0.5" clip-path="url(#clipPath4)"
/><text x="38" font-size="14px" y="18.1094" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Ticket</text
><path fill="none" d="M1 24.1094 L119 24.1094" clip-path="url(#clipPath4)"
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account: rf1Bi...</text
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 101</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(70,120)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="128.5" height="108.5" y="0.5" clip-path="url(#clipPath6)" stroke="none"
/></g
><g transform="translate(70,120)"
><rect fill="none" x="0.5" width="128.5" height="108.5" y="0.5" clip-path="url(#clipPath6)"
/><text x="36" font-size="14px" y="18.1094" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Account</text
><path fill="none" d="M1 24.1094 L129 24.1094" clip-path="url(#clipPath6)"
/><text x="5" font-size="14px" y="39.2188" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>ID: rf1Bi...</text
><text x="5" font-size="14px" y="55.3281" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Sequence: 104</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(750,80)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="438.5" height="328.5" y="0.5" clip-path="url(#clipPath7)" stroke="none"
/></g
><g stroke-dasharray="8,5" stroke-miterlimit="5" transform="translate(750,80)" stroke-linecap="butt"
><rect fill="none" x="0.5" width="438.5" height="328.5" y="0.5" clip-path="url(#clipPath7)"
/><text x="131" font-size="14px" y="18.1094" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Ledger State Data (After)</text
></g
><g transform="translate(690,200)"
><path fill="none" d="M259.6056 80.0528 L220.5 60.5" clip-path="url(#clipPath9)"
/><path fill="none" d="M220.5 60.5 L60.5 40.5" clip-path="url(#clipPath9)"
/><path fill="none" d="M60.5 40.5 L10.5 10.5" clip-path="url(#clipPath9)"
/><path d="M252.8899 69.4277 L260.0528 80.2764 L247.0761 81.0553 Z" clip-path="url(#clipPath9)" stroke="none"
/><path fill="none" d="M252.8899 69.4277 L260.0528 80.2764 L247.0761 81.0553 Z" clip-path="url(#clipPath9)"
/></g
><g transform="translate(890,150)"
><path fill="none" d="M11.4487 30.1838 L70.5 10.5" clip-path="url(#clipPath3)"
/><path fill="none" d="M23.7104 32.9481 L10.9743 30.3419 L19.5995 20.6152" clip-path="url(#clipPath3)"
/></g
><g transform="translate(280,200)"
><path fill="none" d="M249.521 10.704 L10.5 60.5" clip-path="url(#clipPath10)"
/><path d="M237.6631 6.5348 L250.0105 10.602 L240.3145 19.2615 Z" clip-path="url(#clipPath10)" stroke="none"
/><path fill="none" d="M237.6631 6.5348 L250.0105 10.602 L240.3145 19.2615 Z" clip-path="url(#clipPath10)"
/><text x="114.3989" font-size="14px" y="31" clip-path="url(#clipPath10)" font-family="sans-serif" stroke="none" xml:space="preserve"
>used</text
></g
></g
></svg
>

After

Width:  |  Height:  |  Size: 13 KiB