From 9f87c561fae007251ab701fae17223d0b5f8fce2 Mon Sep 17 00:00:00 2001 From: Dastan-glitch Date: Sat, 7 May 2022 02:58:15 +0300 Subject: [PATCH] bin/tau: remove key arg and only use the key from file --- bin/tau/README.md | 13 +++---------- bin/tau/taud/src/main.rs | 6 ------ bin/tau/taud/src/settings.rs | 3 --- bin/tau/taud_config.toml | 3 --- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/bin/tau/README.md b/bin/tau/README.md index e95e04d75..1105f37bc 100644 --- a/bin/tau/README.md +++ b/bin/tau/README.md @@ -39,15 +39,8 @@ Also note that for the first time ever running seed node you must run it with ``` This will generate a new secret key in `/home/${USER}/.config/tau/secret_key` that you can share with nodes you want them to get and decrypt your tasks, otherwise if you -have already generated or got a copy from a peer place it either in the same directory -`/home/${USER}/.config/tau/secret_key`, or in the config file. - - in config file: - - ## Secret key - key="SECRET_KEY_GOES_HERE" - -DO NOT use `--key` in terminal to pass the secret key. +have already generated or got a copy from a peer place it in the same directory +`/home/${USER}/.config/tau/secret_key`. ### Inbound Node @@ -153,7 +146,7 @@ Output: ### List tasks with filters ```shell -% tau all # lists all tasks +% tau # lists all tasks % tau open # lists currently open tasks % tau pause # lists currently paused tasks % tau 0522 # lists tasks created at May 2022 diff --git a/bin/tau/taud/src/main.rs b/bin/tau/taud/src/main.rs index 1441b0dcd..4b9f62682 100644 --- a/bin/tau/taud/src/main.rs +++ b/bin/tau/taud/src/main.rs @@ -98,12 +98,6 @@ async fn realmain(settings: Args, executor: Arc>) -> Result<()> { let sk_string = hex::encode(secret.as_bytes()); save::(&datastore_path.join("secret_key"), &sk_string)?; secret - } else if settings.key.is_some() { - let sk_str = settings.key.unwrap(); - save::(&datastore_path.join("secret_key"), &sk_str)?; - let sk_bytes = hex::decode(sk_str)?; - let sk_bytes: [u8; KEY_SIZE] = sk_bytes.as_slice().try_into()?; - SecretKey::try_from(sk_bytes)? } else { let loaded_key = match load::(&datastore_path.join("secret_key")) { Ok(key) => key, diff --git a/bin/tau/taud/src/settings.rs b/bin/tau/taud/src/settings.rs index 69d4f8406..3e8a8b832 100644 --- a/bin/tau/taud/src/settings.rs +++ b/bin/tau/taud/src/settings.rs @@ -31,7 +31,4 @@ pub struct Args { /// Generate a new secret key #[structopt(long)] pub key_gen: bool, - /// Load a secret key - #[structopt(long)] - pub key: Option, } diff --git a/bin/tau/taud_config.toml b/bin/tau/taud_config.toml index f0f7d5af5..abc02f065 100644 --- a/bin/tau/taud_config.toml +++ b/bin/tau/taud_config.toml @@ -4,9 +4,6 @@ ## Sets Datastore Path #datastore="~/.config/tau" -## Secret key -#key="" - ## Raft net settings [net] ## P2P accept address