diff --git a/.gitignore b/.gitignore index e84b8927f..a87fc3042 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /taud /vanityaddr /zkas +/lilith diff --git a/Cargo.lock b/Cargo.lock index 0f290ac07..9e874f2c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2381,6 +2381,28 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "lilith" +version = "0.3.0" +dependencies = [ + "async-channel", + "async-executor", + "async-std", + "ctrlc-async", + "darkfi", + "easy-parallel", + "futures-lite", + "fxhash", + "log", + "serde", + "serde_derive", + "simplelog", + "structopt", + "structopt-toml", + "toml 0.5.9", + "url", +] + [[package]] name = "lock_api" version = "0.4.7" diff --git a/Cargo.toml b/Cargo.toml index 3e5bf6d21..2e8949096 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,6 +31,7 @@ members = [ "bin/tau/taud", "bin/tau/tau-cli", "bin/vanityaddr", + "bin/lilith", "src/sdk", "src/util/derive", diff --git a/script/research/seedd/Cargo.toml b/bin/lilith/Cargo.toml similarity index 61% rename from script/research/seedd/Cargo.toml rename to bin/lilith/Cargo.toml index 44d05ec7c..588ba30df 100644 --- a/script/research/seedd/Cargo.toml +++ b/bin/lilith/Cargo.toml @@ -1,19 +1,27 @@ [package] -name = "seedd" +name = "lilith" +description = "Daemon that spawns P2P seeds" version = "0.3.0" edition = "2021" - -[dependencies.darkfi] -path = "../../../" -features = ["net"] +authors = ["darkfi "] +license = "AGPL-3.0-only" +homepage = "https://dark.fi" +repository = "https://github.com/darkrenaissance/darkfi" +keywords = [] +categories = [] [dependencies] +darkfi = {path = "../../", features = ["net"]} + +# Async async-channel = "1.6.1" async-executor = "1.4.1" async-std = "1.12.0" ctrlc-async = {version = "3.2.2", default-features = false, features = ["async-std", "termination"]} easy-parallel = "3.2.0" futures-lite = "1.12.0" + +# Misc fxhash = "0.2.1" log = "0.4.17" simplelog = "0.12.0" @@ -25,5 +33,3 @@ serde_derive = "1.0.138" structopt = "0.3.26" structopt-toml = "0.5.0" toml = "0.5.9" - -[workspace] diff --git a/script/research/seedd/README.md b/bin/lilith/README.md similarity index 91% rename from script/research/seedd/README.md rename to bin/lilith/README.md index b1fd5426f..4419e84e0 100644 --- a/script/research/seedd/README.md +++ b/bin/lilith/README.md @@ -1,4 +1,4 @@ -seedd +lilith ========== A tool to deploy multiple P2P network seed nodes for darkfi applications, in a single daemon. @@ -6,11 +6,11 @@ A tool to deploy multiple P2P network seed nodes for darkfi applications, in a s ## Usage ``` -seedd 0.3.0 -Defines the network specific settings +lilith 0.3.0 +Daemon that spawns P2P seeds USAGE: - seedd [FLAGS] [OPTIONS] + lilith [FLAGS] [OPTIONS] FLAGS: -h, --help Prints help information @@ -22,13 +22,13 @@ OPTIONS: --url Daemon published url, common for all enabled networks [default: tcp://127.0.0.1] ``` -On first execution, daemon will create default config file ~/.config/darkfi/seedd_config.toml. +On first execution, daemon will create default config file ~/.config/darkfi/lilith_config.toml. Configuration must be verified, and application networks should be configured accordingly. -Run seedd as follows: +Run lilith as follows: ``` -% cargo run +% lilith 13:02:30 [INFO] Found configuration for network: darkfid 13:02:30 [INFO] Found configuration for network: ircd 13:02:30 [INFO] Found configuration for network: taud diff --git a/script/research/seedd/seedd_config.toml b/bin/lilith/lilith_config.toml similarity index 91% rename from script/research/seedd/seedd_config.toml rename to bin/lilith/lilith_config.toml index 5ffc37cdc..0ff94905d 100644 --- a/script/research/seedd/seedd_config.toml +++ b/bin/lilith/lilith_config.toml @@ -1,4 +1,4 @@ -## seedd configuration file +## lilith configuration file ## ## Please make sure you go through all the settings so you can configure ## your daemon properly. @@ -15,7 +15,6 @@ #seeds = [] #peers = [] -## Per-network settings #[network."darkfid_consensus"] #port = 33033 #seeds = [] diff --git a/script/research/seedd/src/config.rs b/bin/lilith/src/config.rs similarity index 98% rename from script/research/seedd/src/config.rs rename to bin/lilith/src/config.rs index 957cff600..ba4488007 100644 --- a/script/research/seedd/src/config.rs +++ b/bin/lilith/src/config.rs @@ -10,7 +10,7 @@ use darkfi::{cli_desc, Result}; #[derive(Clone, Debug, Deserialize, StructOpt, StructOptToml)] #[serde(default)] -#[structopt(name = "seedd", about = cli_desc!())] +#[structopt(name = "lilith", about = cli_desc!())] pub struct Args { #[structopt(short, long)] /// Configuration file to use diff --git a/script/research/seedd/src/main.rs b/bin/lilith/src/main.rs similarity index 95% rename from script/research/seedd/src/main.rs rename to bin/lilith/src/main.rs index d67b91c55..2eba9f3c3 100644 --- a/script/research/seedd/src/main.rs +++ b/bin/lilith/src/main.rs @@ -17,8 +17,8 @@ use darkfi::{ mod config; use config::{parse_configured_networks, Args, NetInfo}; -const CONFIG_FILE: &str = "seedd_config.toml"; -const CONFIG_FILE_CONTENTS: &str = include_str!("../seedd_config.toml"); +const CONFIG_FILE: &str = "lilith_config.toml"; +const CONFIG_FILE_CONTENTS: &str = include_str!("../lilith_config.toml"); async fn spawn_network( name: &str, diff --git a/script/research/seedd/init/lilith.confd b/contrib/init/lilith.confd similarity index 100% rename from script/research/seedd/init/lilith.confd rename to contrib/init/lilith.confd diff --git a/script/research/seedd/init/lilith.initd b/contrib/init/lilith.initd similarity index 100% rename from script/research/seedd/init/lilith.initd rename to contrib/init/lilith.initd diff --git a/script/research/seedd/.gitignore b/script/research/seedd/.gitignore deleted file mode 100644 index 96ef6c0b9..000000000 --- a/script/research/seedd/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -Cargo.lock