0% found this document useful (0 votes)
176 views13 pages

Create A Node Open Mining Portal Docker Container Part 2 - Explosive Cloud

This document discusses configuring a Node Open Mining Portal (NOMP) Docker container. It covers creating a config.json file, which is the main configuration for NOMP. The config.json sets values like the log level, clustering settings, default pool configurations, and website settings to start a basic Verium mining pool using NOMP in a Docker container.

Uploaded by

jojoosinga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
176 views13 pages

Create A Node Open Mining Portal Docker Container Part 2 - Explosive Cloud

This document discusses configuring a Node Open Mining Portal (NOMP) Docker container. It covers creating a config.json file, which is the main configuration for NOMP. The config.json sets values like the log level, clustering settings, default pool configurations, and website settings to start a basic Verium mining pool using NOMP in a Docker container.

Uploaded by

jojoosinga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

HOME (HTTPS://EXPLOSIVE.CLOUD/) / DEVOPS (HTTPS://EXPLOSIVE.CLOUD/CATEGORY/DEVOPS/)


/ CREATE A NODE OPEN MINING PORTAL DOCKER CONTAINER (PART 2) (HTTPS://EXPLOSIVE.CLOUD/?P=71)

CREATE A NODE OPEN MINING


PORTAL DOCKER CONTAINER
(PART 2)
PUBLISHED ON 21 MARCH 2024 (HTTPS://EXPLOSIVE.CLOUD/?P=71)

BY TYLER JURGENS (HTTPS://EXPLOSIVE.CLOUD/AUTHOR/TJURGENS/)

This entry is part 6 of 0 in the series How to start a Verium mining Search … SEARC
pool (https://explosive.cloud/series/how-to-start-a-verium-mining-
pool/)

How to start a Verium mining pool


(https://explosive.cloud/series/how-to-start-a-verium-mining-
pool/)

In Part 1 (https://explosive.cloud/create-a-node-open-mining-
(https://vexpert.vmware.com/direc
portal-docker-container-part-1/) of creating a NOMP Docker
Container, we covered creating a Dockerfile and docker-
entrypoint.sh for our own NOMP image, creating the folders
we need, building the image and adding it to our docker-
compose.yml. However, even after all this work, we still do not
have a fully configured NOMP instance. For that, we’re going
 (https://community.veeam.com/p/v
to need to setup a couple configuration files.
(https://explosive.cloud)


(mailto:[email protected])
https://explosive.cloud/?p=71&preview=true 1/13
3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

config.json
The config.json is the main configuration for NOMP. For a
basic VRM mining pool, most of this configuration will be
disabled. Still, without this configuration NOMP won’t start, so
let’s put in the values we need.

(https://tanzu.vmware.com/vangua

(https://tanzu.vmware.com/vangua

RECENT POSTS
(https://tanzu.vmware.com/vangua
(https://tanzu.vmware.com/vangua

(https://tanzu.vmware.com/vangua

Tuning Minio – Ethernet


Settings
(https://explosive.cloud/set-
minio-rx-and-tx-buffers/)

VMware Cloud Director – VAMI


Backup Failure
(https://explosive.cloud/vmware-
cloud-director-vami-backup/)

NSX – Node with the same IP


already exists
(https://explosive.cloud/nsx-
same-ip-already-exists/)

Minio and Veeam – Cleaning


up Expired DeleteMarkers
 (https://explosive.cloud/minio-
(https://explosive.cloud) and-veeam-cleaning-up-
expired-delete-markers/)


(mailto:[email protected])
https://explosive.cloud/?p=71&preview=true 2/13
3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

Configuring VMware NSX Backups


{
Using SSH Keys
"logLevel": "debug",
(https://explosive.cloud/configuring
"logColors": true,
vmware-nsx-backups-using-ssh-
keys/)
"cliPort": 17117,

"clustering": {
"enabled": true,
RECENT COMMENTS
"forks": "auto"
Tyler Jurgens
},
(https://explosive.cloud) on
NSX – Node with the same IP
"defaultPoolConfigs": {
already exists
"blockRefreshInterval": 1000,
(https://explosive.cloud/nsx-
"jobRebroadcastTimeout": 55,
same-ip-already-
"connectionTimeout": 900,
exists/#comment-4064)
"emitInvalidBlockHashes": false,
"validateWorkerUsername": true,
"tcpProxyProtocol": false, Fernando on NSX – Node with
"banning": { the same IP already exists
"enabled": true, (https://explosive.cloud/nsx-
"time": 2400, same-ip-already-
"invalidPercent": 20, exists/#comment-4050)
"checkThreshold": 20,
"purgeInterval": 600
},
ARCHIVES
"redis": {
"host": "redis",
February 2024
"port": 6379
(https://explosive.cloud/2024/02/)
}
},
January 2024
"website": { (https://explosive.cloud/2024/01/)

"enabled": false,
"host": "0.0.0.0", September 2023
 "port": 8880, (https://explosive.cloud/2023/09/)
(https://explosive.cloud)
"stratumHost": "poolium.win",
 "stats": {
August 2023
"updateInterval": 60,
 (https://explosive.cloud/2023/08/)
"historicalRetention": 4320
(mailto:[email protected])
https://explosive.cloud/?p=71&preview=true 3/13
3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

0,
June 2023
"hashrateWindow": 300
(https://explosive.cloud/2023/06/)
},
"adminCenter": {
"enabled": false, May 2023
"password": "admincenterpass (https://explosive.cloud/2023/05/)
word"
} October 2020
}, (https://explosive.cloud/2020/10/)

"redis": {
"host": "redis", CATEGORIES
"port": 6379
}, Backup & Disaster Recovery
(https://explosive.cloud/category/b
"switching": { disaster-recovery/)
"switch1": {
"enabled": false,
DevOps
"algorithm": "scrypt-n",
(https://explosive.cloud/category/d
"ports": {
"3399": {
"diff": 6, Minio
"varDiff": { (https://explosive.cloud/category/m
"minDiff": 1,
"maxDiff": 512, NSX
"targetTime": 1 (https://explosive.cloud/category/n
5,
"retargetTime":
Veeam
90,
(https://explosive.cloud/category/v
"variancePercen
t": 30
} VMware

} (https://explosive.cloud/category/v

}
}, VMware Cloud Director
 "switch2": { (https://explosive.cloud/category/v
(https://explosive.cloud)
"enabled": false, cloud-director/)
 "algorithm": "scrypt",
"ports": { Web
 "4444": {
(mailto:[email protected]) (https://explosive.cloud/category/w

https://explosive.cloud/?p=71&preview=true 4/13
3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

"diff": 10,
"varDiff": {
"minDiff": 16, TAGS
"maxDiff": 512,
"targetTime": 1 Caddy Docker

5,
"retargetTime": Docker Compose
90,
"variancePercen
Grafana Influxdb
t": 30
}
} Minio Nsx
}
}, Telegraf Veeam
"switch3": {
"enabled": false,
VMware
"algorithm": "x11",
"ports": {
"5555": { VMware Cloud Director
"diff": 0.001,
"varDiff": {
"minDiff": 0.00
1,
"maxDiff": 1,
"targetTime": 1
5,
"retargetTime":
60,
"variancePercen
t": 30
}
}
}
}
},

(https://explosive.cloud)
"profitSwitch": {
 "enabled": false,
"updateInterval": 600,
 "depth": 0.90,
(mailto:[email protected])
https://explosive.cloud/?p=71&preview=true 5/13
3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

"usePoloniex": true,
"useCryptsy": true,
"useMintpal": true,
"useBittrex": true
}
}

The main sections to pay attention to above are the


“clustering”, “defaultPoolConfigs” and “redis” sections. You’ll
remember how we set up a Memcached and Redis Docker
container (https://explosive.cloud/create-a-redis-and-
memcache-docker-container/)earlier in this series, here is
where we start to utilize the Redis container.

For “clustering” we always want to enable clustering with auto


forks. This allows NOMP to deploy multiple threads for the
workers on our pool. Given a decent multithreaded processor,
NOMP can perform quite well when enabling clustering. The
amount of CPU horsepower you need will be dependent on the
hashing power your pool recieves from the workers.

For “defaultPoolConfigs”, leave the settings as I have


configured above. Make sure to set the “redis” subsection
here to your Redis server we configured earlier. Since we
named our Redis instant in our docker-compose.yml file to
“redis” we can simply use “redis” and the default Redis port.

Now, due to how NOMP works, there are two sections in this
config that utilize a Redis instance. We can reuse the same
Redis instance for both without any problem, so make sure to
set the “redis” section further down in the config to our Redis
instance on the default Redis port.

We don’t utilize the NOMP website or any algorithm switching,


 so the rest of the sections can be set to false as you see
(https://explosive.cloud)
above.

This config.json file we will place in our /data/vnomp
 directory. We mapped this file directly in our docker-
(mailto:[email protected])
compose.yml file in part 1 (https://explosive.cloud/create-a-
https://explosive.cloud/?p=71&preview=true 6/13
3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

node-open-mining-portal-docker-container-part-1/).

coins/verium.json
The verium.json coin file is critical to a successful NOMP
instance for VRM. Without this file, NOMP would have no idea
how to work with this coin. Luciky for you, this file can now be
found in mderasse’s v-nomp github repository. Back when I
first started a mining pool, this file did not exist.

{
"name": "Verium",
"symbol": "VRM",
"algorithm": "scrypt-n",
"reward": "POS",
"hasGetInfo": false,
"peerMagic": "70352205",
"peerMagicTestnet": "cdf2c0ef",
"timeTable": {
"1048576": 100
}
}

The contents of this file should not be modified at all. Leave


this alone, just make sure your file matches.

Save this file as /data/vnomp/coins/verium.json

pool_configs/verium.json
The verium.json file located in the pool_configs folder is the
real brains as to how NOMP will be configured for your pool.
Its a bit long, but I’ll explain it all at the end.


(https://explosive.cloud)


(mailto:[email protected])
https://explosive.cloud/?p=71&preview=true 7/13
3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

{
"enabled": true,
"coin": "verium.json",

"address": "<a verium1/2 address her


e>",

"paymentProcessing": {
"enabled": false,
"paymentInterval": 20,
"minimumPayment": 5,
"daemon": {
"host": "verium",
"port": 33987,
"user": "mywalletrpcuser",
"password": "some!long!rando
m.string"
}
},

"ports": {
"3332": {
"diff": 0.06,
"varDiff": {
"minDiff": 0.03,
"maxDiff": 0.9,
"targetTime": 100,
"retargetTime": 135,
"variancePercent": 30
}
},
"3333": {
"diff": 0.09,
"varDiff": {
 "minDiff": 0.07,
(https://explosive.cloud)
"maxDiff": 1.0,
 "targetTime": 100,
"retargetTime": 135,

"variancePercent": 30
(mailto:[email protected])
https://explosive.cloud/?p=71&preview=true 8/13
3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

}
},
"3334": {
"diff": 0.5,
"varDiff": {
"minDiff": 0.1,
"maxDiff": 1,
"targetTime": 100,
"retargetTime": 135,
"variancePercent": 30
}
}
},

"daemons": [
{
"host": "verium1",
"port": 33987,
"user": "mywalletrpcuser",
"password": "some!long!rando
m.string"
},
{
"host": "verium2",
"port": 33997,
"user": "mywalletrpcuser",
"password": "some!long!rando
m.string"
}

],

"p2p": {
"enabled": true,
"host": "verium1",
 "port": 33988,
(https://explosive.cloud)
"disableTransactions": true
 },

 "mposMode": {
(mailto:[email protected])
https://explosive.cloud/?p=71&preview=true 9/13
3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

"enabled": true,
"host": "db",
"port": 3306,
"user": "pooluser",
"password": "my.super.top.secre
t.password",
"database": "mpos",
"checkPassword": true,
"autoCreateWorker": false
},

"mongoMode": {
"enabled": false,
"host": "127.0.0.1",
"user": "",
"pass": "",
"database": "ltc",
"authMechanism": "DEFAULT"
}

For this config, we’ll have to reference back to a few settings


set in both the Create a Verium Wallet
(https://explosive.cloud/create-a-verium-wallet-image/) guide
and the Create a MySQL Docker Container
(https://explosive.cloud/create-a-mysql-instance/) guide.
Specifically, the passwords for the pooluser and RPC ports for
the verium1 and verium2 Docker Containers.

Starting at the top of this config with "enabled": true, we


want to enable this config for use. NOMP is pretty smart, you
can run multiple mining pools on one NOMP instance, each of
which would have a .json file, and each can be enabled or

disabled.
(https://explosive.cloud)
 With "coin": "verium.json", we reference the coin
config json we mentioned above.

(mailto:[email protected])
https://explosive.cloud/?p=71&preview=true 10/13
3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

For "address": "<a verium1/2 address here>", we


want to make sure we have an address listed here from our
wallet.dat. Running the command docker-compose exec
verium1 verium-cli listaddressgroupings will give us
all the addresses associated with this wallet, choose one of
them and keep it handy.

The "paymentProcessing" section we keep disabled.


MPOS will handle our payments, so we don’t want to confuse
things by having NOMP run payments as well.

For "ports": { there is no real right or wrong way to handle


these ports. Until you can learn more about the different
difficulty settings, just stick to what I have above. If you really
want to run a low difficulty port (suitable for SBCs and low end
CPUs), you can add this port settings below.

"3331": {
"diff": 0.005,
"varDiff": {
"minDiff": 0.00001,
"maxDiff": 0.005,
"targetTime": 100,
"retargetTime": 135,
"variancePercent": 30
}
},

You can run as many difficulty ports as you like, each with
their own settings. Keep in mind though, a high-end miner
(someone with a lot of hashing power) on a low difficulty port
such as this will absolutely hammer your NOMP resources,
and is commonly considered a “dick move
 (https://i.imgur.com/mLAjKr1.gifv)“. The settings to tweak are
(https://explosive.cloud)
always going to be “diff”, “minDiff” and “maxDiff”. Where “diff”
 is the difficulty the miners will start at, “minDiff” is the lowest


(mailto:[email protected])
https://explosive.cloud/?p=71&preview=true 11/13
3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

difficulty the miner can be adjusted to, and “maxDiff” will be


the highest difficulty the miner can be adjusted to. Always
keep “diff” within the min-max range.

The "daemons": [ section is where you reference your


verium1 and verium2 Docker Containers created earlier
(https://explosive.cloud/create-a-verium-wallet-image/).

In "p2p": { you will reference the first verium docker


container “verium1”.

The daemons and p2p sections are how NOMP talks to the
wallets to determine work to distribute to the miners, and
identifying when blocks are found.

The last important section is "mposMode": { . This section


we tell NOMP that there will be a php-mpos front end in use,
and to save the share data into the mpos database we
created in the MySQL Docker (https://explosive.cloud/create-
a-mysql-instance/) part of this series. Make sure to reference
your MySQL database by the “db” name, or whatever name
you may have used in your docker-config.yml to reference your
MySQL container.

Save this file as /data/vnomp/pool_configs/verium.json

Recap
Once you’ve created all these files and mounted them
accordingly in your docker-compose.yml file (see part 1
(https://explosive.cloud/create-a-node-open-mining-portal-
docker-container-part-1/)) your NOMP container should work
like a charm, and you’re ready to setup php-mpos, arguably the
most complex container… at least it was for me, when I was
trying to make this all work.


(https://explosive.cloud)
(/#facebook) (/#twitter) (/#reddit)
(/#email) (/#wechat) (/#linkedin)

(https://www.addtoany.com/share#url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Fexplosive.cloud%2F%3Fp%3D71&title

(mailto:[email protected])
https://explosive.cloud/?p=71&preview=true 12/13
3/21/24, 8:10 AM Create a Node Open Mining Portal Docker Container (Part 2) - Explosive Cloud

 DEVOPS (HTTPS://EXPLOSIVE.CLOUD/CATEGORY/DEVOPS/)

E D I T ( H T T P S : // E X P L O S I V E . C L O U D / W P -
A D M I N / P O S T. P H P ? P O S T = 7 1 & A C T I O N = E D I T )

LEAVE A REPLY
Logged in as Tyler Jurgens. Edit your profile (https://explosive.cloud/wp-admin/profile.php). Log out?
(https://explosive.cloud/wp-login.php?
action=logout&redirect_to=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Fexplosive.cloud%2F%3Fp%3D71&_wpnonce=541394605b
Required fields are marked *

Comment *

POST COMMENT

This site uses Akismet to reduce spam. Learn how your


comment data is processed (https://akismet.com/privacy/).

COPYRIGHT © ALL RIGHTS RESERVED. THEME: MINIMAL GRID


(HTTPS://WWW.THEMEMATTIC.COM/THEME/MINIMAL-GRID/) BY THEMEMATTIC
(HTTPS://THEMEMATTIC.COM/)


(https://explosive.cloud)


(mailto:[email protected])
https://explosive.cloud/?p=71&preview=true 13/13

You might also like