diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5aa3d234..385d54c4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,6 +41,7 @@ jobs: -p serai-processor-messages \ -p serai-processor-key-gen \ -p serai-processor-frost-attempt-manager \ + -p serai-processor-scanner \ -p serai-processor \ -p tendermint-machine \ -p tributary-chain \ diff --git a/Cargo.toml b/Cargo.toml index ddfaf1f2..8d6d9416 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,6 +72,7 @@ members = [ "processor/messages", "processor/key-gen", "processor/frost-attempt-manager", + "processor/scanner", "processor", "coordinator/tributary/tendermint", diff --git a/processor/scanner/Cargo.toml b/processor/scanner/Cargo.toml new file mode 100644 index 00000000..f3b5ad37 --- /dev/null +++ b/processor/scanner/Cargo.toml @@ -0,0 +1,33 @@ +[package] +name = "serai-processor-scanner" +version = "0.1.0" +description = "Scanner of abstract blockchains for Serai" +license = "AGPL-3.0-only" +repository = "https://github.com/serai-dex/serai/tree/develop/processor/scanner" +authors = ["Luke Parker "] +keywords = ["frost", "multisig", "threshold"] +edition = "2021" +rust-version = "1.79" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[lints] +workspace = true + +[dependencies] +rand_core = { version = "0.6", default-features = false, features = ["std", "getrandom"] } + +frost = { package = "modular-frost", path = "../../crypto/frost", version = "^0.8.1", default-features = false } + +serai-validator-sets-primitives = { path = "../../substrate/validator-sets/primitives", default-features = false, features = ["std"] } + +hex = { version = "0.4", default-features = false, features = ["std"] } +log = { version = "0.4", default-features = false, features = ["std"] } + +scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["std"] } +borsh = { version = "1", default-features = false, features = ["std", "derive", "de_strict_order"] } +serai-db = { path = "../../common/db" } + +messages = { package = "serai-processor-messages", path = "../messages" } diff --git a/processor/scanner/LICENSE b/processor/scanner/LICENSE new file mode 100644 index 00000000..41d5a261 --- /dev/null +++ b/processor/scanner/LICENSE @@ -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 . diff --git a/processor/scanner/README.md b/processor/scanner/README.md new file mode 100644 index 00000000..f6c6ccc6 --- /dev/null +++ b/processor/scanner/README.md @@ -0,0 +1,12 @@ +# Scanner + +A scanner of arbitrary blockchains for Serai. + +This scanner has two distinct roles: + +1) Scanning blocks for received outputs contained within them +2) Scanning blocks for the completion of eventualities + +While these can be optimized into a single structure, they are written as two +distinct structures (with the associated overhead) for clarity and simplicity +reasons. diff --git a/processor/src/multisigs/scanner.rs b/processor/scanner/src/lib.rs similarity index 100% rename from processor/src/multisigs/scanner.rs rename to processor/scanner/src/lib.rs