Browse Source

some updates

pull/2/head
jahway603 3 years ago
parent
commit
25e648201e
  1. 34
      CONFIGURE.md
  2. 28
      README.md
  3. 2
      config_example.json
  4. 16
      gencfg.sh

34
CONFIGURE.md

@ -0,0 +1,34 @@
# Configuration notes
## Table of Contents
* [Setup Config](#setup-config)
* [Setup your coin file](#setup-your-coin-file)
* [Setup your pool config](#setup-your-pool-config)
* [Notes](#notes)
* [License](#license)
## Setup Config
1. Open your new [config.json](config_example.json) and edit the following:
1. Change `"forks": 1` to `"forks: auto`.
1. Change `"stratumHost": "stratum.hushpool.io"` to your server.
## Setup your coin file
1. Change directory to coins.
1. You will see [HUSH](coins/hush.json) there as an example.
1. I then recommend you change the "hush.json example by
[reading and learning from this repo](https://github.com/zone117x/node-stratum-pool#module-usage) to configure your own coin's file.
## Next, setup your pool
1. Change directory to the pool_configs directory.
1. You will see the [hushsolo example](pool_configs/hushsolo.json) there, which you can use to start from.
1. If you want to setup more than a solo pool, then I suggest learning what each
option does [from this link](https://github.com/zone117x/node-open-mining-portal)
as well as [checking these config out](https://github.com/z-classic/z-nomp/tree/master/pool_configs) to do so.
## License
Released under the GNU General Public License v2
http://www.gnu.org/licenses/gpl-2.0.html

28
README.md

@ -19,6 +19,8 @@ It will directly use your host system's network so you can connect to the coin d
The ports it listens on must not be in use, this includes 8080 for the website, 6379 for redis and any ports you open for stratums (default is 3333).
It is currently untested, but config.json has the ports as line items, so perhaps they can be changed in that file.
### Requirements
[Install Docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/)
@ -29,9 +31,9 @@ cd ./hnomp
cp config_example.json config.json
```
Setup your [config.json](./config_example.json), `./coins/` and `./pool_configs/` here. Can reference [hushsolo](pool_configs/hushsolo.json) to help you.
* **Next follow this [new config document](CONFIGURE.md) and then come back to this one & start to get Docker up and running.**
Then run the following command.
Then run the following command in the hnomp directory.
```
docker-compose up &
```
@ -41,7 +43,7 @@ docker-compose up &
docker-compose down
```
### Docker rebuild and update
### To rebuild and update Docker version
```
docker-compose down
docker rmi knomp_knomp
@ -57,7 +59,7 @@ docker-compose up &
* Redis (see https://redis.io/topics/quickstart for details)
### Upgrade
Please be sure to backup your `./coins` and `./pool_configs` directory before upgrading
**Please be sure to backup your `./coins` and `./pool_configs` directory before upgrading**
Kill your running pool (CTRL-C)
```shell
@ -68,7 +70,9 @@ npm start
```
### Install Daemon
Some initial setup
Note: This setup from here-on applies to both Docker and bare-metal installations.
```shell
# The following packages are needed to build both Hush and this stratum:
sudo apt-get update
@ -76,25 +80,25 @@ sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoco
```
Now, let's build the Hush daemon. In order to not duplicate documentation, please follow the instructions in the [hush3 repository here](https://git.hush.is/hush/hush3/src/branch/master/INSTALL.md) before proceeding.
Now, let's run the assets. This will start ALL of the assets might take a day or so to sync, depending on system speed/network connection.
Now, start up the Hush deamon which should start downloading its blockchain. This might take a couple of hours to a day to sync, depending on system speed/network connection.
_If you are setting up a single chain to mine and/or don't know what pubkey is, skip this step and use the startup params for the hushd daemon as provided by the individual coin's team._
```shell
cd ~/hush3/src
./assetchains
./smartchains
```
### Install Pool
Once all the chains you want on your pool have synced up we can configure the stratum.
Once all the blockchains you want on your pool have synced up we can configure the stratum.
We need node and npm installed
We need node and npm installed to start and recommend you install them via your Linux OS's package manager.
```shell
cd ~
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
```
Now, let's build our stratum and run it. This will install the pool and configure it for all the assetchains on your system automatically. It must be run from the same user as the coin deamons were launched, as it pulls the rpcuser/pass from the conf file in the home directory.
Now, let's build our stratum and run it. This will install the pool and configure it for all the smartchains on your system automatically. It must be run from the same user as the coin deamons were launched, as it pulls the rpcuser/pass from the conf file in the home directory.
```shell
git clone https://git.hush.is/hush/hnomp.git
cd ./hnomp
@ -103,11 +107,11 @@ cp config_example.json config.json (and configure it)
nano gencfg.sh
```
Edit line 3 in so that it has your own HUSH based address, CTRL-X then Y to save and exit
Edit line 7 to your own HUSH based address...
We need to generate the coins files (coin daemon must be running!): `gencfg.sh <coin name>`
You can run just gencfg.sh with no coin name to use the assetchains.json in hush3/src directory for all coins. Make sure you edit the template with the correct values you want before running the config generator.
You can run just gencfg.sh with no coin name to use the smartchains.json in hush3/src directory for all coins. Make sure you edit the template with the correct values you want before running the config generator.
Finally we are ready to start the pool software

2
config_example.json

@ -37,7 +37,7 @@
"enabled": true,
"host": "0.0.0.0",
"port": 8080,
"stratumHost": "stratum.piratepool.io",
"stratumHost": "stratum.hushpool.io",
"template": "default",
"stats": {
"updateInterval": 30,

16
gencfg.sh

@ -1,17 +1,21 @@
#!/bin/bash
# Copyright (c) 2021 The Hush Developers
# Distributed under the GPLv2 software license, see the accompanying
# file LICENSE or https://www.gnu.org/licenses/gpl-3.0.en.html
#
# Put the address to mine to here
walletaddress=
#Change to path of komodo-cli here
komodoexec=~/komodo/src/komodo-cli
# Change to path of hush-cli here
hushexec=/usr/bin/hush-cli
# Any coins you would like to skip go here
declare -a skip=("BEER" "PIZZA")
declare -a skip=("BEER" "PIZZA" "DANK")
# Stratum port to start with
stratumport=3030
cli="komodo-cli"
cli="hush-cli"
coinsdir=./coins
poolconfigdir=./pool_configs
coinstpl=coins.template
@ -41,7 +45,7 @@ fi
listassetchains () {
if [[ $specificchain = "0" ]]; then
~/komodo/src/listassetchains
~/hush3/src/listassetchains
else
echo $specificchain
fi
@ -65,7 +69,7 @@ listassetchains | while read chain; do
magicrev=$(echo ${magic:6:2}${magic:4:2}${magic:2:2}${magic:0:2})
p2pport=$(echo $getinfo | jq '.p2pport')
thisconf=$(<~/.komodo/$chain/$chain.conf)
thisconf=$(<~/.hush/$chain/$chain.conf)
rpcuser=$(echo $thisconf | grep -Po "rpcuser=(\S*)" | sed 's/rpcuser=//')
rpcpass=$(echo $thisconf | grep -Po "rpcpassword=(\S*)" | sed 's/rpcpassword=//')

Loading…
Cancel
Save