ソースを参照

chore: dropped minerd references

skoupidi 7 ヶ月 前
コミット
ecfebc2b71
7 ファイル変更27 行追加67 行削除
  1. 2 14
      .gitignore
  2. 0 9
      Makefile
  3. 2 2
      README.md
  4. 1 1
      bin/explorer/Makefile
  5. 16 17
      bin/explorer/README.md
  6. 2 16
      bin/explorer/explorerd/Makefile
  7. 4 8
      bin/explorer/explorerd/README.md

+ 2 - 14
.gitignore

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

+ 0 - 9
Makefile

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

+ 2 - 2
README.md

@@ -44,8 +44,8 @@ transactions and stays connected to the p2p network.
 - `drk` is a CLI wallet. It provides an interface to smart contracts
 - `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
 such as Money and DAO, manages our keys and coins, and scans the
 blockchain to update our balances.
 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].
 To connect to the alpha testnet, [follow the tutorial][tutorial].
 
 

+ 1 - 1
bin/explorer/Makefile

@@ -41,6 +41,6 @@ stop:
 	@$(MAKE) -C ./explorerd stop || true; \
 	@$(MAKE) -C ./explorerd stop || true; \
 	$(MAKE) -C ./site 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
 
 
 
 

+ 16 - 17
bin/explorer/README.md

@@ -42,13 +42,12 @@ The DarkFi Explorer provides a visual interface to explore blockchains on DarkFi
 
 
 ### Prerequisites
 ### Prerequisites
 Before you begin, ensure you have the following installed and configured:
 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`).
 - **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).
 - **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.
 - **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 isn’t 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
 ### 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.
 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 explorer site on localnet network (PID=31911)
 Started localnet environment. Press Ctrl-C to stop.
 Started localnet environment. Press Ctrl-C to stop.
 ```
 ```

+ 2 - 16
bin/explorer/explorerd/Makefile

@@ -28,8 +28,6 @@ EXPLORERD_CONFIG := $(EXPLORERD_BIN)_config.toml
 # If these binaries are missing when launching the explorer node environment,
 # 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
 # the Makefile (via a sub-make call) will build them if needed. Their configurations
 # are used to start the nodes.
 # 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_BIN      := $(PROJECT_ROOT)/darkfid
 DARKFID_CONFIG   := $(PROJECT_ROOT)/bin/darkfid/darkfid_config.toml
 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 *); \
 		(cd "$$TMP_DIR/$$contract" && tar --format=pax -cf ../../$${contract}_contract_src.tar *); \
 	done;
 	done;
 
 
-# Start explorer on localnet (requires minerd)
-start-localnet: check-minerd
-
 # Starts an explorer node environment for `localnet`, `testnet`, or `mainnet` networks.
 # 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,
 # 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
 start-%: check-darkfid check-explorerd
 	@if [ "$*" != "localnet" ] && [ "$*" != "testnet" ] && [ "$*" != "mainnet" ]; then \
 	@if [ "$*" != "localnet" ] && [ "$*" != "testnet" ] && [ "$*" != "mainnet" ]; then \
 		echo "Error: Unsupported network '$*'. Use 'localnet', 'testnet', or 'mainnet'."; \
 		echo "Error: Unsupported network '$*'. Use 'localnet', 'testnet', or 'mainnet'."; \
@@ -127,7 +121,6 @@ start-%: check-darkfid check-explorerd
 	@sh -c ' \
 	@sh -c ' \
 		LOG_DIR=$(LOG_HOME)/$*; \
 		LOG_DIR=$(LOG_HOME)/$*; \
 		mkdir -p "$$LOG_DIR"; \
 		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; \
 		$(DARKFID_BIN) $(VERBOSE) --log "$$LOG_DIR/darkfid.log" -c $(DARKFID_CONFIG) --network $* & echo $$! >> PIDs.txt; sleep 2; \
 		$(call wait_for_darkfid_startup, $$LOG_DIR) \
 		$(call wait_for_darkfid_startup, $$LOG_DIR) \
 		./$(EXPLORERD_BIN) $(VERBOSE) --log "$$LOG_DIR/explorerd.log" -c $(EXPLORERD_CONFIG) --network $* & echo $$! >> PIDs.txt; \
 		./$(EXPLORERD_BIN) $(VERBOSE) --log "$$LOG_DIR/explorerd.log" -c $(EXPLORERD_CONFIG) --network $* & echo $$! >> PIDs.txt; \
@@ -167,13 +160,6 @@ check-explorerd:
 		$(MAKE) -C .; \
 		$(MAKE) -C .; \
 	fi
 	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 and build contracts if they do not exist
 check-contracts:
 check-contracts:
 	@if [ ! -f "$(PROJECT_ROOT)/src/contract/money/darkfi_money_contract.wasm" ] \
 	@if [ ! -f "$(PROJECT_ROOT)/src/contract/money/darkfi_money_contract.wasm" ] \
@@ -227,4 +213,4 @@ define wait_for_explorerd_startup
   done;
   done;
 endef
 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-%

+ 4 - 8
bin/explorer/explorerd/README.md

@@ -19,12 +19,11 @@ The testnet and mainnet configurations serve as placeholders in preparation for
 
 
 ## Prerequisites
 ## Prerequisites
 Before you begin, ensure you have the following installed and configured:
 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)).
 - **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.
 - **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 isn’t 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
 ## Quick-Start Guide
 
 
@@ -176,12 +175,9 @@ make install
 
 
 ##### Using darkfid's networks
 ##### Using darkfid's networks
 
 
-Start the `minerd` and `darkfid` daemons using their configurations.
+Start the `darkfid` daemon using their configurations.
 
 
 ```bash
 ```bash
-# Start the mining daemon
-minerd
-
 # Start darkfid (example uses localnet) 
 # Start darkfid (example uses localnet) 
 darkfid --network 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
 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.