HomeAltaCoin

Setup Electroneum(ETN) Mining pool

Setup Electroneum(ETN) Mining pool

This a step by step guide on how to setup your own crypto-currency mining pool. This guide is going over how to setup an Electroneum(etn) mining pool . This is meant to setup a mining pool for a SINGLE CRYPTO CURRENCY. This is not a guide for a Multipool!!!!

If you want to see what it looks like before you set it all up, head to the Electroneum(etn) mining pool .

For this guide purpose I will be using Electroneum(etn) Crypto Currency .

Requirements

 

Setup

At this point you should have your VPS started, putty up and running and your logged in as root.

Update Ubuntu

apt-get update
apt-get dist-upgrade

Setup SWAP

I am setting up a 4GB swap, which may be overkill but it’s the most common swap sized used in most guides so ill keep it at that.

dd if=/dev/zero of=/mnt/myswap.swap bs=1M count=4000
mkswap /mnt/myswap.swap
swapon /mnt/myswap.swap

Now let’s add it into fstab so it’ll activate at boot.

nano /etc/fstab

Add the following line at the end of the file.

/mnt/myswap.swap none swap sw 0 0

Ctrl+O to save, and Ctrl+X to exit the nano editor.

Now your swap is setup, you can modify the size in the future if you need more or less.

Install Required Packages

apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
apt-get install libboost-all-dev git npm nodejs nodejs-legacy libminiupnpc-dev redis-server
add-apt-repository ppa:bitcoin/bitcoin
apt-get update
apt-get install libdb4.8-dev libdb4.8++-dev
curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | sh
source ~/.profile
nvm install 0.10.25
nvm use 0.10.25

 

Electroneum Daemon Setup (Wallet)

Now let’s setup the coin daemon, I will be using electroneum.

Now boot up putty .

Build electroneum binaries from source

1) Download the latest github .zip file and unzip it in a working directory
https://github.com/electroneum/electroneum

2) Open a terminal in the unzipped directory

3) Type in:
sudo apt-get update
sudo apt-get install build-essential cmake pkg-config libboost-all-dev
libunbound-dev libminiupnpc-dev libunwind8-dev libldns-dev libexpat1-dev
libgtest-dev doxygen graphviz

4) Run cmake:
cmake .

Watch closely if all the dependencies are met or if it informs you about missing dependencies – this is crucial. The error message about readline can be safely ignored.

5) Run make:
make

 

After issuing “ls” you will see many files are in the directory. you need to start demon now so that it will start sync to blockchain network

./electroneumd

You can see demon is starting and you can see that it started syncing with network . Depend on your vps network speed it will take some time to fully sync .

** On the other hand we can do this sync process faster by using this command so what ever you like you can do it

 

Now we need to verify and link to Electroneum network to current state

./electroneumd

You can see all list of detail and showing that it connect to network success message ..

now

exit

you need to use exit command so that it will save the sync done otherwise you have to again do the sync process

Finally start the electroneum daemon, which most likely, u will want running in detached/background mode;
./electroneumd --detach

Mining Pool Setup

We will use node-cryptonote-pool to setup the pool and front end site.

  1. Downloading and Installing

Clone the repository and run npm update for all the dependencies to be installed:

cd
git clone https://github.com/electroneum/electroneum-pool.git pool
cd pool
npm update

Once the above process done we need to copy the config_example.json to active configuration to so your pool start working

cp config_example.json config.json

This will copy all default config file data to active config file “ config.json

2. Configuration

Warning for Cyrptonote coins other than electroneumd: this software may or may not work with any given cryptonote coin. Be wary of altcoins that change the number of minimum coin units because you will have to reconfigure several config values to account for those changes. Unless you’re offering a bounty reward – do not open an issue asking for help getting a coin other than electroneumd working with this software.

Now start up the wincp and put your root login detail to start up once done head over to

/root/pool folder and right click on config.json and edit now you can see all config detail as per below mention and you can edit as per your need .

Explanation for each field:

{
    "coin": "electroneum",
    "symbol": "ETN",
    "logging": {
        "files": {
            "level": "info",
            "directory": "logs",
            "flushInterval": 5
        },

        "console": {
            "level": "info",
            "colors": true
        }
    },
    "poolServer": {
        "enabled": true,
        "clusterForks": "auto",
        "poolAddress": "WALLETADDRESSHERE",
        "blockRefreshInterval": 1000,
        "minerTimeout": 900,
        "ports": [
            {
                "port": 3333,
                "difficulty": 100,
                "desc": "Low end hardware"
            },
            {
                "port": 5555,
                "difficulty": 2000,
                "desc": "Mid range hardware"
            },
            {
                "port": 7777,
                "difficulty": 10000,
                "desc": "High end hardware"
            }
        ],
        "varDiff": {
            "minDiff": 2,
            "maxDiff": 100000,
            "targetTime": 100,
            "retargetTime": 30,
            "variancePercent": 30,
            "maxJump": 100
        },
        "shareTrust": {
            "enabled": true,
            "min": 10,
            "stepDown": 3,
            "threshold": 10,
            "penalty": 30
        },
        "banning": {
            "enabled": true,
            "time": 600,
            "invalidPercent": 25,
            "checkThreshold": 30
        },
        "slushMining": {
            "enabled": false,
            "weight": 300,
            "lastBlockCheckRate": 1
        }
    },
    "payments": {
        "enabled": true,
        "interval": 600,
        "maxAddresses": 10,
        "mixin": 0,
        "transferFee": 1,
        "minPayment": 10000,
        "denomination": 100
    },
    "blockUnlocker": {
        "enabled": true,
        "interval": 30,
        "depth": 20,
        "poolFee": 1.8,
        "devDonation": 0.1,
        "coreDevDonation": 0.1
    },
    "api": {
        "enabled": true,
        "hashrateWindow": 600,
        "updateInterval": 3,
        "port": 8117,
        "blocks": 30,
        "payments": 30,
        "password": "test"
    },
    "daemon": {
        "host": "127.0.0.1",
        "port": 26968
    },
    "wallet": {
        "host": "127.0.0.1",
        "port": 26969
    },
    "redis": {
        "host": "127.0.0.1",
        "port": 6379,
        "auth": null
    }
}

3. [Optional] Configure cryptonote-easy-miner for your pool
Your miners that are Windows users can use cryptonote-easy-miner which will automatically generate their wallet address and stratup multiple threads of simpleminer. You can download it and edit the config.ini file to point to your own pool. Inside the easyminer folder, edit config.init to point to your pool details

pool_host=example.com
pool_port=5555

Rezip and upload to your server or a file host. Then change the easyminerDownload link in your config.json file to point to your zip file.

4. Start the pool
node init.js

This will show all running and start accepting share for your pool

we need to now install forever so that this pool will remain running even on close of ssh

npm install forever -g

once installation done final start the pool

forever start init.js

Example screenshot of running the pool in single module mode with tmux.

5. Host the front end

Simply host the contents of the website_example directory on file server capable of serving simple static files.

Edit the variables in the website_example/config.js file to use your pool’s specific configuration. Variable explanations:

/* Must point to the API setup in your config.json file. */
var api = "http://poolhost:8117";

/* Minimum units in a single coin, for Electroneum its 100. */
var coinUnits = 100;

/* Pool server host to instruct your miners to point to.  */
var poolHost = "poolhost.com";

/* IRC Server and room used for embedded KiwiIRC chat. */
var irc = "irc.freenode.net/#electroneum";

/* Contact email address. */
var email = "support@poolhost.com";

/* Market stat display params from https://www.cryptonator.com/widget - Not used for Electroneum pool */
var cryptonatorWidget = ["XMR-BTC", "XMR-USD", "XMR-EUR", "XMR-GBP"];

/* Download link to cryptonote-easy-miner for Windows users. */
var easyminerDownload = "https://github.com/zone117x/cryptonote-easy-miner/releases/";

/* Used for front-end block links. */
var blockchainExplorer = "https://blockexplorer.electroneum.com/block/";

/* Used by front-end transaction links. */
var transactionExplorer = "https://blockexplorer.electroneum.com/tx";

6. Customize your website

The following files are included so that you can customize your pool website without having to make significant changes to index.html or other front-end files thus reducing the difficulty of merging updates with your own changes:

  1. custom.css for creating your own pool style
  2. custom.js for changing the functionality of your pool website

 

Then simply serve the files via nginx, Apache, Google Drive, or anything that can host static content.

Congratulations You have now your own electroneum Mining Pool Ready to Start

If you liked this guide, please donate to me as well!

Donations

BTC: 18xRnsa828YALPgbvjRXQuQ63QqikPbKxq

  • Cryptadd

    Followed this guide for 2 hours again and again and it keeps producing the same error. https://pastebin.com/HPpWQNdd

    • sumit pradhan

      so dependency is missing you need again clone and then make

      • Cryptadd

        Tried that and it still isnt working?

        • sumit pradhan

          provide me login detail to sumitpradhan85@gmail.com and will see it how this can be done

          • Rook

            I have the same issue as Cryptadd.

            Did you found any solution?

          • sumit pradhan

            yes use 16.04 and it will work

    • Rook

      Using Ubuntu 16.04 did the trick for me.

  • Muhamad Ghazali Hasan

    Thank you for sharing your experience in setting up ETN mining pool.

    However, as a Linux newbie, I stuck at “Build electroneum binaries from source” where I can’t execute ./electroneumd command, no where can this file be found in Ubuntu server.

    Appreciate if you could assist.

    Thank you.

    Regards,
    Ghazali
    Singapore

    • sumit pradhan

      you can find it in electroneum/build/bin folder

      • Muhamad Ghazali Hasan

        hold on, let me check & revert

        • Muhamad Ghazali Hasan

          I redo it again and now building cxx object..

          • sumit pradhan

            first build it and once done

            run it in screen

            this command

            ./electroneumd

            it will start syncing to network

          • Muhamad Ghazali Hasan

            Sync in progress…!!!

          • sumit pradhan

            Good

          • Muhamad Ghazali Hasan
          • sumit pradhan

            your demon and rpc demon is not running

          • Muhamad Ghazali Hasan

            how to run rpc demon?

          • sumit pradhan

            ./electroneum-wallet-rpc –wallet-file your-wallet-name –password your-wallet-password –rpc-bind-port 26969 –disable-rpc-login

      • Muhamad Ghazali Hasan

        Yes, electroneumd is inside bin folder.
        Can I just key in electroneum and press ENTER?

      • Muhamad Ghazali Hasan

        Okay, I managed to execute ./electroneumd
        And it is now in sync with ETN 56513 blocks

  • chris

    https://uploads.disquscdn.com/images/8e574ed2306b25f4d07bdf365c61bc464751a249bc5912c0ea797f47ebee7de0.jpg

    THIS IS THE ERROR WHEN I TRY TO RUN ./bin/electroneumd can you help me @su@disqus_N1LH522xbx:disqus thanks

    • sumit pradhan

      reboot your server and then try again

      • chris

        i did and same error

        • sumit pradhan

          then you have not build the demon properly ..sir . send detail to sumitpradhan85@gmail.com so i can see it

          • chris

            please check your email. i sent you putty config. also can you show me how you fixed it ?

  • Proud and Deplorable

    Im a little confused with downloading the binary files to a working directory? do I create this directory and name it or is there a directory I need to use?

    • sumit pradhan

      git clone https://github.com/electroneum/electroneum.git

      then cd electroneum

      sudo
      apt-get update sudo apt-get install build-essential cmake pkg-config
      libboost-all-dev libunbound-dev libminiupnpc-dev libunwind8-dev
      libldns-dev libexpat1-dev libgtest-dev doxygen graphviz

      cmake .
      make

  • Kostantinos Moure

    Can someone explain me the following?
    “1) Download the latest github .zip file and unzip it in a working directory
    https://github.com/electroneum/electroneum

    2) Open a terminal in the unzipped directory

    3) Type in:
    sudo apt-get update
    sudo apt-get install build-essential cmake pkg-config libboost-all-dev
    libunbound-dev libminiupnpc-dev libunwind8-dev libldns-dev libexpat1-dev
    libgtest-dev doxygen graphviz”

    1)Do i have to type wget https://github.com/electroneum/electroneum.git ??
    How to unzip it?
    2) Open a terminal?? isn’t it open already (from putty??)?? if no how to open?
    3) one command is sudo apt-get update the other command is al the other?
    is this -> sudo apt-get install build-essential cmake pkg-config libboost-all-dev
    libunbound-dev libminiupnpc-dev libunwind8-dev libldns-dev libexpat1-dev
    libgtest-dev doxygen graphviz an one command ?

  • noname

    Any ide why the webinterface is not working properly? Pool is up and running and the website is hosted via Apache2, but all i get is a circle, that seems to be waiting for some data.
    The API is correctly set in the config.js file https://uploads.disquscdn.com/images/0daad2ce0f7f07568bde3765eae1f33e367d154cee79fd7bdaa3253537176528.png .

    • sumit pradhan

      That mean your api is not able to get data to show in site ..so there is some issue may be .. provide me login detail so i can check it sumitpradhan85@gmail.com

      • noname

        After trying to fix this several times, i found, that i was missing the folders from the website example in the apache folder. after copying these, everything is working well.

  • Information Lord

    Do we need to change IP in this http://prntscr.com/hm92g7 to our VPS IP?
    If not? Then how to get the url to mine on! Thank You

    • sumit pradhan

      No you dont have to change where you mention you just need to keep as it is .. when mine use your vps ip it will work rest of the ip mention is for internal working

      • Information Lord

        Well, Please check your mail sumitpradhan85@gmail.com
        I have sent you the detailed problem with my server credentials!