HowTo run and connect to PoW Miner pool

From Veriblock Wiki
Jump to: navigation, search

See: Main_Page, NodeCore_Networking

See also: List_of_mining_pools_testnet

Overview

A brand new pool will start at Current Round = 1, as the Current Round is based on number of blocks won... not to be confused with the current blockchain height

  • Current Round: X - the blocks that have been won by this pool. This increments each time the pool wins a new block.
  • Pool Mining Block: Y - the current block the pool is working on
  • Blockchain height: Z - the height of the blockchain

Once a round is won, then the pool payouts the reward from the block proportionally to all the shares submitted.

For example, if you mine on a pool for 10 minutes, and it wins a block (block time is targeted for every 30 seconds, other pools may win other blocks in the meantime), and you contributed 10% of the shares to that round, then you will receive approximately 10% of the block reward (less pool fees).

Technical note - The pool data is stored in the file: "\testnet\poolshares-normal.txt". Is that is deleted, then the html page will start anew.

Pool 1b.png

Setup a Pool

Modify the nodecore.properties file:

#Allow the pool statistics page to be reachable from any remote host
pool.stats.bind.address=0.0.0.0

#Allow the UCP pool server to be reachable from any remote host
ucp.mining.bind.address=0.0.0.0
  1. Run an instance of NodeCore
  2. In the NodeCore_CommandLine, run startpool, either for CPU or GPU. Note that one instance of nodecore supports only 1 pool. If you want both a CPU and GPU, then you'll need to run two instances of NodeCore, one for each.
    1. Run 'startpool CPU'
    2. Run 'startpool GPU'
  3. Make note of the public IP (pool miners will connect to this)
  4. Open firewall ports for 8500/tcp and 8501/tcp such that other clients can connect

Opening firewall ports will vary per OS and version. One set of commands is:

firewall-cmd --permanent --add-port=8500/tcp
firewall-cmd --permanent --add-port=8501/tcp
firewall-cmd --reload

Choose a CPU or GPU pool

A pool can be either CPU or GPU. Simply pass in the type to the command line:

#CPU
startpool CPU

#GPU
startpool GPU

Set the auto-restart option

For better pool stability, set nodecore.properties to auto-restart the pool. When nodecore starts (or restarts), it will automatically start the pool without needing to run the NC_CLI startpool command.

pool.standard.autostart = GPU

For a solo pool, just specify the address:

pool.solo.autostart=V5QCsNjm8nzqWi1ymHtF3GWPEDsd2g

Set the Pool Fee

Set these 2 nodecore.property values, and then restart nodecore:

pool.operator.fee -> Decimal value between 0 and 1, representing a percentage, i.e. 0.01 = 1%
pool.operator.address the address that should receive the operator fee

Connect to an Existing Pool

  1. Run the PoW Miner
  2. Specify thread count to mine on
  3. Connect to the IP and port provided by the pool owner (Note that pools generally want to maximize users, to pools binding to 0.0.0.0 allow connections from any IP)
  4. Enter the address to mine to (run getinfo from the NodeCore_CommandLine)

You can see pool results by viewing the web page:

http://<IP_Address>:8500

API

View a specific address

Not really an API, but will highlight address in the HTML page and show an address summary

http://testnet-pool-gpu.veriblock.org:8500?address=VEcTwuZfAmBABEFTguoYgyQVR55Job


Pool address highlight.png

View pool summary

Breakign change, as of 0.3.4:

http://testnet-pool-gpu.veriblock.org:8500/api/summary

{
  "network": "TestNet",
  "poolType": "GPU",
  "poolAddress": "VJ2WZN7nB4AVDJZc2Sg1whwJLAUPNr",
  "fee": 0.0,
  "currentRoundNumber": 2,
  "miningBlockNumber": 48267,
  "lastBlockNumber": 48266,
  "lastBlockHash": "00000000000187D3269B861CA088C7C188D8617A74E89993",
  "recentRoundsIncluded": 1,
  "recentRoundsTotalShares": 183,
  "recentRoundsAverageShares": 183,
  "recentHashRate": 1209198484,
  "displayAddress": false,
  "recentRoundsSingleAddressShares": 0,
  "recentRoundsSingleAddressPercent": 0.0,
  "applicationVersion": "VeriBlock NodeCore v0.3.4",
  "nodeCoreStartTime": 1538408980,
  "timestamp": "Oct 1, 2018 6:01:33 PM"
}

FAQ

Should I pool or solo mine?

Joining a pool reduces the variance.

If you join a pool, you are more likely to get a trickle of rewards because the pool has higher hashing rate, but splits among all the members. Pools will also have an operator fee, but that is negligible.

  • If you join a bigger pool (more hashes), then you are likely to get a more frequent trickle, but of smaller rewards because it's split among more people
  • If you join a smaller pool (less hashes), then you are likely to get less frequent rewards... but when (if) they come they'll be larger because it's split among less people

If you solo mine, when (if) you do a get a reward then you get the whole thing. If you solo mine at 1/10000 of the total network hash, statistically within 10000 blocks you will win a block and get the whole reward.

There is not a right or wrong answer to (1) Should I join a pool or solo mine, or (2) should I join a big pool or a small pool.

What is the difference between a CPU vs. GPU pool?

CPU and GPU should connect to different pools.

On a high-end GPU, the GPU miner is roughly 400 times faster than the CPU miner on a high-end CPU.

In order to accommodate both types of mining, we have two different modes for the pool software which either accept shares at an appropriate difficulty for CPU miners, or an appropriate difficulty for GPU miners. Solo pools do not have to do this, because they can simply allow shares at any difficulty to be submitted, as the number of shares submitted by a particular miner is not relevant to payouts (since all payouts go to one address).

The pool software when running in GPU mode will accept shares that represent roughly 4.26 GH of mining, and in CPU mode will accept shares that represent roughly 16.7 MH of mining. If mining on a public pool (a pool where other people are also mining), please ensure that the pool is running in the appropriate mode for your miner.

How do I know if I'm connecting to a CPU or GPU pool?

NodeCore pool should clearly tell. If it does not, ask the pool operator to upgrade NodeCore.

For example, this is a CPU pool:

Pool html CPU.png

GPU pool should say "GPU".

Pool html GPU.png

Troubleshooting

Cannot see the pool web page

Check for http (as in http://<IP_Address>:8500), not https

Ensure that the nodecore.properties file has been updated per above steps (and NodeCore was restarted).

Ensure that firewall ports are open for 8500/tcp and 8501/tcp

I start the pool but another computer can not connect its IP

Set this option in your nodecore.properties file (See: Nodecore.properties)

ucp.mining.bind.address=0.0.0.0

And restart NodeCore and the pool software

Error: unable to start pool Starting pool failed: the port 8500 is already bound on 127.0.0.1!

Ensure that the nodecore.properties file is updated per above, and restart nodecore.

Pool is stuck at round 1

Troubleshooting questions to check:

  • Is there a miner connecting to it?
  • If you run NC_CLI getinfo, does it show the latest block (i.e. does NodeCore appear to be updating)?

Pool is stuck at block X

This should not happen, but if it does... have the administrator restart nodecore on the server.

General Troubleshooting tips

Make sure that it works locally:

  • You can connect a miner on 127.0.0.1
  • You can view the html page at http://127.0.0.1:8500
  • You can connect NC_CLI on 127.0.0.1 and run getInfo and it shows the latest block

Make your you're connecting to the right ports:

The website is on port 8500
http://111.194.224.159:8500/

The miner connects to port 8501
111.194.224.159:8501