-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements on standalone node execution (#55)
## What ❔ Documented a guide on setting up and running a local consensus node, along with a new Makefile containing commands for easy execution. Also modifies the database directory path for each node. ## Why ❔ The README and the Makefile would streamline generating the configuration for all nodes with a single command and simplify running the desired node. About the modification for the database directory path, it seems beneficial for running multiple nodes on a single machine, especially for local testing. However, in the broader architecture of the Test Framework, each node is expected to operate within a distinct Docker container or a similar setup. In that context, this change might not be useful.
- Loading branch information
Showing
3 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.PHONY: run-node node-configs clean | ||
IP?=127.0.0.1:3054 | ||
|
||
run-node: | ||
export RUST_LOG=INFO && cd node-configs/${IP} && cargo run -- --database ./database/${IP} | ||
|
||
node-configs: | ||
cargo run --bin localnet_config -- --input-addrs addresses.txt --output-dir node-configs | ||
|
||
clean: | ||
rm -rf node-configs | ||
rm -rf database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Running a test node | ||
|
||
1. Generate a file named `addresses.txt` in the root directory of the tools crate, containing node addresses in the format `IP:PORT`, with each address on a separate line. | ||
2. Run `make node-configs`. This command will establish a directory named `node-configs` and create a folder for each address listed in the `.txt` file, providing the necessary configuration files for the respective node. | ||
3. Execute `make run-node IP=<NODE_IP>`. The default value for this command would be `127.0.0.1:3054`. Note that running this command will take control of the terminal. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters