Commit Graph

7 Commits

Author SHA1 Message Date
Paul Otten
721502a468 Move from "nightly" toolchain to "stable".
Intended to address tau RefID "Gifn1u".

There are still a few things that require nightly.
- cargo +nightly fmt
- fuzzing
2025-04-14 19:42:15 -04:00
kalm
a9939f47e9 explorer: incorporate no-sync mode into respective explorer Makefiles
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
2025-03-17 07:12:30 -07:00
kalm
8ef29926a1 explorerd: clean up and further document makefile
This commit cleans up the explorerd Makefile by:

- Adding named variables for all binary and configuration paths
- Enhancing the `bundle_contracts_src` target's documentation
- Cleaning up path handling to use variable references
- Improving comments in the `start-%` target to explain the workflow
- Updating all project root path references to use the `$(PROJECT_ROOT)` variable
- Reorganizing the `await-startup-%` target to group it with other targets
2025-03-13 22:38:13 -07:00
kalm
c4e22941d9 explorerd: improve process termination in 'stop' makefile target
This commit enhances the process termination mechanism in the 'stop' target by:
- Adding a check to verify that a PID is running before attempting to terminate it
- Implementing a more graceful termination approach by first sending SIGTERM (15) and only using SIGKILL (9) as a fallback
2025-03-12 23:11:02 -07:00
kalm
bec2f5c55e explorerd: improve cross-platform native contract bundling, add witness proof files
This commit replaces the GNU tar-specific `--transform` flag with a more portable solution, ensuring contract bundling works correctly on both Linux and BSD/macOS systems. It also includes witness proof JSON files in the native contract source code.

Summary of Updates
- Removed dependency on the GNU-specific `--transform` option
- Specified PAX format explicitly (`--format=pax`) for better cross-platform compatibility
- Refactored to use a temporary directory structure that mirrors the desired archive layout before generating tar files
- Included proof witness JSON files as part of the native contract bundling
2025-03-12 22:48:55 -07:00
kalm
a0bc5ae51f explorerd: automate starting explorer node environments
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
2025-03-09 06:46:35 -07:00
kalm
f852967618 explorer: move explorer source code from research to bin/explorer for project releases
This commit relocates the explorer code from the research directory to `bin/explorer` to include it as part of future releases.

### Summary of Updates:

#### Darkfi Project
- Updated `Cargo.toml` to include `bin/explorer/explorerd` as a workspace member
- Updated `Cargo.lock` to include the `explorerd` package
- Updated the `Makefile` to include `explorerd` in the build process

#### Explorer Daemon
- Renamed the project directory from `blockchain-explorer` to `explorer`
- Moved the explorer daemon source code to `bin/explorer/explorerd`
- Updated the cargo package name to `explorerd`
- Updated log statement targets from `blockchain-explorer::` to `explorerd::`
- Renamed the explorer configuration file to `explorerd_config.toml`
- Removed Halo2 patches as they are now included in the root package
- Changed default db_path to use explorerd instead of blockchain-explorer in the path
- Changed binary crate Arg structopt name from blockchain-explorer to explorerd

#### Explorer Site
- Moved the explorer site source code to `bin/explorer/site`
- Updated README.md to include new build instructions for explorerd
2025-02-18 03:49:44 -08:00