chore: dropped minerd references

This commit is contained in:
skoupidi
2025-12-29 15:38:12 +02:00
parent 73ca7106fa
commit ecfebc2b71
7 changed files with 27 additions and 67 deletions

16
.gitignore vendored
View File

@@ -15,15 +15,6 @@ witness.json
/bin/darkfid/darkfid
/darkfid
/bin/minerd/minerd
/minerd
/bin/explorer/explorerd/explorerd
/explorerd
/bin/darkfi-mmproxy/darkfi-mmproxy
/darkfi-mmproxy
/bin/drk/drk
/drk
@@ -39,17 +30,14 @@ witness.json
/bin/lilith/lilith
/lilith
/bin/swapd/swapd
/swapd
/bin/tau/taud/taud
/taud
/bin/vanityaddr/vanityaddr
/vanityaddr
/bin/darkwallet/darkwallet
/darkwallet
/bin/explorer/explorerd/explorerd
/explorerd
/bin/fud/fud/fud
/fud

View File

@@ -24,7 +24,6 @@ PROOFS_BIN = $(PROOFS_SRC:=.bin)
BINS = \
zkas \
darkfid \
minerd \
drk \
darkirc \
genev \
@@ -60,13 +59,6 @@ darkfid: contracts
RUST_TARGET="$(RUST_TARGET)" \
RUSTFLAGS="$(RUSTFLAGS)"
minerd: contracts
$(MAKE) -C bin/$@ \
PREFIX="$(PREFIX)" \
CARGO="$(CARGO)" \
RUST_TARGET="$(RUST_TARGET)" \
RUSTFLAGS="$(RUSTFLAGS)"
drk: contracts
$(MAKE) -C bin/$@ \
PREFIX="$(PREFIX)" \
@@ -188,7 +180,6 @@ clean:
$(MAKE) -C src/contract/deployooor clean
$(MAKE) -C bin/zkas clean
$(MAKE) -C bin/darkfid clean
$(MAKE) -C bin/minerd clean
$(MAKE) -C bin/drk clean
$(MAKE) -C bin/darkirc clean
$(MAKE) -C bin/genev/genev-cli clean

View File

@@ -44,8 +44,8 @@ transactions and stays connected to the p2p network.
- `drk` is a CLI wallet. It provides an interface to smart contracts
such as Money and DAO, manages our keys and coins, and scans the
blockchain to update our balances.
- `minerd` is the DarkFi mining daemon. It connects to darkfid over
RPC and triggers commands for it to mine blocks.
- `xmrig` is the mining daemon used in DarkFi. Connects to `darkfid`
over its `Stratum` RPC, and requests new block headers to mine.
To connect to the alpha testnet, [follow the tutorial][tutorial].

View File

@@ -41,6 +41,6 @@ stop:
@$(MAKE) -C ./explorerd stop || true; \
$(MAKE) -C ./site stop || true; \
.PHONY: start-% check-minerd check-darkfid check-explorerd check-site stop
.PHONY: start-% check-darkfid check-explorerd check-site stop

View File

@@ -42,13 +42,12 @@ The DarkFi Explorer provides a visual interface to explore blockchains on DarkFi
### Prerequisites
Before you begin, ensure you have the following installed and configured:
- **Rust 1.86 or later**: Required for building components written in Rust (like `darkfid`, `minerd`, `explorerd`)
- **Rust 1.86 or later**: Required for building components written in Rust (like `darkfid`, `explorerd`)
- **Python 3.12**: Required for building and running the Explorer Site (`site`).
- **Darkfi Project Dependencies**: System dependencies required to compile Darkfi code. For details, see [Darkfi Build Dependencies](../../README.md#build).
- **Darkfid**: Runs DarkFi blockchain nodes on respective networks.
- **Minerd**: Mines blocks and is required if Darkfid is configured with a miner JSON-RPC endpoint and the associated miner isnt running.
> **Note** When using the `make` commands in the [Quick Start Guide](#quick-start-guide), Darkfid and Minerd are automatically built when needed.
> **Note** When using the `make` commands in the [Quick Start Guide](#quick-start-guide), Darkfid is automatically built when needed.
### Start Localnet Explorer Environment
@@ -88,20 +87,20 @@ make start-no-sync-localnet
Upon successful initialization of the Explorer environment, confirmation messages will appear in the startup logs. If these logs are not visible, the Explorer environment is still initializing. Allow sufficient time for the initialization process to complete before accessing the block explorer.
```
07:09:22 [INFO] ========================================================================================
07:09:22 [INFO] Started DarkFi Explorer Node
07:09:22 [INFO] ========================================================================================
07:09:22 [INFO] - Network: localnet
07:09:22 [INFO] - JSON-RPC Endpoint: tcp://127.0.0.1:14567
07:09:22 [INFO] - Database: ~/.local/share/darkfi/explorerd/localnet
07:09:22 [INFO] - Configuration: ./explorerd_config.toml
07:09:22 [INFO] - Reset Blocks: No
07:09:22 [INFO] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
07:09:22 [INFO] - Synced Blocks: 9
07:09:22 [INFO] - Synced Transactions: 9
07:09:22 [INFO] - Connected Darkfi Node: tcp://127.0.0.1:8240
07:09:22 [INFO] ========================================================================================
07:09:22 [INFO] All is good. Waiting for block notifications...
[INFO] ========================================================================================
[INFO] Started DarkFi Explorer Node
[INFO] ========================================================================================
[INFO] - Network: localnet
[INFO] - JSON-RPC Endpoint: tcp://127.0.0.1:14567
[INFO] - Database: ~/.local/share/darkfi/explorerd/localnet
[INFO] - Configuration: ./explorerd_config.toml
[INFO] - Reset Blocks: No
[INFO] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[INFO] - Synced Blocks: 9
[INFO] - Synced Transactions: 9
[INFO] - Connected Darkfi Node: tcp://127.0.0.1:8240
[INFO] ========================================================================================
[INFO] All is good. Waiting for block notifications...
Started explorer site on localnet network (PID=31911)
Started localnet environment. Press Ctrl-C to stop.
```

View File

@@ -28,8 +28,6 @@ EXPLORERD_CONFIG := $(EXPLORERD_BIN)_config.toml
# If these binaries are missing when launching the explorer node environment,
# the Makefile (via a sub-make call) will build them if needed. Their configurations
# are used to start the nodes.
MINERD_BIN := $(PROJECT_ROOT)/minerd
MINERD_CONFIG := $(PROJECT_ROOT)/bin/minerd/minerd_config.toml
DARKFID_BIN := $(PROJECT_ROOT)/darkfid
DARKFID_CONFIG := $(PROJECT_ROOT)/bin/darkfid/darkfid_config.toml
@@ -110,13 +108,9 @@ bundle_contracts_src:
(cd "$$TMP_DIR/$$contract" && tar --format=pax -cf ../../$${contract}_contract_src.tar *); \
done;
# Start explorer on localnet (requires minerd)
start-localnet: check-minerd
# Starts an explorer node environment for `localnet`, `testnet`, or `mainnet` networks.
# It validates the input network, stops any currently running nodes, initializes the log directory,
# optionally starts `minerd` for `localnet`, and starts the remaining nodes while waiting for them
# to properly initialize.
# and starts the remaining nodes while waiting for them to properly initialize.
start-%: check-darkfid check-explorerd
@if [ "$*" != "localnet" ] && [ "$*" != "testnet" ] && [ "$*" != "mainnet" ]; then \
echo "Error: Unsupported network '$*'. Use 'localnet', 'testnet', or 'mainnet'."; \
@@ -127,7 +121,6 @@ start-%: check-darkfid check-explorerd
@sh -c ' \
LOG_DIR=$(LOG_HOME)/$*; \
mkdir -p "$$LOG_DIR"; \
$(if $(filter localnet,$*), $(MINERD_BIN) -c $(MINERD_CONFIG) & echo $$! >> PIDs.txt; sleep 2;) \
$(DARKFID_BIN) $(VERBOSE) --log "$$LOG_DIR/darkfid.log" -c $(DARKFID_CONFIG) --network $* & echo $$! >> PIDs.txt; sleep 2; \
$(call wait_for_darkfid_startup, $$LOG_DIR) \
./$(EXPLORERD_BIN) $(VERBOSE) --log "$$LOG_DIR/explorerd.log" -c $(EXPLORERD_CONFIG) --network $* & echo $$! >> PIDs.txt; \
@@ -167,13 +160,6 @@ check-explorerd:
$(MAKE) -C .; \
fi
# Check and build minerd if it does not exist
check-minerd:
@if [ ! -f "$(MINERD_BIN)" ]; then \
echo "Building minerd..."; \
$(MAKE) -C "$(PROJECT_ROOT)" minerd; \
fi
# Check and build contracts if they do not exist
check-contracts:
@if [ ! -f "$(PROJECT_ROOT)/src/contract/money/darkfi_money_contract.wasm" ] \
@@ -227,4 +213,4 @@ define wait_for_explorerd_startup
done;
endef
.PHONY: help all clean install uninstall bundle_contracts_src check-minerd check-darkfid check-explorerd stop start-%
.PHONY: help all clean install uninstall bundle_contracts_src check-darkfid check-explorerd stop start-%

View File

@@ -19,12 +19,11 @@ The testnet and mainnet configurations serve as placeholders in preparation for
## Prerequisites
Before you begin, ensure you have the following installed and configured:
- **Rust 1.86 or later**: Required for building components written in Rust (like `darkfid`, `minerd`, `explorerd`).
- **Rust 1.86 or later**: Required for building components written in Rust (like `darkfid`, `explorerd`).
- **Darkfi Project Dependencies**: System dependencies required to compile DarkFi code (see [Darkfi Build Dependencies](../../../README.md#build)).
- **Darkfid**: Runs DarkFi blockchain nodes on respective networks.
- **Minerd**: Mines blocks and is required if Darkfid is configured with a miner JSON-RPC endpoint and the associated miner isnt running.
> **Note** When using the `make` commands in the [Quick Start Guide](#quick-start-guide), Darkfid and Minerd are automatically built when needed.
> **Note** When using the `make` commands in the [Quick Start Guide](#quick-start-guide), Darkfid is automatically built when needed.
## Quick-Start Guide
@@ -176,12 +175,9 @@ make install
##### Using darkfid's networks
Start the `minerd` and `darkfid` daemons using their configurations.
Start the `darkfid` daemon using their configurations.
```bash
# Start the mining daemon
minerd
# Start darkfid (example uses localnet)
darkfid --network localnet
```
@@ -221,4 +217,4 @@ To connect to a custom blockchain network, provide a configuration file with you
explorerd -c explorerd-config.toml --network localnet
```
> Update the `endpoint` in your `explorerd-config.toml` to point to your custom `darkfid` instance. The `--network` parameter can be set to `localnet`, `testnet`, or `mainnet` to match your target network configuration.
> Update the `endpoint` in your `explorerd-config.toml` to point to your custom `darkfid` instance. The `--network` parameter can be set to `localnet`, `testnet`, or `mainnet` to match your target network configuration.