From d5db280c841e8c33c7be00203761258beb450a62 Mon Sep 17 00:00:00 2001 From: Stan Date: Tue, 12 Apr 2022 09:11:47 +0400 Subject: [PATCH] remove all references to --create-id --- README.md | 4 ++-- applications/launchpad/docker_rig/quick_start.sh | 2 +- .../tari_app_utilities/src/identity_management.rs | 12 +++++------- applications/tari_base_node/linux/supervisord.md | 2 +- applications/tari_base_node/osx/install.sh | 1 - applications/tari_base_node/osx/post_install.sh | 2 +- applications/tari_base_node/setup.sh | 1 - applications/tari_base_node/src/main.rs | 2 +- .../windows/runtime/source_base_node_env.bat | 2 +- buildtools/docker/start.sh | 2 +- integration_tests/helpers/baseNodeProcess.js | 9 +-------- integration_tests/helpers/validatorNodeProcess.js | 2 +- 12 files changed, 15 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 955faaefce..f4132cc89e 100644 --- a/README.md +++ b/README.md @@ -242,7 +242,7 @@ start Tor service `~/tari/applications/tari_base_node/osx/start_tor` (on Mac), To run from any directory of your choice, where the executable is visible in the path (first time use): - tari_base_node --init --create-id + tari_base_node --init tari_base_node tari_console_wallet --init @@ -264,7 +264,7 @@ Consecutive runs: Alternatively, you can run the Tari applications from your source directory using `cargo`, and just omit the `--release` flag if you want to run in debug mode (first time use): - cargo run --bin tari_base_node --release -- --init --create-id + cargo run --bin tari_base_node --release -- --init cargo run --bin tari_base_node --release cargo run --bin tari_merge_mining_proxy --release diff --git a/applications/launchpad/docker_rig/quick_start.sh b/applications/launchpad/docker_rig/quick_start.sh index 614dedb87d..990eeee809 100755 --- a/applications/launchpad/docker_rig/quick_start.sh +++ b/applications/launchpad/docker_rig/quick_start.sh @@ -52,7 +52,7 @@ export TARI_NETWORK=$NETWORK if [[ $SETUP == 1 ]]; then echo "Creating identity files and default config file" - docker compose run --rm base_node --create-id --init + docker compose run --rm base_node --init fi if [[ $START_TOR == 1 ]]; then diff --git a/applications/tari_app_utilities/src/identity_management.rs b/applications/tari_app_utilities/src/identity_management.rs index 093f6a7ecf..da597ee5f7 100644 --- a/applications/tari_app_utilities/src/identity_management.rs +++ b/applications/tari_app_utilities/src/identity_management.rs @@ -36,7 +36,7 @@ pub const LOG_TARGET: &str = "tari_application"; const REQUIRED_IDENTITY_PERMS: u32 = 0o100600; -/// Loads the node identity, or creates a new one if the --create-id flag was specified +/// Loads the node identity, or creates a new one if create_id is true /// /// ## Parameters /// - `identity_file` - Reference to file path @@ -65,7 +65,7 @@ pub fn setup_node_identity>( ExitCode::ConfigError, &format!( "{path} has incorrect permissions. You can update the identity file with the correct permissions \ - using 'chmod 600 {path}', or delete the identity file and re-run the node with the --create-id flag.", + using 'chmod 600 {path}', or delete the identity file and a new one will be created on next start", path = identity_file.as_ref().to_string_lossy() ), )), @@ -76,17 +76,15 @@ pub fn setup_node_identity>( if !prompt { error!( target: LOG_TARGET, - "Node identity information not found. {}. You can update the configuration file to point to a \ - valid node identity file, or re-run the node with the --create-id flag to create a new \ - identity.", + "Node identity not found. {}. You can update the configuration file to point to a valid node \ + identity file, or re-run the node and create a new one.", e ); return Err(ExitError::new( ExitCode::ConfigError, &format!( "Node identity information not found. {}. You can update the configuration file to point \ - to a valid node identity file, or re-run the node with the --create-id flag to create a \ - new identity.", + to a valid node identity file, or re-run the node to create a new one", e ), )); diff --git a/applications/tari_base_node/linux/supervisord.md b/applications/tari_base_node/linux/supervisord.md index dba75e34c5..5c30274367 100644 --- a/applications/tari_base_node/linux/supervisord.md +++ b/applications/tari_base_node/linux/supervisord.md @@ -20,7 +20,7 @@ sudo cp -v /home/vagrant/src/tari/target/release/tari_base_node /usr/local/tari ``` Create your tari_base_node configs ``` -sudo /usr/local/tari/bin/tari_base_node --base-path /usr/local/tari --init --create-id +sudo /usr/local/tari/bin/tari_base_node --base-path /usr/local/tari --init ``` Setup ```tari_base_node``` services in supervisord - ```/etc/supervisor/conf.d/tari_base_node.conf``` diff --git a/applications/tari_base_node/osx/install.sh b/applications/tari_base_node/osx/install.sh index daa4ac9409..acbdb4b1b0 100755 --- a/applications/tari_base_node/osx/install.sh +++ b/applications/tari_base_node/osx/install.sh @@ -83,7 +83,6 @@ fi # Configure Base Node ./tari_base_node --init -./tari_base_node --create-id banner Running Tari Base Node # Run Base Node diff --git a/applications/tari_base_node/osx/post_install.sh b/applications/tari_base_node/osx/post_install.sh index 133b4eca3d..472062be44 100755 --- a/applications/tari_base_node/osx/post_install.sh +++ b/applications/tari_base_node/osx/post_install.sh @@ -197,7 +197,7 @@ if [ ! -f "$DATA_DIR/config.toml" ]; then # cp log4rs_sample_base_node.yml $DATA_DIR/log4rs_base_node.yml # Configure Base Node - tari_base_node --init --create-id + tari_base_node --init echo "Configuration complete." fi diff --git a/applications/tari_base_node/setup.sh b/applications/tari_base_node/setup.sh index 0296a5e8bd..d8464fe076 100644 --- a/applications/tari_base_node/setup.sh +++ b/applications/tari_base_node/setup.sh @@ -29,7 +29,6 @@ osascript -e "tell application \"Terminal\" to do script \"sh ${PWD}/start_tor.s # Configure Base Node cd "${INSTALL_ROOT}" || exit tari_base-node --init -tari_base_node --create-id # Run Base Node tari_base_node diff --git a/applications/tari_base_node/src/main.rs b/applications/tari_base_node/src/main.rs index a6adb6cd63..9c3c2b6757 100644 --- a/applications/tari_base_node/src/main.rs +++ b/applications/tari_base_node/src/main.rs @@ -44,7 +44,7 @@ /// ``` /// /// For the first run -/// `cargo run tari_base_node -- --create-id` +/// `cargo run tari_base_node -- --init /// /// Subsequent runs /// `cargo run tari_base_node` diff --git a/applications/tari_base_node/windows/runtime/source_base_node_env.bat b/applications/tari_base_node/windows/runtime/source_base_node_env.bat index 2146186902..a289c61c6c 100644 --- a/applications/tari_base_node/windows/runtime/source_base_node_env.bat +++ b/applications/tari_base_node/windows/runtime/source_base_node_env.bat @@ -61,7 +61,7 @@ if exist "%my_exe_path%\%my_exe%" ( rem First time run if not exist "%config_path%\base_node_id.json" ( - "%base_node%" --create-id --init --config "%config_path%\config.toml" --log_config "%config_path%\log4rs_base_node.yml" --base-path "%base_path%" + "%base_node%" --init --config "%config_path%\config.toml" --log_config "%config_path%\log4rs_base_node.yml" --base-path "%base_path%" echo. echo. echo Created "%config_path%\base_node_id.json". diff --git a/buildtools/docker/start.sh b/buildtools/docker/start.sh index 6b067dd060..2e66aaf38c 100755 --- a/buildtools/docker/start.sh +++ b/buildtools/docker/start.sh @@ -11,7 +11,7 @@ sleep 15 TARI_CONFIG=~/.tari/config/config.toml if [[ ! -f $TARI_CONFIG ]]; then - tari_base_node --init --create-id + tari_base_node --init # fix for docker, bind grpc to 0.0.0.0 instead of loopback sed -i -e 's/127.0.0.1:18142/0.0.0.0:18142/' $TARI_CONFIG fi diff --git a/integration_tests/helpers/baseNodeProcess.js b/integration_tests/helpers/baseNodeProcess.js index 7b552e1cdb..c99844d9f1 100644 --- a/integration_tests/helpers/baseNodeProcess.js +++ b/integration_tests/helpers/baseNodeProcess.js @@ -49,14 +49,7 @@ class BaseNodeProcess { break; } } while (fs.existsSync(this.baseDir)); - const args = [ - "--base-path", - ".", - "--init", - "--create-id", - "--network", - "localnet", - ]; + const args = ["--base-path", ".", "--init", "--network", "localnet"]; const overrides = this.getOverrides(); Object.keys(overrides).forEach((k) => { args.push("-p"); diff --git a/integration_tests/helpers/validatorNodeProcess.js b/integration_tests/helpers/validatorNodeProcess.js index f30d33bb90..c11e9d6c23 100644 --- a/integration_tests/helpers/validatorNodeProcess.js +++ b/integration_tests/helpers/validatorNodeProcess.js @@ -47,7 +47,7 @@ class ValidatorNodeProcess { break; } } while (fs.existsSync(this.baseDir)); - const args = ["--base-path", ".", "--init", "--create-id"]; + const args = ["--base-path", ".", "--init"]; if (this.logFilePath) { args.push("--log-config", this.logFilePath); }