Add crate for the transaction-chaining Scheduler

This commit is contained in:
Luke Parker 2024-08-30 19:51:53 -04:00
parent 13b74195f7
commit fc765bb9e0
7 changed files with 64 additions and 0 deletions

View file

@ -42,6 +42,7 @@ jobs:
-p serai-processor-key-gen \
-p serai-processor-frost-attempt-manager \
-p serai-processor-primitives \
-p serai-processor-transaction-chaining-scheduler \
-p serai-processor-scanner \
-p serai-processor \
-p tendermint-machine \

View file

@ -74,6 +74,7 @@ members = [
"processor/frost-attempt-manager",
"processor/primitives",
"processor/scheduler/transaction-chaining",
"processor/scanner",
"processor",

View file

@ -48,6 +48,9 @@ exceptions = [
{ allow = ["AGPL-3.0"], name = "serai-processor-messages" },
{ allow = ["AGPL-3.0"], name = "serai-processor-key-gen" },
{ allow = ["AGPL-3.0"], name = "serai-processor-frost-attempt-manager" },
{ allow = ["AGPL-3.0"], name = "serai-processor-transaction-chaining-scheduler" },
{ allow = ["AGPL-3.0"], name = "serai-processor-scanner" },
{ allow = ["AGPL-3.0"], name = "serai-processor" },
{ allow = ["AGPL-3.0"], name = "tributary-chain" },

View file

@ -0,0 +1,22 @@
[package]
name = "serai-processor-transaction-chaining-scheduler"
version = "0.1.0"
description = "Scheduler for networks with transaction chaining for the Serai processor"
license = "AGPL-3.0-only"
repository = "https://github.com/serai-dex/serai/tree/develop/processor/scheduler/transaction-chaining"
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
keywords = []
edition = "2021"
publish = false
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[package.metadata.cargo-machete]
ignored = ["scale"]
[lints]
workspace = true
[dependencies]

View file

@ -0,0 +1,15 @@
AGPL-3.0-only license
Copyright (c) 2022-2024 Luke Parker
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License Version 3 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

View file

@ -0,0 +1,19 @@
# 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(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.

View file

@ -0,0 +1,3 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc = include_str!("../README.md")]
#![deny(missing_docs)]