diff --git a/Cargo.toml b/Cargo.toml index ce269aa..c701836 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,8 +3,8 @@ resolver = "2" members = [ "client/core", - "client/single-key-dal", - "client/serializable-noise-kv", + "client/single-key-tank", + "client/multi-key-tank", "apps/cmdline/lightswitch", "apps/cmdline/period-tracking", "apps/cmdline/chess", diff --git a/apps/bench/Cargo.toml b/apps/bench/Cargo.toml index 6742955..1067cd6 100644 --- a/apps/bench/Cargo.toml +++ b/apps/bench/Cargo.toml @@ -9,13 +9,13 @@ edition = "2021" tokio = { version = "1.25.0", features = ["macros", "io-std", "io-util", "rt", "rt-multi-thread"] } serde_json = { version = "1.0.91", features = ["std"] } serde = { version = "1.0.152", features = ["derive"] } -#noise-core = { path = "../../client/core" } +#scuba-core = { path = "../../client/core" } #async-trait = "0.1.66" #parking_lot = { version = "0.12.1", features = ["send_guard"] } #async-condvar-fair = { version = "1.0.0", features = ["parking_lot_0_12"] } #bincode = "1.3.3" #rand = { version = "0.8.5", features = ["small_rng"] } -single-key-dal = { path = "../../client/single-key-dal" } +single-key-tank = { path = "../../client/single-key-tank" } uuid = "1.3.0" base64ct = { version = "1.6.0", features = ["alloc"] } sha2 = "0.10.8" diff --git a/apps/bench/src/fam_bench.rs b/apps/bench/src/fam_bench.rs index 45bff17..5f27901 100644 --- a/apps/bench/src/fam_bench.rs +++ b/apps/bench/src/fam_bench.rs @@ -2,9 +2,9 @@ use chrono::offset::Utc; use chrono::DateTime; use serde::{Deserialize, Serialize}; -use single_key_dal::client::Error; -use single_key_dal::client::NoiseKVClient; -use single_key_dal::data::NoiseData; +use single_key_tank::client::Error; +use single_key_tank::client::TankClient; +use single_key_tank::data::ScubaData; use std::collections::HashMap; use std::fs; use std::fs::File; @@ -74,7 +74,7 @@ impl Post { #[derive(Clone)] struct FamilyApp { - client: NoiseKVClient, + client: TankClient, ts: Arc>>, run_ctr: Arc>>, app_filename: String, @@ -94,7 +94,7 @@ impl FamilyApp { dal_recv_filename_d: Option, app_filename: String, ) -> FamilyApp { - let client = NoiseKVClient::new( + let client = TankClient::new( None, None, false, diff --git a/apps/bench/src/pass_bench.rs b/apps/bench/src/pass_bench.rs index 7e2ec85..695e091 100644 --- a/apps/bench/src/pass_bench.rs +++ b/apps/bench/src/pass_bench.rs @@ -1,8 +1,8 @@ use passwords::PasswordGenerator; use serde::{Deserialize, Serialize}; -use single_key_dal::client::Error; -use single_key_dal::client::NoiseKVClient; -use single_key_dal::data::NoiseData; +use single_key_tank::client::Error; +use single_key_tank::client::TankClient; +use single_key_tank::data::ScubaData; use std::collections::HashMap; use std::fs; use std::fs::File; @@ -73,7 +73,7 @@ impl Config { #[derive(Clone)] struct PasswordManager { - client: NoiseKVClient, + client: TankClient, ts: Arc>>, run_ctr: Arc>>, app_filename: String, @@ -93,7 +93,7 @@ impl PasswordManager { dal_recv_filename_d: Option, app_filename: String, ) -> PasswordManager { - let client = NoiseKVClient::new( + let client = TankClient::new( None, None, false, diff --git a/apps/cmdline/auctioning/Cargo.toml b/apps/cmdline/auctioning/Cargo.toml index 1cd9284..cad7b78 100644 --- a/apps/cmdline/auctioning/Cargo.toml +++ b/apps/cmdline/auctioning/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -single-key-dal = { path = "../../../client/single-key-dal" } +single-key-tank = { path = "../../../client/single-key-tank" } reedline-repl-rs = { version = "1.0.3", features = ["async"] } tokio = { version = "1.25.0", features = ["macros", "io-std", "io-util", "rt", "rt-multi-thread"] } uuid = "1.3.0" diff --git a/apps/cmdline/auctioning/src/main.rs b/apps/cmdline/auctioning/src/main.rs index 1fb0ba7..7a70e6e 100644 --- a/apps/cmdline/auctioning/src/main.rs +++ b/apps/cmdline/auctioning/src/main.rs @@ -4,8 +4,8 @@ use core::cmp::Ordering; use reedline_repl_rs::clap::{Arg, ArgAction, ArgMatches, Command}; use reedline_repl_rs::Repl; use reedline_repl_rs::Result as ReplResult; -use single_key_dal::client::NoiseKVClient; -use single_key_dal::data::NoiseData; +use single_key_tank::client::TankClient; +use single_key_tank::data::ScubaData; use serde::{Deserialize, Serialize}; use std::sync::Arc; use uuid::Uuid; @@ -177,12 +177,12 @@ impl OpenAuctionClients { #[derive(Clone)] struct AuctioningApp { - client: NoiseKVClient, + client: TankClient, } impl AuctioningApp { pub async fn new() -> AuctioningApp { - let client = NoiseKVClient::new( + let client = TankClient::new( None, None, false, @@ -794,7 +794,7 @@ async fn main() -> ReplResult<()> { let mut repl = Repl::new(app.clone()) .with_name("Auctioning App") .with_version("v0.1.0") - .with_description("Noise online auctioning app") + .with_description("Scuba online auctioning app") .with_command_async( Command::new("init_new_device"), |_, context| Box::pin(AuctioningApp::init_new_device(context)), diff --git a/apps/cmdline/calendar/Cargo.toml b/apps/cmdline/calendar/Cargo.toml index 0ceb3a7..de8fba4 100644 --- a/apps/cmdline/calendar/Cargo.toml +++ b/apps/cmdline/calendar/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -single-key-dal = { path = "../../../client/single-key-dal" } +single-key-tank = { path = "../../../client/single-key-tank" } reedline-repl-rs = { version = "1.0.3", features = ["async"] } tokio = { version = "1.25.0", features = ["macros", "io-std", "io-util", "rt", "rt-multi-thread"] } uuid = "1.3.0" diff --git a/apps/cmdline/calendar/src/main.rs b/apps/cmdline/calendar/src/main.rs index 61ef6c7..8b15e0a 100644 --- a/apps/cmdline/calendar/src/main.rs +++ b/apps/cmdline/calendar/src/main.rs @@ -2,8 +2,8 @@ use chrono::naive::{NaiveDate, NaiveDateTime, NaiveTime}; use reedline_repl_rs::clap::{Arg, ArgAction, ArgMatches, Command}; use reedline_repl_rs::Repl; use reedline_repl_rs::Result as ReplResult; -use single_key_dal::client::NoiseKVClient; -use single_key_dal::data::NoiseData; +use single_key_tank::client::TankClient; +use single_key_tank::data::ScubaData; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::sync::Arc; @@ -150,7 +150,7 @@ struct AppointmentInfo { pending: bool, // TODO add perm field or resolved writer idkeys if clients make apptmts, // although data_store doesn't have access to metadata_store, so this would - // constitute a larger change in NoiseKV (the two are separate for locking + // constitute a larger change in Tank (the two are separate for locking // purposes now) } @@ -204,12 +204,12 @@ impl Availability { #[derive(Clone)] struct CalendarApp { - client: NoiseKVClient, + client: TankClient, } impl CalendarApp { pub async fn new() -> CalendarApp { - let client = NoiseKVClient::new( + let client = TankClient::new( None, None, false, @@ -978,7 +978,7 @@ async fn main() -> ReplResult<()> { let mut repl = Repl::new(app.clone()) .with_name("Calendar App") .with_version("v0.1.0") - .with_description("Noise calendar app") + .with_description("Scuba calendar app") .with_command_async(Command::new("init_new_device"), |_, context| { Box::pin(CalendarApp::init_new_device(context)) }) diff --git a/apps/cmdline/chess/Cargo.toml b/apps/cmdline/chess/Cargo.toml index 61588b8..fa58ec1 100644 --- a/apps/cmdline/chess/Cargo.toml +++ b/apps/cmdline/chess/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -single-key-dal = { path = "../../../client/single-key-dal" } +single-key-tank = { path = "../../../client/single-key-tank" } reedline-repl-rs = { version = "1.0.3", features = ["async"] } tokio = { version = "1.25.0", features = ["macros", "io-std", "io-util", "rt", "rt-multi-thread"] } uuid = "1.3.0" diff --git a/apps/cmdline/chess/src/main.rs b/apps/cmdline/chess/src/main.rs index 28d9521..7bf6ca5 100644 --- a/apps/cmdline/chess/src/main.rs +++ b/apps/cmdline/chess/src/main.rs @@ -1,8 +1,8 @@ use reedline_repl_rs::clap::{Arg, ArgAction, ArgMatches, Command}; use reedline_repl_rs::Repl; use reedline_repl_rs::Result as ReplResult; -use single_key_dal::client::NoiseKVClient; -use single_key_dal::data::NoiseData; +use single_key_tank::client::TankClient; +use single_key_tank::data::ScubaData; use std::sync::Arc; use uuid::Uuid; @@ -186,12 +186,12 @@ impl<'a> Game<'a> { #[derive(Clone)] struct ChessApp { - client: NoiseKVClient, + client: TankClient, } impl ChessApp { pub async fn new() -> ChessApp { - let client = NoiseKVClient::new(None, None, false, None, None).await; + let client = TankClient::new(None, None, false, None, None).await; Self { client } } @@ -499,7 +499,7 @@ async fn main() -> ReplResult<()> { let mut repl = Repl::new(app.clone()) .with_name("Chess App") .with_version("v0.1.0") - .with_description("Noise chess app") + .with_description("Scuba chess app") .with_command( Command::new("create_new_device"), ChessApp::create_new_device, diff --git a/apps/cmdline/family-app/Cargo.toml b/apps/cmdline/family-app/Cargo.toml index 207b142..497ac45 100644 --- a/apps/cmdline/family-app/Cargo.toml +++ b/apps/cmdline/family-app/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -single-key-dal = { path = "../../../client/single-key-dal" } +single-key-tank = { path = "../../../client/single-key-tank" } reedline-repl-rs = { version = "1.0.3", features = ["async"] } tokio = { version = "1.25.0", features = ["macros", "io-std", "io-util", "rt", "rt-multi-thread"] } uuid = "1.3.0" diff --git a/apps/cmdline/family-app/src/main.rs b/apps/cmdline/family-app/src/main.rs index 0f68c6e..b844d5b 100644 --- a/apps/cmdline/family-app/src/main.rs +++ b/apps/cmdline/family-app/src/main.rs @@ -3,8 +3,8 @@ use chrono::DateTime; use reedline_repl_rs::clap::{Arg, ArgAction, ArgMatches, Command}; use reedline_repl_rs::Repl; use reedline_repl_rs::Result as ReplResult; -use single_key_dal::client::NoiseKVClient; -use single_key_dal::data::NoiseData; +use single_key_tank::client::TankClient; +use single_key_tank::data::ScubaData; use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; use std::sync::Arc; @@ -165,12 +165,12 @@ impl Member { #[derive(Clone)] struct FamilyApp { - client: NoiseKVClient, + client: TankClient, } impl FamilyApp { pub async fn new() -> FamilyApp { - let client = NoiseKVClient::new( + let client = TankClient::new( None, None, false, @@ -1103,7 +1103,7 @@ async fn main() -> ReplResult<()> { let mut repl = Repl::new(app.clone()) .with_name("Family App") .with_version("v0.1.0") - .with_description("Noise family app") + .with_description("Scuba family app") .with_command_async( Command::new("init_new_device").arg( Arg::new("enable_loc_polling") diff --git a/apps/cmdline/lightswitch/Cargo.toml b/apps/cmdline/lightswitch/Cargo.toml index 703284e..98d4334 100644 --- a/apps/cmdline/lightswitch/Cargo.toml +++ b/apps/cmdline/lightswitch/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] itertools = "0.10.5" -single-key-dal = { path = "../../../client/single-key-dal" } +single-key-tank = { path = "../../../client/single-key-tank" } reedline-repl-rs = { version = "1.0.3", features = ["async"] } tokio = { version = "1.25.0", features = ["macros", "io-std", "io-util", "rt", "rt-multi-thread"] } uuid = "1.3.0" diff --git a/apps/cmdline/lightswitch/src/main.rs b/apps/cmdline/lightswitch/src/main.rs index 71075d4..b0b72d5 100644 --- a/apps/cmdline/lightswitch/src/main.rs +++ b/apps/cmdline/lightswitch/src/main.rs @@ -1,8 +1,8 @@ use reedline_repl_rs::clap::{Arg, ArgAction, ArgMatches, Command}; use reedline_repl_rs::Repl; use reedline_repl_rs::Result as ReplResult; -use single_key_dal::client::NoiseKVClient; -use single_key_dal::data::NoiseData; +use single_key_tank::client::TankClient; +use single_key_tank::data::ScubaData; use std::sync::Arc; use uuid::Uuid; @@ -15,12 +15,12 @@ const LB_ON_VAL: &str = r#"{ "is_on": true }"#; #[derive(Clone)] struct LightswitchApp { - client: NoiseKVClient, + client: TankClient, } impl LightswitchApp { pub async fn new() -> LightswitchApp { - let client = NoiseKVClient::new( + let client = TankClient::new( None, None, //Some("sns26.cs.princeton.edu"), //Some("8080"), @@ -415,7 +415,7 @@ async fn main() -> ReplResult<()> { let mut repl = Repl::new(app.clone()) .with_name("Lightswitch App") .with_version("v0.1.0") - .with_description("Noise lightswitch app") + .with_description("Scuba lightswitch app") .with_command_async(Command::new("create_bulb"), |_, context| { Box::pin(LightswitchApp::create_bulb(context)) }) diff --git a/apps/cmdline/password-manager/Cargo.toml b/apps/cmdline/password-manager/Cargo.toml index 1a96d92..ef40b2d 100644 --- a/apps/cmdline/password-manager/Cargo.toml +++ b/apps/cmdline/password-manager/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -single-key-dal = { path = "../../../client/single-key-dal" } +single-key-tank = { path = "../../../client/single-key-tank" } reedline-repl-rs = { version = "1.0.3", features = ["async"] } tokio = { version = "1.25.0", features = ["macros", "io-std", "io-util", "rt", "rt-multi-thread"] } uuid = "1.3.0" diff --git a/apps/cmdline/password-manager/src/main.rs b/apps/cmdline/password-manager/src/main.rs index 34c3046..e2f3b3b 100644 --- a/apps/cmdline/password-manager/src/main.rs +++ b/apps/cmdline/password-manager/src/main.rs @@ -2,8 +2,8 @@ use passwords::PasswordGenerator; use reedline_repl_rs::clap::{Arg, ArgAction, ArgMatches, Command}; use reedline_repl_rs::Repl; use reedline_repl_rs::Result as ReplResult; -use single_key_dal::client::NoiseKVClient; -use single_key_dal::data::NoiseData; +use single_key_tank::client::TankClient; +use single_key_tank::data::ScubaData; use serde::{Deserialize, Serialize}; use std::sync::Arc; use uuid::Uuid; @@ -116,12 +116,12 @@ impl PasswordConfig { #[derive(Clone)] struct PasswordManager { - client: NoiseKVClient, + client: TankClient, } impl PasswordManager { pub async fn new() -> PasswordManager { - let client = NoiseKVClient::new( + let client = TankClient::new( None, None, false, @@ -762,7 +762,7 @@ async fn main() -> ReplResult<()> { let mut repl = Repl::new(app.clone()) .with_name("Password Manager App") .with_version("v0.1.0") - .with_description("Noise password manager app") + .with_description("Scuba password manager app") .with_command_async( Command::new("init_new_device"), |_, context| { diff --git a/apps/cmdline/period-tracking/Cargo.toml b/apps/cmdline/period-tracking/Cargo.toml index a7c2806..2fd857a 100644 --- a/apps/cmdline/period-tracking/Cargo.toml +++ b/apps/cmdline/period-tracking/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -single-key-dal = { path = "../../../client/single-key-dal" } +single-key-tank = { path = "../../../client/single-key-tank" } reedline-repl-rs = { version = "1.0.3", features = ["async"] } tokio = { version = "1.25.0", features = ["macros", "io-std", "io-util", "rt", "rt-multi-thread"] } uuid = "1.3.0" diff --git a/apps/cmdline/period-tracking/src/main.rs b/apps/cmdline/period-tracking/src/main.rs index 3e502f6..50dc3b7 100644 --- a/apps/cmdline/period-tracking/src/main.rs +++ b/apps/cmdline/period-tracking/src/main.rs @@ -1,8 +1,8 @@ use reedline_repl_rs::clap::{Arg, ArgAction, ArgMatches, Command}; use reedline_repl_rs::Repl; use reedline_repl_rs::Result as ReplResult; -use single_key_dal::client::NoiseKVClient; -use single_key_dal::data::NoiseData; +use single_key_tank::client::TankClient; +use single_key_tank::data::ScubaData; use std::sync::Arc; use uuid::Uuid; @@ -16,12 +16,12 @@ const EMPTY_SYMPTOMS_VAL: &str = r#"{ "symptoms": [] }"#; #[derive(Clone)] struct PeriodTrackingApp { - client: NoiseKVClient, + client: TankClient, } impl PeriodTrackingApp { pub async fn new() -> PeriodTrackingApp { - let client = NoiseKVClient::new( + let client = TankClient::new( None, None, //Some("sns26.cs.princeton.edu"), //Some("8080"), @@ -426,7 +426,7 @@ async fn main() -> ReplResult<()> { let mut repl = Repl::new(app.clone()) .with_name("PeriodTracking App") .with_version("v0.1.0") - .with_description("Noise period tracking app") + .with_description("Scuba period tracking app") .with_command( Command::new("create_new_device"), PeriodTrackingApp::create_new_device, diff --git a/client/BROKEN_CONTACTS.md b/client/BROKEN_CONTACTS.md index ce7e260..7f0158e 100644 --- a/client/BROKEN_CONTACTS.md +++ b/client/BROKEN_CONTACTS.md @@ -23,5 +23,5 @@ But now the `get_contacts` command on the sharee returns the empty list However, nothing seems to check whether a group is a contact or not before sharing, so for the purpose of sketching out applications this is fine for -the time being (contacts, as tracked by noise, are messed up, but this shouldn't +the time being (contacts, as tracked by SCUBA, are messed up, but this shouldn't inhibit other functionality) diff --git a/client/TODO.md b/client/TODO.md index edbff94..263b8f1 100644 --- a/client/TODO.md +++ b/client/TODO.md @@ -8,4 +8,4 @@ 1. Unify `get_field()` vs `field()` -1. Re-export core things from noiseKV (qualified, not unqualified as rust::std does); or don't re-export - instead have app just instantiate Core separately +1. Re-export core things from TANK (qualified, not unqualified as rust::std does); or don't re-export - instead have app just instantiate Core separately diff --git a/client/core/Cargo.toml b/client/core/Cargo.toml index 128024a..cef69ed 100644 --- a/client/core/Cargo.toml +++ b/client/core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "noise-core" +name = "scuba-core" version = "0.1.0" edition = "2021" @@ -27,5 +27,5 @@ base64 = "0.21.0" ed25519-dalek = "1.0.1" bincode = "1.3.3" -noise-server = { path = "../../server" } +scuba-server = { path = "../../server" } aes-gcm = "0.10.3" diff --git a/client/core/src/server_comm.rs b/client/core/src/server_comm.rs index 4d7ce19..c34d17b 100644 --- a/client/core/src/server_comm.rs +++ b/client/core/src/server_comm.rs @@ -20,7 +20,7 @@ pub enum Event { Msg(EncryptedInboxMessage), } -pub use noise_server_lib::shard::client_protocol::{ +pub use scuba_server_lib::shard::client_protocol::{ Attestation, AttestationData, EncryptedCommonPayload, EncryptedInboxMessage, EncryptedOutboxMessage, EncryptedPerRecipientPayload, MessageBatch, diff --git a/client/serializable-noise-kv/.gitignore b/client/multi-key-tank/.gitignore similarity index 100% rename from client/serializable-noise-kv/.gitignore rename to client/multi-key-tank/.gitignore diff --git a/client/serializable-noise-kv/Cargo.toml b/client/multi-key-tank/Cargo.toml similarity index 90% rename from client/serializable-noise-kv/Cargo.toml rename to client/multi-key-tank/Cargo.toml index d59ebd1..8063457 100644 --- a/client/serializable-noise-kv/Cargo.toml +++ b/client/multi-key-tank/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "serializable-noise-kv" +name = "multi-key-tank" version = "0.1.0" edition = "2021" @@ -7,7 +7,7 @@ edition = "2021" [dependencies] uuid = { version = "1.2.2", features = ["v4", "fast-rng"] } -noise-core = { path = "../core" } +scuba-core = { path = "../core" } serde = { version = "1.0.152", features = ["derive"] } serde_json = { version = "1.0.91", features = ["std"] } tokio = { version = "1.23.0", features = ["macros"] } diff --git a/client/serializable-noise-kv/src/.gitignore b/client/multi-key-tank/src/.gitignore similarity index 100% rename from client/serializable-noise-kv/src/.gitignore rename to client/multi-key-tank/src/.gitignore diff --git a/client/serializable-noise-kv/src/client.rs b/client/multi-key-tank/src/client.rs similarity index 96% rename from client/serializable-noise-kv/src/client.rs rename to client/multi-key-tank/src/client.rs index 386f2a0..11d7869 100644 --- a/client/serializable-noise-kv/src/client.rs +++ b/client/multi-key-tank/src/client.rs @@ -7,9 +7,9 @@ use std::sync::Arc; use std::{thread, time}; use thiserror::Error; -use noise_core::core::{Core, CoreClient, SequenceNumber}; +use scuba_core::core::{Core, CoreClient, SequenceNumber}; -use crate::data::{BasicData, NoiseData}; +use crate::data::{BasicData, ScubaData}; use crate::devices::Device; use crate::groups::Group; @@ -337,8 +337,8 @@ impl TxCoordinator { } #[derive(Clone)] -pub struct NoiseKVClient { - core: Option>>, +pub struct TankClient { + core: Option>>, pub device: Arc>>>, ctr: Arc>, ctr_cv: Arc, @@ -347,7 +347,7 @@ pub struct NoiseKVClient { } #[async_trait] -impl CoreClient for NoiseKVClient { +impl CoreClient for TankClient { async fn client_callback( &self, seq: SequenceNumber, @@ -393,16 +393,16 @@ impl CoreClient for NoiseKVClient { } } -impl NoiseKVClient { +impl TankClient { pub async fn new<'a>( ip_arg: Option<&'a str>, port_arg: Option<&'a str>, turn_encryption_off: bool, test_wait_num_callbacks: Option, sec_wait_to_apply: Option, - ) -> NoiseKVClient { + ) -> TankClient { let ctr_val = test_wait_num_callbacks.unwrap_or(0); - let mut client = NoiseKVClient { + let mut client = TankClient { core: None, device: Arc::new(RwLock::new(None)), ctr: Arc::new(Mutex::new(ctr_val)), @@ -1313,14 +1313,14 @@ impl NoiseKVClient { } mod tests { - use crate::client::{NoiseKVClient, Operation}; + use crate::client::{TankClient, Operation}; #[tokio::test] async fn test_send_one_message() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, None, None).await; + TankClient::new(None, None, false, None, None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -1351,9 +1351,9 @@ mod tests { #[tokio::test] async fn test_send_two_sequential_messages() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -1400,9 +1400,9 @@ mod tests { #[tokio::test] async fn test_send_two_concurrent_messages() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -1449,9 +1449,9 @@ mod tests { #[tokio::test] async fn test_create_linked_device() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; client_0.create_standalone_device(); // sends operation to device 0 to link devices @@ -1502,17 +1502,17 @@ mod tests { #[tokio::test] async fn test_serialization() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(0), None).await; + TankClient::new(None, None, false, Some(0), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_2 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_3 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_4 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_5 = - NoiseKVClient::new(None, None, false, Some(2), None).await; + TankClient::new(None, None, false, Some(2), None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -1619,9 +1619,9 @@ mod tests { #[tokio::test] async fn test_add_contact() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -1744,9 +1744,9 @@ mod tests { #[tokio::test] async fn test_get_all_contacts() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -1780,12 +1780,12 @@ mod tests { /* #[tokio::test] async fn test_delete_self_device() { - let mut client_0 = NoiseKVClient::new(None, None, false).await; + let mut client_0 = TankClient::new(None, None, false).await; // upload otkeys to server client_0.core.receive_message().await; client_0.create_standalone_device(); - let mut client_1 = NoiseKVClient::new(None, None, false).await; + let mut client_1 = TankClient::new(None, None, false).await; // upload otkeys to server client_1.core.receive_message().await; @@ -1820,12 +1820,12 @@ mod tests { #[tokio::test] async fn test_delete_other_device() { - let mut client_0 = NoiseKVClient::new(None, None, false).await; + let mut client_0 = TankClient::new(None, None, false).await; // upload otkeys to server client_0.core.receive_message().await; client_0.create_standalone_device(); - let mut client_1 = NoiseKVClient::new(None, None, false).await; + let mut client_1 = TankClient::new(None, None, false).await; // upload otkeys to server client_1.core.receive_message().await; @@ -1860,12 +1860,12 @@ mod tests { #[tokio::test] async fn test_delete_all_devices() { - let mut client_0 = NoiseKVClient::new(None, None, false).await; + let mut client_0 = TankClient::new(None, None, false).await; // upload otkeys to server client_0.core.receive_message().await; client_0.create_standalone_device(); - let mut client_1 = NoiseKVClient::new(None, None, false).await; + let mut client_1 = TankClient::new(None, None, false).await; // upload otkeys to server client_1.core.receive_message().await; diff --git a/client/serializable-noise-kv/src/data.rs b/client/multi-key-tank/src/data.rs similarity index 95% rename from client/serializable-noise-kv/src/data.rs rename to client/multi-key-tank/src/data.rs index 3988523..fb84b39 100644 --- a/client/serializable-noise-kv/src/data.rs +++ b/client/multi-key-tank/src/data.rs @@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::fmt; -pub trait NoiseData { +pub trait ScubaData { fn data_id(&self) -> &String; fn data_type(&self) -> &String; fn data_val(&self) -> &String; @@ -33,7 +33,7 @@ impl BasicData { } } -impl NoiseData for BasicData { +impl ScubaData for BasicData { fn data_id(&self) -> &String { &self.data_id } @@ -62,12 +62,12 @@ impl fmt::Display for BasicData { } #[derive(Clone)] -pub struct Validator { +pub struct Validator { general_callback: fn(&String, &T) -> bool, per_type_callbacks: HashMap bool>, } -fn default_general_callback( +fn default_general_callback( data_id: &String, data_val: &T, ) -> bool { @@ -80,7 +80,7 @@ fn default_general_callback( true } -impl Validator { +impl Validator { pub fn new( general_callback: Option bool>, ) -> Validator { @@ -122,13 +122,13 @@ impl Validator { } #[derive(Clone)] -pub struct DataStore { +pub struct DataStore { store: HashMap, validator: Validator, } //fn get_all_data_with_type -impl DataStore { +impl DataStore { pub fn new() -> DataStore { Self { store: HashMap::::new(), diff --git a/client/serializable-noise-kv/src/devices.rs b/client/multi-key-tank/src/devices.rs similarity index 99% rename from client/serializable-noise-kv/src/devices.rs rename to client/multi-key-tank/src/devices.rs index 4127202..cd59411 100644 --- a/client/serializable-noise-kv/src/devices.rs +++ b/client/multi-key-tank/src/devices.rs @@ -5,7 +5,7 @@ use std::sync::Arc; use thiserror::Error; use uuid::Uuid; -use crate::data::{DataStore, NoiseData}; +use crate::data::{DataStore, ScubaData}; use crate::groups::{Group, GroupStore}; #[derive(Debug, PartialEq, Error)] @@ -15,7 +15,7 @@ pub enum Error { } #[derive(Clone)] -pub struct Device { +pub struct Device { idkey: Arc>, pub group_store: Arc>, // FIXME rwlock pub data_store: Arc>>, @@ -23,7 +23,7 @@ pub struct Device { pending_link_idkey: Arc>>, } -impl Device { +impl Device { pub fn new( idkey: String, linked_name_arg: Option, @@ -152,7 +152,7 @@ impl Device { } // add data - // into_iter() needed b/c NoiseData can't implement Clone(), so + // into_iter() needed b/c ScubaData can't implement Clone(), so // if we want this to stay generic then we need to move data_val // from new_data via into_iter() (as opposed to just iter()) for (data_key, data_val) in new_data.into_iter() { diff --git a/client/serializable-noise-kv/src/groups.rs b/client/multi-key-tank/src/groups.rs similarity index 100% rename from client/serializable-noise-kv/src/groups.rs rename to client/multi-key-tank/src/groups.rs diff --git a/client/serializable-noise-kv/src/lib.rs b/client/multi-key-tank/src/lib.rs similarity index 100% rename from client/serializable-noise-kv/src/lib.rs rename to client/multi-key-tank/src/lib.rs diff --git a/client/serializable-noise-kv/src/permissions.rs b/client/multi-key-tank/src/permissions.rs similarity index 100% rename from client/serializable-noise-kv/src/permissions.rs rename to client/multi-key-tank/src/permissions.rs diff --git a/client/single-key-dal/.gitignore b/client/single-key-tank/.gitignore similarity index 100% rename from client/single-key-dal/.gitignore rename to client/single-key-tank/.gitignore diff --git a/client/single-key-dal/Cargo.toml b/client/single-key-tank/Cargo.toml similarity index 91% rename from client/single-key-dal/Cargo.toml rename to client/single-key-tank/Cargo.toml index 85cdee5..db6efbd 100644 --- a/client/single-key-dal/Cargo.toml +++ b/client/single-key-tank/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "single-key-dal" +name = "single-key-tank" version = "0.1.0" edition = "2021" @@ -7,7 +7,7 @@ edition = "2021" [dependencies] uuid = { version = "1.2.2", features = ["v4", "fast-rng"] } -noise-core = { path = "../core" } +scuba-core = { path = "../core" } serde = { version = "1.0.152", features = ["derive"] } serde_json = { version = "1.0.91", features = ["std"] } tokio = { version = "1.23.0", features = ["macros"] } diff --git a/client/single-key-dal/src/.gitignore b/client/single-key-tank/src/.gitignore similarity index 100% rename from client/single-key-dal/src/.gitignore rename to client/single-key-tank/src/.gitignore diff --git a/client/single-key-dal/src/client.rs b/client/single-key-tank/src/client.rs similarity index 97% rename from client/single-key-dal/src/client.rs rename to client/single-key-tank/src/client.rs index b23cf2c..6fb004e 100644 --- a/client/single-key-dal/src/client.rs +++ b/client/single-key-tank/src/client.rs @@ -11,9 +11,9 @@ use std::time::Instant; use std::{thread, time}; use thiserror::Error; -use noise_core::core::{Core, CoreClient}; +use scuba_core::core::{Core, CoreClient}; -use crate::data::{BasicData, NoiseData}; +use crate::data::{BasicData, ScubaData}; use crate::devices::Device; use crate::metadata::{Group, PermType, PermissionSet}; @@ -115,8 +115,8 @@ impl Operation { } #[derive(Clone)] -pub struct NoiseKVClient { - core: Option>>, +pub struct TankClient { + core: Option>>, // TODO remove pub pub device: Arc>>>, ctr: Arc>, @@ -144,10 +144,10 @@ pub struct NoiseKVClient { } #[async_trait] -impl CoreClient for NoiseKVClient { +impl CoreClient for TankClient { async fn client_callback( &self, - _seq: noise_core::core::SequenceNumber, + _seq: scuba_core::core::SequenceNumber, sender: String, message: String, bench: bool, @@ -266,7 +266,7 @@ impl CoreClient for NoiseKVClient { } } -impl NoiseKVClient { +impl TankClient { pub async fn new<'a>( ip_arg: Option<&'a str>, port_arg: Option<&'a str>, @@ -286,9 +286,9 @@ impl NoiseKVClient { send_filename: Option, recv_update_filename: Option, recv_dummy_filename: Option, - ) -> NoiseKVClient { + ) -> TankClient { let ctr_val = test_wait_num_callbacks.unwrap_or(0); - let mut client = NoiseKVClient { + let mut client = TankClient { core: None, device: Arc::new(RwLock::new(None)), ctr: Arc::new(Mutex::new(ctr_val)), @@ -2416,15 +2416,15 @@ impl NoiseKVClient { } mod tests { - use crate::client::{NoiseKVClient, Operation}; - use crate::data::NoiseData; + use crate::client::{TankClient, Operation}; + use crate::data::ScubaData; #[tokio::test] async fn test_send_one_message() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, None, None).await; + TankClient::new(None, None, false, None, None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -2455,9 +2455,9 @@ mod tests { #[tokio::test] async fn test_send_two_sequential_messages() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -2504,9 +2504,9 @@ mod tests { #[tokio::test] async fn test_send_two_concurrent_messages() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -2553,9 +2553,9 @@ mod tests { #[tokio::test] async fn test_create_linked_device() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; client_0.create_standalone_device(); // sends operation to device 0 to link devices @@ -2606,17 +2606,17 @@ mod tests { #[tokio::test] async fn test_serialization() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(0), None).await; + TankClient::new(None, None, false, Some(0), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_2 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_3 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_4 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_5 = - NoiseKVClient::new(None, None, false, Some(2), None).await; + TankClient::new(None, None, false, Some(2), None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -2724,9 +2724,9 @@ mod tests { #[tokio::test] async fn test_add_contact() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -2850,9 +2850,9 @@ mod tests { #[tokio::test] async fn test_get_all_contacts() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(1), None).await; + TankClient::new(None, None, false, Some(1), None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -2886,12 +2886,12 @@ mod tests { /* #[tokio::test] async fn test_delete_self_device() { - let mut client_0 = NoiseKVClient::new(None, None, false).await; + let mut client_0 = TankClient::new(None, None, false).await; // upload otkeys to server client_0.core.receive_message().await; client_0.create_standalone_device(); - let mut client_1 = NoiseKVClient::new(None, None, false).await; + let mut client_1 = TankClient::new(None, None, false).await; // upload otkeys to server client_1.core.receive_message().await; @@ -2926,12 +2926,12 @@ mod tests { #[tokio::test] async fn test_delete_other_device() { - let mut client_0 = NoiseKVClient::new(None, None, false).await; + let mut client_0 = TankClient::new(None, None, false).await; // upload otkeys to server client_0.core.receive_message().await; client_0.create_standalone_device(); - let mut client_1 = NoiseKVClient::new(None, None, false).await; + let mut client_1 = TankClient::new(None, None, false).await; // upload otkeys to server client_1.core.receive_message().await; @@ -2966,12 +2966,12 @@ mod tests { #[tokio::test] async fn test_delete_all_devices() { - let mut client_0 = NoiseKVClient::new(None, None, false).await; + let mut client_0 = TankClient::new(None, None, false).await; // upload otkeys to server client_0.core.receive_message().await; client_0.create_standalone_device(); - let mut client_1 = NoiseKVClient::new(None, None, false).await; + let mut client_1 = TankClient::new(None, None, false).await; // upload otkeys to server client_1.core.receive_message().await; @@ -3002,7 +3002,7 @@ mod tests { #[tokio::test] async fn test_set_data() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(4), None).await; + TankClient::new(None, None, false, Some(4), None).await; client_0.create_standalone_device(); let data_type = "type".to_string(); @@ -3168,9 +3168,9 @@ mod tests { #[tokio::test] async fn test_add_writers() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(8), None).await; + TankClient::new(None, None, false, Some(8), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(5), None).await; + TankClient::new(None, None, false, Some(5), None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); @@ -3457,9 +3457,9 @@ mod tests { #[tokio::test] async fn test_add_readers() { let mut client_0 = - NoiseKVClient::new(None, None, false, Some(10), None).await; + TankClient::new(None, None, false, Some(10), None).await; let mut client_1 = - NoiseKVClient::new(None, None, false, Some(7), None).await; + TankClient::new(None, None, false, Some(7), None).await; client_0.create_standalone_device(); client_1.create_standalone_device(); diff --git a/client/single-key-dal/src/data.rs b/client/single-key-tank/src/data.rs similarity index 95% rename from client/single-key-dal/src/data.rs rename to client/single-key-tank/src/data.rs index da6a084..40b3fa5 100644 --- a/client/single-key-dal/src/data.rs +++ b/client/single-key-tank/src/data.rs @@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::fmt; -pub trait NoiseData { +pub trait ScubaData { fn data_id(&self) -> &String; fn data_type(&self) -> &String; fn data_val(&self) -> &String; @@ -33,7 +33,7 @@ impl BasicData { } } -impl NoiseData for BasicData { +impl ScubaData for BasicData { fn data_id(&self) -> &String { &self.data_id } @@ -62,12 +62,12 @@ impl fmt::Display for BasicData { } #[derive(Clone)] -pub struct Validator { +pub struct Validator { general_callback: fn(&String, &T) -> bool, per_type_callbacks: HashMap bool>, } -fn default_general_callback( +fn default_general_callback( data_id: &String, data_val: &T, ) -> bool { @@ -80,7 +80,7 @@ fn default_general_callback( true } -impl Validator { +impl Validator { pub fn new( general_callback: Option bool>, ) -> Validator { @@ -122,13 +122,13 @@ impl Validator { } #[derive(Clone)] -pub struct DataStore { +pub struct DataStore { store: HashMap, validator: Validator, } //fn get_all_data_with_type -impl DataStore { +impl DataStore { pub fn new() -> DataStore { Self { store: HashMap::::new(), diff --git a/client/single-key-dal/src/devices.rs b/client/single-key-tank/src/devices.rs similarity index 99% rename from client/single-key-dal/src/devices.rs rename to client/single-key-tank/src/devices.rs index 02bc97f..b7c64c5 100644 --- a/client/single-key-dal/src/devices.rs +++ b/client/single-key-tank/src/devices.rs @@ -4,7 +4,7 @@ use std::collections::HashSet; use std::sync::Arc; use thiserror::Error; -use crate::data::{DataStore, NoiseData}; +use crate::data::{DataStore, ScubaData}; use crate::metadata::{Group, MetadataStore, PermType, PermissionSet}; #[derive(Debug, PartialEq, Error)] @@ -14,7 +14,7 @@ pub enum Error { } #[derive(Clone)] -pub struct Device { +pub struct Device { idkey: Arc>, pub meta_store: Arc>, pub data_store: Arc>>, @@ -23,7 +23,7 @@ pub struct Device { } // TODO linked_name => root or smthg -impl Device { +impl Device { pub fn new( idkey: String, linked_name_arg: Option, @@ -182,7 +182,7 @@ impl Device { } // add data - // into_iter() needed b/c NoiseData can't implement Clone(), so + // into_iter() needed b/c ScubaData can't implement Clone(), so // if we want this to stay generic then we need to move data_val // from new_data via into_iter() (as opposed to just iter()) for (data_key, data_val) in new_data.into_iter() { diff --git a/client/single-key-dal/src/lib.rs b/client/single-key-tank/src/lib.rs similarity index 100% rename from client/single-key-dal/src/lib.rs rename to client/single-key-tank/src/lib.rs diff --git a/client/single-key-dal/src/metadata.rs b/client/single-key-tank/src/metadata.rs similarity index 100% rename from client/single-key-dal/src/metadata.rs rename to client/single-key-tank/src/metadata.rs diff --git a/server-bench/Cargo.toml b/server-bench/Cargo.toml index 73ed786..ed86403 100644 --- a/server-bench/Cargo.toml +++ b/server-bench/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "noise-server-bench" +name = "scuba-server-bench" version = "0.1.0" edition = "2021" @@ -8,7 +8,7 @@ reqwest = "0.11.16" tokio = { version = "^1.12", features = ["rt-multi-thread", "fs"] } bincode = "1.3.3" -noise-server = { path = "../server" } +scuba-server = { path = "../server" } clap = "4.4.8" serde_json = "1.0.108" serde = { version = "1.0.193", features = ["derive"] } diff --git a/server-bench/src/delete_attest_messages_bench.rs b/server-bench/src/delete_attest_messages_bench.rs index dba4267..d8399d2 100644 --- a/server-bench/src/delete_attest_messages_bench.rs +++ b/server-bench/src/delete_attest_messages_bench.rs @@ -134,7 +134,7 @@ async fn client_loop( .await .unwrap(); - let parsed: noise_server_lib::shard::client_protocol::MessageBatch = + let parsed: scuba_server_lib::shard::client_protocol::MessageBatch = bincode::deserialize(&messages_resp.bytes().await.unwrap()).unwrap(); let duration = std::time::Instant::now().duration_since(start); diff --git a/server-goose-bench/Cargo.toml b/server-goose-bench/Cargo.toml index 24f9381..a7f72d2 100644 --- a/server-goose-bench/Cargo.toml +++ b/server-goose-bench/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "noise-server-goose-bench" +name = "scuba-server-goose-bench" version = "0.1.0" edition = "2021" @@ -14,5 +14,5 @@ serde_json = "1.0.95" tokio = "^1.12" bincode = "1.3.3" -noise-server = { path = "../server" } +scuba-server = { path = "../server" } clap = "4.4.8" diff --git a/server-goose-bench/src/main.rs b/server-goose-bench/src/main.rs index 6354034..7575e0f 100644 --- a/server-goose-bench/src/main.rs +++ b/server-goose-bench/src/main.rs @@ -14,7 +14,7 @@ use std::borrow::Cow; use std::collections::{BTreeMap, HashMap}; use std::sync::atomic::{AtomicUsize, Ordering}; -use noise_server_lib::shard::client_protocol::{EncryptedPerRecipientPayload, EncryptedCommonPayload, EncryptedOutboxMessage}; +use scuba_server_lib::shard::client_protocol::{EncryptedPerRecipientPayload, EncryptedCommonPayload, EncryptedOutboxMessage}; // Horribly unsafe AND unsound, never do this, this WILL break, it's terrible. static mut USERNAMES: Option> = None; diff --git a/server/Cargo.toml b/server/Cargo.toml index d789aec..e18c142 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "noise-server" +name = "scuba-server" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] -name = "noise_server_lib" +name = "scuba_server_lib" path = "src/lib.rs" [[bin]] -name = "noise-server" +name = "scuba-server" path = "src/bin/server.rs" [dependencies] diff --git a/server/src/bin/server.rs b/server/src/bin/server.rs index 84bdb73..aff634e 100644 --- a/server/src/bin/server.rs +++ b/server/src/bin/server.rs @@ -1,9 +1,9 @@ use actix_web::{App, HttpServer}; use clap::{Parser, Subcommand}; -use noise_server_lib::attestation_proxy; -use noise_server_lib::sequencer; -use noise_server_lib::shard; +use scuba_server_lib::attestation_proxy; +use scuba_server_lib::sequencer; +use scuba_server_lib::shard; #[derive(Subcommand, Debug)] enum Commands {