Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tickets re-allocation workflow. #12

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified spec/img/allocate-ticket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified spec/img/submit-xrpl-tx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions spec/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Check [workflow](#register-token) for more details.
##### Token enabling/disabling

Any token can be disabled and enabled at any time by that admin. Any new workflow with the disabled token is prohibited
by the contract, the pending operations should be completed.
by the contract, the pending operations should be completed.

#### Operation queues

Expand Down Expand Up @@ -93,9 +93,12 @@ idempotent. And let some operations be safely re-processed at any time.
##### Ticket allocation process

The XRPL tickets allow us to execute a transaction with non-sequential sequence numbers, hence we can execute multiple
transactions in parallel. When any workflow allocates the ticket and the free ticket length is less than max allowed the
contract triggers the `submit-increase-tickets` operation to increase the amount. Once the operation is confirmed, the
transactions in parallel. Any workflow can allocate a ticket and the ticket allocation mechanism either returns a tocket
number or errors out, in case of lack of the free tickets. The ticket re-allocation will be triggered by the tx
conformation (Submit XRPL transaction last step) once the used tickets count is gather that allowed threshold. The
contract initiates the `submit-increase-tickets` operation to increase the amount. Once the operation is confirmed, the
contract increases the free slots on the contract as well (based on the tx result).

Check [workflow](#allocate-ticket) for more details.

#### Tokens sending
Expand Down