This commit adds targets to the explorer's Makefiles for starting the explorer in no-sync mode. This allows node environments to launch without connecting to a Darkfi blockchain network, relying instead on existing explorer databases. A `check-contracts` target was added to ensure required WASM files are built to start explorerd in no-sync mode. This setup enhances the mode implementation by simplifying the process of starting environments without sync.
Summary of Updates:
- Introduced `start-no-sync-%` targets in `explorer/Makefile` and `explorer/explorerd/Makefile`
- Added `await-startup-no-sync-%` in `explorer/explorerd/Makefile` to wait for explorerd startup while skipping the Darkfid connection and sync
- Implemented a `check-contracts` target to verify the presence of required contract artifacts and build them if necessary
This commit adds the ability to start an explorer environment with a single command. The new Makefile addition streamlines the process of working with the DarkFi explorer across various network configurations, catering to users with diverse needs.
The implementation automates startup and shutdown for explorer environments while managing dependencies efficiently, ensuring that missing components are automatically built. It also launches the explorer site (UI), verifying that all required dependencies are installed beforehand. The startup process is orchestrated so that `darkfid` initializes first, followed by `explorerd`, and the UI is launched after verifying that the explorer node is fully operational.
These improvements allow a diverse community of users to focus on what matters most to them without concern for environment setup, startup, or shutdown.
For usage details, run: `make help`
Key Features:
- Single-command to start/stop explorer environments for Darkfi localnet, testnet, or mainnet networks
- Automatic dependency management and node building
- Graceful shutdown with a single keyboard interrupt (Ctrl-C)
- Sequential startup to prevent race conditions
- Organized node logging for each network (localnet, testnet, mainnet)
- Enhanced `make help` help documentation