Amoveo Mining Pool
Warning, if you are re-syncing your amoveo full node, make sure to turn off the mining pool first.
This is a mining pool for the Amoveo blockchain.
You must be in
sync_mode:normal(). in order to run the mining pool.
A mining pool has a server. The server runs a full node of Amoveo so that they can calculate what we should be mining on next.
A mining pool has workers. The workers all ask the server what to work on, and give their work to the server.
The server pays the worker some money.
Some of the work can be used to make blocks to pay the server.
This software is only for the server. Different kinds of workers can connect to Amoveo Mining Pool, if they know your ip address and the port you are running this mining pool server on. By default it uses port 8085.
=== Turning it on and off
First make sure you have an Amoveo node running, and that the keys are unlocked on that node.
To connect to it, so you can give it commands:
If it says "Node is not running!", this means that the Amoveo mining pool is shut off and there is nothing for you to connect to. So try using start.sh again to turn it on.
To disconnect, and allow it to run in the background, hold the CTRL key, and press D.
Then to turn it off, make sure you are attached, and run:
=== Configure your node
the config file is here There are comments in the config file to explain what each thing is for.
!!! WARNING !!!
Make sure to update the
pubkey value in config.erl
=== internal commands
Make a blockchain transaction to pay this person the Veo they own:
^ pay_veo/1 is useful if someone wants to stop mining, and they can't afford to get to the limit where it automatically pays out.
give one share to this account:
give_share is run every time a miner submits enough work to solve a share.
Look up the data for an account:
Make a copy of the current accounts database, and store it in variable V.
V = accounts:check().
got_reward/0 is run every time the pool finds a block. It is used to convert shares into Veo stored on the pool.
pay_veo/0 is for scanning the accounts to see if anyone has enough veo that we should make a tx to send them to veo.
final_reward/0 is the command you run if you want to shut off the mining pool. Make sure that you have enough veo in your account first. This pays everyone about enough so that you don't under-reward the people who mine that last few blocks.
This is the command for looking up the total amount of veo that we owe to miners. Make sure that your full node's account balance stays above this amount, that way you can afford to pay everyone:
=== API commands
curl -i -d '["mining_data"]' http://188.8.131.52:8085
returns something like:
curl -i -d '["mining_data", 8383]' http://184.108.40.206:8085 curl -i -d '["mining_data","BCjdlkTKyFh7BBx4grLUGFJCedmzo4e0XT1KJtbSwq5vCJHrPltHATB+maZ+Pncjnfvt9CsCcI9Rn1vO+fPLIV4="]' http://220.127.116.11:8085
both these commands do the same thing, because the second part is ignored.
They both return something that looks like this:
This version doesn't send any entropy, and it sends the share difficulty twice. This is to make the API compatible with AmoveoPool style miners.
Look up the total number of shares
curl -i -d '["account", 2]' http://18.104.22.168:8085
Yes it is poorly named. the encrypter github project needs to expand it's vocabulary.
it returns something like this:
Look up an account
curl -i -d '["account", "BCjdlkTKyFh7BBx4grLUGFJCedmzo4e0XT1KJtbSwq5vCJHrPltHATB+maZ+Pncjnfvt9CsCcI9Rn1vO+fPLIV4="]' http://22.214.171.124:8085
It returns something like this:
curl -i -d '["work", Nonce, "BCjdlkTKyFh7BBx4grLUGFJCedmzo4e0XT1KJtbSwq5vCJHrPltHATB+maZ+Pncjnfvt9CsCcI9Rn1vO+fPLIV4="]' http://126.96.36.199:8085
Where Nonce is a base64 encoded string of a 23 byte binary of the Nonce.