Skip to content

Commit

Permalink
remove all references to --create-id
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi committed Apr 12, 2022
1 parent 8cd4a0e commit d5db280
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 26 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion applications/launchpad/docker_rig/quick_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 5 additions & 7 deletions applications/tari_app_utilities/src/identity_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -65,7 +65,7 @@ pub fn setup_node_identity<P: AsRef<Path>>(
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()
),
)),
Expand All @@ -76,17 +76,15 @@ pub fn setup_node_identity<P: AsRef<Path>>(
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
),
));
Expand Down
2 changes: 1 addition & 1 deletion applications/tari_base_node/linux/supervisord.md
Original file line number Diff line number Diff line change
Expand Up @@ -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```
Expand Down
1 change: 0 additions & 1 deletion applications/tari_base_node/osx/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion applications/tari_base_node/osx/post_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion applications/tari_base_node/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion applications/tari_base_node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down
2 changes: 1 addition & 1 deletion buildtools/docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions integration_tests/helpers/baseNodeProcess.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/helpers/validatorNodeProcess.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d5db280

Please sign in to comment.