QRL Testnet Pool Setup — QRL Testnet Pool Setup
QRL uses the RandomX protocol and can be mined collectively using a centralized pool server and a collection of computers running mining software. This guide will walk through the steps required to get a Testnet pool up and running using Our GithHub Fork of the popular cryptonote-nodejs-pool software. This fork has been modified to run the QRL blockchain. You can use this as a basis for integrating QRL into your Pool or hosting your own private pool. It is assumed that the appropriate security measures have been taken to secure the server hosting this pool software. Please follow best practice and keep software up to date. Running a mining pool is not something that should be taken lightly. You need to have a good understanding of multiple complex administration and security practices. Requirements Hardware minimum 4GB RAM 2 Core CPU Support for AES-NI Support for avx2 64 bit Processor high bandwidth network connection Dedicated IP address Software and OS This guide uses Ubuntu 18.04LTS python 3.6 All required dependencies specified in the Pool software repo QRL Install Follow the instructions found docs.theqrl.org/node/QRLnode/ to get the testnet node started. Make sure to issue the start_qrl --network-type testnet to start the testnet node. Start QRL and Sync Edit or create the configuration file to give the QRL testnet node instructions on how to run. By default the node will look in `` You may need to create this directory if you have not started the testnet node previously. The active qrl testnet configuration will be found at ~/.qrl-testnet/config.yml Ensure these minimum configuration settings are set along with the rest of the testnet configuration. mining_enabled: False enable_peer_discovery: True mining_api_enabled: True public_api_enabled: True In the end your configuration file should read something close to this. The peer details and heasderhash will change over time as the network is reset: peer_list: [ 18.130.83.207" "209.250.246.234" "136.244.104.146" "95.179.154.132" ] genesis_prev_headerhash: 'The Testnet Genesis' genesis_timestamp: 1530004179 genesis_difficulty: 5000 db_name: 'testnet-state' mining_enabled: False enable_peer_discovery: True mining_api_enabled: True public_api_enabled: True Make sure to restart the node to pickup the changes. start_qrl --network-type testnet Check the state of the qrl node with qrl state Verify the local node blockheight matches the testnet block explorer. This may take some time to sync fully. grpcProxy The QRL requires a bridge between the RPC and gRPC that QRL utilizes. The proxy handles the communication between the pool and the QRL node. To use the proxy you must have a slaves.json file named payment_slaves.json in your ~/.qrl-testnet directory. To generate this file first you need a QRL wallet. QRL CLI Wallet Generate a new QRL wallet using the QRL node CLI. With the node running enter: # Creates a QRL wallet qrl wallet_gen --height 12 --hash_function shake128 --encrypt The cli will ask for an encryption password to encrypt the file. This password will be required every time this wallet is needed typically to generate a new slave tree in the distant future. DO not lose this password There now is a wallet.json file in the local directory the command was issued in. Backup this file to a secure location for future use if needed. This is the new pool wallet. Now generate slave trees to use for sending payments through the pools automated system. QRL payment_slaves.json With the encrypted QRL Wallet.json file can create a slave tree file. This file contains a new set of One Time Signatures (OTS) generated from the main address that the pool will use to send transactions. See more on the XMSS slave trees in our Documentation To generate a slave file from the wallet we just created run the following command. This will create the slaves tree and broadcast a transaction onto the QRL network allowing the set of slaves to be used. qrl slave_tx_generate --src 0 --master '' --number_of_slaves 100 --access_type 0 --fee .001 This will create a new file called slaves.json in the same directory you are in sign the message and send onto the network. This transaction will require a small fee to broadcast to the network. Make sure you have enough funds to cover the fee. If needed visit the testnet faucet for funds to make this transaction. Move the slaves.json file to the ~/.qrl-testnet directory and rename to payment_slaves.json Start the QRL_gRPC_Proxy Run the proxy with the following: qrl_grpc_proxy --network-type=testnet Note: This wll use the default testnet directory ~/.qrl-testnet . Ports Check to see that you have open ports for the pool to communicate on using netstat netstat -tulnp This will print all of the open ports on the server. Ensure ports 18090 19007 19009 are open and available for the pool. Pool Install To install the pool follow the instructions in the GitHub Repository. This will guide you through the dependencies and various steps to getting the pool software installed. Please use the configuration found at the end of these docs to connect to the QRL node and wallet. this file lives at the root of the pool directory as config.json Install Web Server You will need a web server setup somewhere pointed at the pool API port. See the README.md in the pool Github for instructions on setting up the web front end. There is an additional configuration file needed to host the web server. Most importantly ensure the port is available to the web server and you can reach the address or IP externally. var api = "http://pool.FQDN_OR_IP:8117"; Pool Config File Copy the /config_examples/qrl.json file found in the repository to /config.json and overview each option. Change any to match your preferred setup however pay attention to the following few configurations as they are important. { "poolAddress": "Q01060019b0f4ce8ea82e71a5fc60851541db7e515d2585247c70533487cc89c50f6dddb8a4f386" "daemon": { "host": "127.0.0.1" "port": 18090 } "wallet": { "host": "127.0.0.1" "port": 18090 } } Start The Pool With the QRL node fully synced and running slaves.json file in the correct place ~/.qrl/config.yml file correctly filled out and the qrl_grpc_proxy running you can start the pool. from the root pool directory run node init.js Enjoy"