serai/processor/scheduler/utxo/transaction-chaining
Luke Parker e1ad897f7e Allow scheduler's creation of transactions to be async and error
I don't love this, but it's the only way to select decoys without using a local
database. While the prior commit added such a databse, the performance of it
presumably wasn't viable, and while TODOs marked the needed improvements, it
was still messy with an immense scope re: any auditing.

The relevant scheduler functions now take `&self` (intentional, as all
mutations should be via the `&mut impl DbTxn` passed). The calls to `&self` are
expected to be completely deterministic (as usual).
2024-09-19 23:36:32 -07:00
..
src Allow scheduler's creation of transactions to be async and error 2024-09-19 23:36:32 -07:00
Cargo.toml Add input aggregation in the transaction-chaining scheduler 2024-09-19 23:36:32 -07:00
LICENSE Outline of the transaction-chaining scheduler 2024-09-19 23:36:32 -07:00
README.md Add non-transaction-chaining scheduler 2024-09-19 23:36:32 -07:00

Transaction Chaining Scheduler

A scheduler of transactions for networks premised on the UTXO model which support transaction chaining. Transaction chaining refers to the ability to obtain an identifier for an output within a transaction not yet signed usable to build and sign a transaction spending it.

Design

The scheduler is designed to achieve fulfillment of all expected payments with an O(1) delay (regardless of prior scheduler state), O(log n) time, and O(log(n) + n) computational complexity.

Due to the ability to chain transactions, we can immediately plan/sign dependent transactions. For the time/computational complexity, we use a tree to fulfill payments. This quickly gives us the ability to make as many outputs as necessary (regardless of per-transaction output limits) and only has the latency of including a chain of O(log n) transactions on-chain. The only computational overhead is in creating the transactions which are branches in the tree.