Tickets
Ticket Feature on XRPL
Introduction
Tickets on the XRPL allow you to reserve sequence numbers for transactions, enabling asynchronous transaction submission. This feature is particularly useful in multi-signature setups, where sequence management can become challenging due to independent signers.
Tickets Explained
What Are Tickets?
Tickets are a feature on the XRP Ledger that allow you to preallocate sequence numbers for future transactions. This helps avoid sequence number conflicts, especially in scenarios where multiple parties (like signers in a MultiSignature setup) need to sign a transaction.
Why Use Tickets?
In standard transactions, the Sequence field determines the order of execution. When signers asynchronously sign transactions, the sequence number may become outdated. Tickets provide a solution by reserving sequence numbers in advance, ensuring transactions can proceed without conflict.
How Tickets Work
Tickets are created using the TicketCreate transaction. Once created, these tickets can be used in place of the Sequence field in any subsequent transaction.
Advantages of Tickets
Avoiding Sequence Conflicts
Tickets prevent sequence number mismatches in multi-signature transactions, where signers may not act in a synchronized manner.
Streamlining MultiSignature
By reserving sequence numbers, Tickets simplify the signing and submission process in MultiSignature environments.
Flexibility for Transaction Management
Tickets can be used to prioritize certain transactions or reserve future transaction slots, offering better control over transaction flow.
Ticket Setup
Prerequisites
Create Wallet
Retrieve Tickets
You can query your account to retrieve active tickets.
Using Tickets in Transactions
Once you have created tickets, you can use them in subsequent transactions by specifying the TicketSequence field instead of Sequence.
Optional Remove a Ticket
Deleting a Ticket is sometimes required. To free up the associated Account Object. The way to do this is generate a no-op transaction
Explanation of the Script
Ticket Creation
The TicketCreate transaction reserves sequence numbers for future transactions.
Specify the number of tickets you want to create using the TicketCount field.
Querying Tickets
Use the account_objects command to fetch active tickets linked to your account.
Using Tickets
Include the TicketSequence field in your transaction to use a ticket instead of a regular sequence number.
Key Considerations
Cost of Tickets
Each ticket costs 2 XRP to reserve. Ensure you have sufficient XRP balance in your account before creating tickets.
Ticket Expiry
Tickets remain valid until used or until the account’s Sequence surpasses the ticket’s TicketSequence.
Managing Tickets
Efficiently manage tickets to avoid unnecessary fees and ensure smooth transaction workflows.
Combining Tickets with MultiSign
Tickets are particularly effective in MultiSignature setups, preventing sequence mismatches and allowing independent signers to collaborate seamlessly.
With the Ticket feature, XRPL provides a powerful mechanism to manage transaction order and avoid sequence conflicts, especially in asynchronous environments like MultiSignature. By leveraging Tickets, you can ensure smooth and conflict-free transaction workflows.
Last updated