Coder Social home page Coder Social logo

kadena-mining-stratum's Introduction

Kadena Mining Stratum

  • Allows ASIC miners for the Kadena Blockchain to be able to talk directly with a Chainweb-Node eliminating the need to rely on third party pools to mine a free and open source Blockchain.

A very special thanks to Greg from Icemining

Dependencies

The Kadena Mining stratum was built on and tested with Ubunutu 20.04.2 LTS

The Kadena Mining Stratum is Dependant on the Kadena Chainweb-Node

To install the Kadena Mining Stratum:

Dependencies ####

apt update
apt upgrade
apt install nodejs mysql-server redis-server


Configuring sql ####

First setup mysql with new password

mysql_secure_installation
Change the root password? [Y/n] y
Remove anonymous users? [Y/n] n
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

Import the pool.sql file to create the necessary tables

mysql -u username -p kdapool < pool.sql

Configuring Chainweb ####

Second run the Chainweb-Node with the provided config.yaml file, make sure to edit the hostname (your WAN IP) and change the account and public keys to match the wallet you would like to mine to, as well as the port if desired.

./Chainweb-node --config-file=config.yaml

IMPORTANT! do not run the stratum untill the node is synced up with the rest of the network!!

It can take a very long time for the node to sync up so be patient, check https://yourip:port/chainweb/0.0/mainnet01/cut in a browser to see what the current block height of your node is and compare it with the Block Explorer, do not run the stratum untill your node matches the height of the explorer.

Running the stratum ####

Lastly, run the init.js script found in the stratum folder making sure to change the public keys and mysql password in the stratum/.env file as well as the ports for the stratum if desired in the pool_configs/kadena.json file You will also need to make sure that the ports you have configured are open and forwarded correctly.

node init.js

Example stratum/.env file

SOLVED=/chainweb/0.0/mainnet01/mining/solved
WORK=/chainweb/0.0/mainnet01/mining/work
PUBKEY=caf062921c1b781f69f20c5c4ad7e697262017dd98a59380e3b3f16308ae5a90(your wallet here)
CUT=/chainweb/0.0/mainnet01/cut
PORT=3443
NODE_NET=mainnet01
NODE1=YourIp
NODE2=IpOfBackupNode1
NODE3=IpOfBackupNode2
STRATUMID=US
COIN_ID=2423

**Note: NODE1, NODE2, AND NODE3 can all be the same node, but ideally it is best to have at least one backup node. **

Example pool_configs/kadena.json file

"address": "",

"rewardRecipients": {
    "RDsffBxPZh2SXonPPhvER8cCUwaeaeHbRq": 0.0
}, 

"paymentProcessing": {
    "enabled": false,
    "paymentInterval": 20,
    "minimumPayment": 70,
    "daemon": {
        "host": "127.0.0.1",
        "port": 19332,
        "user": "testuser",
        "password": "testpass"
    }
},

"ports": {
    "3700": {
        "diff": 17592186044416 
    },
    "3701": {
            "diff": 1099511627776 
    }
},
"daemons": [
    {
        "host": "YOUR_WAN_IP",
        "port": 443,
        "user": "",
        "password": ""
    }
],

"p2p": {
    "enabled": false,
   "host": "127.0.0.1",
    "port": 8767,
    "disableTransactions": false
},

"mposMode": {
    "enabled": true,
    "host": "127.0.0.1",
    "port": 3306,
    "user": "root",
    "password": "MY_SQL_DB_ROOT_PASSWORD",
    "database": "MYSQL_DB_NAME",
    "checkPassword": false,
    "autoCreateWorker": true
}

It is reccomended to run both the Stratum and the Chainweb-node using something like tmux so that neither will die upon ssh disconnect.

apt install tmux
https://tmuxcheatsheet.com/

Happy Mining!

I will be happy to help you get the stratum setup from start to finish for a one time fee, please reach out via discord or telegram to harmonic if interested.

If you have any issues or need assistance please reach out via:
Discord: Harmonic#4240
Telegram: https://t.me/cmpool_io_chat

Dontations are highly appreciated!!

KDA: caf062921c1b781f69f20c5c4ad7e697262017dd98a59380e3b3f16308ae5a90
BTC: 3Mdes4zKuEBtS7xTCKZSarP3dApNGFNuEC
ETH: 0xFb52a503F129C5e38F8b815e06C8EbDA41D313DD

kadena-mining-stratum's People

Contributors

h4rmonic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kadena-mining-stratum's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.