Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
explorerd: automate starting explorer nodes and associated darkfi net…
…works Enhanced Makefile with capabilities to automate the startup and shutdown of explorerd and its dependencies using a single `make` command. These additions create a streamlined user experience for running explorer nodes across the DarkFi networks, orchestrating the process by automatically building necessary dependencies prior to starting an explorer node environment. Ordered startup sequencing has been implemented to ensure darkfid starts before launching explorerd, with a mechanism to wait for explorerd to complete initialization to avoid startup race conditions. The implementation maintains PID tracking for graceful process shutdown. Additionally, it organizes logs by network type (localnet, testnet, mainnet) in dedicated directories (`~/.local/share/darkfi/logs/NETWORK`) that are monitored to determine when nodes are initialized. To view a list of available make commands (targets), run: `make help`. Key Features: - Single Command Launch: Provides targets to start explorer node environments with a single command (`make start-localnet/testnet/mainnet`) - Automatic Dependency Checks and Builds: Automatic dependency resolution that builds missing `darkfid`, `explorerd`, and `minerd` binaries before starting nodes - Graceful Shutdown: Added graceful network shutdown capability with PID tracking (`make stop`) - Ordered Initialization: Implemented ordered startup sequencing for network nodes, ensuring `darkfid` starts before launching `explorerd`, and waiting for explorerd to complete initialization before it is marked as started - Organized Logging: Logs for each started network (localnet, testnet, mainnet) are saved in their respective directories (~/.local/share/darkfi/logs/NETWORK) - Log Monitoring: Implemented log monitoring to ensure that nodes are not started before their dependencies are ready - Error Handling: Ensures invalid or unsupported network arguments are reported with an error message
- Loading branch information