komodo-solo-pool is a project designed for solo-mining Komodo (KMD) and its assetchains.
469
komodo-solo-pool is a project designed for solo-mining Komodo (KMD) and its assetchains using NiceHash or multiple Equihash ASICs. This pool allows miners to connect and mine directly to their own daemon, providing an efficient and straightforward way to participate in the Komodo ecosystem.
komodo-solo-pool is based on the node-stratum-pool module from the joshuayabut repository but includes several improvements for compatibility with modern Node.js versions and enhanced functionality.
One significant enhancement is the rewriting of the equihashverify package to be compatible with the new V8 API. This is achieved using the NAN (Native Abstraction for Node.js) library, ensuring compatibility across different Node.js and V8 versions.
The pool is dockerized, allowing for easy deployment and management. It reads configuration parameters from a .env file, providing a simple way to customize settings without modifying the code.
docker pull deckersu/komodo-solo-pool:latest
Create a .env file in the project root directory with the following content:
# Coin and Pool Settings
COIN=KMD
REWARDS_ADDRESS=YOUR_WALLET_ADDRESS
# Stratum Ports
STRATUM_HIGH_DIFF_PORT=3333
STRATUM_LOW_DIFF_PORT=4444
# Daemon Configuration
DAEMON_HOST=127.0.0.1
DAEMON_RPC_PORT=YOUR_DAEMON_RPC_PORT
DAEMON_RPC_USER=YOUR_DAEMON_RPC_USER
DAEMON_RPC_PASS=YOUR_DAEMON_RPC_PASSWORD
DAEMON_P2P_PORT=YOUR_DAEMON_P2P_PORT
USE_DAEMON_COINBASE=false
COIN - Specifies a unique identifier for the cryptocurrency that the pool will mine. This can be any name, such as KMD or Komodo, regardless of how you choose to specify it.
REWARDS_ADDRESS - The wallet address from the daemon's wallet where mining rewards will be deposited.
STRATUM_HIGH_DIFF_PORT - Port number with high local difficulty for big ASIC farms or services like Nicehash.
STRATUM_LOW_DIFF_PORT - Port number with low local difficulty, for use with a single ASIC or GPU.
DAEMON_HOST - The hostname or IP address where the cryptocurrency daemon is running. Use 127.0.0.1 if the daemon is on the same machine (dHost Networking), or host.docker.internal in case of Bridge Networking. See below.
DAEMON_RPC_PORT - The port number for the daemon's RPC (Remote Procedure Call) interface. This port allows the pool to communicate with the daemon for tasks like fetching blockchain data and submitting blocks.
DAEMON_RPC_USER - The username for authenticating with the daemon's RPC interface.
DAEMON_RPC_PASS - The password for authenticating with the daemon's RPC interface.
DAEMON_P2P_PORT - The port number used by the daemon for peer-to-peer (P2P) network communication. This port facilitates communication with other nodes in the cryptocurrency network.
USE_DAEMON_COINBASE is a parameter (when set to true) that allows the pool to derive the coinbase from the daemon's block template. Regardless of the REWARDS_ADDRESS you set, the coinbase will not be constructed by the pool itself, but will instead be obtained from the daemon's getblocktemplate RPC. This is particularly useful for mining CC-enabled chains, such as MCL (Marmara Credit Loops). Using this option in MCL will help you mine activated blocks.
Replace the placeholders with your actual configuration values.
There are two main methods to run the pool: using host networking and using bridge networking. We recommend using host networking in most cases.
Host networking allows the container to share the host's network stack, which simplifies network configurations and improves performance.
docker run --rm -d \
--env-file .env \
--network host \
--user $(id -u):$(id -g) \
--name kmd-pool \
deckersu/komodo-solo-pool
In this case, the .env file should have DAEMON_HOST set to localhost:
DAEMON_HOST=127.0.0.1
Note: When using host networking, you do not need to map ports using the -p option.
If you prefer or require bridged networking, you can run the container as follows. This method requires additional configuration to allow the container to communicate with the Komodo daemon running on the host.
Add the following lines to your daemon configuration file (komodo.conf):
rpcallowip=172.17.0.0/16
rpcbind=172.17.0.1
server=1
rpcallowip: Allows RPC connections from the Docker subnet (172.17.0.0/16).rpcbind: Binds the RPC service to the Docker bridge interface (172.17.0.1).server=1: Enables the daemon to accept RPC commands.Note: 172.17.0.1 is the default IP address of the docker0 interface, and 172.17.0.0/16 is its subnet. You can use the daemon-config-params.sh script to retrieve these parameters.
.env FileSet DAEMON_HOST to host.docker.internal in your .env file:
DAEMON_HOST=host.docker.internal
docker run --rm -d \
-p 3333:3333 \
-p 4444:4444 \
--env-file .env \
--add-host=host.docker.internal:host-gateway \
--user $(id -u):$(id -g) \
--name kmd-pool \
deckersu/komodo-solo-pool
-p 3333:3333 -p 4444:4444: Maps the container's stratum ports to the host.--add-host=host.docker.internal:host-gateway: Maps host.docker.internal to the host's gateway IP address, allowing the container to communicate with services running on the host.If you would like to run the container in interactive mode, use the following command:
docker run --init --rm -it \
-p 3333:3333 \
-p 4444:4444 \
--env-file .env \
--add-host=host.docker.internal:host-gateway \
--user $(id -u):$(id -g) \
--name kmd-pool \
deckersu/komodo-solo-pool
Note: The --init flag runs an init inside the container that forwards signals and reaps processes.
After running the Docker container, two stratum ports will be available:
3333): Configured for NiceHash or mining rigs with high hash rates.4444): Suitable for single GPUs or ASICs, useful for starting new assetchains.Before starting mining, ensure that the pool can communicate with the Komodo daemon via RPC. You can test the RPC connection using the following curl command:
curl --user YOUR_DAEMON_RPC_USER:YOUR_DAEMON_RPC_PASSWORD \
--data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' \
-H 'Content-Type: text/plain;' \
http://127.0.0.1:YOUR_DAEMON_RPC_PORT/
Replace the placeholders with your actual daemon RPC user, password, and port.
If the RPC connection is working correctly, you should receive a JSON response containing the daemon's information.
https://github.com/DeckerSU/komodo-solo-pool
This project is licensed under the MIT License. See the LICENSE file for details.
Content type
Image
Digest
sha256:6c527c0eb…
Size
175.6 MB
Last updated
almost 2 years ago
docker pull deckersu/komodo-solo-pool